From aafdaa2fc2f62cbd493fdb924ba008440a63b8ad Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 14:13:00 +0200 Subject: [PATCH 01/51] update --- cli/asc.js | 15 + tests/compiler/assert-nonnull.optimized.wat | 55 +- tests/compiler/builtins.optimized.wat | 32 +- tests/compiler/call-optional.optimized.wat | 36 +- tests/compiler/call-super.optimized.wat | 159 +- tests/compiler/class.optimized.wat | 119 +- tests/compiler/constructor.optimized.wat | 89 +- tests/compiler/declare.optimized.wat | 5 +- tests/compiler/do.optimized.wat | 691 +- tests/compiler/exports.optimized.wat | 61 +- .../extends-baseaggregate.optimized.wat | 365 +- tests/compiler/for.optimized.wat | 751 +- .../function-expression.optimized.wat | 95 +- tests/compiler/function-types.optimized.wat | 118 +- tests/compiler/getter-call.optimized.wat | 30 +- tests/compiler/if.optimized.wat | 75 +- .../implicit-getter-setter.optimized.wat | 241 +- tests/compiler/infer-array.optimized.wat | 418 +- tests/compiler/infer-generic.optimized.wat | 35 +- tests/compiler/infer-type.optimized.wat | 5 +- .../inlining-blocklocals.optimized.wat | 5 +- tests/compiler/inlining.optimized.wat | 87 +- tests/compiler/instanceof-class.optimized.wat | 99 +- tests/compiler/issues/1095.optimized.wat | 310 +- tests/compiler/logical.optimized.wat | 5 +- tests/compiler/loop-flow.optimized.wat | 65 +- tests/compiler/managed-cast.optimized.wat | 414 +- tests/compiler/many-locals.optimized.wat | 22 +- tests/compiler/new.optimized.wat | 49 +- tests/compiler/number.optimized.wat | 487 +- .../optional-typeparameters.optimized.wat | 46 +- tests/compiler/rc/global-init.optimized.wat | 5 +- tests/compiler/rc/local-init.optimized.wat | 263 +- .../rc/logical-and-mismatch.optimized.wat | 345 +- .../rc/logical-or-mismatch.optimized.wat | 347 +- tests/compiler/rc/optimize.optimized.wat | 299 +- tests/compiler/rc/rereturn.optimized.wat | 229 +- .../rc/ternary-mismatch.optimized.wat | 356 +- tests/compiler/reexport.optimized.wat | 11 - tests/compiler/resolve-access.optimized.wat | 309 +- tests/compiler/resolve-binary.optimized.wat | 334 +- .../resolve-elementaccess.optimized.wat | 271 +- .../resolve-function-expression.optimized.wat | 360 +- tests/compiler/resolve-new.optimized.wat | 36 +- .../resolve-propertyaccess.optimized.wat | 270 +- tests/compiler/resolve-ternary.optimized.wat | 426 +- tests/compiler/resolve-unary.optimized.wat | 287 +- .../retain-release-sanity.optimized.wat | 740 +- tests/compiler/retain-release.optimized.wat | 124 +- tests/compiler/retain-return.optimized.wat | 537 +- tests/compiler/rt/instanceof.optimized.wat | 90 +- tests/compiler/rt/stub-realloc.optimized.wat | 90 +- tests/compiler/runtime-full.optimized.wat | 208 +- tests/compiler/runtime-stub.optimized.wat | 93 +- tests/compiler/scoped.optimized.wat | 5 +- tests/compiler/std/array-access.optimized.wat | 51 +- .../compiler/std/array-literal.optimized.wat | 402 +- tests/compiler/std/array.optimized.wat | 8672 +++++---- tests/compiler/std/arraybuffer.optimized.wat | 576 +- tests/compiler/std/dataview.optimized.wat | 573 +- tests/compiler/std/date.optimized.wat | 38 +- tests/compiler/std/libm.optimized.wat | 584 +- tests/compiler/std/map.optimized.wat | 6510 ++++--- tests/compiler/std/math.optimized.wat | 5518 +++--- tests/compiler/std/mod.optimized.wat | 47 +- tests/compiler/std/new.optimized.wat | 49 +- .../compiler/std/object-literal.optimized.wat | 170 +- tests/compiler/std/object.optimized.wat | 158 +- .../std/operator-overloading.optimized.wat | 729 +- tests/compiler/std/pointer.optimized.wat | 92 +- tests/compiler/std/set.optimized.wat | 3614 ++-- tests/compiler/std/static-array.optimized.wat | 284 +- tests/compiler/std/staticarray.optimized.wat | 449 +- .../std/string-casemapping.optimized.wat | 1379 +- .../std/string-encoding.optimized.wat | 987 +- tests/compiler/std/string.optimized.wat | 4617 +++-- tests/compiler/std/symbol.optimized.wat | 401 +- tests/compiler/std/typedarray.optimized.wat | 15006 +++++++++++----- tests/compiler/switch.optimized.wat | 170 +- tests/compiler/typeof.optimized.wat | 63 +- tests/compiler/while.optimized.wat | 715 +- 81 files changed, 38601 insertions(+), 24272 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index c88ec45bd3..8a56263d65 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -643,6 +643,21 @@ exports.main = function main(argv, options, callback) { const passes = []; function add(pass) { passes.push(pass); } + // console.log('AlwaysInlineMaxSize: ' + module.getAlwaysInlineMaxSize()); + // console.log('FlexibleInlineMaxSize: ' + module.getFlexibleInlineMaxSize()); + // console.log('OneCallerInlineMaxSize: ' + module.getOneCallerInlineMaxSize()); + + if (optimizeLevel >= 2 && shrinkLevel < 2) { + module.setAlwaysInlineMaxSize(10); + module.setFlexibleInlineMaxSize(50); + module.setOneCallerInlineMaxSize(50); + } else { + // tune defaults + module.setAlwaysInlineMaxSize(5); // default: 2 + module.setFlexibleInlineMaxSize(30); // default: 20 + module.setOneCallerInlineMaxSize(30); // default: 15 + } + // Optimize the module if requested if (optimizeLevel > 0 || shrinkLevel > 0) { // Binaryen's default passes with Post-AssemblyScript passes added. diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 041fbf0e86..f062adab0c 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -67,12 +67,17 @@ end local.get $0 ) - (func $~lib/array/Array#__unchecked_get (; 4 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testArr (; 4 ;) (param $0 i32) (result i32) local.get $0 - i32.load offset=4 - i32.load - ) - (func $~lib/array/Array#__get (; 5 ;) (param $0 i32) (result i32) + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 19 + i32.const 9 + call $~lib/builtins/abort + unreachable + end i32.const 0 local.get $0 i32.load offset=12 @@ -86,7 +91,8 @@ unreachable end local.get $0 - call $~lib/array/Array#__unchecked_get + i32.load offset=4 + i32.load local.tee $0 i32.eqz if @@ -99,21 +105,7 @@ end local.get $0 ) - (func $assert-nonnull/testArr (; 6 ;) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 19 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/array/Array#__get - ) - (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 5 ;) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load offset=12 @@ -127,9 +119,10 @@ unreachable end local.get $0 - call $~lib/array/Array#__unchecked_get + i32.load offset=4 + i32.load ) - (func $assert-nonnull/testElem (; 8 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testElem (; 6 ;) (param $0 i32) (result i32) local.get $0 call $~lib/array/Array#__get local.tee $0 @@ -144,7 +137,7 @@ end local.get $0 ) - (func $assert-nonnull/testAll (; 9 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testAll (; 7 ;) (param $0 i32) (result i32) (local $1 i32) block $folding-inner0 local.get $0 @@ -170,7 +163,7 @@ call $~lib/builtins/abort unreachable ) - (func $assert-nonnull/testAll2 (; 10 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testAll2 (; 8 ;) (param $0 i32) (result i32) (local $1 i32) block $folding-inner0 local.get $0 @@ -196,17 +189,17 @@ call $~lib/builtins/abort unreachable ) - (func $~setArgumentsLength (; 11 ;) (param $0 i32) + (func $~setArgumentsLength (; 9 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $assert-nonnull/testFn (; 12 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testFn (; 10 ;) (param $0 i32) (result i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) ) - (func $assert-nonnull/testFn2 (; 13 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testFn2 (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -222,7 +215,7 @@ local.get $0 call_indirect (type $none_=>_i32) ) - (func $assert-nonnull/testRet (; 14 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testRet (; 12 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 0 global.set $~argumentsLength @@ -240,14 +233,14 @@ unreachable end ) - (func $assert-nonnull/testObjFn (; 15 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testObjFn (; 13 ;) (param $0 i32) (result i32) i32.const 0 global.set $~argumentsLength local.get $0 i32.load offset=4 call_indirect (type $none_=>_i32) ) - (func $assert-nonnull/testObjRet (; 16 ;) (param $0 i32) (result i32) + (func $assert-nonnull/testObjRet (; 14 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 0 global.set $~argumentsLength diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index a3ac08a301..bc9e6b8da1 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (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))) + (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -57,15 +57,7 @@ select select ) - (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -141,7 +133,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -158,10 +150,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -173,10 +173,10 @@ end i32.const 0 ) - (func $start:builtins~anonymous|0 (; 6 ;) + (func $start:builtins~anonymous|0 (; 5 ;) nop ) - (func $start:builtins (; 7 ;) + (func $start:builtins (; 6 ;) i32.const 31 global.set $builtins/i i32.const 0 @@ -849,7 +849,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 7 ;) call $start:builtins ) ) diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index 3385c7e707..a4cb568d6c 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param 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 16) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") @@ -10,14 +10,7 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $call-optional/opt (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - local.get $0 - local.get $1 - i32.add - i32.add - ) - (func $call-optional/opt|trampoline (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $call-optional/opt|trampoline (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -35,16 +28,17 @@ i32.const -2 local.set $2 end + local.get $2 local.get $0 local.get $1 - local.get $2 - call $call-optional/opt + i32.add + i32.add ) - (func $~setArgumentsLength (; 3 ;) (param $0 i32) + (func $~setArgumentsLength (; 2 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:call-optional (; 4 ;) + (func $start:call-optional (; 3 ;) i32.const 1 global.set $~argumentsLength i32.const 3 @@ -75,20 +69,6 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - i32.const 4 - i32.const 5 - call $call-optional/opt - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 6 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 1 global.set $~argumentsLength i32.const 3 @@ -136,7 +116,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) call $start:call-optional ) ) diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 2e9dd95f41..0b743e0505 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,9 +1,7 @@ (module (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -12,20 +10,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -33,16 +57,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -51,42 +75,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -97,10 +92,14 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $call-super/A#constructor (; 3 ;) (param $0 i32) (result i32) - local.get $0 + (func $call-super/B#constructor (; 2 ;) (result i32) + (local $0 i32) + i32.const 8 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.eqz if i32.const 4 @@ -124,14 +123,6 @@ unreachable end local.get $0 - ) - (func $call-super/B#constructor (; 4 ;) (result i32) - (local $0 i32) - i32.const 8 - i32.const 3 - call $~lib/rt/stub/__alloc - call $call-super/A#constructor - local.tee $0 i32.const 2 i32.store offset=4 local.get $0 @@ -160,8 +151,12 @@ end local.get $0 ) - (func $call-super/test1 (; 5 ;) + (func $~start (; 3 ;) (local $0 i32) + i32.const 64 + global.set $~lib/rt/stub/startOffset + i32.const 64 + global.set $~lib/rt/stub/offset call $call-super/B#constructor local.tee $0 i32.load @@ -187,9 +182,6 @@ call $~lib/builtins/abort unreachable end - ) - (func $call-super/D#constructor (; 6 ;) (result i32) - (local $0 i32) i32.const 8 i32.const 5 call $~lib/rt/stub/__alloc @@ -232,11 +224,6 @@ unreachable end local.get $0 - ) - (func $call-super/test2 (; 7 ;) - (local $0 i32) - call $call-super/D#constructor - local.tee $0 i32.load i32.const 1 i32.ne @@ -260,9 +247,10 @@ call $~lib/builtins/abort unreachable end - ) - (func $call-super/E#constructor (; 8 ;) (param $0 i32) (result i32) - local.get $0 + i32.const 8 + i32.const 7 + call $~lib/rt/stub/__alloc + local.tee $0 i32.eqz if i32.const 4 @@ -286,14 +274,6 @@ unreachable end local.get $0 - ) - (func $call-super/test3 (; 9 ;) - (local $0 i32) - i32.const 8 - i32.const 7 - call $~lib/rt/stub/__alloc - call $call-super/E#constructor - local.tee $0 i32.const 2 i32.store offset=4 local.get $0 @@ -320,9 +300,6 @@ call $~lib/builtins/abort unreachable end - ) - (func $call-super/H#constructor (; 10 ;) (result i32) - (local $0 i32) i32.const 8 i32.const 9 call $~lib/rt/stub/__alloc @@ -341,11 +318,6 @@ i32.const 2 i32.store offset=4 local.get $0 - ) - (func $call-super/test4 (; 11 ;) - (local $0 i32) - call $call-super/H#constructor - local.tee $0 i32.load i32.const 1 i32.ne @@ -369,9 +341,6 @@ call $~lib/builtins/abort unreachable end - ) - (func $call-super/J#constructor (; 12 ;) (result i32) - (local $0 i32) i32.const 8 i32.const 11 call $~lib/rt/stub/__alloc @@ -390,11 +359,6 @@ i32.const 2 i32.store offset=4 local.get $0 - ) - (func $call-super/test5 (; 13 ;) - (local $0 i32) - call $call-super/J#constructor - local.tee $0 i32.load i32.const 1 i32.ne @@ -419,15 +383,4 @@ unreachable end ) - (func $~start (; 14 ;) - i32.const 64 - global.set $~lib/rt/stub/startOffset - i32.const 64 - global.set $~lib/rt/stub/offset - call $call-super/test1 - call $call-super/test2 - call $call-super/test3 - call $call-super/test4 - call $call-super/test5 - ) ) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index fbcb9a9833..4dc2c18dc0 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,8 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) (data (i32.const 16) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") @@ -34,20 +32,46 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -55,16 +79,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -73,42 +97,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -119,10 +114,19 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 3 ;) (param $0 i32) (result i32) + (func $class/testGenericInitializer (; 2 ;) + (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 4 + i32.const 4 + call $~lib/rt/stub/__alloc + i32.const 16 + i32.const 5 + call $~lib/rt/stub/__alloc + local.set $0 i32.const 0 i32.const 0 call $~lib/rt/stub/__alloc @@ -157,34 +161,15 @@ i32.const 0 i32.store offset=8 local.get $0 - ) - (func $class/GenericInitializer#constructor (; 4 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 4 - i32.const 4 - call $~lib/rt/stub/__alloc - local.set $0 - i32.const 16 - i32.const 5 - call $~lib/rt/stub/__alloc - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=12 local.get $0 - local.get $1 i32.store - local.get $0 - ) - (func $class/testGenericInitializer (; 5 ;) - call $class/GenericInitializer#constructor - drop ) - (func $~start (; 6 ;) + (func $~start (; 3 ;) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index 6e8f9a5060..def857c975 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -17,20 +16,46 @@ (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -38,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -56,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -102,9 +98,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $start:constructor (; 2 ;) + (func $~start (; 1 ;) (local $0 i32) i32.const 16 global.set $~lib/rt/stub/startOffset @@ -172,7 +168,4 @@ local.get $0 global.set $constructor/ctorConditionallyAllocates ) - (func $~start (; 3 ;) - call $start:constructor - ) ) diff --git a/tests/compiler/declare.optimized.wat b/tests/compiler/declare.optimized.wat index 1c82844609..f455739c91 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -10,7 +10,7 @@ (data (i32.const 16) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") (export "memory" (memory $0)) (start $~start) - (func $start:declare (; 3 ;) + (func $~start (; 3 ;) call $declare/externalFunction global.get $declare/externalConstant i32.const 1 @@ -36,7 +36,4 @@ unreachable end ) - (func $~start (; 4 ;) - call $start:declare - ) ) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 679f0a64c1..f813930526 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -2,10 +2,10 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (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_=>_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,74 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $do/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - 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|0 - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testEmpty (; 6 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - br_if $do-continue|0 - end - local.get $0 - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 21 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testNested (; 7 ;) + (func $do/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -172,105 +105,7 @@ i32.const 1 global.set $do/ran ) - (func $do/testAlwaysTrue (; 8 ;) - (local $0 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $do-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 56 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testContinue (; 9 ;) - (local $0 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $do-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 107 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testNestedContinue (; 10 ;) - (local $0 i32) - (local $1 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - if - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.rem_s - br_if $do-continue|1 - end - br $do-continue|0 - end - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 125 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 90 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -436,7 +271,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -719,7 +554,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -833,7 +668,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -920,7 +755,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -977,54 +812,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1085,8 +873,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1110,8 +899,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -1159,80 +989,66 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $do/Ref#constructor (; 20 ;) (result i32) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - i32.const 208 - i32.gt_u + i32.const 208 + i32.gt_u if local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) - local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $do/testRef (; 22 ;) + (func $do/testRef (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $do-continue|0 local.get $1 @@ -1247,13 +1063,31 @@ local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end else - call $do/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $2 local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.tee $0 @@ -1282,42 +1116,74 @@ i32.const 1 global.set $do/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $do/testRefAutorelease (; 23 ;) + (func $do/testRefAutorelease (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $do/Ref#constructor + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $do-continue|0 block $do-break|0 - local.get $1 + local.get $2 i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 10 i32.eq if i32.const 0 - local.set $2 + local.set $1 local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 local.set $0 br $do-break|0 end - call $do/Ref#constructor - local.tee $2 - call $~lib/rt/pure/__release - local.get $2 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + local.set $3 + local.get $1 + i32.const 208 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 br_if $do-continue|0 end end - local.get $1 + local.get $2 i32.const 10 i32.ne if @@ -1340,35 +1206,81 @@ i32.const 1 global.set $do/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $start:do (; 24 ;) + (func $start:do (; 16 ;) + (local $0 i32) + (local $1 i32) i32.const 0 global.set $do/ran - call $do/testSimple - global.get $do/ran - i32.eqz + i32.const 10 + local.set $0 + loop $do-continue|0 + 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|0 + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 16 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran - call $do/testEmpty - global.get $do/ran - i32.eqz + i32.const 10 + local.set $1 + loop $do-continue|00 + local.get $1 + local.tee $0 + i32.const 1 + i32.sub + local.set $1 + local.get $0 + br_if $do-continue|00 + end + local.get $1 + i32.const -1 + i32.ne if i32.const 0 i32.const 32 - i32.const 26 - i32.const 0 + i32.const 21 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran call $do/testNested @@ -1384,17 +1296,30 @@ end i32.const 0 global.set $do/ran - call $do/testAlwaysTrue - global.get $do/ran - i32.eqz + i32.const 0 + local.set $0 + loop $do-continue|01 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $do-continue|01 + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 61 - i32.const 0 + i32.const 56 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran i32.const 1 @@ -1409,30 +1334,80 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/testContinue - global.get $do/ran - i32.eqz + i32.const 0 + local.set $0 + loop $do-continue|02 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $do-continue|02 + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 112 - i32.const 0 + i32.const 107 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran - call $do/testNestedContinue - global.get $do/ran - i32.eqz + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + loop $do-continue|03 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.ne + if + loop $do-continue|1 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.rem_s + br_if $do-continue|1 + end + br $do-continue|03 + end + end + local.get $1 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 131 + i32.const 125 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 90 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 126 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran call $do/testRef @@ -1460,7 +1435,7 @@ unreachable end ) - (func $~start (; 25 ;) + (func $~start (; 17 ;) global.get $~started if return @@ -1470,7 +1445,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1497,10 +1472,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 208 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1546,34 +1547,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 27 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 208 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index ed0e81b3c2..a783640e03 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -60,20 +60,28 @@ (func $exports/Car.getNumTires (; 2 ;) (result i32) i32.const 4 ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -81,16 +89,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -99,20 +107,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -127,27 +124,27 @@ local.get $1 i32.const 4 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $exports/Car#get:doors (; 5 ;) (param $0 i32) (result i32) + (func $exports/Car#get:doors (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:doors (; 6 ;) (param $0 i32) (param $1 i32) + (func $exports/Car#set:doors (; 5 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 7 ;) (param $0 i32) + (func $exports/Car#openDoors (; 6 ;) (param $0 i32) nop ) - (func $~start (; 8 ;) + (func $~start (; 7 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset ) - (func $exports/subOpt|trampoline (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 8 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -163,13 +160,13 @@ end local.get $0 local.get $1 - call $exports/subOpt + i32.sub ) - (func $~setArgumentsLength (; 10 ;) (param $0 i32) + (func $~setArgumentsLength (; 9 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $exports/Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 10 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -196,7 +193,7 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#constructor|trampoline (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index bfee7a0532..6d684d684a 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,13 +1,13 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 20) "\01") @@ -1054,54 +1054,9 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1109,32 +1064,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $extends-baseaggregate/A1#constructor (; 13 ;) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 20 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end 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 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1176,7 +1145,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1349,18 +1318,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 16 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - ) - (func $~lib/rt/tlsf/reallocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1416,10 +1374,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1454,13 +1412,19 @@ i32.const 556 i32.ge_u if + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock end local.get $3 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1671,7 +1635,7 @@ end end ) - (func $~lib/array/ensureSize (; 19 ;) (param $0 i32) + (func $~lib/array/ensureSize (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1730,9 +1694,38 @@ i32.store end ) - (func $~lib/array/Array#push (; 20 ;) (param $0 i32) + (func $~start (; 16 ;) + (local $0 i32) (local $1 i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 20 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + call $~lib/rt/tlsf/maybeInitialize + i32.const 20 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 i32.const 108 i32.load local.tee $1 @@ -1752,16 +1745,6 @@ i32.const 108 local.get $2 i32.store - ) - (func $start:extends-baseaggregate (; 21 ;) - (local $0 i32) - i32.const 20 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - call $extends-baseaggregate/A1#constructor - local.tee $0 - call $~lib/array/Array#push local.get $0 i32.const 556 i32.gt_u @@ -1772,10 +1755,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 22 ;) - call $start:extends-baseaggregate - ) - (func $~lib/rt/pure/markGray (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 17 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1799,7 +1779,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 18 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1812,7 +1792,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 19 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1846,7 +1826,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 20 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1874,12 +1854,18 @@ i32.add i32.const 5 call $~lib/rt/__visit_members + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock end ) - (func $~lib/rt/pure/__collect (; 27 ;) + (func $~lib/rt/pure/__collect (; 21 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1889,17 +1875,17 @@ global.get $~lib/rt/pure/ROOTS local.tee $5 local.tee $2 - local.set $3 + local.set $4 global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $3 + local.get $4 local.get $0 i32.lt_u if - local.get $3 + local.get $4 i32.load - local.tee $4 + local.tee $3 i32.load offset=4 local.tee $1 i32.const 1879048192 @@ -1916,10 +1902,10 @@ i32.const 0 end if - local.get $4 + local.get $3 call $~lib/rt/pure/markGray local.get $2 - local.get $4 + local.get $3 i32.store local.get $2 i32.const 4 @@ -1936,21 +1922,27 @@ i32.and select if + local.get $3 + local.get $3 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT - local.get $4 - call $~lib/rt/tlsf/freeBlock + local.get $3 + call $~lib/rt/tlsf/insertBlock else - local.get $4 + local.get $3 local.get $1 i32.const 2147483647 i32.and i32.store offset=4 end end - local.get $3 + local.get $4 i32.const 4 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -2000,91 +1992,65 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/__typeinfo (; 28 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 480 - i32.load - i32.gt_u - if - i32.const 384 - i32.const 448 - i32.const 22 - i32.const 27 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.shl - i32.const 484 - i32.add - i32.load - ) - (func $~lib/rt/pure/growRoots (; 29 ;) + (func $~lib/rt/pure/growRoots (; 22 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) global.get $~lib/rt/pure/CUR global.get $~lib/rt/pure/ROOTS - local.tee $1 + local.tee $0 i32.sub local.tee $2 i32.const 1 i32.shl - local.tee $0 + local.tee $1 i32.const 256 - local.get $0 + local.get $1 i32.const 256 i32.gt_u select - local.tee $3 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $0 local.get $2 call $~lib/memory/memory.copy - local.get $1 + local.get $0 if call $~lib/rt/tlsf/maybeInitialize - local.get $1 + local.get $0 call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + call $~lib/rt/tlsf/insertBlock end - local.get $0 + local.get $1 global.set $~lib/rt/pure/ROOTS - local.get $0 + local.get $1 local.get $2 i32.add global.set $~lib/rt/pure/CUR - local.get $0 + local.get $1 local.get $3 i32.add global.set $~lib/rt/pure/END ) - (func $~lib/rt/pure/appendRoot (; 30 ;) (param $0 i32) - (local $1 i32) - global.get $~lib/rt/pure/CUR - local.tee $1 - global.get $~lib/rt/pure/END - i32.ge_u - if - call $~lib/rt/pure/growRoots - global.get $~lib/rt/pure/CUR - local.set $1 - end - local.get $1 - local.get $0 - i32.store - local.get $1 - i32.const 4 - i32.add - global.set $~lib/rt/pure/CUR - ) - (func $~lib/rt/pure/decrement (; 31 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2120,9 +2086,15 @@ i32.const -2147483648 i32.store offset=4 else + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock end else local.get $1 @@ -2138,7 +2110,24 @@ end local.get $0 i32.load offset=8 - call $~lib/rt/__typeinfo + local.tee $3 + i32.const 480 + i32.load + i32.gt_u + if + i32.const 384 + i32.const 448 + i32.const 22 + i32.const 27 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.shl + i32.const 484 + i32.add + i32.load i32.const 16 i32.and if @@ -2164,13 +2153,27 @@ i32.and i32.eqz if + global.get $~lib/rt/pure/CUR + local.tee $1 + global.get $~lib/rt/pure/END + i32.ge_u + if + call $~lib/rt/pure/growRoots + global.get $~lib/rt/pure/CUR + local.set $1 + end + local.get $1 local.get $0 - call $~lib/rt/pure/appendRoot + i32.store + local.get $1 + i32.const 4 + i32.add + global.set $~lib/rt/pure/CUR end end end ) - (func $~lib/rt/pure/__visit (; 32 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 24 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2273,7 +2276,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2306,7 +2309,7 @@ end end ) - (func $~lib/rt/__visit_members (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 26 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index b85f0a6a0e..2d37572462 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -2,10 +2,10 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (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_=>_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,195 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $for/testInitExpression (; 5 ;) - (local $0 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.lt_s - if - 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 32 - i32.const 8 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testInitStatement (; 6 ;) - (local $0 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.lt_s - if - 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 32 - i32.const 19 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testEmpty (; 7 ;) - (local $0 i32) - i32.const 10 - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 0 - i32.gt_s - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 29 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testConditionOmitted (; 8 ;) - (local $0 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.ne - if - 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 32 - i32.const 39 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testAllOmitted (; 9 ;) - (local $0 i32) - i32.const 10 - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 1 - i32.sub - local.tee $0 - br_if $for-loop|0 - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 49 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testAlwaysTrue (; 10 ;) - (local $0 i32) - loop $for-loop|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $for-loop|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 61 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testAlwaysContinues (; 11 ;) - (local $0 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.lt_s - if - 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 32 - i32.const 80 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) - (func $for/testNestedContinue (; 12 ;) + (func $for/testNestedContinue (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -290,7 +102,7 @@ i32.const 1 global.set $for/ran ) - (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -456,7 +268,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -739,7 +551,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -853,7 +665,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -940,7 +752,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -997,54 +809,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1105,8 +870,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1130,8 +896,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -1179,80 +986,66 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $for/Ref#constructor (; 22 ;) (result i32) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 i32.const 208 i32.gt_u if local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 23 ;) (param $0 i32) - local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $for/testRef (; 24 ;) + (func $for/testRef (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $for-loop|0 local.get $0 @@ -1269,13 +1062,31 @@ local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end else - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $2 local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.set $0 @@ -1305,21 +1116,59 @@ i32.const 1 global.set $for/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $for/testRefAutorelease (; 25 ;) + (func $for/testRefAutorelease (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $for/Ref#constructor - call $for/Ref#constructor + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 - call $~lib/rt/pure/__release + local.get $1 + i32.const 208 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end loop $for-loop|0 block $for-break0 - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $1 - call $~lib/rt/pure/__release + local.set $3 + local.get $1 + i32.const 208 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 if local.get $2 @@ -1334,15 +1183,33 @@ local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 local.set $0 br $for-break0 end - call $for/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.set $0 br $for-loop|0 end @@ -1371,104 +1238,210 @@ i32.const 1 global.set $for/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $start:for (; 26 ;) + (func $start:for (; 16 ;) + (local $0 i32) i32.const 0 global.set $for/ran - call $for/testInitExpression - global.get $for/ran - i32.eqz + loop $for-loop|0 + local.get $0 + i32.const 10 + i32.lt_s + if + 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 32 - i32.const 13 - i32.const 0 + i32.const 8 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/testInitStatement - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $0 + i32.const 10 + i32.lt_s + if + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 24 - i32.const 0 + i32.const 19 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/testEmpty - global.get $for/ran - i32.eqz + i32.const 10 + local.set $0 + loop $for-loop|01 + local.get $0 + i32.const 0 + i32.gt_s + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|01 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 34 - i32.const 0 + i32.const 29 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/testConditionOmitted - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|02 + local.get $0 + i32.const 10 + i32.ne + if + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 44 - i32.const 0 + i32.const 39 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/testAllOmitted - global.get $for/ran - i32.eqz + i32.const 10 + local.set $0 + loop $for-loop|03 + local.get $0 + i32.const 1 + i32.sub + local.tee $0 + br_if $for-loop|03 + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 54 - i32.const 0 + i32.const 49 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/testAlwaysTrue - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|04 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $for-loop|04 + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 66 - i32.const 0 + i32.const 61 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran i32.const 1 global.set $for/ran i32.const 0 global.set $for/ran - call $for/testAlwaysContinues - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|05 + local.get $0 + i32.const 10 + i32.lt_s + if + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|05 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 85 - i32.const 0 + i32.const 80 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran i32.const 1 @@ -1517,7 +1490,7 @@ unreachable end ) - (func $~start (; 27 ;) + (func $~start (; 17 ;) global.get $~started if return @@ -1527,7 +1500,7 @@ end call $start:for ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1554,10 +1527,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 208 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1603,34 +1602,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 29 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 208 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 213041899c..2e4eb6a8e5 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -1,52 +1,17 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param 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 16) ",\00\00\00\01\00\00\00\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") - (table $0 12 funcref) - (elem (i32.const 1) $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|2) (global $~argumentsLength (mut i32) (i32.const 0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $start:function-expression~anonymous|0 (; 1 ;) (param $0 i32) (result i32) + (func $~setArgumentsLength (; 0 ;) (param $0 i32) local.get $0 - ) - (func $~setArgumentsLength (; 2 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $start:function-expression~someName (; 3 ;) - nop - ) - (func $start:function-expression~anonymous|2 (; 4 ;) (result i32) - i32.const 1 - ) - (func $start:function-expression~anonymous|3 (; 5 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.add - ) - (func $function-expression/testOmitted (; 6 ;) (param $0 i32) (result i32) - i32.const 2 global.set $~argumentsLength - i32.const 1 - i32.const 2 - local.get $0 - call_indirect (type $i32_i32_=>_i32) - ) - (func $start:function-expression~anonymous|4 (; 7 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 ) - (func $start:function-expression~anonymous|5 (; 8 ;) (param $0 i32) (param $1 i32) (result i32) - i32.const 42 - ) - (func $start:function-expression (; 9 ;) + (func $~start (; 1 ;) i32.const 1 global.set $~argumentsLength i32.const 1 @@ -55,63 +20,17 @@ global.set $~argumentsLength i32.const 0 global.set $~argumentsLength - i32.const 5 - call $function-expression/testOmitted - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 21 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 6 - call $function-expression/testOmitted - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 22 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 7 - call $function-expression/testOmitted - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 23 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 2 global.set $~argumentsLength - i32.const 1 i32.const 2 - call $start:function-expression~anonymous|3 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 34 - i32.const 0 - call $~lib/builtins/abort - unreachable - end + global.set $~argumentsLength + i32.const 2 + global.set $~argumentsLength + i32.const 2 + global.set $~argumentsLength i32.const 2 global.set $~argumentsLength i32.const 2 global.set $~argumentsLength - ) - (func $~start (; 10 ;) - call $start:function-expression ) ) diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index 7f7b1cf3d1..a4cc731e4e 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -1,9 +1,8 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param 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_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -36,68 +35,23 @@ local.get $1 f64.add ) - (func $function-types/doAddWithFn (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $2 - call_indirect (type $i32_i32_=>_i32) - ) - (func $start:function-types (; 6 ;) + (func $~start (; 5 ;) i32.const 1 global.set $function-types/i32Adder i32.const 2 global.set $~argumentsLength - i32.const 1 - i32.const 2 - call $function-types/makeAdder~anonymous|0 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 2 global.set $function-types/i64Adder i32.const 2 global.set $~argumentsLength - i64.const 10 - i64.const 20 - call $function-types/makeAdder~anonymous|0 - i64.const 30 - i64.ne - if - i32.const 0 - i32.const 32 - i32.const 15 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 2 global.set $~argumentsLength - f64.const 1.5 - f64.const 2.5 - call $function-types/makeAdder~anonymous|0 - f64.const 4 - f64.ne - if - i32.const 0 - i32.const 32 - i32.const 17 - i32.const 0 - call $~lib/builtins/abort - unreachable - end + i32.const 2 + global.set $~argumentsLength i32.const 2 i32.const 3 - global.get $function-types/i32Adder - call $function-types/doAddWithFn + i32.const 1 + call_indirect (type $i32_i32_=>_i32) i32.const 5 i32.ne if @@ -110,65 +64,13 @@ end i32.const 2 global.set $~argumentsLength - i32.const 3 - i32.const 4 - call $function-types/makeAdder~anonymous|0 - i32.const 7 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 29 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 4 - i32.const 5 - i32.const 4 - call $function-types/doAddWithFn - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 35 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 2 global.set $~argumentsLength - i32.const 1 i32.const 2 - i32.const 1 - call $function-types/doAddWithFn - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 41 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 + global.set $~argumentsLength i32.const 2 - i32.const 1 - call $function-types/doAddWithFn - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 42 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start (; 7 ;) - call $start:function-types + global.set $~argumentsLength + i32.const 2 + global.set $~argumentsLength ) ) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index a5f078078a..31848c9a8a 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -10,10 +10,18 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $0 memory.size local.tee $2 i32.const 16 @@ -51,17 +59,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) - (local $0 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $0 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $0 + local.get $3 i32.const 16 i32.sub local.tee $0 @@ -77,17 +75,17 @@ i32.const 0 i32.store offset=12 ) - (func $~setArgumentsLength (; 2 ;) (param $0 i32) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $getter-call/test (; 3 ;) (result i32) + (func $getter-call/test (; 2 ;) (result i32) call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 ) - (func $~start (; 4 ;) + (func $~start (; 3 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index f43592ac61..dacef462fb 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -1,6 +1,5 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -11,7 +10,6 @@ (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) (export "ifAlwaysReturns" (func $if/ifAlwaysReturns)) - (start $~start) (func $if/ifThenElse (; 1 ;) (param $0 i32) (result i32) i32.const 1 i32.const 0 @@ -26,75 +24,7 @@ end i32.const 0 ) - (func $start:if (; 3 ;) - i32.const 0 - call $if/ifThenElse - if - i32.const 0 - i32.const 32 - i32.const 8 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $if/ifThenElse - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 9 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $if/ifThen - if - i32.const 0 - i32.const 32 - i32.const 17 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $if/ifThen - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 18 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $if/ifThenElse - if - i32.const 0 - i32.const 32 - i32.const 30 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $if/ifThenElse - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 31 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - ) - (func $if/ifAlwaysReturns (; 4 ;) (param $0 i32) (result i32) + (func $if/ifAlwaysReturns (; 3 ;) (param $0 i32) (result i32) local.get $0 if (result i32) i32.const 1 @@ -107,7 +37,4 @@ unreachable end ) - (func $~start (; 5 ;) - call $start:if - ) ) diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 6ad0bd3b79..5edae5728e 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1,8 +1,8 @@ (module (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 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -687,31 +687,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 9 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 80 - i32.const 32 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -842,7 +818,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -904,7 +880,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -980,7 +956,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -992,9 +968,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 80 + i32.const 32 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1062,7 +1058,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1070,48 +1066,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 220 i32.gt_u @@ -1119,11 +1076,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1134,13 +1128,16 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1149,22 +1146,25 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 19 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 20 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1174,12 +1174,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 22 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 23 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1191,16 +1191,23 @@ call $~lib/rt/pure/__retain drop local.get $2 - call $~lib/rt/pure/__release + i32.const 220 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 24 ;) + (func $~lib/rt/pure/__collect (; 22 ;) nop ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1227,10 +1234,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 220 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1276,34 +1309,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 26 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$case$4 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 220 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index a8062edd38..6cee555feb 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,10 +1,7 @@ (module (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))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -32,20 +29,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -53,16 +76,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -71,42 +94,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -117,9 +111,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -292,7 +286,7 @@ end end ) - (func $~lib/rt/__allocArray (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -329,51 +323,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#__get (; 5 ;) (param $0 i32) (result i32) - i32.const 1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 64 - i32.const 128 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - i32.load - ) - (func $~lib/array/Array#__get (; 6 ;) (param $0 i32) - i32.const 1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 64 - i32.const 128 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - f32.load - drop - ) - (func $infer-array/Ref#constructor (; 7 ;) (result i32) - i32.const 0 - i32.const 7 - call $~lib/rt/stub/__alloc - ) - (func $start:infer-array (; 8 ;) + (func $start:infer-array (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -393,132 +343,170 @@ i32.const 176 call $~lib/rt/__allocArray drop - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 224 - call $~lib/rt/__allocArray - call $~lib/array/Array#__get - i32.const -1 - i32.ne - if + block $folding-inner0 + i32.const 1 + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 224 + call $~lib/rt/__allocArray + local.tee $0 + i32.load offset=12 + i32.ge_u + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + i32.load + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 14 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 3 + i32.const 3 + i32.const 4 + i32.const 304 + call $~lib/rt/__allocArray + drop + i32.const 1 + i32.const 3 + i32.const 2 + i32.const 6 + i32.const 352 + call $~lib/rt/__allocArray + local.tee $0 + i32.load offset=12 + i32.ge_u + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + f32.load + drop + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc + local.set $0 i32.const 0 - i32.const 256 - i32.const 14 + i32.const 7 + call $~lib/rt/stub/__alloc + local.set $1 i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + i32.load offset=4 + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc + local.set $0 + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc + local.set $1 + i32.const 2 + i32.const 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + i32.load offset=4 + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc + local.set $0 + i32.const 2 + i32.const 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + i32.load offset=4 + local.tee $1 + local.get $0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + i32.const 2 + i32.const 2 + i32.const 9 + i32.const 416 + call $~lib/rt/__allocArray + drop + i32.const 1 + i32.const 2 + i32.const 10 + i32.const 448 + call $~lib/rt/__allocArray + drop + i32.const 2 + i32.const 2 + i32.const 10 + i32.const 480 + call $~lib/rt/__allocArray + drop + i32.const 2 + i32.const 2 + i32.const 3 + i32.const 512 + call $~lib/rt/__allocArray + drop + i32.const 2 + i32.const 2 + i32.const 3 + i32.const 544 + call $~lib/rt/__allocArray + drop + i32.const 2 + i32.const 2 + i32.const 11 + i32.const 0 + call $~lib/rt/__allocArray + i32.load offset=4 + local.tee $0 + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 576 + call $~lib/rt/__allocArray + i32.store + local.get $0 + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 608 + call $~lib/rt/__allocArray + i32.store offset=4 + return end - i32.const 3 - i32.const 3 - i32.const 4 - i32.const 304 - call $~lib/rt/__allocArray - drop - i32.const 3 - i32.const 2 - i32.const 6 - i32.const 352 - call $~lib/rt/__allocArray - call $~lib/array/Array#__get - call $infer-array/Ref#constructor - local.set $0 - call $infer-array/Ref#constructor - local.set $1 - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - i32.load offset=4 - local.tee $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - call $infer-array/Ref#constructor - local.set $0 - call $infer-array/Ref#constructor - local.set $1 - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - i32.load offset=4 - local.tee $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - call $infer-array/Ref#constructor - local.set $0 - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - i32.load offset=4 - local.tee $1 - local.get $0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - i32.const 2 - i32.const 2 - i32.const 9 - i32.const 416 - call $~lib/rt/__allocArray - drop - i32.const 1 - i32.const 2 - i32.const 10 - i32.const 448 - call $~lib/rt/__allocArray - drop - i32.const 2 - i32.const 2 - i32.const 10 - i32.const 480 - call $~lib/rt/__allocArray - drop - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 512 - call $~lib/rt/__allocArray - drop - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 544 - call $~lib/rt/__allocArray - drop - i32.const 2 - i32.const 2 - i32.const 11 - i32.const 0 - call $~lib/rt/__allocArray - i32.load offset=4 - local.tee $0 - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 576 - call $~lib/rt/__allocArray - i32.store - local.get $0 - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 608 - call $~lib/rt/__allocArray - i32.store offset=4 + i32.const 64 + i32.const 128 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable ) - (func $~start (; 9 ;) + (func $~start (; 5 ;) call $start:infer-array ) ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 524a39965c..c8e9c74040 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_f32_i32_i32_=>_i32 (func (param i32 f32 i32 i32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 1) (data (i32.const 16) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00i\00n\00f\00e\00r\00-\00g\00e\00n\00e\00r\00i\00c\00.\00t\00s") @@ -16,19 +15,17 @@ (export "test3" (func $infer-generic/test2)) (export "test4" (func $infer-generic/test2)) (start $~start) - (func $start:infer-generic~anonymous|0 (; 0 ;) (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) - local.get $1 - f32.const 0 - f32.ne - i32.const 0 + (func $~setArgumentsLength (; 0 ;) (param $0 i32) local.get $0 - select + global.set $~argumentsLength ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) + (func $infer-generic/test1 (; 1 ;) (param $0 f32) (result f32) + local.get $0 + ) + (func $infer-generic/test2 (; 2 ;) (param $0 i32) (result i32) local.get $0 - global.set $~argumentsLength ) - (func $~lib/array/Array#reduce (; 2 ;) + (func $~start (; 3 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -50,7 +47,6 @@ if i32.const 4 global.set $~argumentsLength - local.get $3 i32.const 116 i32.load local.get $0 @@ -58,9 +54,11 @@ i32.shl i32.add f32.load - local.get $0 - i32.const 112 - call $start:infer-generic~anonymous|0 + f32.const 0 + f32.ne + i32.const 0 + local.get $3 + select local.set $3 local.get $0 i32.const 1 @@ -70,13 +68,4 @@ end end ) - (func $infer-generic/test1 (; 3 ;) (param $0 f32) (result f32) - local.get $0 - ) - (func $infer-generic/test2 (; 4 ;) (param $0 i32) (result i32) - local.get $0 - ) - (func $~start (; 5 ;) - call $~lib/array/Array#reduce - ) ) diff --git a/tests/compiler/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 3da1fa4920..b852d4f050 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -7,7 +7,7 @@ (global $infer-type/rF (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:infer-type (; 0 ;) + (func $~start (; 0 ;) (local $0 i32) i32.const 0 global.set $infer-type/ri @@ -30,7 +30,4 @@ end end ) - (func $~start (; 1 ;) - call $start:infer-type - ) ) diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index daedfe913b..49b142ecbf 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -10,7 +10,7 @@ (global $inlining-blocklocals/theCall_c (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $inlining-blocklocals/test (; 1 ;) + (func $~start (; 1 ;) (local $0 i32) global.get $inlining-blocklocals/b local.tee $0 @@ -46,7 +46,4 @@ unreachable end ) - (func $~start (; 2 ;) - call $inlining-blocklocals/test - ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ed205d4afd..27f36ff0b3 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -21,20 +21,46 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -42,16 +68,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -60,42 +86,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -106,9 +103,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $inlining/test_ctor (; 5 ;) + (func $inlining/test_ctor (; 4 ;) (local $0 i32) i32.const 16 i32.const 4 @@ -188,7 +185,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 1 global.set $~argumentsLength i32.const 64 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index b040de24e5..ed55da4f34 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1,8 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -14,20 +13,28 @@ (global $instanceof-class/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -35,16 +42,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -53,20 +60,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -81,9 +77,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $start:instanceof-class (; 3 ;) + (func $~start (; 2 ;) (local $0 i32) i32.const 144 global.set $~lib/rt/stub/startOffset @@ -111,8 +107,27 @@ end local.get $0 global.set $instanceof-class/b - global.get $instanceof-class/b - call $instanceof-class/Child~instanceof + block $__inlined_func$instanceof-class/Child~instanceof (result i32) + i32.const 0 + global.get $instanceof-class/b + local.tee $0 + i32.eqz + br_if $__inlined_func$instanceof-class/Child~instanceof + drop + i32.const 1 + local.get $0 + i32.const 3 + call $~lib/rt/__instanceof + br_if $__inlined_func$instanceof-class/Child~instanceof + drop + i32.const 1 + local.get $0 + i32.const 6 + call $~lib/rt/__instanceof + br_if $__inlined_func$instanceof-class/Child~instanceof + drop + i32.const 0 + end i32.eqz if i32.const 0 @@ -123,10 +138,7 @@ unreachable end ) - (func $~start (; 4 ;) - call $start:instanceof-class - ) - (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -156,27 +168,4 @@ end i32.const 0 ) - (func $instanceof-class/Child~instanceof (; 6 ;) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - return - end - local.get $0 - i32.const 3 - call $~lib/rt/__instanceof - if - i32.const 1 - return - end - local.get $0 - i32.const 6 - call $~lib/rt/__instanceof - if - i32.const 1 - return - end - i32.const 0 - ) ) diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 8dd35edbb7..ea425e6c9e 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -728,54 +728,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -836,8 +789,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -861,8 +815,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -910,48 +905,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 252 i32.gt_u @@ -959,29 +915,64 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) - local.get $0 - i32.const 252 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $issues/1095/test (; 16 ;) (param $0 i32) + (func $start:issues/1095 (; 13 ;) + (local $0 i32) (local $1 i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 192 + i32.store local.get $0 - local.tee $1 + local.set $1 local.get $0 i32.load - local.tee $0 + local.tee $2 i32.eqz if i32.const 0 @@ -991,37 +982,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 local.get $1 i32.load local.tee $1 i32.ne if - local.get $0 + local.get $2 call $~lib/rt/pure/__retain - local.set $0 + local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 252 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 + local.get $2 i32.store - ) - (func $~start (; 17 ;) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 192 - i32.store - local.get $0 - call $issues/1095/test local.get $0 - call $~lib/rt/pure/__release + i32.const 252 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~start (; 14 ;) + call $start:issues/1095 ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1048,10 +1044,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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$4 $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 252 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1097,34 +1119,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 19 ;) (param $0 i32) - block $switch$1$default - 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$4 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 252 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 0298582781..bdab016514 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -8,7 +8,7 @@ (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:logical (; 0 ;) + (func $~start (; 0 ;) i32.const 2 global.set $logical/i i32.const 1 @@ -42,7 +42,4 @@ f64.const nan:0x8000000000000 global.set $logical/F ) - (func $~start (; 1 ;) - call $start:logical - ) ) diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 97d51576a3..4cf6e35cbf 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -88,7 +88,37 @@ end end ) - (func $start:loop-flow (; 5 ;) + (func $loop-flow/whileThrow (; 5 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 11 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/whileContinue (; 6 ;) (result i32) + loop $while-continue|0 + br $while-continue|0 + end + unreachable + ) + (func $loop-flow/forThrow (; 7 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 41 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/doThrow (; 8 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 71 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~start (; 9 ;) i32.const 1 call $loop-flow/whileAny i32.const 1 @@ -126,37 +156,4 @@ unreachable end ) - (func $loop-flow/whileThrow (; 6 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 11 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/whileContinue (; 7 ;) (result i32) - loop $while-continue|0 - br $while-continue|0 - end - unreachable - ) - (func $loop-flow/forThrow (; 8 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 41 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/doThrow (; 9 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 71 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $~start (; 10 ;) - call $start:loop-flow - ) ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 58ecfcccb2..912d6e4fd9 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -730,54 +730,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -838,8 +791,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -863,8 +817,49 @@ local.tee $2 i32.eqz if + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $2 @@ -912,55 +907,9 @@ call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 268 i32.gt_u @@ -968,37 +917,68 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $managed-cast/Cat#constructor (; 16 ;) (result i32) + (func $managed-cast/Cat#constructor (; 13 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 - i32.eqz - if - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) - local.get $0 - i32.const 268 - i32.gt_u - if + if (result i32) local.get $0 + else + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + call $~lib/rt/tlsf/allocateBlock i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.add + call $~lib/rt/pure/__retain end ) - (func $~lib/rt/__instanceof (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/__instanceof (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1028,25 +1008,7 @@ end i32.const 0 ) - (func $managed-cast/testUpcastFromNullable (; 19 ;) (param $0 i32) - block $folding-inner0 - local.get $0 - i32.eqz - br_if $folding-inner0 - local.get $0 - call $~lib/rt/__instanceof - i32.eqz - br_if $folding-inner0 - return - end - i32.const 0 - i32.const 192 - i32.const 36 - i32.const 8 - call $~lib/builtins/abort - unreachable - ) - (func $start:managed-cast (; 20 ;) + (func $start:managed-cast (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1056,8 +1018,9 @@ (local $6 i32) (local $7 i32) call $managed-cast/Cat#constructor + local.set $2 call $managed-cast/Cat#constructor - local.tee $1 + local.tee $3 i32.eqz if i32.const 0 @@ -1068,11 +1031,11 @@ unreachable end call $managed-cast/Cat#constructor - local.set $2 + local.set $4 call $managed-cast/Cat#constructor - local.set $3 + local.set $5 call $managed-cast/Cat#constructor - local.tee $4 + local.tee $6 call $~lib/rt/__instanceof i32.eqz if @@ -1084,10 +1047,28 @@ unreachable end call $managed-cast/Cat#constructor - local.tee $5 - call $managed-cast/testUpcastFromNullable + local.tee $1 + local.set $0 + block $__inlined_func$managed-cast/testUpcastFromNullable + block $folding-inner0 + local.get $1 + i32.eqz + br_if $folding-inner0 + local.get $0 + call $~lib/rt/__instanceof + i32.eqz + br_if $folding-inner0 + br $__inlined_func$managed-cast/testUpcastFromNullable + end + i32.const 0 + i32.const 192 + i32.const 36 + i32.const 8 + call $~lib/builtins/abort + unreachable + end call $managed-cast/Cat#constructor - local.tee $6 + local.tee $0 call $~lib/rt/__instanceof i32.eqz if @@ -1110,23 +1091,80 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 268 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 268 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 268 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 21 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1136,7 +1174,7 @@ end call $start:managed-cast ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1163,10 +1201,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 268 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1212,34 +1276,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 23 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$case$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 268 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 68668d9d07..abe9619493 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -1,36 +1,18 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) - (start $~start) - (func $many-locals/testI32 (; 1 ;) (param $0 i32) (result i32) + (func $many-locals/testI32 (; 0 ;) (param $0 i32) (result i32) local.get $0 ) - (func $many-locals/testI8 (; 2 ;) (param $0 i32) (result i32) + (func $many-locals/testI8 (; 1 ;) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s ) - (func $~start (; 3 ;) - i32.const 42 - call $many-locals/testI8 - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 267 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - ) ) diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 839e931fa0..2e14cfff60 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $new/ref (mut i32) (i32.const 0)) @@ -10,20 +9,28 @@ (global $new/ref2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -31,16 +38,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -49,20 +56,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -77,9 +73,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $start:new (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 @@ -109,7 +105,4 @@ call $~lib/rt/stub/__alloc global.set $new/ref2 ) - (func $~start (; 3 ;) - call $start:new - ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 68fa6b2020..a85d53c769 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,15 +1,14 @@ (module (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 $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) - (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_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\000") @@ -90,20 +89,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -111,16 +136,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -129,42 +154,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -175,9 +171,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -201,55 +197,46 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 32 - return - end - local.get $0 - i32.const 0 - i32.lt_s - local.tee $1 - if + if (result i32) + local.get $0 i32.const 0 + i32.lt_s + local.tee $1 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end local.get $0 - i32.sub - local.set $0 - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 + end local.get $2 - i32.const 45 - i32.store16 + else + i32.const 32 end - local.get $2 ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -325,7 +312,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -342,10 +329,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -357,7 +352,7 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 7 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -748,7 +743,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -921,7 +916,7 @@ end end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1166,7 +1161,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1304,13 +1299,17 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.const 0 local.get $2 @@ -1375,8 +1374,24 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (func $~lib/util/number/dtoa (; 12 ;) (result i32) + (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 56 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/string/String#substring local.get $0 i32.const 15 i32.and @@ -1396,7 +1411,7 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 + local.tee $2 i32.load offset=4 i32.const 1 i32.ne @@ -1410,54 +1425,16 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $1 + local.get $2 i32.load i32.add i32.eq if - local.get $1 + local.get $2 global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 15 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 56 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 - call $~lib/rt/stub/__free - ) - (func $~lib/number/Bool#toString (; 16 ;) (param $0 i32) (result i32) - i32.const 1488 - i32.const 1520 - local.get $0 - select - ) - (func $~lib/number/F32.isSafeInteger (; 17 ;) (param $0 f32) (result i32) - local.get $0 - f32.trunc - local.get $0 - f32.eq - i32.const 0 - local.get $0 - f32.abs - f32.const 16777215 - f32.le - select - ) - (func $~lib/number/F32.isInteger (; 18 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 13 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1470,19 +1447,7 @@ f32.eq select ) - (func $~lib/number/F64.isSafeInteger (; 19 ;) (param $0 f64) (result i32) - local.get $0 - f64.trunc - local.get $0 - f64.eq - i32.const 0 - local.get $0 - f64.abs - f64.const 9007199254740991 - f64.le - select - ) - (func $~lib/number/F64.isInteger (; 20 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 14 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1495,14 +1460,14 @@ f64.eq select ) - (func $start:number (; 21 ;) + (func $start:number (; 15 ;) (local $0 i32) i32.const 1536 global.set $~lib/rt/stub/startOffset i32.const 1536 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1527,7 +1492,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -1540,7 +1505,7 @@ unreachable end i32.const -5 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -1553,7 +1518,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -1570,7 +1535,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1587,7 +1552,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1599,8 +1564,7 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - call $~lib/number/Bool#toString + i32.const 1488 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -1612,8 +1576,7 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/number/Bool#toString + i32.const 1520 i32.const 1520 call $~lib/string/String.__eq i32.eqz @@ -1631,7 +1594,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1649,7 +1612,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1661,104 +1624,6 @@ call $~lib/builtins/abort unreachable end - f32.const -16777216 - call $~lib/number/F32.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 25 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -16777215 - call $~lib/number/F32.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 26 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 0 - call $~lib/number/F32.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 27 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -0 - call $~lib/number/F32.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 28 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const nan:0x400000 - call $~lib/number/F32.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 29 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const inf - call $~lib/number/F32.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 30 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 16777215 - call $~lib/number/F32.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 31 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 16777216 - call $~lib/number/F32.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 32 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 0.5 - call $~lib/number/F32.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 33 - i32.const 0 - call $~lib/builtins/abort - unreachable - end f32.const 0 call $~lib/number/F32.isInteger i32.const 1 @@ -1881,104 +1746,6 @@ call $~lib/builtins/abort unreachable end - f64.const -9007199254740992 - call $~lib/number/F64.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 48 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -9007199254740991 - call $~lib/number/F64.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 49 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 0 - call $~lib/number/F64.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 50 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -0 - call $~lib/number/F64.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 51 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const nan:0x8000000000000 - call $~lib/number/F64.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 52 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const inf - call $~lib/number/F64.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 53 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 9007199254740991 - call $~lib/number/F64.isSafeInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 54 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 9007199254740992 - call $~lib/number/F64.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 55 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 0.5 - call $~lib/number/F64.isSafeInteger - if - i32.const 0 - i32.const 96 - i32.const 56 - i32.const 0 - call $~lib/builtins/abort - unreachable - end f64.const 0 call $~lib/number/F64.isInteger i32.const 1 @@ -2102,7 +1869,7 @@ unreachable end ) - (func $~start (; 22 ;) + (func $~start (; 16 ;) call $start:number ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index e5a0edcd04..f9e27ebac4 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -9,20 +8,28 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -30,16 +37,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -48,20 +55,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -76,9 +72,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/rc/global-init.optimized.wat b/tests/compiler/rc/global-init.optimized.wat index 6eebee8ac0..7f594e6ee4 100644 --- a/tests/compiler/rc/global-init.optimized.wat +++ b/tests/compiler/rc/global-init.optimized.wat @@ -8,7 +8,7 @@ (global $rc/global-init/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:rc/global-init (; 0 ;) + (func $~start (; 0 ;) i32.const 32 global.set $rc/global-init/a i32.const 32 @@ -18,7 +18,4 @@ i32.const 0 global.set $rc/global-init/b ) - (func $~start (; 1 ;) - call $start:rc/global-init - ) ) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 2546c53138..5eab61bfae 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,11 +1,11 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,63 +904,66 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $start:rc/local-init (; 14 ;) + (func $rc/local-init/Ref#constructor (; 12 ;) (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 192 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $0 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end - local.get $0 + local.get $1 + ) + (func $~start (; 13 ;) + (local $0 i32) + call $rc/local-init/Ref#constructor + local.tee $0 i32.const 192 i32.gt_u if @@ -975,10 +973,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 15 ;) - call $start:rc/local-init - ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1005,10 +1000,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 192 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1054,34 +1075,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 17 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 192 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 8c15e149a8..b4a932cf46 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -3,9 +3,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,48 +904,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,18 +914,75 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (; 15 ;) (result i32) + (func $start:rc/logical-and-mismatch (; 13 ;) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + global.set $rc/logical-and-mismatch/gloRef + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + if + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $rc/logical-and-mismatch/gloRef + call $~lib/rt/pure/__retain + local.set $0 + end local.get $0 i32.const 176 i32.gt_u @@ -979,48 +992,74 @@ i32.sub call $~lib/rt/pure/decrement end - ) - (func $start:rc/logical-and-mismatch (; 17 ;) - (local $0 i32) - call $rc/logical-and-mismatch/Ref#constructor - global.set $rc/logical-and-mismatch/gloRef - call $rc/logical-and-mismatch/Ref#constructor + global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain else local.get $0 + call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release - global.get $rc/logical-and-mismatch/gloRef local.tee $0 - if (result i32) - call $rc/logical-and-mismatch/Ref#constructor - else + i32.const 176 + i32.gt_u + if local.get $0 - call $~lib/rt/pure/__retain + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 - if (result i32) + if local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor - else + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 176 + i32.gt_u + if local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 18 ;) + (func $~start (; 14 ;) call $start:rc/logical-and-mismatch ) - (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1047,10 +1086,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 176 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1096,34 +1161,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 20 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 176 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 632d30caae..6883dce343 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -3,9 +3,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,48 +904,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,18 +914,76 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (; 15 ;) (result i32) + (func $start:rc/logical-or-mismatch (; 13 ;) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + global.set $rc/logical-or-mismatch/gloRef + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $rc/logical-or-mismatch/gloRef + call $~lib/rt/pure/__retain + local.set $0 + end local.get $0 i32.const 176 i32.gt_u @@ -979,48 +993,75 @@ i32.sub call $~lib/rt/pure/decrement end - ) - (func $start:rc/logical-or-mismatch (; 17 ;) - (local $0 i32) - call $rc/logical-or-mismatch/Ref#constructor - global.set $rc/logical-or-mismatch/gloRef - call $rc/logical-or-mismatch/Ref#constructor + global.get $rc/logical-or-mismatch/gloRef local.tee $0 if (result i32) local.get $0 + call $~lib/rt/pure/__retain else - local.get $0 - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain end - call $~lib/rt/pure/__release - global.get $rc/logical-or-mismatch/gloRef local.tee $0 - if (result i32) + i32.const 176 + i32.gt_u + if local.get $0 - call $~lib/rt/pure/__retain - else - call $rc/logical-or-mismatch/Ref#constructor + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $0 - if (result i32) + i32.eqz + if local.get $0 - else + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 176 + i32.gt_u + if local.get $0 - call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 18 ;) + (func $~start (; 14 ;) call $start:rc/logical-or-mismatch ) - (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1047,10 +1088,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 176 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1096,34 +1163,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 20 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 176 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index f8ebeb7e2e..cdd37612a9 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -2,10 +2,10 @@ (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 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result 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))) @@ -41,7 +41,7 @@ (export "OptimizeARC.eliminates.replaceAlreadyRetained" (func $rc/optimize/eliminated_rr)) (export "OptimizeARC.keeps.partialRetains" (func $rc/optimize/OptimizeARC.keeps.partialRetains)) (export "OptimizeARC.keeps.reachesReturn" (func $rc/optimize/OptimizeARC.keeps.reachesReturn)) - (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/eliminated_v)) + (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation)) (export "FinalizeARC.eliminates.unnecessaryPair" (func $rc/optimize/eliminated_vi)) (export "FinalizeARC.eliminates.unnecessaryStaticPair" (func $rc/optimize/eliminated_v)) (export "FinalizeARC.eliminates.unnecessaryStaticRetain" (func $rc/optimize/eliminated_v)) @@ -60,48 +60,9 @@ (func $rc/optimize/eliminated_viii (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 196 i32.gt_u @@ -109,11 +70,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 32 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -279,7 +277,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -562,7 +560,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -676,7 +674,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -763,31 +761,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 128 - i32.const 80 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -918,7 +892,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -980,7 +954,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1056,7 +1030,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1068,9 +1042,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 128 + i32.const 80 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1138,7 +1132,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $rc/optimize/getRef (; 20 ;) (result i32) + (func $rc/optimize/getRef (; 18 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 3 @@ -1147,21 +1141,16 @@ i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) - local.get $0 - i32.const 196 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $rc/optimize/eliminated_rr (; 22 ;) (param $0 i32) (result i32) - call $rc/optimize/getRef + (func $rc/optimize/eliminated_rr (; 19 ;) (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1173,17 +1162,24 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 24 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 21 ;) (param $0 i32) (param $1 i32) local.get $1 - if (result i32) + if local.get $0 call $~lib/rt/pure/__retain - else + local.set $0 + end + local.get $0 + i32.const 196 + i32.gt_u + if local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 22 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1193,19 +1189,52 @@ return end local.get $0 - call $~lib/rt/pure/__release + i32.const 196 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 26 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation (; 23 ;) + (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 1 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 196 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 24 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 27 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 25 ;) (param $0 i32) local.get $0 - call $~lib/rt/pure/__release + i32.const 196 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1232,10 +1261,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 196 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1281,34 +1336,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 29 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 196 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 2897aa2f4f..952e92f983 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,12 +1,12 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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 $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result 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) @@ -21,8 +21,9 @@ (export "__alloc" (func $~lib/rt/tlsf/__alloc)) (export "__retain" (func $~lib/rt/pure/__retain)) (export "__release" (func $~lib/rt/pure/__release)) - (export "__collect" (func $~start)) + (export "__collect" (func $~lib/rt/pure/__collect)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) + (start $~start) (func $~lib/rt/tlsf/removeBlock (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -673,31 +674,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 80 - i32.const 32 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -828,7 +805,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -890,7 +867,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -966,7 +943,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -978,9 +955,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 80 + i32.const 32 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1046,7 +1043,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1054,46 +1051,56 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne + i32.const 212 + i32.gt_u if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1101,25 +1108,35 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + call $~lib/rt/pure/decrement end - local.get $0 ) - (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) + (func $~start (; 12 ;) + (local $0 i32) + (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 local.get $0 i32.const 212 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~start (; 14 ;) + (func $~lib/rt/pure/__collect (; 13 ;) nop ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1144,10 +1161,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 212 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1191,34 +1234,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 16 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 212 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index b28eb3de12..12265c6657 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -3,9 +3,9 @@ (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_=>_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -729,54 +729,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -837,8 +790,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -862,8 +816,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -911,77 +906,133 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne + i32.const 176 + i32.gt_u if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement + ) + (func $rc/ternary-mismatch/test1 (; 13 ;) (param $0 i32) (result i32) local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable + if (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + else + global.get $rc/ternary-mismatch/gloRef + call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test2 (; 14 ;) (param $0 i32) (result i32) local.get $0 + if (result i32) + global.get $rc/ternary-mismatch/gloRef + call $~lib/rt/pure/__retain + else + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + end + ) + (func $start:rc/ternary-mismatch (; 15 ;) + (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + global.set $rc/ternary-mismatch/gloRef + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 i32.const 176 i32.gt_u if local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + call $~lib/rt/pure/decrement + end + global.get $rc/ternary-mismatch/gloRef + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $rc/ternary-mismatch/gloRef + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - ) - (func $rc/ternary-mismatch/Ref#constructor (; 15 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - ) - (func $rc/ternary-mismatch/test1 (; 16 ;) (param $0 i32) (result i32) - local.get $0 - if (result i32) - call $rc/ternary-mismatch/Ref#constructor - else - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - end - ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) - local.get $0 + local.tee $0 i32.const 176 i32.gt_u if @@ -990,38 +1041,21 @@ i32.sub call $~lib/rt/pure/decrement end - ) - (func $rc/ternary-mismatch/test2 (; 18 ;) (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 - end - ) - (func $start:rc/ternary-mismatch (; 19 ;) - call $rc/ternary-mismatch/Ref#constructor - global.set $rc/ternary-mismatch/gloRef - i32.const 1 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test1 - call $~lib/rt/pure/__release - i32.const 1 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release - i32.const 0 - call $rc/ternary-mismatch/test2 - call $~lib/rt/pure/__release global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 20 ;) + (func $~start (; 16 ;) call $start:rc/ternary-mismatch ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1048,10 +1082,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 176 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1097,34 +1157,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 22 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 176 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 2aa38298ec..30a76d2891 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -17,7 +17,6 @@ (export "renamed_add" (func $export/add)) (export "rerenamed_sub" (func $export/mul)) (export "renamed_ns.two" (func $export/ns.one)) - (start $~start) (func $export/add (; 0 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 @@ -36,14 +35,4 @@ (func $export/ns.one (; 3 ;) nop ) - (func $~start (; 4 ;) - i32.const 1 - i32.const 2 - call $export/add - i32.const 3 - i32.const 4 - call $export/mul - i32.add - drop - ) ) diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 1c32e82276..94b9e5f084 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,14 +1,12 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (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 $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i64 (func (param i32) (result i64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\08\00\00\00\01\00\00\00\00\00\00\00\08\00\00\00\01") @@ -22,20 +20,46 @@ (export "fieldAccess" (func $resolve-access/fieldAccess)) (export "propertyAccess" (func $resolve-access/propertyAccess)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -43,16 +67,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -61,42 +85,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -107,9 +102,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -280,50 +275,7 @@ end end ) - (func $~lib/rt/__allocArray (; 4 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 16 - i32.const 3 - call $~lib/rt/stub/__alloc - local.set $0 - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/memory/memory.copy - local.get $0 - local.get $1 - 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 - i32.const 1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#__get (; 5 ;) (param $0 i32) (result i64) - i32.const 0 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 64 - i32.const 128 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i64.load - ) - (func $~lib/util/number/decimalCount32 (; 6 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -371,7 +323,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -395,7 +347,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/decimalCount64 (; 8 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 5 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -448,37 +400,11 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - loop $do-continue|0 - local.get $1 - i64.const 10 - i64.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - i32.const 48 - i32.add - i32.store16 - local.tee $1 - i64.const 0 - i64.ne - br_if $do-continue|0 - end - ) - (func $~lib/util/number/utoa64 (; 10 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 6 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i64) local.get $0 i64.eqz if @@ -491,16 +417,16 @@ if local.get $0 i32.wrap_i64 - local.tee $1 + local.tee $2 call $~lib/util/number/decimalCount32 - local.tee $3 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 + local.tee $3 + local.get $2 local.get $1 - local.get $3 call $~lib/util/number/utoa_simple else local.get $0 @@ -510,19 +436,77 @@ i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple + local.tee $3 + local.set $2 + loop $do-continue|0 + local.get $0 + i64.const 10 + i64.div_u + local.get $2 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 1 + i32.shl + i32.add + local.get $0 + i64.const 10 + i64.rem_u + i32.wrap_i64 + i32.const 48 + i32.add + i32.store16 + local.tee $0 + i64.const 0 + i64.ne + br_if $do-continue|0 + end end - local.get $2 + local.get $3 ) - (func $resolve-access/arrayAccess (; 11 ;) (result i32) - call $~lib/rt/__allocArray - call $~lib/array/Array#__get + (func $resolve-access/arrayAccess (; 7 ;) (result i32) + (local $0 i32) + (local $1 i32) + i32.const 16 + i32.const 3 + call $~lib/rt/stub/__alloc + local.set $0 + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 + call $~lib/memory/memory.copy + local.get $0 + local.get $1 + 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 + i32.const 1 + i32.store offset=12 + i32.const 0 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 64 + i32.const 128 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/Container#constructor (; 12 ;) (result i32) + (func $resolve-access/fieldAccess (; 8 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -531,51 +515,48 @@ i64.const 0 i64.store local.get $0 - ) - (func $resolve-access/fieldAccess (; 13 ;) (result i32) - (local $0 i32) - call $resolve-access/Container#constructor - local.tee $0 i64.const 1 i64.store local.get $0 i64.load call $~lib/util/number/utoa64 ) - (func $~lib/util/number/utoa32 (; 14 ;) (param $0 i32) (result i32) + (func $resolve-access/propertyAccess (; 9 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 176 - return - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 + i32.const 8 + i32.const 5 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $2 - ) - (func $resolve-access/propertyAccess (; 15 ;) (result i32) - (local $0 i32) - call $resolve-access/Container#constructor local.tee $0 + i64.const 0 + i64.store + local.get $0 i64.const 1 i64.store local.get $0 i64.load i32.wrap_i64 - call $~lib/util/number/utoa32 + local.tee $1 + if + local.get $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + i32.const 176 + local.set $0 + end + local.get $0 ) - (func $~start (; 16 ;) + (func $~start (; 10 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 4bbe317d3f..4cb6dff1e6 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -2,11 +2,10 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -57,21 +56,7 @@ (global $resolve-binary/bar2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/number/Bool#toString (; 1 ;) (param $0 i32) (result i32) - i32.const 32 - i32.const 64 - local.get $0 - select - ) - (func $~lib/string/String#get:length (; 2 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -147,7 +132,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -164,10 +149,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -179,7 +172,7 @@ end i32.const 0 ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -227,20 +220,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 6 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 4 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -248,16 +267,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -266,42 +285,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 7 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -312,9 +302,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -338,48 +328,47 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 9 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 192 - return - end - local.get $0 - i32.const 0 - i32.lt_s - local.tee $1 - if + if (result i32) + local.get $0 i32.const 0 + i32.lt_s + local.tee $1 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end local.get $0 - i32.sub - local.set $0 - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 + end local.get $2 - i32.const 45 - i32.store16 + else + i32.const 192 end - local.get $2 ) - (func $~lib/util/number/genDigits (; 10 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 7 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -770,7 +759,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -943,7 +932,7 @@ end end ) - (func $~lib/util/number/prettify (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1188,7 +1177,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 13 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1333,13 +1322,17 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.const 0 local.get $2 @@ -1405,8 +1398,25 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) + (func $~lib/util/number/dtoa (; 12 ;) (result i32) + (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 56 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/string/String#substring local.get $0 i32.const 15 i32.and @@ -1449,35 +1459,8 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 16 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 56 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 - call $~lib/rt/stub/__free - ) - (func $resolve-binary/Bar#constructor (; 17 ;) (result i32) - i32.const 0 - i32.const 7 - call $~lib/rt/stub/__alloc - ) - (func $start:resolve-binary (; 18 ;) - i32.const 1 - call $~lib/number/Bool#toString + (func $start:resolve-binary (; 13 ;) + i32.const 32 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1489,8 +1472,7 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/number/Bool#toString + i32.const 64 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1502,8 +1484,7 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - call $~lib/number/Bool#toString + i32.const 32 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1515,8 +1496,7 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/number/Bool#toString + i32.const 64 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1528,8 +1508,7 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/number/Bool#toString + i32.const 64 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1541,8 +1520,7 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - call $~lib/number/Bool#toString + i32.const 32 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1554,8 +1532,7 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - call $~lib/number/Bool#toString + i32.const 32 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1567,8 +1544,7 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $~lib/number/Bool#toString + i32.const 64 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1587,7 +1563,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1604,7 +1580,7 @@ i32.add global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1621,7 +1597,7 @@ i32.sub global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1638,7 +1614,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1671,7 +1647,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1688,7 +1664,7 @@ i32.rem_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1705,7 +1681,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1722,7 +1698,7 @@ i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1739,7 +1715,7 @@ i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1756,7 +1732,7 @@ i32.and global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1773,7 +1749,7 @@ i32.or global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1790,7 +1766,7 @@ i32.xor global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1803,7 +1779,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1816,7 +1792,7 @@ unreachable end i32.const -1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1568 call $~lib/string/String.__eq i32.eqz @@ -1829,7 +1805,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1842,7 +1818,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1855,7 +1831,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1880,7 +1856,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1893,7 +1869,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1906,7 +1882,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1919,7 +1895,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1932,7 +1908,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1945,7 +1921,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1958,7 +1934,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1971,7 +1947,7 @@ unreachable end i32.const 0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 192 call $~lib/string/String.__eq i32.eqz @@ -1984,7 +1960,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1997,7 +1973,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -2157,9 +2133,13 @@ call $~lib/builtins/abort unreachable end - call $resolve-binary/Bar#constructor + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc global.set $resolve-binary/bar - call $resolve-binary/Bar#constructor + i32.const 0 + i32.const 7 + call $~lib/rt/stub/__alloc global.set $resolve-binary/bar2 global.get $resolve-binary/bar2 global.set $resolve-binary/bar @@ -2186,7 +2166,7 @@ unreachable end ) - (func $~start (; 19 ;) + (func $~start (; 14 ;) call $start:resolve-binary ) ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 317e1e7750..3ab7b7aecb 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,15 +1,13 @@ (module - (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -42,20 +40,46 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -63,16 +87,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -81,42 +105,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -127,59 +122,55 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 2 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 + (local $2 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 8 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 4 i32.sub i32.const 0 i32.store8 - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/memory/memory.fill local.get $0 i32.eqz if @@ -211,7 +202,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Float32Array#__set (; 5 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -235,7 +226,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 6 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -258,7 +249,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -306,7 +297,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -696,7 +687,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -869,7 +860,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -893,7 +884,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1138,7 +1129,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -1447,21 +1438,17 @@ local.get $10 i32.add ) - (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) + (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - ) - (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -1527,53 +1514,10 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 1408 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1408 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $1 - i32.load - i32.add - i32.eq - if - local.get $1 - global.set $~lib/rt/stub/offset - end - ) - (func $~lib/util/number/dtoa (; 16 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 12 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -1619,14 +1563,48 @@ local.get $2 call $~lib/string/String#substring local.get $1 - call $~lib/rt/stub/__free - ) - (func $~lib/number/F32#toString (; 17 ;) (param $0 f32) (result i32) - local.get $0 - f64.promote_f32 - call $~lib/util/number/dtoa + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $1 + select + i32.eqz + if + i32.const 0 + i32.const 1408 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.tee $3 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1408 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $1 + local.get $3 + i32.load + i32.add + i32.eq + if + local.get $3 + global.set $~lib/rt/stub/offset + end ) - (func $~lib/util/string/compareImpl (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1702,7 +1680,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1719,10 +1697,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -1734,7 +1720,7 @@ end i32.const 0 ) - (func $start:resolve-elementaccess (; 20 ;) + (func $start:resolve-elementaccess (; 15 ;) (local $0 i32) i32.const 1600 global.set $~lib/rt/stub/startOffset @@ -1756,7 +1742,8 @@ global.get $resolve-elementaccess/arr i32.const 0 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1771,7 +1758,8 @@ global.get $resolve-elementaccess/arr i32.const 1 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -1795,7 +1783,8 @@ local.get $0 i32.const 0 call $~lib/typedarray/Float32Array#__get - call $~lib/number/F32#toString + f64.promote_f32 + call $~lib/util/number/dtoa i32.const 1584 call $~lib/string/String.__eq i32.eqz @@ -1829,7 +1818,7 @@ unreachable end ) - (func $~start (; 21 ;) + (func $~start (; 16 ;) call $start:resolve-elementaccess ) ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index cda4d3d0a9..aaa21de00a 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1,8 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -16,87 +15,50 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $start:resolve-function-expression~anonymous|0 (; 1 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 40 - i32.add - ) - (func $~setArgumentsLength (; 2 ;) (param $0 i32) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-function-expression~anonymous|1 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 41 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 i32.add - ) - (func $start:resolve-function-expression~anonymous|2 (; 4 ;) (param $0 i32) (result i32) + local.tee $3 local.get $0 - i32.const 42 + i32.const 15 i32.add - ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 6 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -104,16 +66,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -122,42 +84,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 7 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -168,36 +101,14 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 - ) - (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end + local.get $3 ) - (func $~lib/util/number/itoa32 (; 9 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.eqz if @@ -214,35 +125,90 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple + local.tee $3 + local.set $4 + loop $do-continue|0 + local.get $0 + i32.const 10 + i32.div_u + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $0 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $0 + br_if $do-continue|0 + end local.get $1 if - local.get $2 + local.get $3 i32.const 45 i32.store16 end - local.get $2 - ) - (func $~lib/string/String#get:length (; 10 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.get $3 ) - (func $~lib/util/string/compareImpl (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -317,75 +283,55 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 12 ;) (param $0 i32) (result i32) + (func $start:resolve-function-expression (; 5 ;) + (local $0 i32) (local $1 i32) - local.get $0 - i32.const 144 - i32.eq - if - i32.const 1 - return - end - block $folding-inner0 - i32.const 0 - i32.const 1 - local.get $0 - select - br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.const 144 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz - return - end - i32.const 0 - ) - (func $start:resolve-function-expression (; 13 ;) i32.const 1 global.set $~argumentsLength - i32.const 2 - call $start:resolve-function-expression~anonymous|0 - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 1 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 1 global.set $~argumentsLength - i32.const 1 - call $start:resolve-function-expression~anonymous|1 - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 6 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 160 global.set $~lib/rt/stub/startOffset i32.const 160 global.set $~lib/rt/stub/offset i32.const 1 global.set $~argumentsLength - i32.const 0 - call $start:resolve-function-expression~anonymous|2 - call $~lib/util/number/itoa32 - call $~lib/string/String.__eq + block $__inlined_func$~lib/string/String.__eq (result i32) + i32.const 1 + i32.const 42 + call $~lib/util/number/itoa32 + local.tee $0 + i32.const 144 + i32.eq + br_if $__inlined_func$~lib/string/String.__eq + drop + block $folding-inner0 + i32.const 0 + i32.const 1 + local.get $0 + select + br_if $folding-inner0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 140 + 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.eqz if i32.const 0 @@ -396,7 +342,7 @@ unreachable end ) - (func $~start (; 14 ;) + (func $~start (; 6 ;) call $start:resolve-function-expression ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index c4170ae6ab..e217064f83 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,18 +7,26 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,18 +56,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -75,9 +71,9 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 7d81ff4392..cf13f4a47c 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1,10 +1,8 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (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 $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) @@ -24,68 +22,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000000 - i32.lt_u - select + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 local.get $0 - i32.const 100000 - i32.lt_u + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -93,16 +69,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -111,42 +87,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -157,36 +104,14 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 - ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end + local.get $4 ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.eqz if @@ -203,36 +128,91 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple + local.tee $3 + local.set $4 + loop $do-continue|0 + local.get $0 + i32.const 10 + i32.div_u + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $0 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $0 + br_if $do-continue|0 + end local.get $1 if - local.get $2 + local.get $3 i32.const 45 i32.store16 end - local.get $2 - ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.get $3 ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -308,7 +288,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -325,10 +305,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -340,7 +328,7 @@ end i32.const 0 ) - (func $start:resolve-propertyaccess (; 9 ;) + (func $start:resolve-propertyaccess (; 5 ;) (local $0 i32) i32.const 448 global.set $~lib/rt/stub/startOffset @@ -484,7 +472,7 @@ unreachable end ) - (func $~start (; 10 ;) + (func $~start (; 6 ;) call $start:resolve-propertyaccess ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 01a60f49c3..5d9ac3ec23 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,10 +1,10 @@ (module - (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_i32_=>_none (func (param i32 i32 i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -695,31 +695,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 80 - i32.const 32 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -850,7 +826,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -912,7 +888,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -988,7 +964,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1000,9 +976,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 80 + i32.const 32 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1068,7 +1064,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1076,46 +1072,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1123,11 +1082,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1138,7 +1132,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 14 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1186,7 +1180,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1210,15 +1204,7 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (; 16 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1294,7 +1280,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1313,10 +1299,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1328,7 +1322,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 19 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 16 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1719,7 +1713,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1892,7 +1886,7 @@ end end ) - (func $~lib/util/number/prettify (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2137,7 +2131,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 22 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 19 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2275,13 +2269,17 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.const 0 local.get $2 @@ -2337,9 +2335,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -2349,21 +2350,44 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 24 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa (; 21 ;) (result i32) + (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + return + end + local.get $1 local.get $0 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 16 i32.sub - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $0 + local.get $1 select if (result i32) - local.get $1 + local.get $0 i32.load i32.const 1 i32.and @@ -2372,7 +2396,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $0 i32.load offset=4 i32.const -268435456 i32.and @@ -2389,80 +2413,41 @@ call $~lib/builtins/abort unreachable end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 + local.get $0 + local.get $0 i32.load i32.const 1 i32.or i32.store local.get $0 - local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/util/number/dtoa (; 26 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $start:resolve-ternary~anonymous|0 (; 27 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.add - ) - (func $start:resolve-ternary~anonymous|1 (; 28 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 2 - i32.add - ) - (func $~setArgumentsLength (; 29 ;) (param $0 i32) + (func $~setArgumentsLength (; 22 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $resolve-ternary/g1 (; 30 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 3 - i32.add - ) - (func $start:resolve-ternary (; 31 ;) + (func $start:resolve-ternary (; 23 ;) (local $0 i32) (local $1 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $1 i32.const 1 i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 i32.const 1 - local.get $0 - call $~lib/util/number/utoa_simple local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 + call $~lib/util/number/utoa_simple local.get $0 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -2490,56 +2475,35 @@ i32.const 1 global.set $~argumentsLength i32.const 1 - call $start:resolve-ternary~anonymous|0 - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 24 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 global.set $~argumentsLength i32.const 1 - call $resolve-ternary/g1 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 35 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 global.set $~argumentsLength - i32.const 1 - call $start:resolve-ternary~anonymous|1 - i32.const 3 - i32.ne + local.get $1 + i32.const 1524 + i32.gt_u if - i32.const 0 - i32.const 256 - i32.const 43 - i32.const 0 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 1524 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 32 ;) + (func $~start (; 24 ;) call $start:resolve-ternary ) - (func $~lib/rt/pure/__collect (; 33 ;) + (func $~lib/rt/pure/__collect (; 25 ;) nop ) - (func $~lib/rt/pure/decrement (; 34 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2564,10 +2528,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 1524 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -2579,9 +2569,15 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock else local.get $1 i32.const 0 @@ -2605,36 +2601,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 35 ;) (param $0 i32) - block $folding-inner0 - block $switch$1$default - 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 $folding-inner0 $folding-inner0 $folding-inner0 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 1524 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - end - ) ) diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 2f8c559ea7..b63bfc2d23 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1,10 +1,8 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (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 $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) @@ -32,68 +30,46 @@ (global $resolve-unary/bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000000 - i32.lt_u - select + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 local.get $0 - i32.const 100000 - i32.lt_u + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -101,16 +77,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -119,42 +95,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -165,36 +112,14 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 - ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end + local.get $4 ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.eqz if @@ -211,36 +136,91 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple + local.tee $3 + local.set $4 + loop $do-continue|0 + local.get $0 + i32.const 10 + i32.div_u + local.get $4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $0 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $0 + br_if $do-continue|0 + end local.get $1 if - local.get $2 + local.get $3 i32.const 45 i32.store16 end - local.get $2 - ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.get $3 ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -316,7 +296,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -333,10 +313,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -348,13 +336,7 @@ end i32.const 0 ) - (func $~lib/number/Bool#toString (; 9 ;) (param $0 i32) (result i32) - i32.const 208 - i32.const 240 - local.get $0 - select - ) - (func $start:resolve-unary (; 10 ;) + (func $start:resolve-unary (; 5 ;) (local $0 i32) i32.const 544 global.set $~lib/rt/stub/startOffset @@ -420,9 +402,10 @@ call $~lib/builtins/abort unreachable end + i32.const 240 + i32.const 208 global.get $resolve-unary/a - i32.eqz - call $~lib/number/Bool#toString + select i32.const 240 call $~lib/string/String.__eq i32.eqz @@ -434,10 +417,10 @@ call $~lib/builtins/abort unreachable end + i32.const 208 + i32.const 240 global.get $resolve-unary/a - i32.eqz - i32.eqz - call $~lib/number/Bool#toString + select i32.const 208 call $~lib/string/String.__eq i32.eqz @@ -633,7 +616,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 6 ;) call $start:resolve-unary ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 5597a09b0e..5d777f71b0 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1,10 +1,10 @@ (module (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (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_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -1063,15 +1063,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1282,48 +1274,9 @@ end end ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 708 i32.gt_u @@ -1331,22 +1284,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) - local.get $0 - i32.const 708 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1361,21 +1340,27 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $2 call $~lib/memory/memory.fill local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1399,7 +1384,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1412,7 +1404,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 21 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 18 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1454,7 +1446,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1627,7 +1619,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 20 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1640,7 +1632,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1743,7 +1735,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 22 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1802,7 +1794,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 26 ;) (param $0 i32) + (func $~lib/array/Array#push (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1825,68 +1817,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 27 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 1 - i32.lt_s - if - i32.const 352 - i32.const 304 - i32.const 288 - i32.const 20 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.const 2 - i32.shl - i32.add - i32.load - drop - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array<~lib/string/String>#push (; 28 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 1 - i32.add - local.tee $2 - call $~lib/array/ensureSize - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.const 400 - i32.store - local.get $0 - local.get $2 - i32.store offset=12 - ) - (func $~lib/string/String#get:length (; 29 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/string/String#concat (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1902,34 +1833,60 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 480 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if + i32.const 400 + local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 400 - local.tee $0 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -1942,26 +1899,29 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 ) - (func $~lib/string/String.__concat (; 31 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 480 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat - ) - (func $start:retain-release-sanity (; 32 ;) + (func $start:retain-release-sanity (; 25 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1976,36 +1936,74 @@ local.get $0 call $~lib/array/Array#push local.get $0 - call $~lib/array/Array#pop + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.lt_s + if + i32.const 352 + i32.const 304 + i32.const 288 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 2 + i32.shl + i32.add + i32.load + drop + local.get $0 + local.get $2 + i32.store offset=12 local.get $0 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 loop $for-loop|0 - local.get $2 + local.get $3 i32.const 10 i32.lt_s if + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 i32.const 0 @@ -2015,8 +2013,25 @@ i32.const 10 i32.lt_s if - local.get $3 - call $~lib/array/Array<~lib/string/String>#push + local.get $0 + local.get $0 + i32.load offset=12 + local.tee $5 + i32.const 1 + i32.add + local.tee $4 + call $~lib/array/ensureSize + local.get $0 + i32.load offset=4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.const 400 + i32.store + local.get $0 + local.get $4 + i32.store offset=12 local.get $1 i32.const 1 i32.add @@ -2024,80 +2039,131 @@ br $for-loop|1 end end + local.get $0 + i32.const 708 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $0 - call $~lib/rt/pure/__release + local.get $2 + i32.const 708 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 416 i32.const 448 - call $~lib/string/String.__concat - local.tee $3 + call $~lib/string/String#concat + local.tee $2 + i32.const 480 + local.get $2 + select i32.const 512 - call $~lib/string/String.__concat - local.get $3 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + call $~lib/string/String#concat + local.set $0 + local.get $2 + i32.const 708 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 708 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.store local.get $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 0 i32.store - local.get $3 - local.set $1 - local.get $3 + local.get $2 + local.tee $1 local.get $0 i32.load - local.tee $2 + local.tee $4 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $2 - call $~lib/rt/pure/__release + local.get $4 + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $1 i32.store + local.get $2 + local.set $3 + local.get $2 local.get $0 - local.set $1 - local.get $3 - local.set $2 - local.get $3 - local.get $0 + local.tee $1 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 local.get $4 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $1 - local.get $2 - i32.store local.get $3 - local.set $2 + i32.store + local.get $2 + local.set $3 local.get $0 - local.get $3 + local.get $2 i32.load local.tee $4 i32.ne @@ -2106,15 +2172,21 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $2 + local.get $3 local.get $1 i32.store local.get $0 - local.set $1 - local.get $0 - local.get $2 + local.tee $1 + local.get $3 i32.load local.tee $4 i32.ne @@ -2123,16 +2195,23 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $2 + local.get $3 local.get $1 i32.store - local.get $2 + local.get $3 local.set $1 local.get $0 - local.set $2 - local.get $3 + local.set $3 + local.get $2 local.get $0 i32.load local.tee $4 @@ -2142,36 +2221,64 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $2 + local.get $3 local.get $1 i32.store local.get $0 - local.get $3 + local.get $2 i32.load local.tee $1 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $3 local.get $2 + local.get $3 i32.store local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 708 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 708 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $~lib/rt/pure/__collect ) - (func $~start (; 33 ;) + (func $~start (; 26 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 34 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 27 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2195,7 +2302,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 35 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 28 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2208,7 +2315,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 36 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 29 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2242,7 +2349,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 37 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 30 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2275,7 +2382,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 38 ;) + (func $~lib/rt/pure/__collect (; 31 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2396,99 +2503,11 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/__typeinfo (; 39 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 640 - i32.load - i32.gt_u - if - i32.const 544 - i32.const 608 - i32.const 22 - i32.const 27 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.shl - i32.const 644 - i32.add - i32.load - ) - (func $~lib/rt/pure/growRoots (; 40 ;) - (local $0 i32) + (func $~lib/rt/pure/decrement (; 32 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $0 - i32.const 256 - local.get $0 - i32.const 256 - i32.gt_u - select - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onfree - local.get $0 - local.get $1 - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onalloc - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 - global.set $~lib/rt/pure/ROOTS - local.get $0 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $0 - local.get $3 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/appendRoot (; 41 ;) (param $0 i32) - (local $1 i32) - global.get $~lib/rt/pure/CUR - local.tee $1 - global.get $~lib/rt/pure/END - i32.ge_u - if - call $~lib/rt/pure/growRoots - global.get $~lib/rt/pure/CUR - local.set $1 - end - local.get $1 - local.get $0 - i32.store - local.get $1 - i32.const 4 - i32.add - global.set $~lib/rt/pure/CUR - ) - (func $~lib/rt/pure/decrement (; 42 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2544,7 +2563,24 @@ end local.get $0 i32.load offset=8 - call $~lib/rt/__typeinfo + local.tee $3 + i32.const 640 + i32.load + i32.gt_u + if + i32.const 544 + i32.const 608 + i32.const 22 + i32.const 27 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.shl + i32.const 644 + i32.add + i32.load i32.const 16 i32.and if @@ -2570,13 +2606,75 @@ i32.and i32.eqz if + global.get $~lib/rt/pure/CUR + local.tee $1 + global.get $~lib/rt/pure/END + i32.ge_u + if + 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.set $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onfree + local.get $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onalloc + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + 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 $4 + i32.add + global.set $~lib/rt/pure/END + global.get $~lib/rt/pure/CUR + local.set $1 + end + local.get $1 local.get $0 - call $~lib/rt/pure/appendRoot + i32.store + local.get $1 + i32.const 4 + i32.add + global.set $~lib/rt/pure/CUR end end end ) - (func $~lib/rt/pure/__visit (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 33 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2679,7 +2777,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 34 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2712,7 +2810,7 @@ end end ) - (func $~lib/rt/__visit_members (; 45 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 35 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 909a84873e..bb79b2231a 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -57,20 +57,46 @@ (export "provideRefIndirect" (func $retain-release/provideRefIndirect)) (export "receiveRefIndirect" (func $retain-release/receiveRefIndirect)) (export "receiveRefIndirectDrop" (func $retain-release/receiveRefIndirect)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -78,16 +104,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -96,42 +122,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -142,34 +139,31 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 - ) - (func $retain-release/Ref#constructor (; 3 ;) (result i32) - i32.const 0 - i32.const 3 - call $~lib/rt/stub/__alloc + local.get $4 ) - (func $retain-release/returnRef (; 4 ;) (result i32) + (func $retain-release/returnRef (; 2 ;) (result i32) global.get $retain-release/REF ) - (func $retain-release/receiveRef (; 5 ;) + (func $retain-release/receiveRef (; 3 ;) nop ) - (func $retain-release/takeRef (; 6 ;) (param $0 i32) + (func $retain-release/takeRef (; 4 ;) (param $0 i32) nop ) - (func $retain-release/takeReturnRef (; 7 ;) (param $0 i32) (result i32) + (func $retain-release/takeReturnRef (; 5 ;) (param $0 i32) (result i32) local.get $0 ) - (func $retain-release/newRef (; 8 ;) - call $retain-release/Ref#constructor + (func $retain-release/newRef (; 6 ;) + i32.const 0 + i32.const 3 + call $~lib/rt/stub/__alloc drop ) - (func $retain-release/assignGlobal (; 9 ;) + (func $retain-release/assignGlobal (; 7 ;) global.get $retain-release/REF global.set $retain-release/glo ) - (func $retain-release/assignField (; 10 ;) + (func $retain-release/assignField (; 8 ;) (local $0 i32) (local $1 i32) global.get $retain-release/REF @@ -183,7 +177,7 @@ local.get $0 i32.store ) - (func $retain-release/scopeForComplex (; 11 ;) (param $0 i32) + (func $retain-release/scopeForComplex (; 9 ;) (param $0 i32) (local $1 i32) (local $2 i32) loop $for-loop|0 @@ -209,7 +203,7 @@ end end ) - (func $retain-release/scopeThrow (; 12 ;) (param $0 i32) + (func $retain-release/scopeThrow (; 10 ;) (param $0 i32) local.get $0 if i32.const 32 @@ -220,31 +214,31 @@ unreachable end ) - (func $retain-release/scopeUnreachable (; 13 ;) (param $0 i32) + (func $retain-release/scopeUnreachable (; 11 ;) (param $0 i32) local.get $0 if unreachable end ) - (func $~setArgumentsLength (; 14 ;) (param $0 i32) + (func $~setArgumentsLength (; 12 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $retain-release/provideRefIndirect (; 15 ;) (param $0 i32) + (func $retain-release/provideRefIndirect (; 13 ;) (param $0 i32) i32.const 1 global.set $~argumentsLength global.get $retain-release/REF local.get $0 call_indirect (type $i32_=>_none) ) - (func $retain-release/receiveRefIndirect (; 16 ;) (param $0 i32) + (func $retain-release/receiveRefIndirect (; 14 ;) (param $0 i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) drop ) - (func $~start (; 17 ;) + (func $~start (; 15 ;) (local $0 i32) global.get $~started if @@ -257,7 +251,9 @@ global.set $~lib/rt/stub/startOffset i32.const 112 global.set $~lib/rt/stub/offset - call $retain-release/Ref#constructor + i32.const 0 + i32.const 3 + call $~lib/rt/stub/__alloc global.set $retain-release/REF i32.const 4 i32.const 4 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 94d87b58bf..48beda5e07 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,11 +1,11 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) + (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 16) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -726,54 +726,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -834,8 +787,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -859,8 +813,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -906,137 +901,373 @@ call $~lib/rt/tlsf/prepareBlock local.get $1 ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 8 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne + i32.const 176 + i32.gt_u if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 - local.get $1 - i32.const 1 + ) + (func $~setArgumentsLength (; 9 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $start:retain-return (; 10 ;) + (local $0 i32) + (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - i32.store offset=4 + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 local.get $0 - i32.load - i32.const 1 - i32.and + i32.const 176 + i32.gt_u if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 local.get $0 i32.const 176 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub - call $~lib/rt/pure/increment + call $~lib/rt/pure/decrement end - local.get $0 - ) - (func $retain-return/Ref#constructor (; 11 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + local.tee $0 + local.set $1 local.get $0 i32.const 176 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - ) - (func $~setArgumentsLength (; 13 ;) (param $0 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 local.get $0 - global.set $~argumentsLength - ) - (func $start:retain-return (; 14 ;) - (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 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain global.set $retain-return/ref + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1 global.set $~argumentsLength + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1 global.set $~argumentsLength + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength + global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 global.set $~argumentsLength global.get $retain-return/ref + call $~lib/rt/pure/__retain + local.tee $0 + local.set $1 + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $retain-return/ref local.tee $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $retain-return/ref ) - (func $~start (; 15 ;) + (func $~start (; 11 ;) global.get $~started if return @@ -1046,7 +1277,7 @@ end call $start:retain-return ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1071,10 +1302,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 176 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1118,34 +1375,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 17 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 176 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 96e3cb1e35..9229c70045 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,9 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param 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 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -20,20 +18,28 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -41,16 +47,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -59,20 +65,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -87,35 +82,26 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $rt/instanceof/Animal#constructor (; 3 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Cat#constructor (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if - i32.const 3 + i32.const 4 call $~lib/rt/stub/__alloc local.set $0 end local.get $0 - ) - (func $rt/instanceof/Cat#constructor (; 4 ;) (param $0 i32) (result i32) - local.get $0 i32.eqz - if - i32.const 4 + if (result i32) + i32.const 3 call $~lib/rt/stub/__alloc - local.set $0 + else + local.get $0 end - local.get $0 - call $rt/instanceof/Animal#constructor ) - (func $rt/instanceof/BlackCat#constructor (; 5 ;) (result i32) - i32.const 5 - call $~lib/rt/stub/__alloc - call $rt/instanceof/Cat#constructor - ) - (func $~lib/rt/__instanceof (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -145,19 +131,21 @@ end i32.const 0 ) - (func $start:rt/instanceof (; 7 ;) + (func $start:rt/instanceof (; 4 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 global.set $~lib/rt/stub/offset - i32.const 0 - call $rt/instanceof/Animal#constructor + i32.const 3 + call $~lib/rt/stub/__alloc global.set $rt/instanceof/animal i32.const 0 call $rt/instanceof/Cat#constructor global.set $rt/instanceof/cat - call $rt/instanceof/BlackCat#constructor + i32.const 5 + call $~lib/rt/stub/__alloc + call $rt/instanceof/Cat#constructor global.set $rt/instanceof/blackcat global.get $rt/instanceof/animal local.tee $0 @@ -264,13 +252,15 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $rt/instanceof/Animal#constructor + i32.const 3 + call $~lib/rt/stub/__alloc global.set $rt/instanceof/nullableAnimal i32.const 0 call $rt/instanceof/Cat#constructor global.set $rt/instanceof/nullableCat - call $rt/instanceof/BlackCat#constructor + i32.const 5 + call $~lib/rt/stub/__alloc + call $rt/instanceof/Cat#constructor global.set $rt/instanceof/nullableBlackcat global.get $rt/instanceof/nullableAnimal i32.eqz @@ -408,7 +398,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 5 ;) global.get $~started if return diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 5a7324aad9..0fff930a82 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -409,51 +409,9 @@ i32.store offset=12 local.get $0 ) - (func $~lib/rt/stub/__free (; 9 ;) (param $0 i32) + (func $start:rt/stub-realloc (; 9 ;) + (local $0 i32) (local $1 i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $1 - i32.load - i32.add - i32.eq - if - local.get $1 - global.set $~lib/rt/stub/offset - end - ) - (func $start:rt/stub-realloc (; 10 ;) i32.const 10 i32.const 0 call $~lib/rt/stub/__alloc @@ -572,7 +530,47 @@ unreachable end global.get $rt/stub-realloc/ptr - call $~lib/rt/stub/__free + local.tee $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end i32.const 1 i32.const 0 call $~lib/rt/stub/__alloc @@ -587,7 +585,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 10 ;) global.get $~started if return diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index c4a045295d..d9e1741d3f 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,12 +1,12 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32) (result 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 $none_=>_i32 (func (result 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) @@ -673,31 +673,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 80 - i32.const 32 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -828,7 +804,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -890,7 +866,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -966,7 +942,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -978,9 +954,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 80 + i32.const 32 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1046,7 +1042,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1054,46 +1050,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 204 i32.gt_u @@ -1101,11 +1060,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1116,10 +1110,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 14 ;) + (func $~lib/rt/pure/__collect (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1144,10 +1138,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 204 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1191,34 +1211,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 16 ;) (param $0 i32) - block $switch$1$default - 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$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 204 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 4647e2d833..eab4d7d804 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -16,20 +16,46 @@ (export "__reset" (func $~lib/rt/stub/__reset)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -37,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -55,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -101,22 +98,22 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/rt/stub/__retain (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__retain (; 1 ;) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/rt/stub/__release (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__release (; 2 ;) (param $0 i32) nop ) - (func $~lib/rt/stub/__collect (; 4 ;) + (func $~lib/rt/stub/__collect (; 3 ;) nop ) - (func $~lib/rt/stub/__reset (; 5 ;) + (func $~lib/rt/stub/__reset (; 4 ;) global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 48 global.set $~lib/rt/stub/startOffset i32.const 48 diff --git a/tests/compiler/scoped.optimized.wat b/tests/compiler/scoped.optimized.wat index 9d34a26fd3..3cad609964 100644 --- a/tests/compiler/scoped.optimized.wat +++ b/tests/compiler/scoped.optimized.wat @@ -3,7 +3,7 @@ (memory $0 0) (export "memory" (memory $0)) (start $~start) - (func $start:scoped (; 0 ;) + (func $~start (; 0 ;) (local $0 i32) loop $for-loop|0 local.get $0 @@ -32,7 +32,4 @@ end end ) - (func $~start (; 1 ;) - call $start:scoped - ) ) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 6aaa67dcd0..faf72b68db 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -48,9 +48,12 @@ end local.get $0 ) - (func $~lib/array/Array#__get (; 2 ;) (param $0 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (param $0 i32) (result i32) i32.const 1 local.get $0 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + local.tee $0 i32.load offset=12 i32.ge_u if @@ -67,27 +70,17 @@ i32.add i32.load ) - (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get - call $~lib/array/Array#__get - ) - (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) - local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u ) - (func $std/array-access/stringArrayPropertyAccess (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array<~lib/array/Array>#__get - call $~lib/string/String#get:length - ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) i32.const 256 @@ -166,21 +159,29 @@ end i32.const 0 ) - (func $~lib/string/String#startsWith (; 7 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + i32.const 252 + i32.load + i32.const 1 + i32.shr_u + local.tee $1 + local.set $2 + local.get $1 i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 i32.const 0 local.get $1 i32.lt_s select - local.tee $2 - i32.const 256 - call $~lib/string/String#get:length local.tee $3 i32.add local.get $1 @@ -190,26 +191,30 @@ return end local.get $0 - local.get $2 local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 8 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 9 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get i32.const 1 call $~lib/array/Array<~lib/array/Array>#__get - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) - (func $std/array-access/stringArrayArrayMethodCall (; 10 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 4431f1b322..7933c7242e 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 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 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -725,31 +725,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 432 - i32.const 384 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -880,7 +856,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -942,7 +918,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1018,7 +994,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1030,9 +1006,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 432 + i32.const 384 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1100,56 +1096,9 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 496 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 496 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 528 i32.gt_u @@ -1157,22 +1106,65 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 496 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 496 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/__allocArray (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 i32.shl local.tee $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -1187,30 +1179,7 @@ i32.store offset=12 local.get $2 ) - (func $std/array-literal/Ref#constructor (; 20 ;) (result i32) - i32.const 0 - i32.const 5 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - ) - (func $std/array-literal/RefWithCtor#constructor (; 21 ;) (result i32) - i32.const 0 - i32.const 7 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (; 22 ;) (param $0 i32) - local.get $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $start:std/array-literal (; 23 ;) + (func $start:std/array-literal (; 17 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1481,13 +1450,31 @@ local.tee $1 i32.load offset=4 local.tee $0 - call $std/array-literal/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store local.get $0 - call $std/array-literal/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 - call $std/array-literal/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 global.set $std/array-literal/dynamicArrayRef @@ -1511,13 +1498,31 @@ local.tee $1 i32.load offset=4 local.tee $0 - call $std/array-literal/RefWithCtor#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store local.get $0 - call $std/array-literal/RefWithCtor#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 - call $std/array-literal/RefWithCtor#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 global.set $std/array-literal/dynamicArrayRefWithCtor @@ -1534,13 +1539,45 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - call $~lib/rt/pure/__release + local.tee $0 + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayI32 - call $~lib/rt/pure/__release + local.tee $0 + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array-literal/dynamicArrayRefWithCtor - call $~lib/rt/pure/__release + local.tee $0 + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 1 i32.const 2 i32.const 6 @@ -1548,15 +1585,28 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - call $std/array-literal/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store local.get $0 - call $~lib/rt/pure/__release + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 24 ;) + (func $~start (; 18 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1583,10 +1633,45 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + block $switch$1$case$10 + block $switch$1$case$8 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $__inlined_func$~lib/rt/__visit_members $switch$1$case$8 $__inlined_func$~lib/rt/__visit_members $switch$1$case$10 $switch$1$default + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 528 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + end local.get $2 i32.const -2147483648 i32.and @@ -1632,19 +1717,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 26 ;) (param $0 i32) - local.get $0 - i32.const 528 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/array/Array#__visit_impl (; 27 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1655,18 +1728,25 @@ i32.const 2 i32.shl i32.add - local.set $0 + local.set $2 loop $while-continue|0 local.get $1 - local.get $0 + local.get $2 i32.lt_u if local.get $1 i32.load - local.tee $2 + local.tee $0 if - local.get $2 - call $~lib/rt/pure/__visit + local.get $0 + i32.const 528 + i32.ge_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $1 i32.const 4 @@ -1676,36 +1756,4 @@ end end ) - (func $~lib/rt/__visit_members (; 28 ;) (param $0 i32) - block $block$4$break - block $switch$1$default - block $switch$1$case$10 - block $switch$1$case$8 - 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 $block$4$break $block$4$break $block$4$break $switch$1$case$2 $switch$1$case$8 $switch$1$case$2 $switch$1$case$10 $switch$1$default - end - return - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - ) ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 83a49f35dc..d26784f560 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,18 +2,17 @@ (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_=>_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_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $i64_=>_none (func (param i64))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) @@ -1262,15 +1261,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1495,48 +1486,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1544,22 +1496,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1575,12 +1553,15 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 0 local.get $3 @@ -1588,9 +1569,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1604,8 +1588,7 @@ i32.const 0 i32.store offset=8 local.get $2 - local.set $1 - local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 @@ -1615,7 +1598,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1628,11 +1618,14 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 22 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 19 ;) (param $0 i32) (result i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 2 @@ -1645,23 +1638,21 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - ) - (func $std/array/Ref#constructor (; 24 ;) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 20 ;) (param $0 i32) (result i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $1 local.get $0 i32.store local.get $1 ) - (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1834,22 +1825,28 @@ end end ) - (func $~lib/rt/__allocArray (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 i32.shl local.tee $4 local.set $6 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $3 if @@ -1872,7 +1869,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1939,7 +1936,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1958,7 +1955,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 25 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2003,7 +2000,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2078,7 +2075,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2099,7 +2096,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2147,16 +2144,7 @@ end i32.const 1 ) - (func $std/array/internalCapacity (; 33 ;) (param $0 i32) (result i32) - local.get $0 - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s - ) - (func $~lib/rt/tlsf/checkUsedBlock (; 34 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2198,7 +2186,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2211,7 +2199,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2314,7 +2302,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2374,7 +2362,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 33 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2397,7 +2385,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 39 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2427,45 +2415,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#set:length (; 40 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $1 - loop $do-continue|0 - local.get $2 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.const 4 - i32.add - local.tee $2 - local.get $1 - i32.lt_u - br_if $do-continue|0 - end - else - local.get $0 - i32.const 0 - call $~lib/array/ensureSize - end - local.get $0 - i32.const 0 - i32.store offset=12 - ) - (func $~lib/array/Array#concat (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 35 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2518,7 +2468,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2622,7 +2572,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2651,415 +2601,323 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 44 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/Array#indexOf (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load offset=12 - local.tee $1 - i32.const 1 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $2 + i32.const 0 i32.lt_s if - i32.const 976 - i32.const 512 - i32.const 349 - i32.const 20 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end local.get $0 i32.load offset=4 - local.tee $2 - i32.load - local.get $2 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + if + local.get $2 + return + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#splice (; 39 ;) (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 - i32.const 4 - i32.add + local.get $0 + i32.load offset=12 + local.tee $3 local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.const 2 - i32.shl - local.tee $4 - call $~lib/memory/memory.copy + 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.add + i32.lt_s + select + local.tee $2 i32.const 0 - i32.store + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + 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.store offset=12 - ) - (func $~lib/array/Array#reverse (; 45 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + local.get $2 + i32.add local.tee $1 + i32.ne if - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=4 + local.get $6 + local.get $5 local.get $1 - i32.const 1 - i32.sub i32.const 2 i32.shl i32.add - local.set $1 - loop $while-continue|0 - local.get $2 - local.get $1 - i32.lt_u - if - local.get $2 - i32.load - local.set $3 - local.get $2 - local.get $1 - i32.load - i32.store - local.get $1 - local.get $3 - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - local.get $1 - i32.const 4 - i32.sub - local.set $1 - br $while-continue|0 - end - end + local.get $3 + local.get $1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy end local.get $0 - call $~lib/rt/pure/__retain + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 ) - (func $~lib/array/Array#indexOf (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 2 local.get $0 i32.load offset=12 local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $2 + local.get $1 i32.const 0 i32.lt_s - if - local.get $2 + if (result i32) + local.get $1 local.get $3 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select - local.set $2 + 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 $2 + i32.const 2 + local.get $2 + 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 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 local.get $0 i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 + local.tee $5 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + 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 $5 + local.get $1 + i32.const 2 + i32.shl + i32.add local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - if - local.get $2 - return - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end + local.get $1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy end - i32.const -1 + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 ) - (func $~lib/array/Array#indexOf (; 47 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end + i32.ge_u if - i32.const -1 - return + i32.const 448 + i32.const 512 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable end local.get $0 i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.const nan:0x400000 - f32.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/array/Array#indexOf (; 48 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.const nan:0x8000000000000 - f64.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/array/Array#includes (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - ) - (func $~lib/array/Array#includes (; 50 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz if - i32.const 0 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s + local.get $0 + i32.const 8292 + i32.gt_u if local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f32.ne - end - if - i32.const 1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + i32.const 3920 + i32.const 512 + i32.const 97 + i32.const 39 + call $~lib/builtins/abort + unreachable end - i32.const 0 + local.get $0 ) - (func $~lib/array/Array#includes (; 51 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 42 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 f64) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const 0 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f64.ne - end - if - i32.const 1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/array/Array#splice (; 52 ;) (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 + i32.const 0 local.get $0 i32.load offset=12 local.tee $3 - local.get $1 i32.const 0 + local.get $3 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 + select + local.set $2 + i32.const 1 + local.get $3 local.get $2 - local.get $4 + i32.sub + local.tee $1 + i32.const 1 + local.get $1 i32.lt_s select - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select - local.tee $2 + local.tee $1 i32.const 2 - i32.const 3 + i32.const 11 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain @@ -3068,12 +2926,12 @@ local.get $0 i32.load offset=4 local.tee $5 - local.get $1 + local.get $2 i32.const 2 i32.shl i32.add local.tee $6 - local.get $2 + local.get $1 i32.const 2 i32.shl call $~lib/memory/memory.copy @@ -3081,17 +2939,17 @@ local.get $1 local.get $2 i32.add - local.tee $1 + local.tee $2 i32.ne if local.get $6 local.get $5 - local.get $1 + local.get $2 i32.const 2 i32.shl i32.add local.get $3 - local.get $1 + local.get $2 i32.sub i32.const 2 i32.shl @@ -3099,105 +2957,26 @@ end local.get $0 local.get $3 - local.get $2 + local.get $1 i32.sub i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 53 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 2 + (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 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 $2 - i32.const 2 - local.get $2 - 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 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - 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.const 2 - i32.shl - i32.add - local.tee $6 - local.get $2 - i32.const 2 - i32.shl - 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 $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $1 - i32.sub - i32.const 2 - i32.shl - 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#__unchecked_get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 + i32.ge_u + if + i32.const 448 + i32.const 512 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 local.get $1 i32.const 2 i32.shl @@ -3205,132 +2984,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 448 - i32.const 512 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/array/Array#__unchecked_get - local.tee $0 - i32.eqz - if - local.get $0 - call $~lib/rt/pure/__release - i32.const 3920 - i32.const 512 - i32.const 97 - i32.const 39 - call $~lib/builtins/abort - unreachable - end - local.get $0 - ) - (func $~lib/array/Array#splice (; 56 ;) (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/__allocArray - 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 (; 57 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 448 - i32.const 512 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/array/Array#__unchecked_get - ) - (func $~lib/array/Array#__set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3367,15 +3021,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 60 ;) (param $0 i32) + (func $~setArgumentsLength (; 46 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3420,17 +3074,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3438,7 +3092,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3446,12 +3100,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 53 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3497,12 +3151,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3510,12 +3164,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3523,12 +3177,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3573,12 +3227,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3586,12 +3240,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3599,13 +3253,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 79 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 65 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3645,7 +3299,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3654,7 +3308,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3663,7 +3317,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3756,67 +3410,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 84 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - local.get $0 - i32.load offset=12 - local.tee $3 - i32.const 2 - i32.const 9 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $3 - local.get $0 - i32.load offset=12 - local.tee $2 - local.get $3 - local.get $2 - i32.lt_s - select - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.load - f32.convert_i32_s - local.set $6 - local.get $2 - local.get $5 - i32.add - local.get $6 - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $4 - ) - (func $~lib/array/Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 70 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3837,7 +3435,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3847,7 +3445,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 87 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 72 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3906,14 +3504,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3923,12 +3521,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 91 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 76 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3984,7 +3582,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3996,7 +3594,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -4005,7 +3603,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4017,12 +3615,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4065,7 +3663,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -4073,7 +3671,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -4081,7 +3679,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4089,7 +3687,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 100 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4097,7 +3695,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 101 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -4133,7 +3731,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 102 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 87 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4154,7 +3752,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 103 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 88 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4186,51 +3784,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 104 ;) (param $0 i64) - i32.const 1 - global.set $~lib/math/random_seeded - local.get $0 - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state0_64 - global.get $~lib/math/random_state0_64 - i64.const -1 - i64.xor - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state1_64 - local.get $0 - i32.wrap_i64 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state0_32 - global.get $~lib/math/random_state0_32 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state1_32 - global.get $~lib/math/random_state1_32 - i32.const 0 - i32.ne - i32.const 0 - global.get $~lib/math/random_state0_32 - i32.const 0 - global.get $~lib/math/random_state1_64 - i64.const 0 - i64.ne - i32.const 0 - global.get $~lib/math/random_state0_64 - i64.const 0 - i64.ne - select - select - select - i32.eqz - if - i32.const 0 - i32.const 4032 - i32.const 1406 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/util/sort/insertionSort (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 89 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4308,19 +3862,14 @@ end end ) - (func $~lib/rt/tlsf/__free (; 106 ;) (param $0 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/sort/weakHeapSort (; 107 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 90 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) (local $5 i32) (local $6 f32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -4330,7 +3879,9 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -4558,8 +4109,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f32.load offset=4 local.set $4 @@ -4571,7 +4124,7 @@ local.get $4 f32.store ) - (func $~lib/array/Array#sort (; 108 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 91 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -4633,7 +4186,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 109 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4662,7 +4215,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 110 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 93 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4727,7 +4280,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 111 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 94 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -4805,13 +4358,14 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 112 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 95 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) (local $6 f64) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -4821,7 +4375,9 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -5049,8 +4605,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f64.load offset=8 local.set $4 @@ -5062,7 +4620,7 @@ local.get $4 f64.store ) - (func $~lib/array/Array#sort (; 113 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 96 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5124,7 +4682,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 114 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 97 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -5153,7 +4711,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 115 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -5174,7 +4732,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 116 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 99 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -5239,7 +4797,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 117 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 100 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5318,13 +4876,14 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 101 ;) (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 $8 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -5334,7 +4893,9 @@ i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $3 @@ -5564,8 +5125,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 i32.load offset=4 local.set $1 @@ -5577,7 +5140,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 119 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 102 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5641,12 +5204,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 120 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 103 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 121 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5655,7 +5218,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 122 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 105 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5683,7 +5246,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 123 ;) (result f64) + (func $~lib/math/NativeMath.random (; 106 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5727,7 +5290,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 124 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 107 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5755,53 +5318,52 @@ end local.get $2 ) - (func $std/array/isSorted (; 125 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSorted (; 108 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 1 - local.set $2 - local.get $0 - i32.load offset=12 - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $2 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.get $0 + (local $4 i32) + block $__inlined_func$std/array/isSorted (result i32) + i32.const 1 + local.set $2 + local.get $0 + local.get $1 + call $~lib/array/Array#sort + local.tee $0 + local.set $3 + local.get $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__get - local.get $1 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s + local.get $4 + i32.lt_s if + i32.const 2 + global.set $~argumentsLength i32.const 0 - return + local.get $3 + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.get $3 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s + br_if $__inlined_func$std/array/isSorted + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 1 end - i32.const 1 - ) - (func $std/array/assertSorted (; 126 ;) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/array/Array#sort - local.tee $0 - local.get $1 - call $std/array/isSorted i32.eqz if i32.const 0 @@ -5812,40 +5374,21 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/array/assertSortedDefault (; 127 ;) (param $0 i32) - local.get $0 - i32.const 48 - call $std/array/assertSorted + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $start:std/array~anonymous|44 (; 128 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 109 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $0 - i32.load - local.tee $1 - local.get $2 - i32.ne - if - local.get $0 - local.get $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - call $~lib/rt/pure/__release - end - ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5873,57 +5416,34 @@ local.get $3 i32.store offset=12 end + local.get $2 local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__unchecked_set - ) - (func $std/array/createReverseOrderedNestedArray (; 131 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 2 i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + i32.shl + i32.add local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 + i32.load + local.tee $0 + i32.ne + if + local.get $1 + local.get $2 + call $~lib/rt/pure/__retain + i32.store local.get $0 - i32.const 2 - i32.lt_s + i32.const 8292 + i32.gt_u if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 local.get $0 + i32.const 16 i32.sub - call $~lib/array/Array#__set - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + call $~lib/rt/pure/decrement end end - local.get $1 ) - (func $start:std/array~anonymous|47 (; 132 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 111 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5932,7 +5452,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 133 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 112 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5986,7 +5506,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 134 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 113 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6019,16 +5539,44 @@ i32.gt_s if local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 return end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -6038,7 +5586,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 135 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 114 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -6055,15 +5603,25 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/array/createReverseOrderedElementsArray (; 136 ;) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 115 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 14 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 512 i32.const 2 @@ -6079,9 +5637,12 @@ i32.const 512 i32.lt_s if + call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 511 @@ -6093,7 +5654,14 @@ local.get $2 call $~lib/array/Array<~lib/array/Array>#__set local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -6103,14 +5671,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 137 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 116 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 138 ;) (param $0 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 117 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6142,16 +5710,44 @@ i32.gt_s if local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + return + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.add @@ -6161,33 +5757,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String | null> (; 139 ;) (param $0 i32) - local.get $0 - i32.const 55 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $0 - call $std/array/isSorted<~lib/string/String | null> - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 881 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/string/String#get:length (; 140 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6263,7 +5833,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -6281,27 +5851,34 @@ i32.const 0 return end - local.get $0 - call $~lib/string/String#get:length - local.set $2 i32.const 0 local.get $1 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 i32.eqz - local.get $2 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $3 select if i32.const 0 return end - local.get $2 + local.get $3 i32.eqz if i32.const -1 return end - local.get $3 + local.get $2 i32.eqz if i32.const 1 @@ -6309,15 +5886,15 @@ end local.get $0 local.get $1 - local.get $2 local.get $3 local.get $2 local.get $3 + local.get $2 i32.lt_s select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 120 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6336,10 +5913,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -6351,7 +5936,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 144 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 121 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6390,16 +5975,44 @@ i32.eqz if local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 return end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 1 i32.add @@ -6409,31 +6022,7 @@ end i32.const 1 ) - (func $~lib/string/String#charAt (; 145 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 4080 - call $~lib/string/String#get:length - i32.ge_u - if - i32.const 5120 - return - end - i32.const 2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - i32.const 1 - i32.shl - i32.const 4080 - i32.add - i32.load16_u - i32.store16 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#concat (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 122 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6449,34 +6038,60 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 5232 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if + i32.const 5120 + local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5120 - local.tee $0 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -6489,18 +6104,17 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 ) - (func $~lib/string/String.__concat (; 147 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 5232 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat - ) - (func $std/array/createRandomString (; 148 ;) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 123 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6509,96 +6123,110 @@ i32.const 5120 local.set $1 loop $for-loop|0 - local.get $2 + local.get $4 local.get $0 i32.lt_s if local.get $1 local.tee $3 + i32.const 5232 local.get $1 - call $~lib/math/NativeMath.random - i32.const 4080 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - call $~lib/string/String#charAt - local.tee $4 - call $~lib/string/String.__concat + select + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 5120 + call $~lib/math/NativeMath.random + i32.const 4076 + i32.load + i32.const 1 + i32.shr_u + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $1 + i32.const 4076 + i32.load + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charAt + drop + call $~lib/rt/tlsf/maybeInitialize + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $1 + i32.const 1 + i32.shl + i32.const 4080 + i32.add + i32.load16_u + i32.store16 + local.get $2 + call $~lib/rt/pure/__retain + end + local.tee $2 + call $~lib/string/String#concat local.tee $5 local.tee $1 + local.get $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end local.get $1 ) - (func $std/array/createRandomStringArray (; 149 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 400 - i32.store offset=12 - loop $for-loop|0 - local.get $1 - i32.const 400 - i32.lt_s - if - local.get $0 - local.get $1 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - ) - (func $~lib/string/String#substring (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 124 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length - local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 i32.const 0 local.get $2 i32.lt_s @@ -6653,9 +6281,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -6665,7 +6296,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 125 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6676,14 +6307,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $3 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $2 + local.get $3 i32.eqz if i32.const 5296 @@ -6694,9 +6325,11 @@ call $~lib/rt/pure/__retain return end - local.get $2 - i32.const 5360 - call $~lib/string/String#get:length + local.get $3 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 5 i32.add @@ -6706,15 +6339,20 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.set $3 + local.set $2 i32.const 0 local.set $1 loop $for-loop|1 local.get $5 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -6726,7 +6364,7 @@ i32.const 4 i32.add local.set $6 - local.get $3 + local.get $2 local.get $1 i32.const 1 i32.shl @@ -6745,7 +6383,7 @@ local.set $1 local.get $4 if - local.get $3 + local.get $2 local.get $1 i32.const 1 i32.shl @@ -6768,22 +6406,22 @@ end end local.get $0 - local.get $2 + local.get $3 i32.add i32.load8_u - local.tee $2 + local.tee $3 i32.eqz i32.const 4 i32.add local.set $0 - local.get $3 + local.get $2 local.get $1 i32.const 1 i32.shl i32.add i32.const 5296 i32.const 5328 - local.get $2 + local.get $3 select local.get $0 i32.const 1 @@ -6796,16 +6434,23 @@ local.tee $0 i32.gt_s if - local.get $3 + local.get $2 local.get $0 call $~lib/string/String#substring - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end - local.get $3 + local.get $2 ) - (func $~lib/util/number/decimalCount32 (; 152 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 126 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6853,7 +6498,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6877,7 +6522,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 154 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 128 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6890,7 +6535,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -6899,27 +6544,32 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6961,7 +6611,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6987,7 +6637,11 @@ end local.get $4 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 i32.const 11 i32.add @@ -6997,8 +6651,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $3 i32.const 0 @@ -7063,20 +6722,19 @@ local.get $0 call $~lib/string/String#substring local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $3 ) - (func $~lib/array/Array#join (; 157 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/utoa32 (; 158 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 131 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7087,19 +6745,24 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple local.get $2 + call $~lib/util/number/utoa_simple + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 159 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -7123,7 +6786,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7149,7 +6812,11 @@ end local.get $4 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 i32.const 10 i32.add @@ -7159,8 +6826,13 @@ local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $3 i32.const 0 @@ -7225,20 +6897,19 @@ local.get $0 call $~lib/string/String#substring local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $3 ) - (func $~lib/array/Array#join (; 161 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/number/genDigits (; 162 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 134 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7628,7 +7299,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 163 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 135 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7873,7 +7544,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 164 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 136 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8182,7 +7853,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 165 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 137 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8214,9 +7885,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/util/number/dtoa_core @@ -8231,10 +7905,12 @@ local.get $1 local.get $2 call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize local.get $1 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 166 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8305,7 +7981,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 167 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8330,8 +8006,10 @@ return end local.get $3 - i32.const 5792 - call $~lib/string/String#get:length + i32.const 5788 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 28 i32.add @@ -8341,8 +8019,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -8407,12 +8090,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 168 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8420,8 +8110,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - local.get $2 - local.set $5 local.get $1 i32.const 1 i32.sub @@ -8432,6 +8120,8 @@ i32.const 5120 return end + local.get $2 + local.set $7 i32.const 0 local.set $2 local.get $6 @@ -8453,14 +8143,25 @@ i32.const 5120 end local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - local.get $5 - call $~lib/string/String#get:length - local.set $8 + local.get $7 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.set $9 loop $for-loop|0 local.get $4 local.get $6 @@ -8481,18 +8182,29 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $2 call $~lib/rt/pure/__retain local.tee $3 + local.set $8 + local.get $1 local.get $1 + i32.const 5232 local.get $1 + select local.get $3 - call $~lib/string/String.__concat - local.tee $9 + call $~lib/string/String#concat + local.tee $5 local.tee $3 i32.ne if @@ -8500,22 +8212,48 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release local.get $3 local.set $1 end - local.get $8 + local.get $9 if local.get $1 local.tee $3 - local.get $5 - call $~lib/string/String.__concat - local.tee $7 + i32.const 5232 + local.get $1 + select + local.get $7 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $3 i32.ne if @@ -8523,10 +8261,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $7 - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -8549,46 +8301,79 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if local.get $3 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 + local.set $0 local.get $1 + i32.const 5232 local.get $1 - local.get $0 - call $~lib/string/String.__concat - local.tee $0 + select + local.get $2 + call $~lib/string/String#concat local.tee $2 + local.set $4 + local.get $1 + local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 local.set $1 end local.get $3 - call $~lib/rt/pure/__release - local.get $1 - ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 169 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - local.get $1 - call $~lib/util/string/joinReferenceArray<~lib/string/String | null> + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 ) - (func $~lib/util/string/joinReferenceArray (; 170 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 141 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8598,14 +8383,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -8617,21 +8402,32 @@ local.set $4 end local.get $4 - call $~lib/rt/pure/__release - i32.const 7104 - i32.const 5120 + if (result i32) + i32.const 7104 + else + i32.const 5120 + end local.get $4 - select + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - i32.const 5360 - call $~lib/string/String#get:length + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.set $7 loop $for-loop|0 local.get $4 - local.get $5 + local.get $6 i32.lt_s if local.get $3 @@ -8649,15 +8445,25 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 if local.get $1 local.get $1 + i32.const 5232 + local.get $1 + select i32.const 7104 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat + local.tee $5 local.tee $2 i32.ne if @@ -8665,10 +8471,24 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release local.get $2 local.set $1 end @@ -8676,10 +8496,14 @@ if local.get $1 local.tee $2 + i32.const 5232 + local.get $1 + select i32.const 5360 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $2 i32.ne if @@ -8687,10 +8511,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -8700,7 +8538,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -8713,46 +8551,66 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $1 + i32.const 5232 local.get $1 + select i32.const 7104 - call $~lib/string/String.__concat - local.tee $0 + call $~lib/string/String#concat local.tee $3 + local.set $0 + local.get $1 + local.get $3 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) - (func $~lib/array/Array#join (; 171 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray - ) - (func $~lib/array/Array#toString (; 172 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 5360 - call $~lib/array/Array#join - ) - (func $~lib/util/number/itoa_stream (; 173 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8807,7 +8665,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 174 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8832,8 +8690,10 @@ return end local.get $3 - i32.const 5360 - call $~lib/string/String#get:length + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 11 i32.add @@ -8843,8 +8703,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -8905,12 +8770,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8940,7 +8812,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8965,8 +8837,10 @@ return end local.get $3 - i32.const 5360 - call $~lib/string/String#get:length + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -8976,8 +8850,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -9042,12 +8921,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 177 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 146 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -9100,7 +8986,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 178 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 147 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -9127,50 +9013,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 179 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 180 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -9210,12 +9053,13 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 181 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 149 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -9229,38 +9073,93 @@ local.get $3 i32.eqz if - local.get $0 - i64.load - call $~lib/util/number/utoa64 + block $__inlined_func$~lib/util/number/utoa64 (result i32) + i32.const 5472 + local.get $0 + i64.load + local.tee $4 + i64.eqz + br_if $__inlined_func$~lib/util/number/utoa64 + drop + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 - i32.const 5360 - call $~lib/string/String#get:length - local.tee $4 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -9269,7 +9168,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -9277,23 +9176,23 @@ i32.shl i32.add i32.const 5360 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 @@ -9312,12 +9211,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/util/number/itoa64 (; 182 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 150 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9331,7 +9237,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $1 + local.tee $2 if i64.const 0 local.get $0 @@ -9344,44 +9250,54 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $3 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $4 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $3 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $2 + local.get $3 call $~lib/util/number/utoa_simple end - local.get $1 + local.get $2 if - local.get $3 + local.get $1 i32.const 45 i32.store16 end - local.get $3 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 183 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9442,7 +9358,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 184 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9467,8 +9383,10 @@ return end local.get $3 - i32.const 5360 - call $~lib/string/String#get:length + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 21 i32.add @@ -9478,8 +9396,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -9544,17 +9467,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/array/Array<~lib/string/String | null>#toString (; 185 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 5360 - call $~lib/array/Array<~lib/string/String | null>#join - ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 153 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9565,14 +9490,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -9586,22 +9511,35 @@ local.get $3 if (result i32) local.get $3 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $3 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray else i32.const 5120 end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - i32.const 5360 - call $~lib/string/String#get:length - local.set $7 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u + local.set $8 loop $for-loop|0 local.get $3 - local.get $5 + local.get $6 i32.lt_s if local.get $4 @@ -9619,17 +9557,31 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $4 if local.get $1 local.get $1 + i32.const 5232 + local.get $1 + select local.get $4 - call $~lib/array/Array#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + i32.load offset=4 + local.get $4 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $5 + call $~lib/string/String#concat + local.tee $7 local.tee $2 i32.ne if @@ -9637,23 +9589,48 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 + i32.const 5232 + local.get $1 + select i32.const 5360 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $2 i32.ne if @@ -9661,10 +9638,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -9674,7 +9665,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -9687,38 +9678,81 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $1 + i32.const 5232 local.get $1 + select + local.get $2 + i32.load offset=4 local.get $2 - call $~lib/array/Array#toString + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray local.tee $0 - call $~lib/string/String.__concat - local.tee $3 + call $~lib/string/String#concat local.tee $4 + local.set $3 + local.get $1 + local.get $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) - (func $~lib/util/number/itoa_stream (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9748,7 +9782,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 188 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9773,8 +9807,10 @@ return end local.get $3 - i32.const 5360 - call $~lib/string/String#get:length + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -9784,8 +9820,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -9846,19 +9887,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/array/Array#toString (; 189 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 190 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 156 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9869,14 +9910,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -9890,22 +9931,34 @@ local.get $3 if (result i32) local.get $3 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $3 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray else i32.const 5120 end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - i32.const 5360 - call $~lib/string/String#get:length - local.set $7 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u + local.set $8 loop $for-loop|0 local.get $3 - local.get $5 + local.get $6 i32.lt_s if local.get $4 @@ -9923,17 +9976,30 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $4 if local.get $1 local.get $1 + i32.const 5232 + local.get $1 + select local.get $4 - call $~lib/array/Array#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + i32.load offset=4 + local.get $4 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray + local.tee $5 + call $~lib/string/String#concat + local.tee $7 local.tee $2 i32.ne if @@ -9941,23 +10007,48 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 + i32.const 5232 + local.get $1 + select i32.const 5360 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $2 i32.ne if @@ -9965,10 +10056,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -9978,7 +10083,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -9991,43 +10096,80 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $1 + i32.const 5232 local.get $1 + select local.get $2 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $2 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray local.tee $0 - call $~lib/string/String.__concat - local.tee $3 + call $~lib/string/String#concat local.tee $4 + local.set $3 + local.get $1 + local.get $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - call $~lib/rt/pure/__release - end + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) - (func $~lib/array/Array#toString (; 191 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 5360 - call $~lib/array/Array#join - ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 192 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 157 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10038,14 +10180,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -10059,22 +10201,35 @@ local.get $3 if (result i32) local.get $3 - call $~lib/array/Array#toString + i32.load offset=4 + local.get $3 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray else i32.const 5120 end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - i32.const 5360 - call $~lib/string/String#get:length - local.set $7 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u + local.set $8 loop $for-loop|0 local.get $3 - local.get $5 + local.get $6 i32.lt_s if local.get $4 @@ -10092,17 +10247,31 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $4 if local.get $1 local.get $1 + i32.const 5232 + local.get $1 + select local.get $4 - call $~lib/array/Array#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + i32.load offset=4 + local.get $4 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $5 + call $~lib/string/String#concat + local.tee $7 local.tee $2 i32.ne if @@ -10110,23 +10279,48 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 + i32.const 5232 + local.get $1 + select i32.const 5360 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $2 i32.ne if @@ -10134,10 +10328,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -10147,7 +10355,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -10160,45 +10368,81 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $1 + i32.const 5232 local.get $1 + select + local.get $2 + i32.load offset=4 local.get $2 - call $~lib/array/Array#toString + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray local.tee $0 - call $~lib/string/String.__concat - local.tee $3 + call $~lib/string/String#concat local.tee $4 + local.set $3 + local.get $1 + local.get $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 193 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array> - ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 194 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10209,14 +10453,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $5 + local.get $6 i32.eqz if local.get $0 @@ -10230,22 +10474,34 @@ local.get $3 if (result i32) local.get $3 - call $~lib/array/Array<~lib/array/Array>#toString + i32.load offset=4 + local.get $3 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> else i32.const 5120 end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end i32.const 5120 local.set $1 - i32.const 5360 - call $~lib/string/String#get:length - local.set $7 + i32.const 5356 + i32.load + i32.const 1 + i32.shr_u + local.set $8 loop $for-loop|0 local.get $3 - local.get $5 + local.get $6 i32.lt_s if local.get $4 @@ -10263,17 +10519,30 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $4 if local.get $1 local.get $1 + i32.const 5232 + local.get $1 + select local.get $4 - call $~lib/array/Array<~lib/array/Array>#toString - local.tee $6 - call $~lib/string/String.__concat - local.tee $8 + i32.load offset=4 + local.get $4 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> + local.tee $5 + call $~lib/string/String#concat + local.tee $7 local.tee $2 i32.ne if @@ -10281,23 +10550,48 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $7 + local.get $8 if local.get $1 local.tee $2 + i32.const 5232 + local.get $1 + select i32.const 5360 - call $~lib/string/String.__concat - local.tee $6 + call $~lib/string/String#concat local.tee $1 + local.set $5 + local.get $1 local.get $2 i32.ne if @@ -10305,10 +10599,24 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $6 - call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -10318,7 +10626,7 @@ end end local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -10331,38 +10639,80 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 if local.get $1 + i32.const 5232 local.get $1 + select + local.get $2 + i32.load offset=4 local.get $2 - call $~lib/array/Array<~lib/array/Array>#toString + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - call $~lib/string/String.__concat - local.tee $3 + call $~lib/string/String#concat local.tee $4 + local.set $3 + local.get $1 + local.get $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 local.set $1 end local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 ) - (func $start:std/array (; 195 ;) + (func $start:std/array (; 159 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10393,9 +10743,9 @@ (local $27 i32) (local $28 i32) (local $29 i32) - (local $30 i32) + (local $30 f32) (local $31 i32) - (local $32 i32) + (local $32 f64) (local $33 i32) (local $34 i32) (local $35 i32) @@ -10419,31 +10769,27 @@ (local $53 i32) (local $54 i32) (local $55 i32) + (local $56 i32) + (local $57 i64) + (local $58 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr i32.const 0 - call $~lib/array/Array.isArray<~lib/array/Array | null> - if - i32.const 0 - i32.const 304 - i32.const 40 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 call $std/array/Ref#constructor + local.set $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor local.set $1 global.get $std/array/arr - call $~lib/array/Array.isArray<~lib/array/Array | null> i32.eqz if i32.const 0 @@ -10453,9 +10799,24 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 0 i32.const 6 @@ -10467,7 +10828,15 @@ i32.const 1 i32.const 3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -10491,7 +10860,15 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -10499,7 +10876,7 @@ i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -10515,7 +10892,15 @@ i32.const 0 i32.const -3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -10523,7 +10908,7 @@ i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -10539,7 +10924,15 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -10563,7 +10956,15 @@ i32.const 1 i32.const 0 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -10571,7 +10972,7 @@ i32.const 656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -10583,17 +10984,59 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 7 @@ -10605,7 +11048,15 @@ i32.const 1 i32.const 3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -10630,7 +11081,15 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -10638,7 +11097,7 @@ i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10655,7 +11114,15 @@ i32.const 0 i32.const -3 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -10663,7 +11130,7 @@ i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10680,7 +11147,15 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -10705,7 +11180,15 @@ i32.const 1 i32.const 0 call $~lib/array/Array#fill - call $~lib/rt/pure/__release + local.tee $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -10713,7 +11196,7 @@ i32.const 928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10726,17 +11209,59 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.load offset=12 if @@ -10748,7 +11273,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s if i32.const 0 i32.const 304 @@ -10786,7 +11316,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -10820,7 +11355,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -10847,7 +11387,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 1 i32.ne if @@ -10887,9 +11432,14 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 i32.const 2 - i32.ne + i32.shr_s + i32.const 2 + i32.ne if i32.const 0 i32.const 304 @@ -10940,7 +11490,12 @@ unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -10996,19 +11551,59 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $0 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $0 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 - call $~lib/array/Array#set:length - local.get $0 + local.get $1 + i32.load offset=12 + local.tee $3 + i32.const 0 + i32.gt_s + if + local.get $1 + i32.load offset=4 + local.tee $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $3 + loop $do-continue|0 + local.get $0 + i32.load + local.tee $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 4 + i32.add + local.tee $0 + local.get $3 + i32.lt_u + br_if $do-continue|0 + end + else + local.get $1 + i32.const 0 + call $~lib/array/ensureSize + end + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 i32.load offset=12 if i32.const 0 @@ -11018,17 +11613,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 call $~lib/array/Array#constructor local.set $1 global.get $std/array/arr local.get $1 call $~lib/array/Array#concat - local.set $4 + local.set $3 global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -11051,7 +11658,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -11063,7 +11670,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 i32.const 2 i32.const 3 @@ -11072,9 +11679,22 @@ call $~lib/rt/pure/__retain local.tee $2 call $~lib/array/Array#concat - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -11085,7 +11705,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -11098,7 +11718,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -11111,7 +11731,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -11134,10 +11754,22 @@ local.get $1 call $~lib/array/Array#concat local.set $0 - local.get $4 - call $~lib/rt/pure/__release + local.get $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 3 i32.ne if @@ -11258,7 +11890,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.load offset=12 if i32.const 0 @@ -11268,13 +11900,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 global.get $std/array/arr call $~lib/array/Array#concat - local.set $6 + local.set $5 local.get $0 - call $~lib/rt/pure/__release - local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 i32.load offset=12 i32.const 3 i32.ne @@ -11286,7 +11925,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=12 if i32.const 0 @@ -11297,13 +11936,41 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 3 @@ -11315,14 +11982,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $4 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11342,7 +12009,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.const 1 i32.const 3 @@ -11355,7 +12029,7 @@ i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11373,21 +12047,29 @@ i32.const 1248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $6 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11405,14 +12087,21 @@ i32.const 1344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $7 i32.const 5 i32.const 2 i32.const 3 @@ -11437,9 +12126,16 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const 3 i32.const 4 @@ -11469,9 +12165,16 @@ i32.const 1536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 3 i32.const 4 @@ -11501,9 +12204,16 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 2 i32.const 4 @@ -11515,7 +12225,7 @@ i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11533,14 +12243,21 @@ i32.const 1728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 0 - i32.const -2 - i32.const 2147483647 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const 0 + i32.const -2 + i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 @@ -11565,9 +12282,16 @@ i32.const 1824 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const -2 i32.const -1 @@ -11579,7 +12303,7 @@ i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11597,9 +12321,16 @@ i32.const 1920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -2 @@ -11629,9 +12360,16 @@ i32.const 2016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -1 @@ -11661,15 +12399,22 @@ i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $1 + local.tee $0 i32.const 5 i32.const 2 i32.const 3 @@ -11688,261 +12433,259 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - 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 $5 - call $~lib/rt/pure/__release - local.get $7 - 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 $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $26 - 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 $15 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release - local.get $20 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release local.get $1 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.const 42 - call $~lib/array/Array#unshift - global.get $std/array/arr - i32.load offset=12 - i32.const 4 - i32.ne + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 216 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - call $std/array/internalCapacity - i32.const 4 - i32.ne + local.get $3 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 217 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 42 - i32.ne + local.get $5 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 218 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#__get - i32.const 43 - i32.ne + local.get $2 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 219 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#__get - i32.const 44 - i32.ne + local.get $4 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 220 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#__get - i32.const 45 - i32.ne + local.get $6 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 221 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 41 - call $~lib/array/Array#unshift - global.get $std/array/arr - i32.load offset=12 - i32.const 5 - i32.ne + local.get $8 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 225 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 - i32.ne + local.get $7 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 226 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 41 - i32.ne + local.get $9 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 227 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#__get - i32.const 42 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 228 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $10 + i32.const 8292 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#__get - i32.const 43 - i32.ne + local.get $11 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 229 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#__get - i32.const 44 - i32.ne + local.get $12 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 230 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - i32.const 4 - call $~lib/array/Array#__get - i32.const 45 - i32.ne + local.get $13 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 231 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - global.get $std/array/arr - call $~lib/array/Array#shift - global.set $std/array/i - global.get $std/array/i - i32.const 41 - i32.ne + local.get $14 + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 240 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 8292 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 8292 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $17 + i32.const 8292 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $18 + i32.const 8292 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 8292 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $19 + i32.const 8292 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $20 + i32.const 8292 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $21 + i32.const 8292 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $22 + i32.const 8292 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $23 + i32.const 8292 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end global.get $std/array/arr + i32.const 42 + call $~lib/array/Array#unshift + global.get $std/array/arr i32.load offset=12 i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 241 + i32.const 216 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 242 + i32.const 217 i32.const 2 call $~lib/builtins/abort unreachable @@ -11955,7 +12698,7 @@ if i32.const 0 i32.const 304 - i32.const 243 + i32.const 218 i32.const 2 call $~lib/builtins/abort unreachable @@ -11968,7 +12711,7 @@ if i32.const 0 i32.const 304 - i32.const 244 + i32.const 219 i32.const 2 call $~lib/builtins/abort unreachable @@ -11981,7 +12724,7 @@ if i32.const 0 i32.const 304 - i32.const 245 + i32.const 220 i32.const 2 call $~lib/builtins/abort unreachable @@ -11994,45 +12737,39 @@ if i32.const 0 i32.const 304 - i32.const 246 + i32.const 221 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $~lib/array/Array#pop - global.set $std/array/i - global.get $std/array/i - i32.const 45 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 250 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 41 + call $~lib/array/Array#unshift global.get $std/array/arr i32.load offset=12 - i32.const 3 + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 251 + i32.const 225 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $std/array/internalCapacity + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 252 + i32.const 226 i32.const 2 call $~lib/builtins/abort unreachable @@ -12040,12 +12777,12 @@ global.get $std/array/arr i32.const 0 call $~lib/array/Array#__get - i32.const 42 + i32.const 41 i32.ne if i32.const 0 i32.const 304 - i32.const 253 + i32.const 227 i32.const 2 call $~lib/builtins/abort unreachable @@ -12053,12 +12790,12 @@ global.get $std/array/arr i32.const 1 call $~lib/array/Array#__get - i32.const 43 + i32.const 42 i32.ne if i32.const 0 i32.const 304 - i32.const 254 + i32.const 228 i32.const 2 call $~lib/builtins/abort unreachable @@ -12066,310 +12803,412 @@ global.get $std/array/arr i32.const 2 call $~lib/array/Array#__get - i32.const 44 + i32.const 43 i32.ne if i32.const 0 i32.const 304 - i32.const 255 + i32.const 229 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $~lib/array/Array#reverse - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.load offset=12 i32.const 3 + call $~lib/array/Array#__get + i32.const 44 i32.ne if i32.const 0 i32.const 304 - i32.const 263 + i32.const 230 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 + i32.const 4 + call $~lib/array/Array#__get + i32.const 45 i32.ne if i32.const 0 i32.const 304 - i32.const 264 + i32.const 231 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#__get - i32.const 44 - i32.ne + local.tee $1 + i32.load offset=12 + local.tee $3 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 512 + i32.const 349 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=4 + local.tee $0 + i32.load + local.get $0 + local.get $0 + i32.const 4 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.tee $3 + i32.const 2 + i32.shl + local.tee $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + i32.const 0 + i32.store + local.get $1 + local.get $3 + i32.store offset=12 + global.set $std/array/i + global.get $std/array/i + i32.const 41 + i32.ne if i32.const 0 i32.const 304 - i32.const 265 + i32.const 240 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#__get - i32.const 43 + i32.load offset=12 + i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 266 + i32.const 241 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=12 i32.const 2 - call $~lib/array/Array#__get - i32.const 42 + i32.shr_s + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 267 + i32.const 242 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 44 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 44 i32.const 0 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i + call $~lib/array/Array#__get + i32.const 42 + i32.ne if i32.const 0 i32.const 304 - i32.const 277 + i32.const 243 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 42 - i32.const 0 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const 2 + i32.const 1 + call $~lib/array/Array#__get + i32.const 43 i32.ne if i32.const 0 i32.const 304 - i32.const 280 + i32.const 244 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 45 - i32.const 0 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const -1 + i32.const 2 + call $~lib/array/Array#__get + i32.const 44 i32.ne if i32.const 0 i32.const 304 - i32.const 283 + i32.const 245 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - i32.const 100 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const -1 + i32.const 3 + call $~lib/array/Array#__get + i32.const 45 i32.ne if i32.const 0 i32.const 304 - i32.const 286 + i32.const 246 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - i32.const -100 - call $~lib/array/Array#indexOf + call $~lib/array/Array#pop global.set $std/array/i global.get $std/array/i - i32.const 1 + i32.const 45 i32.ne if i32.const 0 i32.const 304 - i32.const 289 + i32.const 250 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - i32.const -2 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 292 + i32.const 251 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - i32.const -4 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const 1 + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 295 + i32.const 252 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 i32.const 0 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const 1 + call $~lib/array/Array#__get + i32.const 42 i32.ne if i32.const 0 i32.const 304 - i32.const 298 + i32.const 253 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 - i32.const 1 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i i32.const 1 + call $~lib/array/Array#__get + i32.const 43 i32.ne if i32.const 0 i32.const 304 - i32.const 301 + i32.const 254 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 43 i32.const 2 - call $~lib/array/Array#indexOf - global.set $std/array/i - global.get $std/array/i - i32.const 3 + call $~lib/array/Array#__get + i32.const 44 i32.ne if i32.const 0 i32.const 304 - i32.const 304 + i32.const 255 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - i32.const 2 - i32.const 9 - i32.const 2208 - call $~lib/rt/__allocArray + global.get $std/array/arr + local.tee $3 + i32.load offset=12 + local.tee $1 + if + local.get $3 + i32.load offset=4 + local.set $0 + local.get $3 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $while-continue|0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $0 + i32.load + local.set $5 + local.get $0 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $5 + i32.store + local.get $0 + i32.const 4 + i32.add + local.set $0 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + br $while-continue|0 + end + end + end + local.get $3 call $~lib/rt/pure/__retain local.tee $0 - call $~lib/array/Array#indexOf - i32.const -1 + local.set $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $std/array/arr + i32.load offset=12 + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 306 + i32.const 263 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - i32.const 3 - i32.const 10 - i32.const 2240 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#indexOf - i32.const -1 + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 307 + i32.const 264 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release global.get $std/array/arr - i32.const 44 i32.const 0 - call $~lib/array/Array#includes - i32.const 1 + call $~lib/array/Array#__get + i32.const 44 i32.ne if i32.const 0 i32.const 304 - i32.const 314 + i32.const 265 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 42 - i32.const 0 - call $~lib/array/Array#includes i32.const 1 + call $~lib/array/Array#__get + i32.const 43 i32.ne if i32.const 0 i32.const 304 - i32.const 317 + i32.const 266 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#__get + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 267 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 43 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 44 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 44 + i32.const 0 + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + if + i32.const 0 + i32.const 304 + i32.const 277 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 42 + i32.const 0 + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 280 i32.const 2 call $~lib/builtins/abort unreachable @@ -12377,11 +13216,15 @@ global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 320 + i32.const 283 i32.const 2 call $~lib/builtins/abort unreachable @@ -12389,11 +13232,15 @@ global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 323 + i32.const 286 i32.const 2 call $~lib/builtins/abort unreachable @@ -12401,13 +13248,15 @@ global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 326 + i32.const 289 i32.const 2 call $~lib/builtins/abort unreachable @@ -12415,13 +13264,15 @@ global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#includes - i32.const 1 + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 329 + i32.const 292 i32.const 2 call $~lib/builtins/abort unreachable @@ -12429,13 +13280,15 @@ global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 332 + i32.const 295 i32.const 2 call $~lib/builtins/abort unreachable @@ -12443,13 +13296,15 @@ global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 335 + i32.const 298 i32.const 2 call $~lib/builtins/abort unreachable @@ -12457,13 +13312,15 @@ global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#includes + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 338 + i32.const 301 i32.const 2 call $~lib/builtins/abort unreachable @@ -12471,13 +13328,15 @@ global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#includes - i32.const 1 + call $~lib/array/Array#indexOf + global.set $std/array/i + global.get $std/array/i + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 341 + i32.const 304 i32.const 2 call $~lib/builtins/abort unreachable @@ -12485,16 +13344,63 @@ i32.const 1 i32.const 2 i32.const 9 - i32.const 2272 + i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/array/Array#includes - i32.eqz + local.tee $1 + local.set $2 + i32.const 0 + local.set $0 + block $__inlined_func$~lib/array/Array#indexOf + local.get $1 + i32.load offset=12 + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $0 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $2 + i32.load offset=4 + local.set $5 + loop $while-continue|090 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.const nan:0x400000 + f32.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|090 + end + end + i32.const -1 + local.set $0 + end + local.get $0 + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 343 + i32.const 306 i32.const 2 call $~lib/builtins/abort unreachable @@ -12502,425 +13408,505 @@ i32.const 1 i32.const 3 i32.const 10 - i32.const 2304 + i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#includes - i32.eqz + local.tee $3 + local.set $4 + i32.const 0 + local.set $0 + block $__inlined_func$~lib/array/Array#indexOf + local.get $3 + i32.load offset=12 + local.tee $5 + if (result i32) + i32.const 0 + local.get $5 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $0 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $4 + i32.load offset=4 + local.set $2 + loop $while-continue|091 + local.get $0 + local.get $5 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.const nan:0x8000000000000 + f64.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|091 + end + end + i32.const -1 + local.set $0 + end + local.get $0 + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 307 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr + i32.const 44 + i32.const 0 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s i32.const 1 - i32.const 1 - call $~lib/array/Array#splice - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.load offset=12 - i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 348 + i32.const 314 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 + i32.const 42 + i32.const 0 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 349 + i32.const 317 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr + i32.const 45 i32.const 0 - call $~lib/array/Array#__get - i32.const 44 - i32.ne + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s if i32.const 0 i32.const 304 - i32.const 350 + i32.const 320 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#__get - i32.const 42 - i32.ne + i32.const 43 + i32.const 100 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s if i32.const 0 i32.const 304 - i32.const 351 + i32.const 323 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2336 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2147483647 - call $~lib/array/Array#splice - local.tee $5 - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 + global.get $std/array/arr + i32.const 43 + i32.const -100 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 358 + i32.const 326 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 0 - i32.const 2 - i32.const 3 - i32.const 2432 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $8 + global.get $std/array/arr + i32.const 43 + i32.const -2 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 359 + i32.const 329 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2448 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const 0 - i32.const 0 - call $~lib/array/Array#splice - local.tee $9 - i32.const 0 - i32.const 2 - i32.const 3 - i32.const 2496 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 + global.get $std/array/arr + i32.const 43 + i32.const -4 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 362 + i32.const 332 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2512 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $11 + global.get $std/array/arr + i32.const 43 i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 363 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2560 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - i32.const 2 - i32.const 2147483647 - call $~lib/array/Array#splice - local.tee $12 - i32.const 3 - i32.const 2 - i32.const 3 - i32.const 2608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $13 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 335 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 2640 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $14 + global.get $std/array/arr + i32.const 43 + i32.const 1 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 338 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 2 - i32.const 2 - call $~lib/array/Array#splice - local.tee $16 - i32.const 2 + global.get $std/array/arr + i32.const 43 i32.const 2 - i32.const 3 - i32.const 2720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $17 + call $~lib/array/Array#indexOf i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.ge_s + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 370 + i32.const 341 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 3 - i32.const 2 - i32.const 3 - i32.const 2752 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $18 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if + block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - i32.const 304 - i32.const 371 + local.set $1 + i32.const 0 + i32.const 1 i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 9 + i32.const 2272 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + local.tee $5 + if (result i32) + i32.const 0 + local.get $5 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $3 + i32.load offset=4 + local.set $4 + loop $while-continue|0103 + local.get $1 + local.get $5 + i32.lt_s + if + i32.const 1 + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $30 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $30 + local.get $30 + f32.ne + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0103 + end + end + i32.const 0 end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2784 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/array/Array#splice - local.tee $15 - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 2832 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $19 - i32.const 0 - call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 374 + i32.const 343 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 4 - i32.const 2 - i32.const 3 - i32.const 2864 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $20 - i32.const 0 - call $std/array/isArraysEqual + block $__inlined_func$~lib/array/Array#includes (result i32) + i32.const 0 + local.set $0 + i32.const 0 + i32.const 1 + i32.const 3 + i32.const 10 + i32.const 2304 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $1 + i32.load offset=4 + local.set $6 + loop $while-continue|0104 + local.get $0 + local.get $2 + i32.lt_s + if + i32.const 1 + local.get $6 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $32 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $32 + local.get $32 + f64.ne + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0104 + end + end + i32.const 0 + end i32.eqz if i32.const 0 i32.const 304 - i32.const 375 + i32.const 344 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 2896 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -1 - i32.const 2147483647 - call $~lib/array/Array#splice - local.tee $21 + global.get $std/array/arr i32.const 1 - i32.const 2 - i32.const 3 - i32.const 2944 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $22 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.const 1 + call $~lib/array/Array#splice + local.tee $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + global.get $std/array/arr + i32.load offset=12 + i32.const 4 + i32.ne if i32.const 0 i32.const 304 - i32.const 378 + i32.const 348 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 4 + global.get $std/array/arr + i32.load + i32.const 16 + i32.sub + i32.load offset=12 i32.const 2 - i32.const 3 - i32.const 2976 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $23 + i32.shr_s + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 349 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr i32.const 0 - call $std/array/isArraysEqual - i32.eqz + call $~lib/array/Array#__get + i32.const 44 + i32.ne if i32.const 0 i32.const 304 - i32.const 379 + i32.const 350 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 1 + call $~lib/array/Array#__get + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 351 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 5 i32.const 2 i32.const 3 - i32.const 3008 + i32.const 2336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -2 + local.tee $1 + i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $27 - i32.const 2 + local.tee $6 + i32.const 5 i32.const 2 i32.const 3 - i32.const 3056 + i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 382 + i32.const 358 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 3 + local.get $1 + i32.const 0 i32.const 2 i32.const 3 - i32.const 3088 + i32.const 2432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 383 + i32.const 359 i32.const 2 call $~lib/builtins/abort unreachable @@ -12928,49 +13914,57 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3120 + i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -2 - i32.const 1 + i32.const 0 + i32.const 0 call $~lib/array/Array#splice - local.tee $30 - i32.const 1 + local.tee $9 + i32.const 0 i32.const 2 i32.const 3 - i32.const 3168 + i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 386 + i32.const 362 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 4 + i32.const 5 i32.const 2 i32.const 3 - i32.const 3200 + i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 387 + i32.const 363 i32.const 2 call $~lib/builtins/abort unreachable @@ -12978,49 +13972,57 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3232 + i32.const 2560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -7 - i32.const 1 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 2 + i32.const 2147483647 call $~lib/array/Array#splice - local.tee $31 - i32.const 1 + local.tee $12 + i32.const 3 i32.const 2 i32.const 3 - i32.const 3280 + i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 390 + i32.const 366 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 4 + local.get $1 + i32.const 2 i32.const 2 i32.const 3 - i32.const 3312 + i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 391 + i32.const 367 i32.const 2 call $~lib/builtins/abort unreachable @@ -13028,49 +14030,57 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3344 + i32.const 2672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.tee $0 - i32.const -2 - i32.const -1 + i32.const 2 + i32.const 2 call $~lib/array/Array#splice - local.tee $34 - i32.const 0 + local.tee $15 + i32.const 2 i32.const 2 i32.const 3 - i32.const 3392 + i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 394 + i32.const 370 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 + i32.const 3 i32.const 2 i32.const 3 - i32.const 3408 + i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 395 + i32.const 371 i32.const 2 call $~lib/builtins/abort unreachable @@ -13078,49 +14088,56 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3456 + i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $0 + i32.const 0 i32.const 1 - i32.const -2 call $~lib/array/Array#splice - local.tee $37 - i32.const 0 + local.tee $16 + i32.const 1 i32.const 2 i32.const 3 - i32.const 3504 + i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 398 + i32.const 374 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 + i32.const 4 i32.const 2 i32.const 3 - i32.const 3520 + i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 399 + i32.const 375 i32.const 2 call $~lib/builtins/abort unreachable @@ -13128,49 +14145,56 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3568 + i32.const 2896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $0 - i32.const 4 - i32.const 0 + i32.const -1 + i32.const 2147483647 call $~lib/array/Array#splice - local.tee $40 - i32.const 0 + local.tee $21 + i32.const 1 i32.const 2 i32.const 3 - i32.const 3616 + i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 402 + i32.const 378 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 + i32.const 4 i32.const 2 i32.const 3 - i32.const 3632 + i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 403 + i32.const 379 i32.const 2 call $~lib/builtins/abort unreachable @@ -13178,50 +14202,56 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3680 + i32.const 3008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const 7 - i32.const 0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const -2 + i32.const 2147483647 call $~lib/array/Array#splice - local.tee $43 - i32.const 0 + local.tee $26 + i32.const 2 i32.const 2 i32.const 3 - i32.const 3728 + i32.const 3056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 406 + i32.const 382 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 5 + local.get $0 + i32.const 3 i32.const 2 i32.const 3 - i32.const 3744 + i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $28 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 407 + i32.const 383 i32.const 2 call $~lib/builtins/abort unreachable @@ -13229,278 +14259,642 @@ i32.const 5 i32.const 2 i32.const 3 - i32.const 3792 + i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - i32.const 7 - i32.const 5 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const -2 + i32.const 1 call $~lib/array/Array#splice - local.tee $46 - i32.const 0 + local.tee $29 + i32.const 1 i32.const 2 i32.const 3 - i32.const 3840 + i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 410 + i32.const 386 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 5 + local.get $0 + i32.const 4 i32.const 2 i32.const 3 - i32.const 3856 + i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $31 i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 411 + i32.const 387 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 0 + i32.const 5 i32.const 2 - i32.const 8 - i32.const 3904 + i32.const 3 + i32.const 3232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const -7 i32.const 1 - call $~lib/array/Array#splice - local.tee $3 - i32.load offset=12 + call $~lib/array/Array#splice + local.tee $33 + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 3280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $34 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 415 + i32.const 390 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=12 + local.get $0 + i32.const 4 + i32.const 2 + i32.const 3 + i32.const 3312 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $35 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 416 + i32.const 391 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 5 i32.const 2 - i32.const 8 - i32.const 0 + i32.const 3 + i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 - local.tee $0 - i32.const 1 - call $std/array/Ref#constructor - i32.store local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const -2 + i32.const -1 + call $~lib/array/Array#splice + local.tee $36 + i32.const 0 i32.const 2 - call $std/array/Ref#constructor - i32.store offset=4 - local.get $0 i32.const 3 - call $std/array/Ref#constructor - i32.store offset=8 - local.get $0 - i32.const 4 - call $std/array/Ref#constructor - i32.store offset=12 + i32.const 3392 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $37 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 394 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.const 5 - call $std/array/Ref#constructor - i32.store offset=16 - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - i32.const 2 - call $~lib/array/Array#splice - local.set $6 - local.get $3 - call $~lib/rt/pure/__release - local.get $6 - i32.load offset=12 i32.const 2 - i32.ne + i32.const 3 + i32.const 3408 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $38 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 421 + i32.const 395 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $6 + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 3456 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const 1 + i32.const -2 + call $~lib/array/Array#splice + local.tee $39 i32.const 0 - call $~lib/array/Array#__get - local.tee $49 - i32.load + i32.const 2 i32.const 3 - i32.ne + i32.const 3504 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $40 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 422 + i32.const 398 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 1 - call $~lib/array/Array#__get - local.tee $50 - i32.load - i32.const 4 - i32.ne + local.get $0 + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 3520 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $41 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 423 + i32.const 399 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=12 + i32.const 5 + i32.const 2 i32.const 3 - i32.ne + i32.const 3568 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const 4 + i32.const 0 + call $~lib/array/Array#splice + local.tee $42 + i32.const 0 + i32.const 2 + i32.const 3 + i32.const 3616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $43 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 425 + i32.const 402 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 3632 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $44 i32.const 0 - call $~lib/array/Array#__get - local.tee $51 - i32.load - i32.const 1 - i32.ne + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 426 + i32.const 403 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 3680 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - i32.const 1 - call $~lib/array/Array#__get - local.tee $52 - i32.load + i32.const 7 + i32.const 0 + call $~lib/array/Array#splice + local.tee $45 + i32.const 0 i32.const 2 - i32.ne + i32.const 3 + i32.const 3728 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $46 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 427 + i32.const 406 i32.const 2 call $~lib/builtins/abort unreachable end local.get $1 - i32.const 2 - call $~lib/array/Array#__get - local.tee $53 - i32.load i32.const 5 - i32.ne + i32.const 2 + i32.const 3 + i32.const 3744 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $47 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 428 + i32.const 407 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 3 + i32.const 5 i32.const 2 - i32.const 11 - i32.const 0 + i32.const 3 + i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.tee $0 - i32.const 1 - call $std/array/Ref#constructor - i32.store + local.set $0 + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 + i32.const 7 + i32.const 5 + call $~lib/array/Array#splice + local.tee $48 i32.const 0 - i32.store offset=4 - local.get $0 i32.const 2 - call $std/array/Ref#constructor - i32.store offset=8 - local.get $4 - call $~lib/array/Array#splice - local.tee $26 - i32.load offset=12 - i32.const 1 - i32.ne + i32.const 3 + i32.const 3840 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $49 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 433 + i32.const 410 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $26 - i32.const 0 - call $~lib/array/Array#__get - local.tee $0 local.get $0 + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 3856 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $50 + i32.const 0 + call $std/array/isArraysEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 434 - i32.const 9 - call $~lib/builtins/abort - unreachable - end - i32.load - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 434 + i32.const 411 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=12 + i32.const 0 + i32.const 2 + i32.const 8 + i32.const 3904 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 1 + call $~lib/array/Array#splice + local.tee $2 + i32.load offset=12 + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.load offset=12 + if + i32.const 0 + i32.const 304 + i32.const 416 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 5 + i32.const 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=4 + local.tee $3 + i32.const 1 + call $std/array/Ref#constructor + i32.store + local.get $3 + i32.const 2 + call $std/array/Ref#constructor + i32.store offset=4 + local.get $3 + i32.const 3 + call $std/array/Ref#constructor + i32.store offset=8 + local.get $3 + i32.const 4 + call $std/array/Ref#constructor + i32.store offset=12 + local.get $3 + i32.const 5 + call $std/array/Ref#constructor + i32.store offset=16 + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 2 + call $~lib/array/Array#splice + local.set $5 + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.load offset=12 + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 421 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 0 + call $~lib/array/Array#__get + local.tee $51 + i32.load + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 422 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + call $~lib/array/Array#__get + local.tee $52 + i32.load + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 423 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=12 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 425 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/array/Array#__get + local.tee $53 + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 426 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/array/Array#__get + local.tee $54 + i32.load + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 427 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + call $~lib/array/Array#__get + local.tee $55 + i32.load + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 428 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 3 + i32.const 2 + i32.const 11 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.tee $2 + i32.const 1 + call $std/array/Ref#constructor + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 2 + call $std/array/Ref#constructor + i32.store offset=8 + local.get $3 + call $~lib/array/Array#splice + local.tee $25 + i32.load offset=12 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 433 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $25 + i32.const 0 + call $~lib/array/Array#__get + local.tee $2 + local.get $2 + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 434 + i32.const 9 + call $~lib/builtins/abort + unreachable + end + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 434 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=12 i32.const 2 i32.ne if @@ -13511,10 +14905,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 0 call $~lib/array/Array#__get - local.tee $54 + local.tee $56 if i32.const 0 i32.const 304 @@ -13523,11 +14917,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 1 call $~lib/array/Array#__get - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 i32.eqz if i32.const 0 @@ -13548,108 +14942,465 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $7 - 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 $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8292 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 8292 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $11 + i32.const 8292 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 8292 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $13 + i32.const 8292 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $14 + i32.const 8292 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 8292 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 8292 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 8292 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $29 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $31 - call $~lib/rt/pure/__release - local.get $32 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $33 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $34 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $35 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $35 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $36 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $36 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $37 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $37 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $38 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $39 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $40 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $41 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $42 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $43 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $44 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $45 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $47 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $50 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $51 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $52 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $53 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $54 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $55 + i32.const 8292 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $56 + i32.const 8292 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 0 i32.const 0 @@ -14150,9 +15901,57 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + i32.const 0 + local.set $2 global.get $std/array/arr - call $~lib/array/Array#map + local.tee $4 + i32.load offset=12 + local.tee $6 + i32.const 2 + i32.const 9 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain local.tee $0 + i32.load offset=4 + local.set $8 + loop $for-loop|00 + local.get $2 + local.get $6 + local.get $4 + i32.load offset=12 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 2 + i32.shl + local.tee $7 + local.get $4 + i32.load offset=4 + i32.add + i32.load + f32.convert_i32_s + local.set $30 + local.get $7 + local.get $8 + i32.add + local.get $30 + f32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|00 + end + end + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -14185,7 +15984,15 @@ global.get $std/array/arr i32.const 23 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 6 i32.ne @@ -14214,7 +16021,15 @@ global.get $std/array/arr i32.const 24 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 406 i32.ne @@ -14243,7 +16058,15 @@ global.get $std/array/arr i32.const 25 call $~lib/array/Array#map - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 1 i32.ne @@ -14274,7 +16097,14 @@ i32.const 3 call $~lib/array/Array#push local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 26 call $~lib/array/Array#filter @@ -14295,7 +16125,15 @@ global.get $std/array/arr i32.const 27 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 6 i32.ne @@ -14324,7 +16162,15 @@ global.get $std/array/arr i32.const 28 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 406 i32.ne @@ -14353,7 +16199,15 @@ global.get $std/array/arr i32.const 29 call $~lib/array/Array#filter - call $~lib/rt/pure/__release + local.tee $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/i i32.const 1 i32.ne @@ -14384,7 +16238,14 @@ i32.const 3 call $~lib/array/Array#push local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr i32.const 30 i32.const 0 @@ -14691,7 +16552,49 @@ call $~lib/array/Array#push call $~lib/bindings/Math/random i64.reinterpret_f64 - call $~lib/math/NativeMath.seedRandom + local.set $57 + i32.const 1 + global.set $~lib/math/random_seeded + local.get $57 + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state0_64 + global.get $~lib/math/random_state0_64 + i64.const -1 + i64.xor + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state1_64 + local.get $57 + i32.wrap_i64 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state0_32 + global.get $~lib/math/random_state0_32 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state1_32 + global.get $~lib/math/random_state1_32 + i32.const 0 + i32.ne + i32.const 0 + global.get $~lib/math/random_state0_32 + i32.const 0 + global.get $~lib/math/random_state1_64 + i64.const 0 + i64.ne + i32.const 0 + global.get $~lib/math/random_state0_64 + i64.const 0 + i64.ne + select + select + select + i32.eqz + if + i32.const 0 + i32.const 4032 + i32.const 1406 + i32.const 4 + call $~lib/builtins/abort + unreachable + end i32.const 8 i32.const 2 i32.const 9 @@ -14703,7 +16606,17 @@ global.set $~argumentsLength local.get $2 call $~lib/array/Array#sort - call $~lib/rt/pure/__release + local.tee $0 + local.set $4 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.const 8 i32.const 2 @@ -14728,20 +16641,30 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $4 i32.const 0 global.set $~argumentsLength - local.get $3 + local.get $4 call $~lib/array/Array#sort - call $~lib/rt/pure/__release - local.get $3 + local.tee $0 + local.set $6 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 i32.const 8 i32.const 3 i32.const 10 i32.const 4448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $16 call $std/array/isArraysEqual i32.eqz if @@ -14758,14 +16681,24 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $6 i32.const 0 global.set $~argumentsLength - local.get $5 + local.get $6 i32.const 46 call $~lib/array/Array#sort - call $~lib/rt/pure/__release - local.get $5 + local.tee $0 + local.set $8 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 i32.const 5 i32.const 2 i32.const 3 @@ -14790,14 +16723,24 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $8 i32.const 0 global.set $~argumentsLength - local.get $7 + local.get $8 i32.const 47 call $~lib/array/Array#sort - call $~lib/rt/pure/__release - local.get $7 + local.tee $0 + local.set $7 + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 i32.const 5 i32.const 2 i32.const 7 @@ -14822,14 +16765,14 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $16 + local.set $15 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $7 i32.const 2 i32.const 2 i32.const 3 @@ -14866,11 +16809,13 @@ i32.const 512 call $std/array/createRandomOrderedArray local.set $17 - local.get $16 - call $std/array/assertSortedDefault - local.get $8 - call $std/array/assertSortedDefault - local.get $8 + local.get $15 + i32.const 48 + call $std/array/assertSorted + local.get $7 + i32.const 48 + call $std/array/assertSorted + local.get $7 i32.const 1 i32.const 2 i32.const 3 @@ -14882,151 +16827,298 @@ call $std/array/isArraysEqual i32.eqz if - i32.const 0 - i32.const 304 - i32.const 924 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 0 + i32.const 304 + i32.const 924 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $9 + i32.const 48 + call $std/array/assertSorted + local.get $9 + i32.const 2 + i32.const 2 + i32.const 3 + i32.const 4960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 927 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $10 + i32.const 48 + call $std/array/assertSorted + local.get $10 + local.get $0 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 930 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $11 + i32.const 48 + call $std/array/assertSorted + local.get $11 + local.get $0 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 933 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $12 + i32.const 48 + call $std/array/assertSorted + local.get $12 + local.get $0 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 936 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $13 + i32.const 48 + call $std/array/assertSorted + local.get $13 + local.get $0 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 939 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $14 + i32.const 48 + call $std/array/assertSorted + local.get $14 + local.get $0 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 942 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $17 + i32.const 48 + call $std/array/assertSorted + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $18 + i32.const 8292 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 8292 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $19 + i32.const 8292 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $20 + i32.const 8292 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 8292 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $9 - call $std/array/assertSortedDefault - local.get $9 - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 4960 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $22 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 927 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $10 - call $std/array/assertSortedDefault - local.get $10 + i32.const 8292 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 930 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $11 - call $std/array/assertSortedDefault - local.get $11 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 933 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $12 - call $std/array/assertSortedDefault - local.get $12 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 936 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $13 - call $std/array/assertSortedDefault - local.get $13 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 939 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $14 - call $std/array/assertSortedDefault - local.get $14 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 942 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $17 - call $std/array/assertSortedDefault - local.get $2 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $20 - call $~lib/rt/pure/__release - local.get $16 - 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 $0 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 64 call $std/array/createRandomOrderedArray local.set $0 @@ -15046,41 +17138,140 @@ i32.const 52 call $std/array/assertSorted local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 2 + i32.store offset=12 + loop $for-loop|001 + local.get $0 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $4 + i32.const 0 + i32.const 1 + local.get $0 + i32.sub + call $~lib/array/Array#__set + local.get $2 + local.get $0 + local.get $4 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|001 + end + end local.get $2 - call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray - local.tee $0 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $0 - call $~lib/rt/pure/__release + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/array/createReverseOrderedElementsArray local.tee $0 i32.const 54 call $std/array/assertSorted<~lib/array/Array> local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 7 i32.const 2 i32.const 15 i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $4 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $6 i32.const 1 global.set $~argumentsLength - local.get $2 - call $std/array/assertSorted<~lib/string/String | null> - local.get $2 - local.get $3 + local.get $4 + i32.const 55 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $0 + call $std/array/isSorted<~lib/string/String | null> + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 881 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + local.get $6 call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if @@ -15091,32 +17282,98 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray + i32.const 0 local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 400 + i32.store offset=12 + loop $for-loop|01 + local.get $0 + i32.const 400 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $8 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $2 i32.const 56 call $std/array/assertSorted<~lib/array/Array> + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 2 i32.const 0 i32.const 17 i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 i32.load offset=4 - local.get $0 + local.get $4 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $2 - local.get $2 + local.tee $11 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -15134,10 +17391,13 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $6 + i32.load offset=4 + local.get $6 + i32.load offset=12 i32.const 5120 - call $~lib/array/Array#join - local.tee $9 + call $~lib/util/string/joinIntegerArray + local.tee $12 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15155,10 +17415,13 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $8 + i32.load offset=4 + local.get $8 + i32.load offset=12 i32.const 5568 - call $~lib/array/Array#join - local.tee $11 + call $~lib/util/string/joinIntegerArray + local.tee $13 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15176,10 +17439,13 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $7 + i32.load offset=4 + local.get $7 + i32.load offset=12 i32.const 5632 - call $~lib/array/Array#join - local.tee $13 + call $~lib/util/string/joinIntegerArray + local.tee $14 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15197,14 +17463,12 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $9 i32.load offset=4 - local.get $2 + local.get $9 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $3 - local.set $14 - local.get $3 + local.tee $15 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -15222,9 +17486,12 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $10 + i32.load offset=4 + local.get $10 + i32.load offset=12 i32.const 5120 - call $~lib/array/Array<~lib/string/String | null>#join + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> local.tee $17 i32.const 7040 call $~lib/string/String.__eq @@ -15243,21 +17510,24 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.load offset=4 - local.tee $5 + local.tee $2 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $5 + local.get $2 i32.const 0 i32.store offset=4 - local.get $5 + local.get $2 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $3 - call $~lib/array/Array#join + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray local.tee $18 i32.const 7152 call $~lib/string/String.__eq @@ -15270,98 +17540,218 @@ call $~lib/builtins/abort unreachable end - i32.const 2 - i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - i32.load offset=4 - local.tee $15 - i32.const 0 - call $std/array/Ref#constructor - i32.store + i32.const 2 + i32.const 2 + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 + local.tee $16 + i32.const 0 + call $std/array/Ref#constructor + i32.store + local.get $16 + i32.const 0 + call $std/array/Ref#constructor + i32.store offset=4 + local.get $2 + i32.load offset=4 + local.get $2 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray + local.tee $16 + i32.const 7232 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 998 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $11 + i32.const 8292 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 8292 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $13 + i32.const 8292 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $14 + i32.const 8292 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8292 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $15 - i32.const 0 - call $std/array/Ref#constructor - i32.store offset=4 - local.get $5 - call $~lib/array/Array#join - local.tee $15 - i32.const 7232 - call $~lib/string/String.__eq - i32.eqz + i32.const 8292 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 998 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - call $~lib/rt/pure/__release - 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 $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $16 + i32.const 8292 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 i32.const 2 i32.const 3 i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $0 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $2 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $4 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 - local.get $5 - call $~lib/array/Array#toString - local.tee $14 + local.set $6 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $17 i32.const 5120 call $~lib/string/String.__eq i32.eqz @@ -15373,9 +17763,13 @@ call $~lib/builtins/abort unreachable end - local.get $7 - call $~lib/array/Array#toString - local.tee $16 + local.get $2 + i32.load offset=4 + local.get $2 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $18 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15387,9 +17781,13 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/array/Array#toString - local.tee $17 + local.get $4 + i32.load offset=4 + local.get $4 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $16 i32.const 7424 call $~lib/string/String.__eq i32.eqz @@ -15401,9 +17799,13 @@ call $~lib/builtins/abort unreachable end - local.get $9 - call $~lib/array/Array#toString - local.tee $18 + local.get $6 + i32.load offset=4 + local.get $6 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinIntegerArray + local.tee $19 i32.const 7456 call $~lib/string/String.__eq i32.eqz @@ -15426,8 +17828,7 @@ local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.get $0 + local.tee $20 i32.const 7520 call $~lib/string/String.__eq i32.eqz @@ -15450,9 +17851,7 @@ local.get $11 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $19 - local.get $0 + local.tee $21 i32.const 7584 call $~lib/string/String.__eq i32.eqz @@ -15475,9 +17874,7 @@ local.get $12 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $20 - local.get $0 + local.tee $22 i32.const 7680 call $~lib/string/String.__eq i32.eqz @@ -15500,9 +17897,7 @@ local.get $13 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $21 - local.get $0 + local.tee $23 i32.const 7792 call $~lib/string/String.__eq i32.eqz @@ -15520,9 +17915,13 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 - call $~lib/array/Array<~lib/string/String | null>#toString - local.tee $23 + local.tee $14 + i32.load offset=4 + local.get $14 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> + local.tee $26 i32.const 7952 call $~lib/string/String.__eq i32.eqz @@ -15540,9 +17939,13 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.tee $15 + i32.load offset=4 + local.get $15 + i32.load offset=12 + i32.const 5360 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> local.tee $27 - call $~lib/array/Array<~lib/string/String | null>#toString - local.tee $28 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15560,9 +17963,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $8 i32.load offset=4 - local.tee $2 + local.tee $7 i32.const 2 i32.const 2 i32.const 3 @@ -15570,7 +17973,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $7 i32.const 2 i32.const 2 i32.const 3 @@ -15578,14 +17981,12 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $0 + local.get $8 i32.load offset=4 - local.get $0 + local.get $8 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 - local.set $29 - local.get $2 + local.tee $28 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15603,9 +18004,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $7 i32.load offset=4 - local.tee $3 + local.tee $9 i32.const 2 i32.const 0 i32.const 6 @@ -15613,7 +18014,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $9 i32.const 2 i32.const 0 i32.const 6 @@ -15621,14 +18022,12 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $7 i32.load offset=4 - local.get $2 + local.get $7 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $3 - local.set $30 - local.get $3 + local.tee $29 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15646,7 +18045,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $9 i32.load offset=4 i32.const 1 i32.const 2 @@ -15654,7 +18053,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $31 i32.load offset=4 i32.const 1 i32.const 2 @@ -15663,90 +18062,307 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $25 + local.get $31 i32.store - local.get $3 + local.get $9 i32.load offset=4 - local.get $3 + local.get $9 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $24 - local.set $25 - local.get $24 i32.const 7040 call $~lib/string/String.__eq i32.eqz if - i32.const 0 - i32.const 304 - i32.const 1030 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 0 + i32.const 304 + i32.const 1030 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 8292 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 8292 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $17 + i32.const 8292 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $18 + i32.const 8292 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $5 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $14 - 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 $10 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 8292 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $11 + i32.const 8292 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 8292 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $13 + i32.const 8292 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $14 + i32.const 8292 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $26 + i32.const 8292 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 8292 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $29 - call $~lib/rt/pure/__release - local.get $30 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $24 + i32.const 8292 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.get $std/array/arr - call $~lib/rt/pure/__release + local.tee $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 8292 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 8292 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $25 + i32.const 8292 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 8292 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 8292 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 8292 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 196 ;) + (func $~start (; 160 ;) global.get $~started if return @@ -15756,7 +18372,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 197 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 161 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15824,19 +18440,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 198 ;) (param $0 i32) - local.get $0 - i32.const 8292 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/array/Array#__visit_impl (; 199 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 162 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15847,18 +18451,25 @@ i32.const 2 i32.shl i32.add - local.set $0 + local.set $2 loop $while-continue|0 local.get $1 - local.get $0 + local.get $2 i32.lt_u if local.get $1 i32.load - local.tee $2 + local.tee $0 if - local.get $2 - call $~lib/rt/pure/__visit + local.get $0 + i32.const 8292 + i32.ge_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $1 i32.const 4 @@ -15868,7 +18479,7 @@ end end ) - (func $~lib/rt/__visit_members (; 200 ;) (param $0 i32) + (func $~lib/rt/__visit_members (; 163 ;) (param $0 i32) block $folding-inner0 block $block$4$break block $switch$1$default @@ -15933,7 +18544,14 @@ local.tee $0 if local.get $0 - call $~lib/rt/pure/__visit + i32.const 8292 + i32.ge_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end end ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 8292f15890..49c5ef31c2 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param 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 (func (param i32 i32) (result 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_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -678,31 +678,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 9 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 192 - i32.const 144 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -833,7 +809,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -895,7 +871,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -971,7 +947,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -983,9 +959,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 192 + i32.const 144 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1053,15 +1049,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1272,48 +1260,9 @@ end end ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 432 i32.gt_u @@ -1321,17 +1270,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 18 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1504,10 +1484,12 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 local.set $3 local.get $1 i32.const 0 @@ -1531,6 +1513,7 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 0 i32.lt_s @@ -1562,7 +1545,9 @@ select local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -1572,18 +1557,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) - local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1600,21 +1574,27 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 1 local.get $1 i32.shl - local.tee $3 + local.tee $4 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $4 call $~lib/memory/memory.fill local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1627,61 +1607,39 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 + local.get $2 + local.set $3 + local.get $2 local.get $0 i32.load - local.tee $4 - local.get $1 + local.tee $1 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 - local.get $4 - call $~lib/rt/pure/__release + local.set $3 + local.get $1 + i32.const 432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 local.get $3 - i32.store offset=8 - local.get $0 - ) - (func $~lib/rt/__allocArray (; 23 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 16 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $0 - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 368 - i32.const 8 - call $~lib/memory/memory.copy - local.get $0 - local.get $1 - call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 - i32.const 8 + local.get $4 i32.store offset=8 local.get $0 - i32.const 2 - i32.store offset=12 - local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1690,7 +1648,9 @@ i32.gt_u local.get $1 local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.gt_u i32.or if @@ -1701,9 +1661,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -1726,7 +1689,14 @@ call $~lib/rt/pure/__retain local.set $3 local.get $4 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.get $3 @@ -1739,27 +1709,32 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~setArgumentsLength (; 19 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 26 ;) + (func $start:std/arraybuffer (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $0 i32.const 8 call $~lib/memory/memory.fill local.get $0 call $~lib/rt/pure/__retain local.tee $2 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 8 i32.ne if @@ -1775,7 +1750,9 @@ i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.tee $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 8 i32.ne if @@ -1803,9 +1780,18 @@ call $~lib/arraybuffer/ArrayBuffer#slice local.set $1 local.get $0 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 7 i32.ne if @@ -1820,10 +1806,20 @@ i32.const -1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 i32.ne if @@ -1838,10 +1834,20 @@ i32.const 1 i32.const 3 call $~lib/arraybuffer/ArrayBuffer#slice + local.set $1 + local.get $0 + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 2 i32.ne if @@ -1856,10 +1862,20 @@ i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 6 i32.ne if @@ -1874,11 +1890,19 @@ i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 2 i32.ne if @@ -1895,9 +1919,18 @@ call $~lib/arraybuffer/ArrayBuffer#slice local.set $3 local.get $0 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 4 i32.ne if @@ -1914,9 +1947,18 @@ call $~lib/arraybuffer/ArrayBuffer#slice local.set $1 local.get $3 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 if i32.const 0 i32.const 304 @@ -1935,47 +1977,129 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $0 - call $~lib/rt/__allocArray + call $~lib/rt/tlsf/maybeInitialize + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $4 + i32.const 368 + i32.const 8 + call $~lib/memory/memory.copy + local.get $0 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $4 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.store offset=8 + local.get $0 + i32.const 2 + i32.store offset=12 + local.get $0 call $~lib/rt/pure/__retain + local.set $0 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $5 + local.set $4 i32.const 1 global.set $~argumentsLength - local.get $0 - i32.load - local.tee $3 local.get $3 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.load + local.tee $5 + local.get $5 + i32.const 16 + i32.sub + i32.load offset=12 call $~lib/dataview/DataView#constructor - local.set $3 + local.set $5 local.get $2 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 432 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 432 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 432 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 27 ;) + (func $~start (; 21 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2002,10 +2126,35 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$default + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 432 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + end local.get $2 i32.const -2147483648 i32.and @@ -2051,33 +2200,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 29 ;) (param $0 i32) - block $block$4$break - block $switch$1$default - 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 $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$default - end - return - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 432 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - ) ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 5682ba9b3d..8f654e1e0a 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,10 +1,10 @@ (module - (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -686,31 +686,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 9 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 192 - i32.const 144 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -841,7 +817,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -903,7 +879,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -979,7 +955,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -991,9 +967,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 192 + i32.const 144 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1061,137 +1057,117 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 - local.get $1 + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 8 + i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) - (local $1 i32) - local.get $0 + local.tee $1 i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 8 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 4 i32.sub i32.const 0 i32.store8 - ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) - local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - call $~lib/memory/memory.fill local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1205,21 +1181,28 @@ i32.const 0 i32.store offset=8 local.get $1 - local.set $2 + local.set $3 local.get $1 local.get $0 i32.load - local.tee $3 + local.tee $2 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 local.get $3 - call $~lib/rt/pure/__release + call $~lib/rt/pure/__retain + local.set $3 + local.get $2 + i32.const 512 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 - local.get $2 + local.get $3 i32.store local.get $0 local.get $1 @@ -1229,7 +1212,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1249,13 +1232,7 @@ local.get $2 i32.store8 ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - ) - (func $~lib/dataview/DataView#constructor (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1266,7 +1243,9 @@ local.get $2 i32.add local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.gt_u i32.or if @@ -1277,9 +1256,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1302,7 +1284,14 @@ call $~lib/rt/pure/__retain local.set $4 local.get $5 - call $~lib/rt/pure/__release + i32.const 512 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $3 local.get $4 @@ -1317,14 +1306,7 @@ i32.store offset=8 local.get $3 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub - ) - (func $~lib/polyfills/bswap (; 24 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -1337,7 +1319,7 @@ i32.rotr i32.or ) - (func $~lib/dataview/DataView#getFloat32 (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1373,7 +1355,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 26 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 19 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1399,7 +1381,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 27 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 20 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1425,7 +1407,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 21 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1444,7 +1426,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 29 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -1457,7 +1439,7 @@ i32.shl i32.or ) - (func $~lib/dataview/DataView#getInt16 (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1491,7 +1473,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt32 (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1525,7 +1507,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt64 (; 32 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 25 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1551,7 +1533,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1570,18 +1552,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 34 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 65535 - i32.and - i32.const 8 - i32.shr_u - i32.or - ) - (func $~lib/dataview/DataView#getUint16 (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1605,17 +1576,20 @@ i32.load offset=4 i32.add i32.load16_u - local.set $0 - local.get $2 - i32.eqz - if - local.get $0 - call $~lib/polyfills/bswap - local.set $0 - end + local.tee $0 + local.get $0 + i32.const 8 + i32.shl local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + local.get $2 + select ) - (func $~lib/dataview/DataView#getUint32 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1649,7 +1623,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint64 (; 37 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 29 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1675,7 +1649,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 38 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 30 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1703,7 +1677,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 39 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 31 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1731,25 +1705,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 40 ;) (param $0 i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 304 - i32.const 432 - i32.const 117 - i32.const 49 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 108 - i32.store8 - ) - (func $~lib/dataview/DataView#setInt16 (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1773,7 +1729,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1797,7 +1753,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 43 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 34 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1821,25 +1777,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 44 ;) (param $0 i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 304 - i32.const 432 - i32.const 136 - i32.const 49 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 238 - i32.store8 - ) - (func $~lib/dataview/DataView#setUint16 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1855,15 +1793,23 @@ local.get $0 i32.load offset=4 local.get $2 - if (result i32) + i32.eqz + if local.get $1 - else + i32.const 8 + i32.shl local.get $1 - call $~lib/polyfills/bswap + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + local.set $1 end + local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1887,7 +1833,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 47 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 37 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1911,38 +1857,20 @@ end i64.store ) - (func $~lib/dataview/DataView#constructor|trampoline (; 48 ;) (param $0 i32) (result i32) - (local $1 i32) - block $2of2 - block $1of2 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $1of2 $1of2 $2of2 $outOfRange - end - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.set $1 - end - local.get $0 - i32.const 0 - local.get $1 - call $~lib/dataview/DataView#constructor - ) - (func $~setArgumentsLength (; 49 ;) (param $0 i32) + (func $~setArgumentsLength (; 38 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 50 ;) + (func $start:std/dataview (; 39 ;) (local $0 i32) (local $1 i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 @@ -1980,7 +1908,10 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor @@ -3208,8 +3139,22 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 304 + i32.const 432 + i32.const 117 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/dataview/DataView#setInt8 + i32.load offset=4 + i32.const 108 + i32.store8 local.get $0 i32.const 0 call $~lib/dataview/DataView#getInt8 @@ -3333,8 +3278,22 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 304 + i32.const 432 + i32.const 136 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/dataview/DataView#setUint8 + i32.load offset=4 + i32.const 238 + i32.store8 local.get $0 i32.const 0 call $~lib/dataview/DataView#getUint8 @@ -3462,12 +3421,28 @@ global.set $~argumentsLength local.get $1 i32.load - call $~lib/dataview/DataView#constructor|trampoline + local.tee $2 + i32.const 0 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/dataview/DataView#constructor local.set $2 local.get $0 - call $~lib/rt/pure/__release + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.load offset=4 local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub if i32.const 0 i32.const 480 @@ -3489,14 +3464,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 512 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 512 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 51 ;) + (func $~start (; 40 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 52 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 41 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3523,10 +3512,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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$4 $switch$1$case$4 $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 512 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -3572,34 +3587,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 53 ;) (param $0 i32) - block $switch$1$default - 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$4 $switch$1$case$4 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 512 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 3439d7507a..d892c94c7c 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) @@ -16,18 +15,26 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -38,7 +45,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -57,18 +64,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -83,9 +79,9 @@ local.get $0 i32.const 8 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $start:std/date (; 5 ;) + (func $start:std/date (; 4 ;) (local $0 i32) (local $1 i64) i32.const 1970 @@ -206,7 +202,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) call $start:std/date ) ) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 785afe33b4..23c930d75f 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1,10 +1,9 @@ (module (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_=>_f64 (func (param f64) (result f64))) - (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) @@ -659,65 +658,63 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 6 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acosh (; 6 ;) (param $0 f64) (result f64) (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $1 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $0 - local.get $0 - local.get $0 - f64.mul - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - return - end - local.get $1 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 + block $__inlined_func$~lib/math/NativeMath.acosh (result f64) local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $1 + i64.const 1024 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $0 + local.get $0 + local.get $0 + f64.mul + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + br $__inlined_func$~lib/math/NativeMath.acosh + end + local.get $1 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + br $__inlined_func$~lib/math/NativeMath.acosh + end local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub call $~lib/math/NativeMath.log - return + f64.const 0.6931471805599453 + f64.add end - local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 - f64.add ) - (func $../../lib/libm/assembly/libm/acosh (; 7 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.acosh - ) - (func $~lib/math/NativeMath.asin (; 8 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 7 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -855,11 +852,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/asin (; 9 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asin (; 8 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 10 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 9 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -929,11 +926,11 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/asinh (; 11 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asinh (; 10 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asinh ) - (func $~lib/math/NativeMath.atan (; 12 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 11 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1156,18 +1153,19 @@ local.get $3 f64.copysign ) - (func $../../lib/libm/assembly/libm/atan (; 13 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 12 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $~lib/math/NativeMath.atanh (; 14 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 13 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) local.get $0 + local.tee $1 f64.abs - local.set $1 - local.get $0 + local.set $0 + local.get $1 i64.reinterpret_f64 i64.const 52 i64.shr_u @@ -1176,49 +1174,46 @@ local.tee $2 i64.const 1022 i64.lt_u - if (result f64) + if local.get $2 i64.const 991 i64.ge_u - if (result f64) + if f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.mul local.tee $3 local.get $3 - local.get $1 + local.get $0 f64.mul f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - else - local.get $1 + local.set $0 end else f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul + local.set $0 end local.get $0 + local.get $1 f64.copysign ) - (func $../../lib/libm/assembly/libm/atanh (; 15 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.atanh - ) - (func $~lib/math/NativeMath.atan2 (; 16 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 14 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1428,12 +1423,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libm/atan2 (; 17 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 15 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 18 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 16 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1555,27 +1550,15 @@ f64.mul f64.add ) - (func $../../lib/libm/assembly/libm/cbrt (; 19 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 17 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $../../lib/libm/assembly/libm/ceil (; 20 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 18 ;) (param $0 f64) (result f64) local.get $0 f64.ceil ) - (func $~lib/math/dtoi32 (; 21 ;) (param $0 f64) (result i32) - local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 - ) - (func $../../lib/libm/assembly/libm/clz32 (; 22 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/clz32 (; 19 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -1585,12 +1568,20 @@ f64.const 32 else local.get $0 - call $~lib/math/dtoi32 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 i32.clz f64.convert_i32_s end ) - (func $~lib/math/pio2_large_quot (; 23 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 20 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1876,7 +1867,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 24 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 21 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -2214,11 +2205,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/cos (; 25 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cos (; 22 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cos ) - (func $~lib/math/NativeMath.expm1 (; 26 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 23 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2489,7 +2480,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 27 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 24 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -2566,7 +2557,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 28 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 25 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -2718,7 +2709,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 29 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 26 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -2782,28 +2773,28 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $../../lib/libm/assembly/libm/cosh (; 30 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 27 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cosh ) - (func $../../lib/libm/assembly/libm/exp (; 31 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 28 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $../../lib/libm/assembly/libm/expm1 (; 32 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 29 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $../../lib/libm/assembly/libm/floor (; 33 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 30 ;) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $../../lib/libm/assembly/libm/fround (; 34 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/fround (; 31 ;) (param $0 f64) (result f64) local.get $0 f32.demote_f64 f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 35 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 32 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -2972,42 +2963,54 @@ f64.sqrt f64.mul ) - (func $../../lib/libm/assembly/libm/hypot (; 36 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 33 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $~lib/math/NativeMath.imul (; 37 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 34 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) - local.get $0 - local.get $1 - f64.add - local.tee $2 - local.get $2 - f64.sub - f64.const 0 - f64.ne - if + block $__inlined_func$~lib/math/NativeMath.imul (result f64) f64.const 0 - return + local.get $0 + local.get $1 + f64.add + local.tee $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + br_if $__inlined_func$~lib/math/NativeMath.imul + drop + local.get $0 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + local.get $1 + f64.const 4294967296 + local.get $1 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + i32.mul + f64.convert_i32_s end - local.get $0 - call $~lib/math/dtoi32 - local.get $1 - call $~lib/math/dtoi32 - i32.mul - f64.convert_i32_s ) - (func $../../lib/libm/assembly/libm/imul (; 38 ;) (param $0 f64) (param $1 f64) (result f64) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.imul - ) - (func $../../lib/libm/assembly/libm/log (; 39 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 35 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 40 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 36 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3209,15 +3212,15 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log10 (; 41 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 37 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $../../lib/libm/assembly/libm/log1p (; 42 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 38 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 43 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 39 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3412,21 +3415,21 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log2 (; 44 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 40 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $../../lib/libm/assembly/libm/max (; 45 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 41 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $../../lib/libm/assembly/libm/min (; 46 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 42 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 47 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 43 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -4382,12 +4385,12 @@ f64.const 1e-300 f64.mul ) - (func $../../lib/libm/assembly/libm/pow (; 48 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 44 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $../../lib/libm/assembly/libm/round (; 49 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 45 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -4395,7 +4398,7 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/sign (; 50 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 46 ;) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -4408,7 +4411,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 51 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 47 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -4728,11 +4731,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/sin (; 52 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 48 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 53 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 49 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -4809,15 +4812,15 @@ f64.mul f64.mul ) - (func $../../lib/libm/assembly/libm/sinh (; 54 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 50 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $../../lib/libm/assembly/libm/sqrt (; 55 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 51 ;) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/tan_kern (; 56 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 52 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -4999,7 +5002,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 57 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 53 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -5176,11 +5179,11 @@ i32.sub call $~lib/math/tan_kern ) - (func $../../lib/libm/assembly/libm/tan (; 58 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 54 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 59 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 55 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5259,19 +5262,19 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/tanh (; 60 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 56 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $../../lib/libm/assembly/libm/trunc (; 61 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 57 ;) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $../../lib/libm/assembly/libmf/abs (; 62 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/abs (; 58 ;) (param $0 f32) (result f32) local.get $0 f32.abs ) - (func $~lib/math/Rf (; 63 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 59 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -5290,7 +5293,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 64 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 60 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5406,11 +5409,11 @@ f32.add f32.mul ) - (func $../../lib/libm/assembly/libmf/acos (; 65 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acos (; 61 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.acos ) - (func $~lib/math/NativeMathf.log1p (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 62 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5580,7 +5583,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 67 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 63 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5714,61 +5717,59 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.acosh (; 68 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acosh (; 64 ;) (param $0 f32) (result f32) (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - return - end - local.get $1 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 + block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + br $__inlined_func$~lib/math/NativeMathf.acosh + end + local.get $1 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + br $__inlined_func$~lib/math/NativeMathf.acosh + end local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub call $~lib/math/NativeMathf.log - return + f32.const 0.6931471824645996 + f32.add end - local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 - f32.add - ) - (func $../../lib/libm/assembly/libmf/acosh (; 69 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.acosh ) - (func $~lib/math/NativeMathf.asin (; 70 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 65 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -5848,11 +5849,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asin (; 71 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asin (; 66 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asin ) - (func $~lib/math/NativeMathf.asinh (; 72 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asinh (; 67 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -5917,11 +5918,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asinh (; 73 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asinh (; 68 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asinh ) - (func $~lib/math/NativeMathf.atan (; 74 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 69 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6117,63 +6118,61 @@ local.get $4 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atan (; 75 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan (; 70 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.atan ) - (func $~lib/math/NativeMathf.atanh (; 76 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atanh (; 71 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 + local.tee $1 f32.abs - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.reinterpret_f32 local.tee $2 i32.const 1056964608 i32.lt_u - if (result f32) + if local.get $2 i32.const 796917760 i32.ge_u - if (result f32) + if f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else - local.get $1 + local.set $0 end else f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul + local.set $0 end local.get $0 + local.get $1 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atanh (; 77 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.atanh - ) - (func $~lib/math/NativeMathf.atan2 (; 78 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 72 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6366,12 +6365,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libmf/atan2 (; 79 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan2 (; 73 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 ) - (func $~lib/math/NativeMathf.cbrt (; 80 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 74 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -6470,15 +6469,16 @@ f64.div f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/cbrt (; 81 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cbrt (; 75 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cbrt ) - (func $../../lib/libm/assembly/libmf/ceil (; 82 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/ceil (; 76 ;) (param $0 f32) (result f32) local.get $0 f32.ceil ) - (func $../../lib/libm/assembly/libmf/clz32 (; 83 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/clz32 (; 77 ;) (param $0 f32) (result f32) + (local $1 f64) local.get $0 local.get $0 f32.sub @@ -6489,12 +6489,21 @@ else local.get $0 f64.promote_f32 - call $~lib/math/dtoi32 + local.tee $1 + f64.const 4294967296 + local.get $1 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 i32.clz f32.convert_i32_s end ) - (func $~lib/math/NativeMathf.cos (; 84 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 78 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -6763,11 +6772,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cos (; 85 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cos (; 79 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cos ) - (func $~lib/math/NativeMathf.expm1 (; 86 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 80 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7017,7 +7026,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.scalbn (; 87 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 81 ;) (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 i32.gt_s @@ -7093,7 +7102,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 88 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 82 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -7227,7 +7236,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 89 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 83 ;) (param $0 f32) (result f32) (local $1 i32) local.get $0 i32.reinterpret_f32 @@ -7286,26 +7295,26 @@ f32.const 1661534994731144841129758e11 f32.mul ) - (func $../../lib/libm/assembly/libmf/cosh (; 90 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cosh (; 84 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cosh ) - (func $../../lib/libm/assembly/libmf/exp (; 91 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/exp (; 85 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.exp ) - (func $../../lib/libm/assembly/libmf/expm1 (; 92 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/expm1 (; 86 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.expm1 ) - (func $../../lib/libm/assembly/libmf/floor (; 93 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/floor (; 87 ;) (param $0 f32) (result f32) local.get $0 f32.floor ) - (func $../../lib/libm/assembly/libmf/fround (; 94 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/fround (; 88 ;) (param $0 f32) (result f32) local.get $0 ) - (func $~lib/math/NativeMathf.hypot (; 95 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 89 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -7410,20 +7419,21 @@ f32.sqrt f32.mul ) - (func $../../lib/libm/assembly/libmf/hypot (; 96 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/hypot (; 90 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot ) - (func $../../lib/libm/assembly/libmf/imul (; 97 ;) (param $0 f32) (param $1 f32) (result f32) - (local $2 f32) + (func $../../lib/libm/assembly/libmf/imul (; 91 ;) (param $0 f32) (param $1 f32) (result f32) + (local $2 f64) + (local $3 f32) block $~lib/math/NativeMathf.imul|inlined.0 (result f32) f32.const 0 local.get $0 local.get $1 f32.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f32.sub f32.const 0 f32.ne @@ -7431,19 +7441,37 @@ drop local.get $0 f64.promote_f32 - call $~lib/math/dtoi32 + local.tee $2 + f64.const 4294967296 + local.get $2 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 local.get $1 f64.promote_f32 - call $~lib/math/dtoi32 + local.tee $2 + f64.const 4294967296 + local.get $2 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 i32.mul f32.convert_i32_s end ) - (func $../../lib/libm/assembly/libmf/log (; 98 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log (; 92 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log ) - (func $~lib/math/NativeMathf.log10 (; 99 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7601,15 +7629,15 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/log10 (; 100 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log10 (; 94 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log10 ) - (func $../../lib/libm/assembly/libmf/log1p (; 101 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log1p (; 95 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log1p ) - (func $~lib/math/NativeMathf.log2 (; 102 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 96 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7759,21 +7787,21 @@ f32.convert_i32_s f32.add ) - (func $../../lib/libm/assembly/libmf/log2 (; 103 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log2 (; 97 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log2 ) - (func $../../lib/libm/assembly/libmf/max (; 104 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/max (; 98 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.max ) - (func $../../lib/libm/assembly/libmf/min (; 105 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/min (; 99 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.min ) - (func $~lib/math/NativeMathf.pow (; 106 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 100 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8231,12 +8259,12 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/pow (; 107 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/pow (; 101 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow ) - (func $../../lib/libm/assembly/libmf/round (; 108 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/round (; 102 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.5 f32.add @@ -8244,7 +8272,7 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/sign (; 109 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sign (; 103 ;) (param $0 f32) (result f32) local.get $0 f32.abs f32.const 0 @@ -8257,7 +8285,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 110 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 104 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8527,11 +8555,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/sin (; 111 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sin (; 105 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sin ) - (func $~lib/math/NativeMathf.sinh (; 112 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 106 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -8603,15 +8631,15 @@ f32.mul f32.mul ) - (func $../../lib/libm/assembly/libmf/sinh (; 113 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sinh (; 107 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sinh ) - (func $../../lib/libm/assembly/libmf/sqrt (; 114 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sqrt (; 108 ;) (param $0 f32) (result f32) local.get $0 f32.sqrt ) - (func $~lib/math/NativeMathf.tan (; 115 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 109 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8865,11 +8893,11 @@ local.get $1 f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/tan (; 116 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tan (; 110 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tan ) - (func $~lib/math/NativeMathf.tanh (; 117 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 111 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -8943,11 +8971,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/tanh (; 118 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tanh (; 112 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tanh ) - (func $../../lib/libm/assembly/libmf/trunc (; 119 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/trunc (; 113 ;) (param $0 f32) (result f32) local.get $0 f32.trunc ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 41c95dca5e..158f953c37 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,32 +1,28 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result 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_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) - (type $i32_i32_=>_f64 (func (param i32 i32) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -1073,56 +1069,9 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1130,11 +1079,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1345,7 +1331,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1358,34 +1344,35 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 18 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 + i32.load + local.tee $2 i32.const 556 i32.gt_u if - local.get $0 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - ) - (func $~lib/map/Map#clear (; 21 ;) (param $0 i32) - (local $1 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.load - call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1397,7 +1384,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -1411,42 +1406,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 22 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 3 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/util/hash/hash8 (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) - (func $~lib/map/Map#find (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1489,7 +1449,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1497,12 +1457,15 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 21 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1560,10 +1523,13 @@ i32.store offset=4 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_s - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -1597,7 +1563,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -1616,7 +1589,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1629,23 +1609,42 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 - local.tee $4 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -1727,7 +1726,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1735,7 +1734,10 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $0 i32.eqz @@ -1750,7 +1752,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1766,21 +1768,27 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1794,8 +1802,7 @@ i32.const 0 i32.store offset=8 local.get $2 - local.set $1 - local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 @@ -1805,7 +1812,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1818,59 +1832,17 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 30 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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) + (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $2 + local.set $3 + local.get $0 local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/util/memory/memmove|inlined.0 - local.get $2 - local.set $3 - local.get $0 - local.get $1 - i32.eq - br_if $~lib/util/memory/memmove|inlined.0 - local.get $0 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 local.get $1 i32.lt_u if @@ -2033,7 +2005,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 32 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 26 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2046,7 +2018,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2149,13 +2121,15 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $2 i32.shr_u i32.gt_u @@ -2175,26 +2149,67 @@ end local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.set $3 local.get $1 local.get $2 i32.shl local.tee $2 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + local.set $6 + local.get $3 + i32.const 16 + i32.sub + local.set $1 + local.get $3 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $3 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $6 + local.get $1 + local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 i32.add local.get $2 - local.get $3 + local.get $4 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $4 + local.get $3 i32.ne if local.get $0 @@ -2209,7 +2224,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2245,7 +2260,7 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#set:length (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 30 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2257,78 +2272,14 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 37 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/array/Array#constructor (; 38 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 31 ;) (param $0 i32) (result i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.get $0 i32.const 2 @@ -2341,7 +2292,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2379,7 +2330,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#set:length (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 33 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2391,7 +2342,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#values (; 41 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2447,14 +2398,23 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 42 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 35 ;) (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -2466,7 +2426,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -2480,39 +2448,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 43 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/map/Map#constructor (; 44 ;) (result i32) + (func $~lib/map/Map#constructor (; 36 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2536,26 +2479,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_s - ) - (func $~lib/array/Array#__get (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2576,50 +2500,7 @@ i32.add i32.load ) - (func $~lib/map/Map#find (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 48 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 38 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2677,10 +2558,13 @@ i32.store8 offset=1 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_s - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -2714,8 +2598,15 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release - end + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end local.get $0 local.get $2 i32.store @@ -2733,7 +2624,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -2746,27 +2644,82 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 + i32.load local.get $1 - local.get $1 + local.tee $3 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -2812,10 +2765,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -2824,7 +2777,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -2834,17 +2787,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 50 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 40 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2875,7 +2828,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2916,7 +2869,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 42 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3011,7 +2964,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -3030,7 +2990,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -3043,11 +3010,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3137,7 +3118,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 54 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3146,7 +3127,10 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3200,7 +3184,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 55 ;) + (func $std/map/testNumeric (; 45 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3209,8 +3193,33 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|1 local.get $0 i32.const 24 @@ -3241,7 +3250,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -3344,7 +3361,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -3396,93 +3421,209 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $3 - local.get $1 - call $~lib/map/Map#values + i32.load offset=8 local.set $6 - call $~lib/map/Map#constructor - local.set $4 - call $~lib/map/Map#constructor - local.set $5 + local.get $1 + i32.load offset=16 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 i32.const 0 local.set $0 - loop $for-loop|4 - local.get $0 + loop $for-loop|0 + local.get $4 local.get $3 - i32.load offset=12 i32.lt_s if - local.get $3 - local.get $0 - call $~lib/array/Array#__get - local.set $2 local.get $6 - local.get $0 - call $~lib/array/Array#__get - local.set $7 - local.get $1 - local.get $2 - call $~lib/map/Map#has - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 31 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $7 - i32.const 20 - i32.sub - call $~lib/map/Map#has + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 304 - i32.const 32 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $5 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set end local.get $4 - local.get $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $5 - local.get $7 - i32.const 20 - i32.sub - local.tee $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $0 i32.const 1 i32.add - local.set $0 - br $for-loop|4 + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $0 + call $~lib/array/Array#set:length + local.get $1 + call $~lib/map/Map#values + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + local.set $5 + call $~lib/map/Map#constructor + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|4 + local.get $0 + local.get $2 + i32.load offset=12 + i32.lt_s + if + local.get $0 + local.tee $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $2 + i32.load offset=4 + i32.add + i32.load8_s + local.set $0 + local.get $6 + local.get $3 + call $~lib/array/Array#__get + local.set $7 + local.get $1 + local.get $0 + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 31 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $7 + i32.const 20 + i32.sub + call $~lib/map/Map#has + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 32 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + local.get $0 + local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + local.get $7 + i32.const 20 + i32.sub + local.tee $0 + local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 1 + i32.add + local.set $0 + br $for-loop|4 end end - local.get $4 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 36 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $5 i32.load offset=20 i32.const 100 i32.ne + if + i32.const 0 + i32.const 304 + i32.const 36 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=20 + i32.const 100 + i32.ne if i32.const 0 i32.const 304 @@ -3598,7 +3739,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -3656,57 +3805,67 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (; 56 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 8 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#has (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 46 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3764,10 +3923,13 @@ i32.store offset=4 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_u - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -3801,7 +3963,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -3820,7 +3989,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -3833,21 +4009,40 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 - local.tee $4 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $3 + local.set $4 + local.get $0 + local.get $1 + local.get $3 call $~lib/map/Map#find local.tee $3 if @@ -3929,13 +4124,16 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $0 i32.eqz @@ -3950,121 +4148,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 61 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 9 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 62 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/array/Array#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_u - ) - (func $~lib/map/Map#rehash (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 50 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4122,10 +4206,13 @@ i32.store8 offset=1 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_u - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -4159,7 +4246,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -4178,7 +4272,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -4191,25 +4292,80 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 + i32.load local.get $1 - local.get $1 + local.tee $3 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -4255,10 +4411,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -4267,7 +4423,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -4277,24 +4433,27 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 66 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 52 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4348,7 +4507,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 67 ;) + (func $std/map/testNumeric (; 53 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4357,8 +4516,33 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|1 local.get $0 i32.const 255 @@ -4385,7 +4569,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -4480,7 +4672,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -4530,33 +4730,133 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $3 - local.get $1 - call $~lib/map/Map#values + i32.load offset=8 local.set $6 - call $~lib/map/Map#constructor - local.set $4 - call $~lib/map/Map#constructor - local.set $5 + local.get $1 + i32.load offset=16 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 i32.const 0 - local.set $0 - loop $for-loop|4 - local.get $0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 local.get $3 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $5 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $0 + call $~lib/array/Array#set:length + local.get $1 + call $~lib/map/Map#values + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + local.set $5 + call $~lib/map/Map#constructor + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|4 + local.get $0 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $3 local.get $0 - call $~lib/array/Array#__get - local.set $2 + local.tee $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $2 + i32.load offset=4 + i32.add + i32.load8_u + local.set $0 local.get $6 - local.get $0 + local.get $3 call $~lib/array/Array#__get local.set $7 local.get $1 - local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -4581,27 +4881,43 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release local.get $5 + local.get $0 + local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $0 local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -4613,7 +4929,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4724,7 +5040,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -4782,46 +5106,53 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (; 68 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 11 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/hash/hash16 (; 69 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 54 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4836,7 +5167,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -4879,7 +5210,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 71 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 56 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4892,7 +5223,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 72 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4987,7 +5318,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -5006,7 +5344,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -5019,11 +5364,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5117,7 +5476,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5140,7 +5499,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5178,7 +5537,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 76 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 61 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -5190,194 +5549,35 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 77 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $4 + i32.const 2 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $4 + i32.const 3 + i32.shl + i32.const 3 + i32.div_s + local.tee $6 + i32.const 3 + i32.shl + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $4 local.get $0 i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 78 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - ) - (func $~lib/map/Map#find (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 81 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.const 1 - i32.add - local.tee $4 - i32.const 2 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 - i32.const 3 - i32.shl - i32.const 3 - i32.div_s - local.tee $6 - i32.const 3 - i32.shl - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $0 - i32.load offset=8 - local.tee $2 + local.tee $2 local.get $0 i32.load offset=16 i32.const 3 @@ -5444,7 +5644,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -5463,7 +5670,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -5476,27 +5690,80 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 16 i32.shl i32.const 16 i32.shr_s call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -5542,10 +5809,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -5554,7 +5821,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -5564,17 +5831,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 83 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 64 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5637,7 +5904,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 84 ;) + (func $std/map/testNumeric (; 65 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5646,11 +5913,36 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 - loop $for-loop|1 - local.get $0 - i32.const 16 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear + loop $for-loop|1 + local.get $0 + i32.const 16 i32.shl i32.const 16 i32.shr_s @@ -5678,7 +5970,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -5781,7 +6081,15 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -5833,33 +6141,135 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $5 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/map/Map#constructor - local.set $4 - call $~lib/map/Map#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 local.set $5 + call $~lib/map/Map#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $3 local.get $0 - call $~lib/array/Array#__get - local.set $2 + local.tee $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $0 local.get $6 - local.get $0 + local.get $3 call $~lib/array/Array#__get local.set $7 local.get $1 - local.get $2 + local.get $0 call $~lib/map/Map#has i32.eqz if @@ -5884,27 +6294,43 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release local.get $5 + local.get $0 + local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $0 local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -5916,7 +6342,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6035,7 +6461,15 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/map/Map#has @@ -6093,57 +6527,53 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#constructor (; 85 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 14 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/map/Map#has (; 86 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 87 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 66 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6238,7 +6668,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -6257,7 +6694,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -6270,11 +6714,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6366,7 +6824,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 89 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 68 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6387,123 +6845,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 90 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 15 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 91 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/array/Array#__get (; 92 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - ) - (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 69 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6598,7 +6940,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -6617,7 +6966,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -6630,25 +6986,78 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -6694,10 +7103,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -6706,7 +7115,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -6716,17 +7125,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 95 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6787,7 +7196,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 96 ;) + (func $std/map/testNumeric (; 72 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6796,38 +7205,80 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 - loop $for-loop|1 - local.get $0 - i32.const 65535 - i32.and - i32.const 100 - i32.lt_u - if - local.get $1 - local.get $0 - call $~lib/map/Map#has - if - i32.const 0 - i32.const 304 - i32.const 6 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - local.get $0 - i32.const 65535 - i32.and - i32.const 10 - i32.add - call $~lib/map/Map#set - call $~lib/rt/pure/__release + (local $8 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 14 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear + loop $for-loop|1 + local.get $0 + i32.const 65535 + i32.and + i32.const 100 + i32.lt_u + if + local.get $1 + local.get $0 + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find + if + i32.const 0 + i32.const 304 + i32.const 6 + i32.const 4 + call $~lib/builtins/abort + unreachable + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + i32.const 10 + i32.add + call $~lib/map/Map#set + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + local.get $0 + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6884,7 +7335,11 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6919,10 +7374,22 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6969,34 +7436,140 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 15 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $5 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $2 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/map/Map#constructor - local.set $4 - call $~lib/map/Map#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 local.set $5 + call $~lib/map/Map#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $2 i32.load offset=12 i32.lt_s if - local.get $3 local.get $0 - call $~lib/array/Array#__get - local.set $2 + local.tee $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $0 local.get $6 - local.get $0 + local.get $3 call $~lib/array/Array#__get local.set $7 local.get $1 - local.get $2 - call $~lib/map/Map#has + local.get $0 + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7010,7 +7583,12 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7020,27 +7598,43 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release local.get $5 + local.get $0 + local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 - call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $0 local.get $0 + call $~lib/map/Map#set + local.tee $0 + i32.const 556 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7052,7 +7646,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7075,7 +7669,11 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7107,7 +7705,11 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7146,7 +7748,11 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7163,10 +7769,22 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7181,7 +7799,11 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7221,27 +7843,53 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#has (; 97 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#get (; 98 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 73 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7260,63 +7908,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 99 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $3 - local.get $0 - i32.load offset=16 - local.tee $4 - call $~lib/array/Array#constructor - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#delete (; 100 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 74 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7375,7 +7967,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 101 ;) + (func $std/map/testNumeric (; 75 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7384,6 +7976,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/map/Map#constructor local.set $1 loop $for-loop|0 @@ -7393,7 +7986,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7408,10 +8003,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7464,7 +8069,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7495,10 +8102,20 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7543,15 +8160,61 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $0 + local.get $1 + i32.load offset=16 + local.tee $2 + call $~lib/array/Array#constructor + local.set $4 + i32.const 0 + local.set $3 + loop $for-loop|05 + local.get $5 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $5 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.tee $6 + i32.const 1 + i32.add + local.set $3 + local.get $4 + local.get $6 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|05 + end + end + local.get $4 + local.get $3 + call $~lib/array/Array#set:length + local.get $4 local.set $3 local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $5 call $~lib/map/Map#constructor local.set $4 call $~lib/map/Map#constructor - local.set $5 + local.set $6 i32.const 0 local.set $0 loop $for-loop|2 @@ -7564,13 +8227,15 @@ local.get $0 call $~lib/array/Array#__get local.set $2 - local.get $6 + local.get $5 local.get $0 call $~lib/array/Array#__get local.set $7 local.get $1 local.get $2 - call $~lib/map/Map#has + local.get $2 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7584,7 +8249,10 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7598,15 +8266,31 @@ local.get $2 local.get $2 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $5 + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 local.get $7 i32.const 20 i32.sub local.tee $2 local.get $2 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -7626,7 +8310,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $6 i32.load offset=20 i32.const 100 i32.ne @@ -7647,7 +8331,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7677,7 +8363,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7714,7 +8402,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7729,10 +8419,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -7747,7 +8447,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7788,150 +8490,88 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#constructor (; 102 ;) (result i32) + (func $std/map/testNumeric (; 76 ;) (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) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 17 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 0 i32.store offset=8 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 0 i32.store offset=16 - local.get $0 + local.get $1 i32.const 0 i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/map/Map#keys (; 103 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 104 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 19 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 call $~lib/map/Map#clear - local.get $0 - ) - (func $std/map/testNumeric (; 105 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 loop $for-loop|0 local.get $0 i32.const 100 @@ -7939,7 +8579,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -7954,10 +8596,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8010,7 +8662,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8041,10 +8695,20 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8089,34 +8753,119 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $3 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + loop $for-loop|05 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $5 + local.tee $0 + i32.const 1 + i32.add + local.set $5 + local.get $2 + local.get $0 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|05 + end + end + local.get $2 + local.get $5 + call $~lib/array/Array#set:length + local.get $2 + local.set $5 local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/map/Map#constructor - local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 19 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + local.get $2 + call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $5 + local.set $4 i32.const 0 local.set $0 loop $for-loop|2 local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $3 + local.get $5 local.get $0 call $~lib/array/Array#__get - local.set $2 + local.set $3 local.get $6 local.get $0 call $~lib/array/Array#__get local.set $7 local.get $1 - local.get $2 - call $~lib/map/Map#has + local.get $3 + local.get $3 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8130,7 +8879,10 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8140,19 +8892,35 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $2 + local.get $3 + local.get $3 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $5 + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -8160,7 +8928,7 @@ br $for-loop|2 end end - local.get $4 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -8172,7 +8940,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -8193,7 +8961,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8223,7 +8993,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -8260,7 +9032,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -8275,10 +9049,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -8293,7 +9077,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -8333,25 +9119,69 @@ call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#clear (; 106 ;) (param $0 i32) - (local $1 i32) - i32.const 16 + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/map/Map#clear (; 77 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -8363,7 +9193,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -8377,35 +9215,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 107 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 20 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/util/hash/hash64 (; 108 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 78 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -8471,7 +9281,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 109 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 79 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8512,16 +9322,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 110 ;) (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 111 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 80 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8616,7 +9417,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -8635,7 +9443,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -8648,11 +9463,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 112 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 81 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8742,7 +9571,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 113 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 82 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8761,7 +9590,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -8799,7 +9628,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 115 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 84 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -8811,74 +9640,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 116 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 21 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#values (; 117 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 85 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8934,14 +9696,23 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 118 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 86 ;) (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -8953,7 +9724,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -8967,35 +9746,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 119 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 22 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/array/Array#__get (; 120 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 87 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -9016,59 +9767,18 @@ i32.add i64.load ) - (func $~lib/map/Map#find (; 121 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - local.get $0 - i64.load - i64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 122 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.const 1 - i32.add - local.tee $4 + (func $~lib/map/Map#rehash (; 88 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + local.get $1 + i32.const 1 + i32.add + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor @@ -9152,7 +9862,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -9171,7 +9888,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -9184,21 +9908,71 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 123 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 89 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + local.get $3 + i64.load + i64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -9278,7 +10052,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 124 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 90 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -9338,7 +10112,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 125 ;) + (func $std/map/testNumeric (; 91 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9347,8 +10121,36 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + (local $8 i32) + (local $9 i32) + (local $10 i64) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 20 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|0 local.get $0 i64.const 100 @@ -9356,7 +10158,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -9372,10 +10176,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9429,7 +10243,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9462,10 +10278,20 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9511,32 +10337,117 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 21 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + loop $for-loop|05 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $8 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $5 + local.tee $6 + i32.const 1 + i32.add + local.set $5 + local.get $2 + local.get $6 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|05 + end + end + local.get $2 + local.get $5 + call $~lib/array/Array#set:length + local.get $2 + local.set $5 local.get $1 call $~lib/map/Map#values - local.set $7 - call $~lib/map/Map#constructor - local.set $5 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 22 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + local.get $2 + call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $2 - local.get $4 + local.get $7 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $4 - local.get $2 + local.get $5 + local.get $7 call $~lib/array/Array#__get local.set $0 + local.get $4 local.get $7 - local.get $2 call $~lib/array/Array#__get local.set $3 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9551,7 +10462,10 @@ i32.const 20 i32.sub i64.extend_i32_s - call $~lib/map/Map#has + local.tee $10 + local.get $10 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9561,11 +10475,19 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $8 + i32.const 556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 local.get $3 i32.const 20 @@ -9573,15 +10495,23 @@ local.tee $3 local.get $3 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $2 - i32.const 1 - i32.add - local.set $2 + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 1 + i32.add + local.set $7 br $for-loop|2 end end - local.get $5 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -9614,7 +10544,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9645,7 +10577,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -9682,7 +10616,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -9698,10 +10634,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $7 + i32.const 556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9716,7 +10662,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -9756,151 +10704,91 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (; 126 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 23 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#keys (; 127 ;) (param $0 i32) (result i32) + (func $std/map/testNumeric (; 92 ;) + (local $0 i64) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 - call $~lib/rt/tlsf/__alloc + i32.const 23 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 128 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 25 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 0 i32.store offset=8 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 0 i32.store offset=16 - local.get $0 + local.get $1 i32.const 0 i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $std/map/testNumeric (; 129 ;) - (local $0 i64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|0 local.get $0 i64.const 100 @@ -9908,7 +10796,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -9924,10 +10814,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -9981,7 +10881,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10014,10 +10916,20 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10063,47 +10975,135 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $8 local.get $1 - call $~lib/map/Map#values - local.set $7 - call $~lib/map/Map#constructor - local.set $5 - call $~lib/map/Map#constructor - local.set $6 - loop $for-loop|2 - local.get $2 + i32.load offset=16 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 24 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + loop $for-loop|05 + local.get $3 local.get $4 - i32.load offset=12 i32.lt_s if - local.get $4 - local.get $2 - call $~lib/array/Array#__get - local.set $0 - local.get $7 - local.get $2 - call $~lib/array/Array#__get - local.set $3 - local.get $1 - local.get $0 - call $~lib/map/Map#has + local.get $8 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=12 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 304 - i32.const 31 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $3 - i32.const 20 + local.get $5 + local.tee $6 + i32.const 1 + i32.add + local.set $5 + local.get $2 + local.get $6 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|05 + end + end + local.get $2 + local.get $5 + call $~lib/array/Array#set:length + local.get $2 + local.set $5 + local.get $1 + call $~lib/map/Map#values + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 25 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + local.get $2 + call $~lib/map/Map#clear + call $~lib/map/Map#constructor + local.set $6 + loop $for-loop|2 + local.get $7 + local.get $5 + i32.load offset=12 + i32.lt_s + if + local.get $5 + local.get $7 + call $~lib/array/Array#__get + local.set $0 + local.get $4 + local.get $7 + call $~lib/array/Array#__get + local.set $3 + local.get $1 + local.get $0 + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 31 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $3 + i32.const 20 i32.sub i64.extend_i32_s - call $~lib/map/Map#has + local.tee $10 + local.get $10 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10113,11 +11113,19 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $8 + i32.const 556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 local.get $3 i32.const 20 @@ -10125,15 +11133,23 @@ local.tee $3 local.get $3 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $2 + local.tee $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|2 end end - local.get $5 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -10166,7 +11182,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10197,7 +11215,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -10234,7 +11254,9 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -10250,10 +11272,20 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $7 + i32.const 556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -10268,7 +11300,9 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -10308,46 +11342,53 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (; 130 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 26 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#find (; 131 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 93 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -10388,17 +11429,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 132 ;) (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 133 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 94 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10494,7 +11525,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -10513,7 +11551,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -10526,11 +11571,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 134 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 95 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10621,7 +11680,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 135 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 96 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10641,161 +11700,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 136 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/map/Map#keys (; 137 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 27 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - f32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 138 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 28 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - ) - (func $~lib/array/Array#__get (; 139 ;) (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 - 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 $~lib/map/Map#rehash (; 140 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 97 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10891,7 +11796,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -10910,7 +11822,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -10923,11 +11842,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 141 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 98 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11018,7 +11951,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 142 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 99 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -11079,7 +12012,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 143 ;) + (func $std/map/testNumeric (; 100 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -11088,8 +12021,36 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + (local $8 i32) + (local $9 i32) + (local $10 f32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 26 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|0 local.get $0 f32.const 100 @@ -11097,7 +12058,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -11113,10 +12077,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11170,7 +12145,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11203,10 +12181,21 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11252,49 +12241,186 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $4 + i32.load offset=8 + local.set $8 local.get $1 - call $~lib/map/Map#values - local.set $7 - call $~lib/map/Map#constructor + i32.load offset=16 local.set $5 - call $~lib/map/Map#constructor - local.set $6 - loop $for-loop|2 - local.get $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 27 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $5 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $5 + i32.store offset=12 + loop $for-loop|05 local.get $4 - i32.load offset=12 + local.get $5 i32.lt_s if + local.get $8 local.get $4 - local.get $2 - call $~lib/array/Array#__get - local.set $0 - local.get $7 - local.get $2 - call $~lib/array/Array#__get - local.set $3 - local.get $1 - local.get $0 - call $~lib/map/Map#has + i32.const 12 + i32.mul + i32.add + local.tee $9 + i32.load offset=8 + i32.const 1 + i32.and i32.eqz if - i32.const 0 - i32.const 304 - i32.const 31 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $6 + local.tee $3 + i32.const 1 + i32.add + local.set $6 + local.get $9 + f32.load + local.set $0 + local.get $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + local.get $3 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.add + local.tee $9 + i32.const 2 + call $~lib/array/ensureSize + local.get $2 + local.get $9 + i32.store offset=12 + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + f32.store end - local.get $1 - local.get $3 - i32.const 20 - i32.sub - f32.convert_i32_s - call $~lib/map/Map#has - i32.eqz - if + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|05 + end + end + local.get $2 + local.get $6 + call $~lib/array/Array#set:length + local.get $1 + call $~lib/map/Map#values + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 28 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $3 + i32.const 0 + i32.store offset=16 + local.get $3 + i32.const 0 + i32.store offset=20 + local.get $3 + call $~lib/map/Map#clear + call $~lib/map/Map#constructor + local.set $6 + loop $for-loop|2 + local.get $7 + local.get $2 + i32.load offset=12 + i32.lt_s + if + local.get $7 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=4 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $0 + local.get $5 + local.get $7 + call $~lib/array/Array#__get + local.set $4 + local.get $1 + local.get $0 + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 31 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $4 + i32.const 20 + i32.sub + f32.convert_i32_s + local.tee $10 + local.get $10 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.eqz + if i32.const 0 i32.const 304 i32.const 32 @@ -11302,27 +12428,43 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $8 + i32.const 556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $2 + local.tee $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|2 end end - local.get $5 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -11355,7 +12497,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11386,7 +12531,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -11423,7 +12571,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -11439,10 +12590,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $7 + i32.const 556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -11457,7 +12619,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -11497,46 +12662,53 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#constructor (; 144 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 29 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#find (; 145 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 101 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11577,17 +12749,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 146 ;) (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 147 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 102 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11683,7 +12845,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -11702,7 +12871,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -11715,11 +12891,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 148 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 103 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11783,249 +12973,54 @@ f64.store local.get $3 local.get $2 - i32.store offset=8 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $3 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - i32.store offset=12 - local.get $2 - local.get $3 - i32.store - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/map/Map#get (; 149 ;) (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find - local.tee $0 - i32.eqz - if - i32.const 352 - i32.const 416 - i32.const 111 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - ) - (func $~lib/array/Array#__set (; 150 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/map/Map#keys (; 151 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 30 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - f64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#constructor (; 152 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 31 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear + i32.store offset=8 + local.get $0 + local.get $0 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $3 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $2 + i32.load + i32.store offset=12 + local.get $2 + local.get $3 + i32.store + end local.get $0 + call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 153 ;) (param $0 i32) (param $1 i32) (result f64) - local.get $1 + (func $~lib/map/Map#get (; 104 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 - i32.load offset=12 - i32.ge_u + local.get $1 + local.get $1 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find + local.tee $0 + i32.eqz if - i32.const 464 - i32.const 528 - i32.const 93 - i32.const 41 + i32.const 352 + i32.const 416 + i32.const 111 + i32.const 16 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - ) - (func $~lib/map/Map#find (; 154 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - f64.load - local.get $1 - f64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 + i32.load offset=8 ) - (func $~lib/map/Map#rehash (; 155 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 105 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12121,7 +13116,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -12140,7 +13142,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -12153,22 +13162,72 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/map/Map#set (; 156 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 106 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $3 + f64.load + local.get $1 + f64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -12248,7 +13307,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 157 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 107 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -12309,7 +13368,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 158 ;) + (func $std/map/testNumeric (; 108 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -12318,8 +13377,36 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/map/Map#constructor - local.set $1 + (local $8 i32) + (local $9 i32) + (local $10 f64) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 29 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.store + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 0 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + call $~lib/map/Map#clear loop $for-loop|0 local.get $0 f64.const 100 @@ -12327,7 +13414,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -12343,10 +13433,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12400,7 +13501,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12433,10 +13537,21 @@ i32.const 20 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12455,59 +13570,192 @@ i32.add i32.ne if - i32.const 0 - i32.const 304 - i32.const 19 - i32.const 4 - call $~lib/builtins/abort - unreachable + i32.const 0 + i32.const 304 + i32.const 19 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f64.const 1 + f64.add + local.set $0 + br $for-loop|1 + end + end + local.get $1 + i32.load offset=20 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 21 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 30 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $5 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $5 + i32.store offset=12 + loop $for-loop|05 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $8 + local.get $4 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $6 + local.tee $3 + i32.const 1 + i32.add + local.set $6 + local.get $9 + f64.load + local.set $0 + local.get $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + local.get $3 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.add + local.tee $9 + i32.const 3 + call $~lib/array/ensureSize + local.get $2 + local.get $9 + i32.store offset=12 + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $0 + f64.store end - local.get $0 - f64.const 1 - f64.add - local.set $0 - br $for-loop|1 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|05 end end - local.get $1 - i32.load offset=20 - i32.const 100 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 21 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/map/Map#keys - local.set $4 + local.get $2 + local.get $6 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 - call $~lib/map/Map#constructor local.set $5 + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 31 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + local.get $3 + i32.const 0 + i32.store offset=16 + local.get $3 + i32.const 0 + i32.store offset=20 + local.get $3 + call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 + local.get $7 local.get $2 - local.get $4 i32.load offset=12 i32.lt_s if - local.get $4 + local.get $7 + local.get $2 + i32.load offset=12 + i32.ge_u + if + i32.const 464 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end local.get $2 - call $~lib/array/Array#__get + i32.load offset=4 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load local.set $0 + local.get $5 local.get $7 - local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12518,11 +13766,15 @@ unreachable end local.get $1 - local.get $3 + local.get $4 i32.const 20 i32.sub f64.convert_i32_s - call $~lib/map/Map#has + local.tee $10 + local.get $10 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12532,27 +13784,43 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 local.get $0 local.get $0 call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $8 + i32.const 556 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set - call $~lib/rt/pure/__release - local.get $2 + local.tee $4 + i32.const 556 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|2 end end - local.get $5 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -12585,7 +13853,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12616,7 +13887,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -12653,7 +13927,10 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -12669,10 +13946,21 @@ i32.const 10 i32.add call $~lib/map/Map#set - call $~lib/rt/pure/__release + local.tee $7 + i32.const 556 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -12687,7 +13975,10 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -12727,18 +14018,53 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release + local.get $2 + i32.const 556 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 556 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 556 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 159 ;) + (func $~start (; 109 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -12750,9 +14076,10 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 160 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 110 ;) (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -12777,10 +14104,60 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $folding-inner0 + block $block$4$break + block $switch$1$default + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $folding-inner0 $block$4$break $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $switch$1$default + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 556 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $1 + i32.load + local.tee $3 + i32.const 556 + i32.ge_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.load offset=8 + local.tee $1 + i32.const 556 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end local.get $2 i32.const -2147483648 i32.and @@ -12818,47 +14195,4 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 161 ;) (param $0 i32) - local.get $0 - i32.const 556 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/rt/__visit_members (; 162 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - 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 $block$4$break $folding-inner0 $block$4$break $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $folding-inner0 $block$4$break $folding-inner0 $switch$1$default - end - return - end - unreachable - 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 - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=8 - call $~lib/rt/pure/__visit - ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index b50f8038e5..e3ee877089 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1,17 +1,14 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) - (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) - (type $f32_f32_f32_f32_=>_i32 (func (param f32 f32 f32 f32) (result i32))) - (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) + (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $none_=>_none (func)) + (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) - (type $none_=>_f64 (func (result f64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_none (func (param i64))) @@ -19,13 +16,11 @@ (type $f64_=>_none (func (param f64))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f32_i32_f32_=>_i32 (func (param f32 i32 f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) - (type $f64_i32_f64_=>_i32 (func (param f64 i32 f64) (result i32))) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) - (type $none_=>_f32 (func (result f32))) (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) + (type $none_=>_f64 (func (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)) @@ -480,23 +475,7 @@ end i32.const 1 ) - (func $std/math/test_scalbn (; 38 ;) (param $0 f64) (param $1 i32) (param $2 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.scalbn - local.get $2 - f64.const 0 - call $std/math/check - ) - (func $std/math/test_scalbnf (; 39 ;) (param $0 f32) (param $1 i32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.scalbn - local.get $2 - f32.const 0 - call $std/math/check - ) - (func $std/math/test_abs (; 40 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_abs (; 38 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.abs local.get $1 @@ -512,14 +491,7 @@ i32.const 0 end ) - (func $std/math/test_absf (; 41 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.abs - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/R (; 42 ;) (param $0 f64) (result f64) + (func $~lib/math/R (; 39 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 local.get $0 @@ -562,7 +534,7 @@ f64.add f64.div ) - (func $~lib/math/NativeMath.acos (; 43 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 40 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -686,7 +658,7 @@ f64.add f64.mul ) - (func $std/math/test_acos (; 44 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_acos (; 41 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 @@ -702,7 +674,7 @@ i32.const 0 end ) - (func $~lib/math/Rf (; 45 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 42 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -721,7 +693,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 46 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 43 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -837,14 +809,7 @@ f32.add f32.mul ) - (func $std/math/test_acosf (; 47 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.acos - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.log1p (; 48 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log1p (; 44 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1042,7 +1007,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 49 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 45 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 f64) @@ -1210,63 +1175,62 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 50 ;) (param $0 f64) (result f64) - (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $1 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $0 - local.get $0 - local.get $0 - f64.mul - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - return - end - local.get $1 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 + (func $std/math/test_acosh (; 46 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i64) + block $__inlined_func$~lib/math/NativeMath.acosh (result f64) local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $4 + i64.const 1024 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $3 + local.get $3 + local.get $3 + f64.mul + f64.const 2 + local.get $3 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + br $__inlined_func$~lib/math/NativeMath.acosh + end + local.get $4 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + br $__inlined_func$~lib/math/NativeMath.acosh + end local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub call $~lib/math/NativeMath.log - return + f64.const 0.6931471805599453 + f64.add end - local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 - f64.add - ) - (func $std/math/test_acosh (; 51 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.acosh local.get $1 local.get $2 call $std/math/check @@ -1280,7 +1244,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (; 52 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 47 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -1450,7 +1414,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 53 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 48 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -1584,64 +1548,62 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.acosh (; 54 ;) (param $0 f32) (result f32) - (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - return - end - local.get $1 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 + (func $std/math/test_acoshf (; 49 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + br $__inlined_func$~lib/math/NativeMathf.acosh + end + local.get $3 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + br $__inlined_func$~lib/math/NativeMathf.acosh + end local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub call $~lib/math/NativeMathf.log - return + f32.const 0.6931471824645996 + f32.add end - local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 - f32.add - ) - (func $std/math/test_acoshf (; 55 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.acosh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.asin (; 56 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 50 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1779,7 +1741,7 @@ end local.get $0 ) - (func $std/math/test_asin (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asin (; 51 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 @@ -1795,7 +1757,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (; 58 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 52 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -1875,14 +1837,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_asinf (; 59 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.asin - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.asinh (; 60 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 53 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -1952,7 +1907,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_asinh (; 61 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asinh (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 @@ -1968,7 +1923,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asinh (; 62 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asinh (; 55 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -2033,14 +1988,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_asinhf (; 63 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.asinh - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.atan (; 64 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 56 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2263,7 +2211,7 @@ local.get $3 f64.copysign ) - (func $std/math/test_atan (; 65 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atan (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 @@ -2279,7 +2227,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 58 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2475,75 +2423,66 @@ local.get $4 f32.copysign ) - (func $std/math/test_atanf (; 67 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.atan - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.atanh (; 68 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $std/math/test_atanh (; 59 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) + (local $4 i64) + (local $5 f64) local.get $0 + local.tee $3 f64.abs - local.set $1 - local.get $0 + local.set $0 + local.get $3 i64.reinterpret_f64 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $4 i64.const 1022 i64.lt_u - if (result f64) - local.get $2 + if + local.get $4 i64.const 991 i64.ge_u - if (result f64) + if f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.mul - local.tee $3 - local.get $3 - local.get $1 + local.tee $5 + local.get $5 + local.get $0 f64.mul f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - else - local.get $1 + local.set $0 end else f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul + local.set $0 end local.get $0 + local.get $3 f64.copysign - ) - (func $std/math/test_atanh (; 69 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.atanh local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $0 + local.get $3 call $~lib/bindings/Math/atanh local.get $1 local.get $2 @@ -2552,62 +2491,60 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atanh (; 70 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_atanhf (; 60 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 f32) + (local $4 i32) local.get $0 + local.tee $3 f32.abs - local.set $1 - local.get $0 + local.set $0 + local.get $3 i32.reinterpret_f32 - local.tee $2 + local.tee $4 i32.const 1056964608 i32.lt_u - if (result f32) - local.get $2 + if + local.get $4 i32.const 796917760 i32.ge_u - if (result f32) + if f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else - local.get $1 + local.set $0 end else f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul + local.set $0 end local.get $0 + local.get $3 f32.copysign - ) - (func $std/math/test_atanhf (; 71 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.atanh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (; 72 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 61 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2817,7 +2754,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 73 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 62 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2835,7 +2772,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 74 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 63 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3028,15 +2965,7 @@ i32.and select ) - (func $std/math/test_atan2f (; 75 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.atan2 - local.get $2 - local.get $3 - call $std/math/check - ) - (func $~lib/math/NativeMath.cbrt (; 76 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 64 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3158,7 +3087,7 @@ f64.mul f64.add ) - (func $std/math/test_cbrt (; 77 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cbrt (; 65 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 @@ -3174,7 +3103,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cbrt (; 78 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 66 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3273,14 +3202,7 @@ f64.div f32.demote_f64 ) - (func $std/math/test_cbrtf (; 79 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cbrt - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_ceil (; 80 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_ceil (; 67 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.ceil local.get $1 @@ -3296,14 +3218,7 @@ i32.const 0 end ) - (func $std/math/test_ceilf (; 81 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.ceil - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/pio2_large_quot (; 82 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 68 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3589,7 +3504,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 83 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 69 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3927,7 +3842,7 @@ end local.get $0 ) - (func $std/math/test_cos (; 84 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cos (; 70 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cos local.get $1 @@ -3943,7 +3858,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (; 85 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 71 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4212,14 +4127,7 @@ end local.get $0 ) - (func $std/math/test_cosf (; 86 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cos - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.expm1 (; 87 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 72 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4490,7 +4398,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 88 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 73 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4642,7 +4550,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 89 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 74 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -4706,7 +4614,7 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $std/math/test_cosh (; 90 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cosh (; 75 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 @@ -4722,7 +4630,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 91 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 76 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4972,7 +4880,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 92 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 77 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5106,7 +5014,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 93 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 78 ;) (param $0 f32) (result f32) (local $1 i32) local.get $0 i32.reinterpret_f32 @@ -5165,14 +5073,7 @@ f32.const 1661534994731144841129758e11 f32.mul ) - (func $std/math/test_coshf (; 94 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cosh - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_exp (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp (; 79 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 @@ -5188,14 +5089,7 @@ i32.const 0 end ) - (func $std/math/test_expf (; 96 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.exp - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_expm1 (; 97 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_expm1 (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 @@ -5211,14 +5105,7 @@ i32.const 0 end ) - (func $std/math/test_expm1f (; 98 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.exp2 (; 99 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp2 (; 81 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5424,7 +5311,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 100 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 82 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5441,7 +5328,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 101 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 83 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5536,14 +5423,7 @@ f32.demote_f64 end ) - (func $std/math/test_exp2f (; 102 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.exp2 - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_floor (; 103 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_floor (; 84 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.floor local.get $1 @@ -5559,14 +5439,7 @@ i32.const 0 end ) - (func $std/math/test_floorf (; 104 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.floor - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.hypot (; 105 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 85 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5735,15 +5608,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 106 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.hypot - local.get $2 - local.get $3 - call $std/math/check - ) - (func $~lib/math/NativeMathf.hypot (; 107 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5848,15 +5713,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 108 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.hypot - local.get $2 - local.get $3 - call $std/math/check - ) - (func $std/math/test_log (; 109 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log (; 87 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 @@ -5872,14 +5729,7 @@ i32.const 0 end ) - (func $std/math/test_logf (; 110 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.log10 (; 111 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 88 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6081,7 +5931,7 @@ local.get $1 f64.add ) - (func $std/math/test_log10 (; 112 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log10 (; 89 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 @@ -6097,7 +5947,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log10 (; 113 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6255,14 +6105,7 @@ f32.mul f32.add ) - (func $std/math/test_log10f (; 114 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log10 - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_log1p (; 115 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log1p (; 91 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 @@ -6278,14 +6121,7 @@ i32.const 0 end ) - (func $std/math/test_log1pf (; 116 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log1p - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.log2 (; 117 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 92 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6480,7 +6316,7 @@ local.get $1 f64.add ) - (func $std/math/test_log2 (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log2 (; 93 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 @@ -6496,7 +6332,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (; 119 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 94 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6646,14 +6482,7 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_log2f (; 120 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.log2 - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_max (; 121 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_max (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6671,15 +6500,7 @@ i32.const 0 end ) - (func $std/math/test_maxf (; 122 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - f32.max - local.get $2 - f32.const 0 - call $std/math/check - ) - (func $std/math/test_min (; 123 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_min (; 96 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6697,15 +6518,7 @@ i32.const 0 end ) - (func $std/math/test_minf (; 124 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - f32.min - local.get $2 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.mod (; 125 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 97 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6908,7 +6721,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 126 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 98 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6926,7 +6739,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 127 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 99 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7118,15 +6931,7 @@ local.get $0 f32.mul ) - (func $std/math/test_modf (; 128 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.mod - local.get $2 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.pow (; 129 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 100 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -8082,7 +7887,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 130 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 101 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -8100,7 +7905,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 131 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 102 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8558,15 +8363,7 @@ end local.get $0 ) - (func $std/math/test_powf (; 132 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.pow - local.get $2 - local.get $3 - call $std/math/check - ) - (func $~lib/math/murmurHash3 (; 133 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 103 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8587,7 +8384,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 134 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 104 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8619,7 +8416,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 135 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 105 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8663,119 +8460,7 @@ unreachable end ) - (func $~lib/math/NativeMath.random (; 136 ;) (result f64) - (local $0 i64) - (local $1 i64) - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 1413 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_64 - local.set $0 - global.get $~lib/math/random_state1_64 - local.tee $1 - global.set $~lib/math/random_state0_64 - local.get $1 - local.get $0 - local.get $0 - i64.const 23 - i64.shl - i64.xor - local.tee $0 - local.get $0 - i64.const 17 - i64.shr_u - i64.xor - i64.xor - local.get $1 - i64.const 26 - i64.shr_u - i64.xor - global.set $~lib/math/random_state1_64 - local.get $1 - i64.const 12 - i64.shr_u - i64.const 4607182418800017408 - i64.or - f64.reinterpret_i64 - f64.const 1 - f64.sub - ) - (func $~lib/math/NativeMathf.random (; 137 ;) (result f32) - (local $0 i32) - (local $1 i32) - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 2606 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_32 - local.tee $0 - global.get $~lib/math/random_state1_32 - i32.xor - local.tee $1 - local.get $0 - i32.const 26 - i32.rotl - i32.xor - local.get $1 - i32.const 9 - i32.shl - i32.xor - global.set $~lib/math/random_state0_32 - local.get $1 - i32.const 13 - i32.rotl - global.set $~lib/math/random_state1_32 - local.get $0 - i32.const -1640531525 - i32.mul - i32.const 5 - i32.rotl - i32.const 5 - i32.mul - i32.const 9 - i32.shr_u - i32.const 1065353216 - i32.or - f32.reinterpret_i32 - f32.const 1 - f32.sub - ) - (func $std/math/test_round (; 138 ;) (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.const 0.5 - f64.add - f64.floor - local.get $0 - f64.copysign - local.get $1 - f64.const 0 - call $std/math/check - ) - (func $std/math/test_roundf (; 139 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.const 0.5 - f32.add - f32.floor - local.get $0 - f32.copysign - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $std/math/test_sign (; 140 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_sign (; 106 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8798,7 +8483,7 @@ i32.const 0 end ) - (func $std/math/test_signf (; 141 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_signf (; 107 ;) (param $0 f32) (param $1 f32) (result i32) f32.const 1 local.get $0 f32.copysign @@ -8812,7 +8497,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 142 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 108 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -9061,15 +8746,7 @@ end local.get $0 ) - (func $std/math/test_rem (; 143 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.rem - local.get $2 - f64.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMathf.rem (; 144 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 109 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9310,15 +8987,7 @@ end local.get $0 ) - (func $std/math/test_remf (; 145 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.rem - local.get $2 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.sin (; 146 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 110 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9638,7 +9307,7 @@ end local.get $0 ) - (func $std/math/test_sin (; 147 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sin (; 111 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sin local.get $1 @@ -9654,7 +9323,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (; 148 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 112 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9924,14 +9593,7 @@ end local.get $0 ) - (func $std/math/test_sinf (; 149 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.sin - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.sinh (; 150 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 113 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -10008,7 +9670,7 @@ f64.mul f64.mul ) - (func $std/math/test_sinh (; 151 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sinh (; 114 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 @@ -10024,7 +9686,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (; 152 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 115 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -10096,14 +9758,7 @@ f32.mul f32.mul ) - (func $std/math/test_sinhf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.sinh - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_sqrt (; 154 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sqrt (; 116 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 f64.sqrt local.get $1 @@ -10119,14 +9774,7 @@ i32.const 0 end ) - (func $std/math/test_sqrtf (; 155 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - f32.sqrt - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/tan_kern (; 156 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 117 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -10308,7 +9956,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 157 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 118 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10485,7 +10133,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (; 158 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tan (; 119 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tan local.get $1 @@ -10501,7 +10149,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (; 159 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 120 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10755,14 +10403,7 @@ local.get $1 f32.demote_f64 ) - (func $std/math/test_tanf (; 160 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.tan - local.get $1 - local.get $2 - call $std/math/check - ) - (func $~lib/math/NativeMath.tanh (; 161 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 121 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10841,7 +10482,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 162 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tanh (; 122 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 @@ -10857,7 +10498,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tanh (; 163 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 123 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -10931,14 +10572,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_tanhf (; 164 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.tanh - local.get $1 - local.get $2 - call $std/math/check - ) - (func $std/math/test_trunc (; 165 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_trunc (; 124 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.trunc local.get $1 @@ -10954,14 +10588,7 @@ i32.const 0 end ) - (func $std/math/test_truncf (; 166 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $0 - f32.trunc - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.sincos (; 167 ;) (param $0 f64) + (func $~lib/math/NativeMath.sincos (; 125 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -11356,7 +10983,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 168 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 126 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -11382,19 +11009,7 @@ drop end ) - (func $~lib/math/dtoi32 (; 169 ;) (param $0 f64) (result i32) - local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 - ) - (func $~lib/math/NativeMath.imul (; 170 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 127 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -11409,13 +11024,29 @@ return end local.get $0 - call $~lib/math/dtoi32 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 local.get $1 - call $~lib/math/dtoi32 + f64.const 4294967296 + local.get $1 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 171 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 128 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -11426,11 +11057,19 @@ return end local.get $0 - call $~lib/math/dtoi32 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 172 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 129 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -11461,7 +11100,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 173 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 130 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -11507,7 +11146,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 174 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 131 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -11553,10 +11192,14 @@ end local.get $2 ) - (func $start:std/math (; 175 ;) + (func $start:std/math (; 132 ;) (local $0 f64) (local $1 f32) (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i32) + (local $6 i32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -11748,8 +11391,10 @@ end f64.const -8.06684839057968 i32.const -2 + call $~lib/math/NativeMath.scalbn f64.const -2.01671209764492 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11761,8 +11406,10 @@ end f64.const 4.345239849338305 i32.const -1 + call $~lib/math/NativeMath.scalbn f64.const 2.1726199246691524 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11774,8 +11421,10 @@ end f64.const -8.38143342755525 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const -8.38143342755525 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11787,8 +11436,10 @@ end f64.const -6.531673581913484 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const -13.063347163826968 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11800,8 +11451,10 @@ end f64.const 9.267056966972586 i32.const 2 + call $~lib/math/NativeMath.scalbn f64.const 37.06822786789034 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11813,8 +11466,10 @@ end f64.const 0.6619858980995045 i32.const 3 + call $~lib/math/NativeMath.scalbn f64.const 5.295887184796036 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11826,8 +11481,10 @@ end f64.const -0.4066039223853553 i32.const 4 + call $~lib/math/NativeMath.scalbn f64.const -6.505662758165685 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11839,8 +11496,10 @@ end f64.const 0.5617597462207241 i32.const 5 + call $~lib/math/NativeMath.scalbn f64.const 17.97631187906317 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11852,8 +11511,10 @@ end f64.const 0.7741522965913037 i32.const 6 + call $~lib/math/NativeMath.scalbn f64.const 49.545746981843436 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11865,8 +11526,10 @@ end f64.const -0.6787637026394024 i32.const 7 + call $~lib/math/NativeMath.scalbn f64.const -86.88175393784351 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11878,8 +11541,10 @@ end f64.const 0 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn + f64.const 0 f64.const 0 - call $std/math/test_scalbn + call $std/math/check i32.eqz if i32.const 0 @@ -11891,8 +11556,10 @@ end f64.const 0 i32.const -2147483647 + call $~lib/math/NativeMath.scalbn + f64.const 0 f64.const 0 - call $std/math/test_scalbn + call $std/math/check i32.eqz if i32.const 0 @@ -11904,8 +11571,10 @@ end f64.const -0 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const -0 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11917,8 +11586,10 @@ end f64.const nan:0x8000000000000 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11930,8 +11601,10 @@ end f64.const inf i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11943,8 +11616,10 @@ end f64.const -inf i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const -inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11956,8 +11631,10 @@ end f64.const 1 i32.const 0 + call $~lib/math/NativeMath.scalbn f64.const 1 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11969,8 +11646,10 @@ end f64.const 1 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const 2 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11982,8 +11661,10 @@ end f64.const 1 i32.const -1 + call $~lib/math/NativeMath.scalbn f64.const 0.5 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -11995,8 +11676,10 @@ end f64.const 1 i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12008,8 +11691,10 @@ end f64.const nan:0x8000000000000 i32.const 1 + call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12021,8 +11706,10 @@ end f64.const inf i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12034,8 +11721,10 @@ end f64.const inf i32.const -2147483647 + call $~lib/math/NativeMath.scalbn f64.const inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12047,8 +11736,10 @@ end f64.const -inf i32.const 2147483647 + call $~lib/math/NativeMath.scalbn f64.const -inf - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12060,8 +11751,10 @@ end f64.const 8988465674311579538646525e283 i32.const -2097 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12073,8 +11766,10 @@ end f64.const 5e-324 i32.const 2097 + call $~lib/math/NativeMath.scalbn f64.const 8988465674311579538646525e283 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12086,8 +11781,10 @@ end f64.const 1.000244140625 i32.const -1074 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12099,8 +11796,10 @@ end f64.const 0.7499999999999999 i32.const -1073 + call $~lib/math/NativeMath.scalbn f64.const 5e-324 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12112,8 +11811,10 @@ end f64.const 0.5000000000000012 i32.const -1024 + call $~lib/math/NativeMath.scalbn f64.const 2.781342323134007e-309 - call $std/math/test_scalbn + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12125,8 +11826,10 @@ end f32.const -8.066848754882812 i32.const -2 + call $~lib/math/NativeMathf.scalbn f32.const -2.016712188720703 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12138,8 +11841,10 @@ end f32.const 4.345239639282227 i32.const -1 + call $~lib/math/NativeMathf.scalbn f32.const 2.1726198196411133 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12151,8 +11856,10 @@ end f32.const -8.381433486938477 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const -8.381433486938477 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12164,8 +11871,10 @@ end f32.const -6.531673431396484 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const -13.063346862792969 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12177,8 +11886,10 @@ end f32.const 9.267057418823242 i32.const 2 + call $~lib/math/NativeMathf.scalbn f32.const 37.06822967529297 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12190,8 +11901,10 @@ end f32.const 0.6619858741760254 i32.const 3 + call $~lib/math/NativeMathf.scalbn f32.const 5.295886993408203 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12203,8 +11916,10 @@ end f32.const -0.40660393238067627 i32.const 4 + call $~lib/math/NativeMathf.scalbn f32.const -6.50566291809082 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12216,8 +11931,10 @@ end f32.const 0.5617597699165344 i32.const 5 + call $~lib/math/NativeMathf.scalbn f32.const 17.9763126373291 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12229,8 +11946,10 @@ end f32.const 0.7741522789001465 i32.const 6 + call $~lib/math/NativeMathf.scalbn f32.const 49.545745849609375 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12242,8 +11961,10 @@ end f32.const -0.6787636876106262 i32.const 7 + call $~lib/math/NativeMathf.scalbn f32.const -86.88175201416016 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12255,8 +11976,10 @@ end f32.const 0 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn + f32.const 0 f32.const 0 - call $std/math/test_scalbnf + call $std/math/check i32.eqz if i32.const 0 @@ -12268,8 +11991,10 @@ end f32.const 0 i32.const -2147483647 + call $~lib/math/NativeMathf.scalbn f32.const 0 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12281,8 +12006,10 @@ end f32.const -0 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const -0 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12294,8 +12021,10 @@ end f32.const nan:0x400000 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12307,8 +12036,10 @@ end f32.const inf i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12320,8 +12051,10 @@ end f32.const -inf i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const -inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12333,8 +12066,10 @@ end f32.const 1 i32.const 0 + call $~lib/math/NativeMathf.scalbn f32.const 1 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12346,8 +12081,10 @@ end f32.const 1 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const 2 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12359,8 +12096,10 @@ end f32.const 1 i32.const -1 + call $~lib/math/NativeMathf.scalbn f32.const 0.5 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12372,8 +12111,10 @@ end f32.const 1 i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12385,8 +12126,10 @@ end f32.const nan:0x400000 i32.const 1 + call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12398,8 +12141,10 @@ end f32.const inf i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12411,8 +12156,10 @@ end f32.const inf i32.const -2147483647 + call $~lib/math/NativeMathf.scalbn f32.const inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12424,8 +12171,10 @@ end f32.const -inf i32.const 2147483647 + call $~lib/math/NativeMathf.scalbn f32.const -inf - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12437,8 +12186,10 @@ end f32.const 1701411834604692317316873e14 i32.const -276 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12450,8 +12201,10 @@ end f32.const 1.401298464324817e-45 i32.const 276 + call $~lib/math/NativeMathf.scalbn f32.const 1701411834604692317316873e14 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12463,8 +12216,10 @@ end f32.const 1.000244140625 i32.const -149 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12476,8 +12231,10 @@ end f32.const 0.7499999403953552 i32.const -148 + call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12489,8 +12246,10 @@ end f32.const 0.5000006556510925 i32.const -128 + call $~lib/math/NativeMathf.scalbn f32.const 1.4693693398263237e-39 - call $std/math/test_scalbnf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12704,9 +12463,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const 8.066848754882812 - call $std/math/test_absf + f32.const 8.066848754882812 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12718,7 +12478,8 @@ end f32.const 4.345239639282227 f32.const 4.345239639282227 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12728,9 +12489,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const 8.381433486938477 - call $std/math/test_absf + f32.const 8.381433486938477 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12740,9 +12502,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const 6.531673431396484 - call $std/math/test_absf + f32.const 6.531673431396484 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12754,7 +12517,8 @@ end f32.const 9.267057418823242 f32.const 9.267057418823242 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12766,7 +12530,8 @@ end f32.const 0.6619858741760254 f32.const 0.6619858741760254 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12776,9 +12541,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const 0.40660393238067627 - call $std/math/test_absf + f32.const 0.40660393238067627 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12790,7 +12556,8 @@ end f32.const 0.5617597699165344 f32.const 0.5617597699165344 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12802,7 +12569,8 @@ end f32.const 0.7741522789001465 f32.const 0.7741522789001465 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12812,9 +12580,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const 0.6787636876106262 - call $std/math/test_absf + f32.const 0.6787636876106262 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12826,7 +12595,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12836,9 +12606,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 0 - call $std/math/test_absf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12850,7 +12621,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12860,9 +12632,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 1 - call $std/math/test_absf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12874,7 +12647,8 @@ end f32.const inf f32.const inf - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12884,9 +12658,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const inf - call $std/math/test_absf + f32.const inf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -12898,7 +12673,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_absf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -13169,9 +12945,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13182,9 +12959,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13195,9 +12973,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13208,9 +12987,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13221,9 +13001,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13234,9 +13015,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.acos f32.const 0.8473311066627502 f32.const -0.13588131964206696 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13247,9 +13029,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.acos f32.const 1.989530086517334 f32.const 0.03764917701482773 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13260,9 +13043,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.acos f32.const 0.9742849469184875 f32.const 0.18443739414215088 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13273,9 +13057,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.acos f32.const 0.6854215264320374 f32.const -0.29158344864845276 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13286,9 +13071,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.acos f32.const 2.3168740272521973 f32.const -0.3795364499092102 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13299,9 +13085,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.acos f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13312,9 +13099,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.acos f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13325,9 +13113,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.acos f32.const 0 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13338,9 +13127,10 @@ unreachable end f32.const 1.0000001192092896 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13351,9 +13141,10 @@ unreachable end f32.const -1.0000001192092896 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13364,9 +13155,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13377,9 +13169,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13390,9 +13183,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13403,9 +13197,10 @@ unreachable end f32.const 0.49965065717697144 + call $~lib/math/NativeMathf.acos f32.const 1.0476008653640747 f32.const -0.21161814033985138 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13416,9 +13211,10 @@ unreachable end f32.const -0.5051405429840088 + call $~lib/math/NativeMathf.acos f32.const 2.1003410816192627 f32.const -0.20852705836296082 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -13429,9 +13225,10 @@ unreachable end f32.const -0.5189794898033142 + call $~lib/math/NativeMathf.acos f32.const 2.116452932357788 f32.const -0.14600826799869537 - call $std/math/test_acosf + call $std/math/check i32.eqz if i32.const 0 @@ -14196,9 +13993,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14209,9 +14007,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14222,9 +14021,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14235,9 +14035,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14248,9 +14049,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14261,9 +14063,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.asin f32.const 0.7234652042388916 f32.const -0.1307632476091385 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14274,9 +14077,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.asin f32.const -0.41873374581336975 f32.const 0.3161141574382782 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14287,9 +14091,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.asin f32.const 0.5965113639831543 f32.const -0.4510819613933563 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14300,9 +14105,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.asin f32.const 0.8853747844696045 f32.const 0.02493886835873127 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14313,9 +14119,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.asin f32.const -0.7460777759552002 f32.const 0.2515012323856354 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14326,9 +14133,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.asin f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14339,9 +14147,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.asin f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14352,9 +14161,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.asin f32.const 0 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14365,9 +14175,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.asin f32.const -0 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14378,9 +14189,10 @@ unreachable end f32.const 1.0000001192092896 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14391,9 +14203,10 @@ unreachable end f32.const -1.0000001192092896 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14404,9 +14217,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14417,9 +14231,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14430,9 +14245,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14443,9 +14259,10 @@ unreachable end f32.const 0.5004770159721375 + call $~lib/math/NativeMathf.asin f32.const 0.5241496562957764 f32.const -0.29427099227905273 - call $std/math/test_asinf + call $std/math/check i32.eqz if i32.const 0 @@ -14651,9 +14468,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.asinh f32.const -2.7847299575805664 f32.const -0.14418013393878937 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14664,9 +14482,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.asinh f32.const 2.17521333694458 f32.const -0.020796965807676315 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14677,9 +14496,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.asinh f32.const -2.8227059841156006 f32.const 0.44718533754348755 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14690,9 +14510,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.asinh f32.const -2.5756194591522217 f32.const -0.14822272956371307 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14703,9 +14524,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.asinh f32.const 2.922511577606201 f32.const 0.14270681142807007 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14716,9 +14538,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.asinh f32.const 0.6212462782859802 f32.const 0.3684912919998169 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14729,9 +14552,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.asinh f32.const -0.39615991711616516 f32.const -0.13170306384563446 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14742,9 +14566,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.asinh f32.const 0.535758912563324 f32.const 0.08184859901666641 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14755,9 +14580,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.asinh f32.const 0.7123571038246155 f32.const -0.14270737767219543 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14768,9 +14594,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.asinh f32.const -0.6351823210716248 f32.const 0.2583143711090088 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14781,9 +14608,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.asinh f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14794,9 +14622,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.asinh f32.const inf f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14807,9 +14636,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.asinh f32.const -inf f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14820,9 +14650,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.asinh f32.const 0 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14833,9 +14664,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.asinh f32.const -0 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -15080,9 +14912,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.atan f32.const -1.4474613666534424 f32.const 0.12686480581760406 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15093,9 +14926,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.atan f32.const 1.3445979356765747 f32.const 0.16045434772968292 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15106,9 +14940,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.atan f32.const -1.4520463943481445 f32.const -0.39581751823425293 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15119,9 +14954,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.atan f32.const -1.418875813484192 f32.const 0.410570353269577 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15132,9 +14968,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.atan f32.const 1.4633032083511353 f32.const 0.48403501510620117 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15145,9 +14982,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.atan f32.const 0.5847550630569458 f32.const 0.2125193476676941 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15158,9 +14996,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.atan f32.const -0.386186420917511 f32.const 0.18169628083705902 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15171,9 +15010,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.atan f32.const 0.5118269920349121 f32.const 0.3499770760536194 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15184,9 +15024,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.atan f32.const 0.6587802171707153 f32.const -0.2505330741405487 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15197,9 +15038,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.atan f32.const -0.5963307619094849 f32.const 0.17614826560020447 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15210,9 +15052,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.atan f32.const 0 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15223,9 +15066,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.atan f32.const -0 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15236,9 +15080,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.atan f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15249,9 +15094,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.atan f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15262,9 +15108,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.atan f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15275,9 +15122,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.atan f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -15288,9 +15136,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.atan f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanf + call $std/math/check i32.eqz if i32.const 0 @@ -16486,9 +16335,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.atan2 f32.const -1.0585895776748657 f32.const -0.22352588176727295 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16500,9 +16350,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.atan2 f32.const 2.686873435974121 f32.const 0.09464472532272339 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16514,9 +16365,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.atan2 f32.const -1.8893001079559326 f32.const -0.21941901743412018 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16528,9 +16380,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.atan2 f32.const -0.9605468511581421 f32.const 0.46015575528144836 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16542,9 +16395,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.atan2 f32.const 1.0919123888015747 f32.const -0.05708503723144531 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16556,9 +16410,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.atan2 f32.const -1.4685084819793701 f32.const 0.19611206650733948 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16570,9 +16425,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.atan2 f32.const 1.5641601085662842 f32.const 0.48143187165260315 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16584,9 +16440,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.atan2 f32.const -0.10281659662723541 f32.const -0.4216274917125702 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16598,9 +16455,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.atan2 f32.const 0.29697975516319275 f32.const 0.2322007566690445 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16612,9 +16470,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.atan2 f32.const -1.5131611824035645 f32.const 0.16620726883411407 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16626,9 +16485,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16640,9 +16500,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16654,9 +16515,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16668,9 +16530,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16682,9 +16545,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16696,9 +16560,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16710,9 +16575,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16724,9 +16590,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16738,9 +16605,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16752,9 +16620,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16766,9 +16635,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16780,9 +16650,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16794,9 +16665,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16808,9 +16680,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16822,9 +16695,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16836,9 +16710,10 @@ end f32.const 1 f32.const -0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16850,9 +16725,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16864,9 +16740,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16878,9 +16755,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16892,9 +16770,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16906,9 +16785,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16920,9 +16800,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16934,9 +16815,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16948,9 +16830,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const 2.356194496154785 f32.const 0.02500828728079796 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16962,9 +16845,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.atan2 f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16976,9 +16860,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.atan2 f32.const -2.356194496154785 f32.const -0.02500828728079796 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -16990,9 +16875,10 @@ end f32.const 5.877471754111438e-39 f32.const 1 + call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -17004,9 +16890,10 @@ end f32.const 1 f32.const 1701411834604692317316873e14 + call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_atan2f + call $std/math/check i32.eqz if i32.const 0 @@ -17277,9 +17164,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cbrt f32.const -2.0055553913116455 f32.const -0.44719240069389343 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17290,9 +17178,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cbrt f32.const 1.6318162679672241 f32.const 0.44636252522468567 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17303,9 +17192,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cbrt f32.const -2.0312938690185547 f32.const 0.19483426213264465 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17316,9 +17206,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cbrt f32.const -1.8692820072174072 f32.const -0.17075514793395996 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17329,9 +17220,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cbrt f32.const 2.1004576683044434 f32.const -0.36362043023109436 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17342,9 +17234,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cbrt f32.const 0.8715311288833618 f32.const -0.12857209146022797 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17355,9 +17248,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cbrt f32.const -0.7408390641212463 f32.const -0.4655757546424866 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17368,9 +17262,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cbrt f32.const 0.8251195549964905 f32.const 0.05601907894015312 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17381,9 +17276,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cbrt f32.const 0.9182102680206299 f32.const 0.45498204231262207 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17394,9 +17290,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cbrt f32.const -0.8788326978683472 f32.const -0.22978967428207397 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17407,9 +17304,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cbrt f32.const nan:0x400000 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17420,9 +17318,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cbrt f32.const inf f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17433,9 +17332,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cbrt f32.const -inf f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17446,9 +17346,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cbrt f32.const 0 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17459,9 +17360,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cbrt f32.const -0 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17472,9 +17374,10 @@ unreachable end f32.const 9.313225746154785e-10 + call $~lib/math/NativeMathf.cbrt f32.const 0.0009765625 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17485,9 +17388,10 @@ unreachable end f32.const -9.313225746154785e-10 + call $~lib/math/NativeMathf.cbrt f32.const -0.0009765625 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17498,9 +17402,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.cbrt f32.const 1 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17511,9 +17416,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.cbrt f32.const -1 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -17524,9 +17430,10 @@ unreachable end f32.const 8 + call $~lib/math/NativeMathf.cbrt f32.const 2 f32.const 0 - call $std/math/test_cbrtf + call $std/math/check i32.eqz if i32.const 0 @@ -18196,9 +18103,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_ceilf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18208,9 +18116,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 5 - call $std/math/test_ceilf + f32.const 5 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18220,9 +18129,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_ceilf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18232,9 +18142,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -6 - call $std/math/test_ceilf + f32.const -6 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18244,9 +18155,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 10 - call $std/math/test_ceilf + f32.const 10 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18256,9 +18168,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18268,9 +18181,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18280,9 +18194,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18292,9 +18207,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18304,9 +18220,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18318,7 +18235,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18330,7 +18248,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18342,7 +18261,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18354,7 +18274,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18366,7 +18287,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18378,7 +18300,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18390,7 +18313,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18400,9 +18324,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18412,9 +18337,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18424,9 +18350,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18436,9 +18363,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18448,9 +18376,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18460,9 +18389,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18472,9 +18402,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18484,9 +18415,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18498,7 +18430,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18510,7 +18443,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18522,7 +18456,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18534,7 +18469,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18546,7 +18482,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18558,7 +18495,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18570,7 +18508,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18580,9 +18519,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18592,9 +18532,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18604,9 +18545,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18616,9 +18558,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18628,9 +18571,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18640,9 +18584,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18652,9 +18597,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18664,9 +18610,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18678,7 +18625,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18690,7 +18638,8 @@ end f32.const inf f32.const inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18702,7 +18651,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18714,7 +18664,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18726,7 +18677,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18738,7 +18690,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18750,7 +18703,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_ceilf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18760,9 +18714,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18772,9 +18727,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18784,9 +18740,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 2 - call $std/math/test_ceilf + f32.const 2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18796,9 +18753,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_ceilf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18808,9 +18766,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18820,9 +18779,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18832,9 +18792,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 1 - call $std/math/test_ceilf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -18844,9 +18805,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_ceilf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -20750,9 +20712,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cos f32.const -0.21126316487789154 f32.const 0.48328569531440735 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20763,9 +20726,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cos f32.const -0.3589562177658081 f32.const 0.042505208402872086 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20776,9 +20740,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cos f32.const -0.5033331513404846 f32.const -0.1386195719242096 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20789,9 +20754,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cos f32.const 0.9692853689193726 f32.const 0.1786951720714569 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20802,9 +20768,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cos f32.const -0.9875878691673279 f32.const 0.1389600932598114 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20815,9 +20782,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cos f32.const 0.7887731194496155 f32.const 0.2989593744277954 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20828,9 +20796,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cos f32.const 0.918469250202179 f32.const 0.24250665307044983 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20841,9 +20810,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cos f32.const 0.8463190197944641 f32.const -0.24033240973949432 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20854,9 +20824,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cos f32.const 0.7150139212608337 f32.const -0.3372635245323181 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20867,9 +20838,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cos f32.const 0.7783495187759399 f32.const 0.16550153493881226 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20880,9 +20852,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20893,9 +20866,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20906,9 +20880,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20919,9 +20894,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20932,9 +20908,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20945,9 +20922,10 @@ unreachable end f32.const 1.862645149230957e-09 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 1.4551915228366852e-11 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20958,9 +20936,10 @@ unreachable end f32.const -1.862645149230957e-09 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 1.4551915228366852e-11 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20971,9 +20950,10 @@ unreachable end f32.const 1.1754943508222875e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20984,9 +20964,10 @@ unreachable end f32.const -1.1754943508222875e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -20997,9 +20978,10 @@ unreachable end f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21010,9 +20992,10 @@ unreachable end f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21023,9 +21006,10 @@ unreachable end f32.const 2.802596928649634e-45 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21036,9 +21020,10 @@ unreachable end f32.const 1.2611686178923354e-44 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21049,9 +21034,10 @@ unreachable end f32.const 2.938735877055719e-39 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21062,9 +21048,10 @@ unreachable end f32.const 5.877471754111438e-39 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21075,9 +21062,10 @@ unreachable end f32.const 1.1754940705625946e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21088,9 +21076,10 @@ unreachable end f32.const 1.1754942106924411e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21101,9 +21090,10 @@ unreachable end f32.const 1.175494490952134e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21114,9 +21104,10 @@ unreachable end f32.const 1.1754946310819804e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21127,9 +21118,10 @@ unreachable end f32.const 2.3509880009953429e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21140,9 +21132,10 @@ unreachable end f32.const 2.350988701644575e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21153,9 +21146,10 @@ unreachable end f32.const 2.3509895424236536e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21166,9 +21160,10 @@ unreachable end f32.const 4.70197740328915e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21179,9 +21174,10 @@ unreachable end f32.const 7.450580596923828e-09 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 2.3283064365386963e-10 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21192,9 +21188,10 @@ unreachable end f32.const 0.000244140625 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0.25 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21205,9 +21202,10 @@ unreachable end f32.const 0.00048828125 + call $~lib/math/NativeMathf.cos f32.const 0.9999998807907104 f32.const -3.973643103449831e-08 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21218,9 +21216,10 @@ unreachable end f32.const 0.0009765625 + call $~lib/math/NativeMathf.cos f32.const 0.9999995231628418 f32.const -6.357828397085541e-07 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21231,9 +21230,10 @@ unreachable end f32.const -2.802596928649634e-45 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21244,9 +21244,10 @@ unreachable end f32.const -1.2611686178923354e-44 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21257,9 +21258,10 @@ unreachable end f32.const -2.938735877055719e-39 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21270,9 +21272,10 @@ unreachable end f32.const -5.877471754111438e-39 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21283,9 +21286,10 @@ unreachable end f32.const -1.1754940705625946e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21296,9 +21300,10 @@ unreachable end f32.const -1.1754942106924411e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21309,9 +21314,10 @@ unreachable end f32.const -1.175494490952134e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21322,9 +21328,10 @@ unreachable end f32.const -1.1754946310819804e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21335,9 +21342,10 @@ unreachable end f32.const -2.3509880009953429e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21348,9 +21356,10 @@ unreachable end f32.const -2.350988701644575e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21361,9 +21370,10 @@ unreachable end f32.const -2.3509895424236536e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21374,9 +21384,10 @@ unreachable end f32.const -4.70197740328915e-38 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21387,9 +21398,10 @@ unreachable end f32.const -7.450580596923828e-09 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 2.3283064365386963e-10 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21400,9 +21412,10 @@ unreachable end f32.const -0.000244140625 + call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0.25 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21413,9 +21426,10 @@ unreachable end f32.const -0.00048828125 + call $~lib/math/NativeMathf.cos f32.const 0.9999998807907104 f32.const -3.973643103449831e-08 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21426,9 +21440,10 @@ unreachable end f32.const -0.0009765625 + call $~lib/math/NativeMathf.cos f32.const 0.9999995231628418 f32.const -6.357828397085541e-07 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21439,9 +21454,10 @@ unreachable end f32.const 255.99993896484375 + call $~lib/math/NativeMathf.cos f32.const -0.03985174745321274 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21452,9 +21468,10 @@ unreachable end f32.const 5033165 + call $~lib/math/NativeMathf.cos f32.const 0.8471871614456177 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21465,9 +21482,10 @@ unreachable end f32.const 421657440 + call $~lib/math/NativeMathf.cos f32.const 0.6728929281234741 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21478,9 +21496,10 @@ unreachable end f32.const 2147483392 + call $~lib/math/NativeMathf.cos f32.const 0.9610780477523804 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21491,9 +21510,10 @@ unreachable end f32.const 68719476736 + call $~lib/math/NativeMathf.cos f32.const 0.1694190502166748 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21504,9 +21524,10 @@ unreachable end f32.const 549755813888 + call $~lib/math/NativeMathf.cos f32.const 0.20735950767993927 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21517,9 +21538,10 @@ unreachable end f32.const 3402823466385288598117041e14 + call $~lib/math/NativeMathf.cos f32.const 0.8530210256576538 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21530,9 +21552,10 @@ unreachable end f32.const -255.99993896484375 + call $~lib/math/NativeMathf.cos f32.const -0.03985174745321274 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21543,9 +21566,10 @@ unreachable end f32.const -5033165 + call $~lib/math/NativeMathf.cos f32.const 0.8471871614456177 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21556,9 +21580,10 @@ unreachable end f32.const -421657440 + call $~lib/math/NativeMathf.cos f32.const 0.6728929281234741 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21569,9 +21594,10 @@ unreachable end f32.const -2147483392 + call $~lib/math/NativeMathf.cos f32.const 0.9610780477523804 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21582,9 +21608,10 @@ unreachable end f32.const -68719476736 + call $~lib/math/NativeMathf.cos f32.const 0.1694190502166748 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21595,9 +21622,10 @@ unreachable end f32.const -549755813888 + call $~lib/math/NativeMathf.cos f32.const 0.20735950767993927 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21608,9 +21636,10 @@ unreachable end f32.const -3402823466385288598117041e14 + call $~lib/math/NativeMathf.cos f32.const 0.8530210256576538 f32.const 0 - call $std/math/test_cosf + call $std/math/check i32.eqz if i32.const 0 @@ -21816,9 +21845,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cosh f32.const 1593.5216064453125 f32.const 0.26242581009864807 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21829,9 +21859,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cosh f32.const 38.56174087524414 f32.const -0.08168885856866837 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21842,9 +21873,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cosh f32.const 2182.631103515625 f32.const -0.02331414446234703 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21855,9 +21887,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cosh f32.const 343.2738037109375 f32.const 0.20081493258476257 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21868,9 +21901,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cosh f32.const 5291.78173828125 f32.const 0.36286723613739014 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21881,9 +21915,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cosh f32.const 1.2272322177886963 f32.const 0.32777416706085205 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21894,9 +21929,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cosh f32.const 1.0838085412979126 f32.const -0.039848703891038895 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21907,9 +21943,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cosh f32.const 1.161980390548706 f32.const 0.15274477005004883 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21920,9 +21957,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cosh f32.const 1.314923644065857 f32.const -0.2387111485004425 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21933,9 +21971,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cosh f32.const 1.2393412590026855 f32.const -0.45791932940483093 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21946,9 +21985,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21959,9 +21999,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21972,9 +22013,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21985,9 +22027,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -21998,9 +22041,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -22570,9 +22614,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.exp f32.const 3.1377049162983894e-04 f32.const -0.030193336308002472 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22583,9 +22628,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.exp f32.const 77.11051177978516 f32.const -0.2875460684299469 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22596,9 +22642,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.exp f32.const 2.2908132814336568e-04 f32.const 0.2237040400505066 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22609,9 +22656,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.exp f32.const 1.4565663877874613e-03 f32.const 0.36469703912734985 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22622,9 +22670,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.exp f32.const 10583.5634765625 f32.const 0.45962104201316833 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22635,9 +22684,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.exp f32.const 1.93863844871521 f32.const 0.3568260967731476 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22648,9 +22698,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.exp f32.const 0.6659078598022461 f32.const -0.38294991850852966 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22661,9 +22712,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.exp f32.const 1.753756046295166 f32.const 0.44355490803718567 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22674,9 +22726,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.exp f32.const 2.168752908706665 f32.const 0.24562469124794006 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22687,9 +22740,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.exp f32.const 0.5072436928749084 f32.const -0.3974292278289795 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22700,9 +22754,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22713,9 +22768,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22726,9 +22782,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.exp f32.const 2.7182817459106445 f32.const -0.3462330996990204 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22739,9 +22796,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.exp f32.const 0.3678794503211975 f32.const 0.3070148527622223 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22752,9 +22810,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22765,9 +22824,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.exp f32.const 0 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22778,9 +22838,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.exp f32.const nan:0x400000 f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22791,9 +22852,10 @@ unreachable end f32.const 88.72283172607422 + call $~lib/math/NativeMathf.exp f32.const 340279851902147610656242e15 f32.const -0.09067153930664062 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22804,9 +22866,10 @@ unreachable end f32.const 88.72283935546875 + call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22817,9 +22880,10 @@ unreachable end f32.const -103.97207641601562 + call $~lib/math/NativeMathf.exp f32.const 1.401298464324817e-45 f32.const 0.49999967217445374 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22830,9 +22894,10 @@ unreachable end f32.const -103.97208404541016 + call $~lib/math/NativeMathf.exp f32.const 0 f32.const -0.49999651312828064 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22843,9 +22908,10 @@ unreachable end f32.const 0.3465735614299774 + call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const 0.13922421634197235 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22856,9 +22922,10 @@ unreachable end f32.const 0.3465735912322998 + call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const -0.21432916820049286 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -22869,9 +22936,10 @@ unreachable end f32.const 0.3465736210346222 + call $~lib/math/NativeMathf.exp f32.const 1.4142136573791504 f32.const 0.43211743235588074 - call $std/math/test_expf + call $std/math/check i32.eqz if i32.const 0 @@ -23129,9 +23197,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.expm1 f32.const -0.9996862411499023 f32.const -0.19532723724842072 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23142,9 +23211,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.expm1 f32.const 76.11051177978516 f32.const -0.2875460684299469 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23155,9 +23225,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.expm1 f32.const -0.9997709393501282 f32.const -0.34686920046806335 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23168,9 +23239,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.expm1 f32.const -0.9985434412956238 f32.const -0.1281939446926117 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23181,9 +23253,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.expm1 f32.const 10582.5634765625 f32.const 0.45962104201316833 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23194,9 +23267,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.expm1 f32.const 0.9386383891105652 f32.const -0.28634780645370483 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23207,9 +23281,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.expm1 f32.const -0.3340921103954315 f32.const 0.23410017788410187 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23220,9 +23295,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.expm1 f32.const 0.7537559866905212 f32.const -0.11289017647504807 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23233,9 +23309,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.expm1 f32.const 1.168752908706665 f32.const 0.4912493824958801 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23246,9 +23323,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.expm1 f32.const -0.49275627732276917 f32.const 0.20514154434204102 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23259,9 +23337,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.expm1 f32.const 0 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23272,9 +23351,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.expm1 f32.const -0 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23285,9 +23365,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.expm1 f32.const 1.718281865119934 f32.const 0.3075338304042816 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23298,9 +23379,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.expm1 f32.const -0.6321205496788025 f32.const 0.15350742638111115 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23311,9 +23393,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.expm1 f32.const inf f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23324,9 +23407,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.expm1 f32.const -1 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23337,9 +23421,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.expm1 f32.const nan:0x400000 f32.const 0 - call $std/math/test_expm1f + call $std/math/check i32.eqz if i32.const 0 @@ -23805,9 +23890,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.exp2 f32.const 3.7293792702257633e-03 f32.const -0.0674908235669136 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23818,9 +23904,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.exp2 f32.const 20.32579231262207 f32.const 0.34121403098106384 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23831,9 +23918,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.exp2 f32.const 2.9987283051013947e-03 f32.const 0.15504619479179382 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23844,9 +23932,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.exp2 f32.const 0.010808623395860195 f32.const 0.2603940963745117 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23857,9 +23946,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.exp2 f32.const 616.1156616210938 f32.const -0.1379322111606598 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23870,9 +23960,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.exp2 f32.const 1.5822590589523315 f32.const -0.427890807390213 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23883,9 +23974,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.exp2 f32.const 0.7543970942497253 f32.const -0.38062313199043274 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23896,9 +23988,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.exp2 f32.const 1.4760686159133911 f32.const 0.1507442593574524 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23909,9 +24002,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.exp2 f32.const 1.7101848125457764 f32.const -0.39102980494499207 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -23922,9 +24016,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.exp2 f32.const 0.6247003674507141 f32.const -0.20904375612735748 - call $std/math/test_exp2f + call $std/math/check i32.eqz if i32.const 0 @@ -24234,9 +24329,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -9 - call $std/math/test_floorf + f32.const -9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24246,9 +24342,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_floorf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24258,9 +24355,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -9 - call $std/math/test_floorf + f32.const -9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24270,9 +24368,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -7 - call $std/math/test_floorf + f32.const -7 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24282,9 +24381,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_floorf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24294,9 +24394,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24306,9 +24407,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24318,9 +24420,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24330,9 +24433,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24342,9 +24446,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24356,7 +24461,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24368,7 +24474,8 @@ end f32.const inf f32.const inf - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24380,7 +24487,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24392,7 +24500,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24404,7 +24513,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24416,7 +24526,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24428,7 +24539,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_floorf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24438,9 +24550,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24450,9 +24563,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24462,9 +24576,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_floorf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24474,9 +24589,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -2 - call $std/math/test_floorf + f32.const -2 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24486,9 +24602,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24498,9 +24615,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24510,9 +24628,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_floorf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24522,9 +24641,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -1 - call $std/math/test_floorf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -24536,9 +24656,10 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 + call $~lib/math/NativeMath.hypot f64.const 9.25452742288464 f64.const -0.31188681721687317 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24550,9 +24671,10 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 + call $~lib/math/NativeMath.hypot f64.const 9.893305808328252 f64.const 0.4593673348426819 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24564,9 +24686,10 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 + call $~lib/math/NativeMath.hypot f64.const 8.825301797432132 f64.const -0.1701754331588745 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24578,9 +24701,10 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 + call $~lib/math/NativeMath.hypot f64.const 7.970265885519092 f64.const -0.3176782727241516 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24592,9 +24716,10 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 + call $~lib/math/NativeMath.hypot f64.const 10.441639651824575 f64.const -0.2693633437156677 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24606,9 +24731,10 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 + call $~lib/math/NativeMath.hypot f64.const 6.483936052542593 f64.const 0.35618898272514343 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24620,9 +24746,10 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 + call $~lib/math/NativeMath.hypot f64.const 7.859063309581766 f64.const 0.08044655621051788 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24634,9 +24761,10 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 + call $~lib/math/NativeMath.hypot f64.const 7.717156764899584 f64.const 0.05178084969520569 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24648,9 +24776,10 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 + call $~lib/math/NativeMath.hypot f64.const 2.104006123874314 f64.const -0.0918039008975029 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24662,9 +24791,10 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 + call $~lib/math/NativeMath.hypot f64.const 0.5596880129062913 f64.const 0.1383407711982727 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24676,9 +24806,10 @@ end f64.const 3 f64.const 4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24690,9 +24821,10 @@ end f64.const -3 f64.const 4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24704,9 +24836,10 @@ end f64.const 4 f64.const 3 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24718,9 +24851,10 @@ end f64.const 4 f64.const -3 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24732,9 +24866,10 @@ end f64.const -3 f64.const -4 + call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24746,9 +24881,10 @@ end f64.const 1797693134862315708145274e284 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24760,9 +24896,10 @@ end f64.const 1797693134862315708145274e284 f64.const -0 + call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24774,9 +24911,10 @@ end f64.const 5e-324 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24788,9 +24926,10 @@ end f64.const 5e-324 f64.const -0 + call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24802,9 +24941,10 @@ end f64.const inf f64.const 1 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24816,9 +24956,10 @@ end f64.const 1 f64.const inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24830,9 +24971,10 @@ end f64.const inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24844,9 +24986,10 @@ end f64.const nan:0x8000000000000 f64.const inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24858,9 +25001,10 @@ end f64.const -inf f64.const 1 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24872,9 +25016,10 @@ end f64.const 1 f64.const -inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24886,9 +25031,10 @@ end f64.const -inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24900,9 +25046,10 @@ end f64.const nan:0x8000000000000 f64.const -inf + call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24914,9 +25061,10 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24928,9 +25076,10 @@ end f64.const 1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24942,9 +25091,10 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24956,9 +25106,10 @@ end f64.const 0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_hypot + call $std/math/check i32.eqz if i32.const 0 @@ -24970,9 +25121,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.hypot f32.const 9.254528045654297 f32.const 0.2735958993434906 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -24984,9 +25136,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.hypot f32.const 9.893305778503418 f32.const 0.4530770778656006 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -24998,9 +25151,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.hypot f32.const 8.825302124023438 f32.const 0.30755728483200073 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25012,9 +25166,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.hypot f32.const 7.970265865325928 f32.const 0.06785223633050919 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25026,9 +25181,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.hypot f32.const 10.44163990020752 f32.const -0.26776307821273804 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25040,9 +25196,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.hypot f32.const 6.483936309814453 f32.const 0.48381292819976807 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25054,9 +25211,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.hypot f32.const 7.859063148498535 f32.const 0.07413065433502197 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25068,9 +25226,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.hypot f32.const 7.717156887054443 f32.const 0.4940592646598816 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25082,9 +25241,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.hypot f32.const 2.104006052017212 f32.const -0.287089467048645 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25096,9 +25256,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.hypot f32.const 0.5596880316734314 f32.const 0.4191940724849701 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25110,9 +25271,10 @@ end f32.const 3 f32.const 4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25124,9 +25286,10 @@ end f32.const -3 f32.const 4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25138,9 +25301,10 @@ end f32.const 4 f32.const 3 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25152,9 +25316,10 @@ end f32.const 4 f32.const -3 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25166,9 +25331,10 @@ end f32.const -3 f32.const -4 + call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25180,9 +25346,10 @@ end f32.const 3402823466385288598117041e14 f32.const 0 + call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25194,9 +25361,10 @@ end f32.const 3402823466385288598117041e14 f32.const -0 + call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25208,9 +25376,10 @@ end f32.const 1.401298464324817e-45 f32.const 0 + call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25222,9 +25391,10 @@ end f32.const 1.401298464324817e-45 f32.const -0 + call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25236,9 +25406,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25250,9 +25421,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25264,9 +25436,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25278,9 +25451,10 @@ end f32.const nan:0x400000 f32.const inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25292,9 +25466,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25306,9 +25481,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25320,9 +25496,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25334,9 +25511,10 @@ end f32.const nan:0x400000 f32.const -inf + call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25348,9 +25526,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25362,9 +25541,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/test_hypotf + call $std/math/check i32.eqz if i32.const 0 @@ -25609,8 +25789,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25621,8 +25803,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25633,8 +25817,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25645,8 +25831,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log f32.const 0 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25657,8 +25845,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25669,8 +25859,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log f32.const inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25681,8 +25873,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25693,8 +25887,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25705,8 +25901,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25717,8 +25915,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log f32.const -inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25729,8 +25929,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25741,8 +25943,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log + f32.const 0 f32.const 0 - call $std/math/test_logf + call $std/math/check i32.eqz if i32.const 0 @@ -25753,8 +25957,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25765,8 +25971,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log f32.const inf - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25777,8 +25985,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -25789,8 +25999,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log f32.const nan:0x400000 - call $std/math/test_logf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -26035,9 +26247,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26048,9 +26261,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log10 f32.const 0.6380137205123901 f32.const -0.20476758480072021 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26061,9 +26275,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26074,9 +26289,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26087,9 +26303,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log10 f32.const 0.9669418334960938 f32.const -0.34273025393486023 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26100,9 +26317,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log10 f32.const -0.1791512817144394 f32.const -0.27078554034233093 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26113,9 +26331,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26126,9 +26345,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log10 f32.const -0.25044935941696167 f32.const 0.2126826047897339 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26139,9 +26359,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log10 f32.const -0.1111735999584198 f32.const 0.46515095233917236 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26152,9 +26373,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26165,9 +26387,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26178,9 +26401,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26191,9 +26415,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26204,9 +26429,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log10 f32.const 0 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26217,9 +26443,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26230,9 +26457,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log10 f32.const inf f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26243,9 +26471,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26256,9 +26485,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log10f + call $std/math/check i32.eqz if i32.const 0 @@ -26503,9 +26733,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26516,9 +26747,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log1p f32.const 1.676206350326538 f32.const -0.23014859855175018 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26529,9 +26761,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26542,9 +26775,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26555,9 +26789,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log1p f32.const 2.3289403915405273 f32.const -0.29075589776039124 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26568,9 +26803,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log1p f32.const 0.5080131888389587 f32.const -0.1386766880750656 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26581,9 +26817,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log1p f32.const -0.5218932032585144 f32.const -0.08804433047771454 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26594,9 +26831,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log1p f32.const 0.44581323862075806 f32.const -0.15101368725299835 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26607,9 +26845,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log1p f32.const 0.5733227133750916 f32.const -0.10264533013105392 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26620,9 +26859,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log1p f32.const -1.1355782747268677 f32.const -0.19879481196403503 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26633,9 +26873,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log1p f32.const 0 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26646,9 +26887,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log1p f32.const -0 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26659,9 +26901,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log1p f32.const -7.888609052210118e-31 f32.const 3.308722450212111e-24 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26672,9 +26915,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log1p f32.const 0.6931471824645996 f32.const 0.031954795122146606 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26685,9 +26929,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log1p f32.const -inf f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26698,9 +26943,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log1p f32.const inf f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26711,9 +26957,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26724,9 +26971,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26737,9 +26985,10 @@ unreachable end f32.const -1.1754942106924411e-38 + call $~lib/math/NativeMathf.log1p f32.const -1.1754942106924411e-38 f32.const 4.930380657631324e-32 - call $std/math/test_log1pf + call $std/math/check i32.eqz if i32.const 0 @@ -26984,9 +27233,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -26997,9 +27247,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.log2 f32.const 2.1194357872009277 f32.const 0.18271538615226746 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27010,9 +27261,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27023,9 +27275,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27036,9 +27289,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.log2 f32.const 3.212111234664917 f32.const -0.3188050389289856 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27049,9 +27303,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.log2 f32.const -0.5951276421546936 f32.const 0.34231460094451904 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27062,9 +27317,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27075,9 +27331,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.log2 f32.const -0.8319748044013977 f32.const -0.33473604917526245 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27088,9 +27345,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.log2 f32.const -0.3693107068538666 f32.const 0.3278401792049408 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27101,9 +27359,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27114,9 +27373,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27127,9 +27387,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27140,9 +27401,10 @@ unreachable end f32.const -7.888609052210118e-31 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27153,9 +27415,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.log2 f32.const 0 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27166,9 +27429,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27179,9 +27443,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.log2 f32.const inf f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27192,9 +27457,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -27205,9 +27471,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/test_log2f + call $std/math/check i32.eqz if i32.const 0 @@ -28101,10 +28368,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const 4.535662651062012 f32.const 4.535662651062012 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28115,9 +28382,9 @@ unreachable end f32.const 4.345239639282227 - f32.const -8.887990951538086 f32.const 4.345239639282227 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28127,10 +28394,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -2.7636072635650635 f32.const -2.7636072635650635 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28140,10 +28407,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const 4.567535400390625 f32.const 4.567535400390625 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28154,9 +28421,9 @@ unreachable end f32.const 9.267057418823242 - f32.const 4.811392307281494 f32.const 9.267057418823242 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28166,10 +28433,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.450045585632324 f32.const 0.6620717644691467 f32.const 0.6620717644691467 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28180,9 +28447,9 @@ unreachable end f32.const 7.858890056610107 - f32.const 0.052154526114463806 f32.const 7.858890056610107 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28192,10 +28459,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.7920545339584351 f32.const 7.676402568817139 f32.const 7.676402568817139 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28205,10 +28472,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6157026886940002 f32.const 2.0119025707244873 f32.const 2.0119025707244873 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28218,10 +28485,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5587586760520935 f32.const 0.03223983198404312 f32.const 0.03223983198404312 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28231,10 +28498,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28244,10 +28511,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28257,10 +28524,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28270,10 +28537,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28285,8 +28552,8 @@ end f32.const 1 f32.const 1 - f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28296,10 +28563,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28310,9 +28577,9 @@ unreachable end f32.const inf - f32.const 1 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28322,10 +28589,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28336,9 +28603,9 @@ unreachable end f32.const nan:0x400000 - f32.const 1 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28349,9 +28616,9 @@ unreachable end f32.const 0 - f32.const -1 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28362,9 +28629,9 @@ unreachable end f32.const -0 - f32.const -1 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28375,9 +28642,9 @@ unreachable end f32.const 0.5 - f32.const -1 f32.const 0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28388,9 +28655,9 @@ unreachable end f32.const -0.5 - f32.const -1 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28401,9 +28668,9 @@ unreachable end f32.const 1 - f32.const -1 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28415,8 +28682,8 @@ end f32.const -1 f32.const -1 - f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28427,9 +28694,9 @@ unreachable end f32.const inf - f32.const -1 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28439,10 +28706,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -1 f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28453,9 +28720,9 @@ unreachable end f32.const nan:0x400000 - f32.const -1 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28468,7 +28735,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_maxf + call $std/math/check i32.eqz if i32.const 0 @@ -28479,9 +28746,9 @@ unreachable end f32.const 0 - f32.const -0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28491,10 +28758,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28505,9 +28772,9 @@ unreachable end f32.const 0 - f32.const -inf f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28517,10 +28784,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28530,10 +28797,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28545,8 +28812,8 @@ end f32.const -0 f32.const -0 - f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28556,10 +28823,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28570,9 +28837,9 @@ unreachable end f32.const -0 - f32.const -inf f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28582,10 +28849,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28596,9 +28863,9 @@ unreachable end f32.const 1 - f32.const 0 f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28608,10 +28875,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28622,9 +28889,9 @@ unreachable end f32.const inf - f32.const 0 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28634,10 +28901,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 0 f32.const 0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28648,9 +28915,9 @@ unreachable end f32.const nan:0x400000 - f32.const 0 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28660,10 +28927,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const -0 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28674,9 +28941,9 @@ unreachable end f32.const inf - f32.const -0 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28686,10 +28953,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -0 f32.const -0 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28700,9 +28967,9 @@ unreachable end f32.const nan:0x400000 - f32.const -0 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28713,9 +28980,9 @@ unreachable end f32.const inf - f32.const 2 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28726,9 +28993,9 @@ unreachable end f32.const inf - f32.const -0.5 f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28738,10 +29005,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28751,10 +29018,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const 2 f32.const 2 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28764,10 +29031,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -0.5 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28777,10 +29044,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28792,8 +29059,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28803,10 +29070,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28816,10 +29083,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28829,10 +29096,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28842,10 +29109,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28857,8 +29124,8 @@ end f32.const inf f32.const inf - f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28868,10 +29135,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28882,9 +29149,9 @@ unreachable end f32.const 1 - f32.const -inf f32.const 1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28895,9 +29162,9 @@ unreachable end f32.const -1 - f32.const -inf f32.const -1 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28908,9 +29175,9 @@ unreachable end f32.const inf - f32.const -inf f32.const inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28922,8 +29189,8 @@ end f32.const -inf f32.const -inf - f32.const -inf - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28934,9 +29201,9 @@ unreachable end f32.const 1.75 - f32.const 0.5 f32.const 1.75 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28946,10 +29213,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.75 f32.const 0.5 f32.const 0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28960,9 +29227,9 @@ unreachable end f32.const 1.75 - f32.const -0.5 f32.const 1.75 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -28972,10 +29239,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.75 f32.const -0.5 f32.const -0.5 - call $std/math/test_maxf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29870,9 +30137,9 @@ unreachable end f32.const -8.066848754882812 - f32.const 4.535662651062012 f32.const -8.066848754882812 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29882,10 +30149,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const -8.887990951538086 f32.const -8.887990951538086 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29896,9 +30163,9 @@ unreachable end f32.const -8.381433486938477 - f32.const -2.7636072635650635 f32.const -8.381433486938477 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29909,9 +30176,9 @@ unreachable end f32.const -6.531673431396484 - f32.const 4.567535400390625 f32.const -6.531673431396484 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29921,10 +30188,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 4.811392307281494 f32.const 4.811392307281494 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29935,9 +30202,9 @@ unreachable end f32.const -6.450045585632324 - f32.const 0.6620717644691467 f32.const -6.450045585632324 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29947,10 +30214,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.858890056610107 f32.const 0.052154526114463806 f32.const 0.052154526114463806 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29961,9 +30228,9 @@ unreachable end f32.const -0.7920545339584351 - f32.const 7.676402568817139 f32.const -0.7920545339584351 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29974,9 +30241,9 @@ unreachable end f32.const 0.6157026886940002 - f32.const 2.0119025707244873 f32.const 0.6157026886940002 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -29987,9 +30254,9 @@ unreachable end f32.const -0.5587586760520935 - f32.const 0.03223983198404312 f32.const -0.5587586760520935 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30000,9 +30267,9 @@ unreachable end f32.const 0 - f32.const 1 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30013,9 +30280,9 @@ unreachable end f32.const -0 - f32.const 1 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30026,9 +30293,9 @@ unreachable end f32.const 0.5 - f32.const 1 f32.const 0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30039,9 +30306,9 @@ unreachable end f32.const -0.5 - f32.const 1 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30053,8 +30320,8 @@ end f32.const 1 f32.const 1 - f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30065,9 +30332,9 @@ unreachable end f32.const -1 - f32.const 1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30077,10 +30344,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 1 f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30091,9 +30358,9 @@ unreachable end f32.const -inf - f32.const 1 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30104,9 +30371,9 @@ unreachable end f32.const nan:0x400000 - f32.const 1 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30116,10 +30383,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30129,10 +30396,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30142,10 +30409,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30155,10 +30422,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30168,10 +30435,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30183,8 +30450,8 @@ end f32.const -1 f32.const -1 - f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30194,10 +30461,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -1 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30208,9 +30475,9 @@ unreachable end f32.const -inf - f32.const -1 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30221,9 +30488,9 @@ unreachable end f32.const nan:0x400000 - f32.const -1 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30236,7 +30503,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_minf + call $std/math/check i32.eqz if i32.const 0 @@ -30246,10 +30513,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30260,9 +30527,9 @@ unreachable end f32.const 0 - f32.const inf f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30272,10 +30539,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30285,10 +30552,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30299,9 +30566,9 @@ unreachable end f32.const -0 - f32.const 0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30313,8 +30580,8 @@ end f32.const -0 f32.const -0 - f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30325,9 +30592,9 @@ unreachable end f32.const -0 - f32.const inf f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30337,10 +30604,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30350,10 +30617,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30363,10 +30630,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const 0 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30377,9 +30644,9 @@ unreachable end f32.const -1 - f32.const 0 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30389,10 +30656,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 0 f32.const 0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30403,9 +30670,9 @@ unreachable end f32.const -inf - f32.const 0 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30416,9 +30683,9 @@ unreachable end f32.const nan:0x400000 - f32.const 0 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30429,9 +30696,9 @@ unreachable end f32.const -1 - f32.const -0 f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30441,10 +30708,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -0 f32.const -0 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30455,9 +30722,9 @@ unreachable end f32.const -inf - f32.const -0 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30468,9 +30735,9 @@ unreachable end f32.const nan:0x400000 - f32.const -0 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30480,10 +30747,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 2 f32.const 2 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30493,10 +30760,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -0.5 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30506,10 +30773,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30520,9 +30787,9 @@ unreachable end f32.const -inf - f32.const 2 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30533,9 +30800,9 @@ unreachable end f32.const -inf - f32.const -0.5 f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30545,10 +30812,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30560,8 +30827,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30571,10 +30838,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30584,10 +30851,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30598,9 +30865,9 @@ unreachable end f32.const 1 - f32.const inf f32.const 1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30611,9 +30878,9 @@ unreachable end f32.const -1 - f32.const inf f32.const -1 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30625,8 +30892,8 @@ end f32.const inf f32.const inf - f32.const inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30637,9 +30904,9 @@ unreachable end f32.const -inf - f32.const inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30649,10 +30916,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30662,10 +30929,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30675,10 +30942,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const -inf f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30690,8 +30957,8 @@ end f32.const -inf f32.const -inf - f32.const -inf - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30701,10 +30968,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.75 f32.const 0.5 f32.const 0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30715,9 +30982,9 @@ unreachable end f32.const -1.75 - f32.const 0.5 f32.const -1.75 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30727,10 +30994,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.75 f32.const -0.5 f32.const -0.5 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -30741,9 +31008,9 @@ unreachable end f32.const -1.75 - f32.const -0.5 f32.const -1.75 - call $std/math/test_minf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32549,8 +32816,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.mod f32.const -3.531186103820801 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32562,8 +32831,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.mod f32.const 4.345239639282227 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32575,8 +32846,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.mod f32.const -0.09061169624328613 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32588,8 +32861,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.mod f32.const -1.9641380310058594 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32601,8 +32876,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.mod f32.const 4.455665111541748 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32614,8 +32891,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.mod f32.const -0.49139970541000366 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32627,8 +32906,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.mod f32.const 0.0357111394405365 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32640,8 +32921,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.mod f32.const -0.7920545339584351 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32653,8 +32936,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.mod f32.const 0.6157026886940002 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32666,8 +32951,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.mod f32.const -0.010681532323360443 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32679,8 +32966,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32692,8 +32981,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32705,8 +32996,10 @@ end f32.const 0.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32718,8 +33011,10 @@ end f32.const -0.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32731,8 +33026,10 @@ end f32.const 1 f32.const 1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -32744,8 +33041,10 @@ end f32.const -1 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32757,8 +33056,10 @@ end f32.const 1.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32770,8 +33071,10 @@ end f32.const -1.5 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32783,8 +33086,10 @@ end f32.const 2 f32.const 1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -32796,8 +33101,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32809,8 +33116,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32822,8 +33131,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32835,8 +33146,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32848,8 +33161,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -32861,8 +33176,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32874,8 +33191,10 @@ end f32.const 0.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32887,8 +33206,10 @@ end f32.const -0.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32900,8 +33221,10 @@ end f32.const 1 f32.const -1 + call $~lib/math/NativeMathf.mod + f32.const 0 f32.const 0 - call $std/math/test_modf + call $std/math/check i32.eqz if i32.const 0 @@ -32913,8 +33236,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32926,8 +33251,10 @@ end f32.const 1.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32939,8 +33266,10 @@ end f32.const -1.5 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0.5 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32952,8 +33281,10 @@ end f32.const 2 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32965,8 +33296,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32978,8 +33311,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -32991,8 +33326,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33004,8 +33341,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33017,8 +33356,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33030,8 +33371,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33043,8 +33386,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33056,8 +33401,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const 0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33069,8 +33416,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33082,8 +33431,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33095,8 +33446,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33108,8 +33461,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33121,8 +33476,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const -0 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33134,8 +33491,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33147,8 +33506,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33160,8 +33521,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33173,8 +33536,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33186,8 +33551,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33199,8 +33566,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33212,8 +33581,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33225,8 +33596,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33238,8 +33611,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33251,8 +33626,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33264,8 +33641,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33277,8 +33656,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33290,8 +33671,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33303,8 +33686,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33316,8 +33701,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33329,8 +33716,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33342,8 +33731,10 @@ end f32.const nan:0x400000 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33355,8 +33746,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33368,8 +33761,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33381,8 +33776,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.mod f32.const 1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33394,8 +33791,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.mod f32.const -1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33407,8 +33806,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33420,8 +33821,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33433,8 +33836,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const 1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33446,8 +33851,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.mod f32.const -1 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33459,8 +33866,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33472,8 +33881,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33485,8 +33896,10 @@ end f32.const 1.75 f32.const 0.5 + call $~lib/math/NativeMathf.mod f32.const 0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33498,8 +33911,10 @@ end f32.const -1.75 f32.const 0.5 + call $~lib/math/NativeMathf.mod f32.const -0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33511,8 +33926,10 @@ end f32.const 1.75 f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const 0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -33524,8 +33941,10 @@ end f32.const -1.75 f32.const -0.5 + call $~lib/math/NativeMathf.mod f32.const -0.25 - call $std/math/test_modf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -35464,9 +35883,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35478,9 +35898,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.pow f32.const 2.134714122803416e-06 f32.const 0.1436440795660019 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35492,9 +35913,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35506,9 +35928,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35520,9 +35943,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.pow f32.const 44909.33203125 f32.const -0.05356409028172493 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35534,9 +35958,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35548,9 +35973,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.pow f32.const 1.1135177612304688 f32.const 0.19122089445590973 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35562,9 +35988,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35576,9 +36003,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.pow f32.const 0.3769077658653259 f32.const 0.337149053812027 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35590,9 +36018,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35604,9 +36033,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35618,9 +36048,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35632,9 +36063,10 @@ end f32.const 0 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35646,9 +36078,10 @@ end f32.const 0 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35660,9 +36093,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35674,9 +36108,10 @@ end f32.const 0 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35688,9 +36123,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35702,9 +36138,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35716,9 +36153,10 @@ end f32.const 0 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35730,9 +36168,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35744,9 +36183,10 @@ end f32.const 0 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35758,9 +36198,10 @@ end f32.const 0 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35772,9 +36213,10 @@ end f32.const 0 f32.const -4 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35786,9 +36228,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35800,9 +36243,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35814,9 +36258,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35828,9 +36273,10 @@ end f32.const -0 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35842,9 +36288,10 @@ end f32.const -0 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35856,9 +36303,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35870,9 +36318,10 @@ end f32.const -0 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35884,9 +36333,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35898,9 +36348,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35912,9 +36363,10 @@ end f32.const -0 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35926,9 +36378,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35940,9 +36393,10 @@ end f32.const -0 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35954,9 +36408,10 @@ end f32.const -0 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35968,9 +36423,10 @@ end f32.const -0 f32.const -4 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35982,9 +36438,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -35996,9 +36453,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36010,9 +36468,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36024,9 +36483,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36038,9 +36498,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36052,9 +36513,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36066,9 +36528,10 @@ end f32.const -0.5 f32.const 0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36080,9 +36543,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36094,9 +36558,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36108,9 +36573,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36122,9 +36588,10 @@ end f32.const 1 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36136,9 +36603,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36150,9 +36618,10 @@ end f32.const -0.5 f32.const -0 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36164,9 +36633,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36178,9 +36648,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36192,9 +36663,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36206,9 +36678,10 @@ end f32.const -1 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36220,9 +36693,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36234,9 +36708,10 @@ end f32.const -1 f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36248,9 +36723,10 @@ end f32.const -1 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36262,9 +36738,10 @@ end f32.const -1 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36276,9 +36753,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36290,9 +36768,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36304,9 +36783,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36318,9 +36798,10 @@ end f32.const 1 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36332,9 +36813,10 @@ end f32.const 1 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36346,9 +36828,10 @@ end f32.const 1 f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36360,9 +36843,10 @@ end f32.const 1 f32.const -3 + call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36374,9 +36858,10 @@ end f32.const -0.5 f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36388,9 +36873,10 @@ end f32.const -0.5 f32.const 1.5 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36402,9 +36888,10 @@ end f32.const -0.5 f32.const 2 + call $~lib/math/NativeMathf.pow f32.const 0.25 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36416,9 +36903,10 @@ end f32.const -0.5 f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -0.125 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36430,9 +36918,10 @@ end f32.const -0.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36444,9 +36933,10 @@ end f32.const -0.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36458,9 +36948,10 @@ end f32.const -0.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36472,9 +36963,10 @@ end f32.const 0.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36486,9 +36978,10 @@ end f32.const 0.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36500,9 +36993,10 @@ end f32.const 0.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36514,9 +37008,10 @@ end f32.const 1.5 f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36528,9 +37023,10 @@ end f32.const 1.5 f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36542,9 +37038,10 @@ end f32.const 1.5 f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36556,9 +37053,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36570,9 +37068,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36584,9 +37083,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36598,9 +37098,10 @@ end f32.const inf f32.const 3 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36612,9 +37113,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36626,9 +37128,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36640,9 +37143,10 @@ end f32.const inf f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36654,9 +37158,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36668,9 +37173,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36682,9 +37188,10 @@ end f32.const inf f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36696,9 +37203,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36710,9 +37218,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36724,9 +37233,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36738,9 +37248,10 @@ end f32.const -inf f32.const 3 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36752,9 +37263,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36766,9 +37278,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36780,9 +37293,10 @@ end f32.const -inf f32.const 0.5 + call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36794,9 +37308,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36808,9 +37323,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36822,9 +37338,10 @@ end f32.const -inf f32.const -2 + call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36836,9 +37353,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36850,9 +37368,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36864,9 +37383,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.pow f32.const -2 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36878,9 +37398,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.pow f32.const -0.5 f32.const 0 - call $std/math/test_powf + call $std/math/check i32.eqz if i32.const 0 @@ -36899,17 +37420,54 @@ f64.const 1e6 f64.lt if - call $~lib/math/NativeMath.random + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 1413 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_64 + local.set $3 + global.get $~lib/math/random_state1_64 + local.tee $4 + global.set $~lib/math/random_state0_64 + local.get $4 + local.get $3 + local.get $3 + i64.const 23 + i64.shl + i64.xor + local.tee $3 + local.get $3 + i64.const 17 + i64.shr_u + i64.xor + i64.xor + local.get $4 + i64.const 26 + i64.shr_u + i64.xor + global.set $~lib/math/random_state1_64 + local.get $4 + i64.const 12 + i64.shr_u + i64.const 4607182418800017408 + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub local.tee $0 + f64.const 1 + f64.lt + i32.const 0 + local.get $0 f64.const 0 f64.ge - if (result i32) - local.get $0 - f64.const 1 - f64.lt - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -36937,17 +37495,56 @@ f64.const 1e6 f64.lt if - call $~lib/math/NativeMathf.random + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 2606 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_32 + local.tee $5 + global.get $~lib/math/random_state1_32 + i32.xor + local.tee $6 + local.get $5 + i32.const 26 + i32.rotl + i32.xor + local.get $6 + i32.const 9 + i32.shl + i32.xor + global.set $~lib/math/random_state0_32 + local.get $6 + i32.const 13 + i32.rotl + global.set $~lib/math/random_state1_32 + local.get $5 + i32.const -1640531525 + i32.mul + i32.const 5 + i32.rotl + i32.const 5 + i32.mul + i32.const 9 + i32.shr_u + i32.const 1065353216 + i32.or + f32.reinterpret_i32 + f32.const 1 + f32.sub local.tee $1 + f32.const 1 + f32.lt + i32.const 0 + local.get $1 f32.const 0 f32.ge - if (result i32) - local.get $1 - f32.const 1 - f32.lt - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -36964,9 +37561,10 @@ br $for-loop|1 end end - f64.const -8.06684839057968 f64.const -8 - call $std/math/test_round + f64.const -8 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -36976,9 +37574,10 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 f64.const 4 - call $std/math/test_round + f64.const 4 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -36988,9 +37587,10 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const -8 - call $std/math/test_round + f64.const -8 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37000,9 +37600,10 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const -7 - call $std/math/test_round + f64.const -7 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37012,9 +37613,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 f64.const 9 - call $std/math/test_round + f64.const 9 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37024,9 +37626,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37036,9 +37639,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37048,9 +37652,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37060,9 +37665,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37072,9 +37678,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37086,7 +37693,8 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37098,7 +37706,8 @@ end f64.const inf f64.const inf - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37110,7 +37719,8 @@ end f64.const -inf f64.const -inf - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37122,7 +37732,8 @@ end f64.const 0 f64.const 0 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37134,7 +37745,8 @@ end f64.const -0 f64.const -0 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37146,7 +37758,8 @@ end f64.const 1 f64.const 1 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37158,7 +37771,8 @@ end f64.const -1 f64.const -1 - call $std/math/test_round + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37168,9 +37782,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37180,9 +37795,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37192,9 +37808,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5 f64.const 2 - call $std/math/test_round + f64.const 2 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37204,9 +37821,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.5 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37216,9 +37834,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37228,9 +37847,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37240,9 +37860,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 1 - call $std/math/test_round + f64.const 1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37252,9 +37873,10 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37264,9 +37886,10 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 0 - call $std/math/test_round + f64.const 0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37276,9 +37899,10 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_round + f64.const -0 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37288,9 +37912,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_roundf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37300,9 +37925,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_roundf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37312,9 +37938,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_roundf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37324,9 +37951,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -7 - call $std/math/test_roundf + f32.const -7 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37336,9 +37964,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_roundf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37348,9 +37977,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37360,9 +37990,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37372,9 +38003,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37384,9 +38016,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37396,9 +38029,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37410,7 +38044,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37422,7 +38057,8 @@ end f32.const inf f32.const inf - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37434,7 +38070,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37446,7 +38083,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37458,7 +38096,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37470,7 +38109,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37482,7 +38122,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_roundf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37492,9 +38133,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37504,9 +38146,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37516,9 +38159,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5 f64.const 2 - call $std/math/test_round + f64.const 2 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37528,9 +38172,10 @@ call $~lib/builtins/abort unreachable end - f64.const -1.5 f64.const -1 - call $std/math/test_round + f64.const -1 + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37540,9 +38185,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37552,9 +38198,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37564,9 +38211,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 1 - call $std/math/test_roundf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37576,9 +38224,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -1 - call $std/math/test_roundf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37588,9 +38237,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_roundf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37600,9 +38250,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_roundf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37830,8 +38481,10 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 + call $~lib/math/NativeMath.rem f64.const 1.0044767307740567 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37843,8 +38496,10 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 + call $~lib/math/NativeMath.rem f64.const 4.345239849338305 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37856,8 +38511,10 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 + call $~lib/math/NativeMath.rem f64.const -0.09061141541648476 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37869,8 +38526,10 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 + call $~lib/math/NativeMath.rem f64.const -1.9641383050707404 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37882,8 +38541,10 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 + call $~lib/math/NativeMath.rem f64.const -0.35572720174700656 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37895,8 +38556,10 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 + call $~lib/math/NativeMath.rem f64.const 0.17067236731650248 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37908,8 +38571,10 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 + call $~lib/math/NativeMath.rem f64.const -0.016443286217702822 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37921,8 +38586,10 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 + call $~lib/math/NativeMath.rem f64.const -0.792054511984896 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37934,8 +38601,10 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 + call $~lib/math/NativeMath.rem f64.const 0.615702673197924 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37947,8 +38616,10 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 + call $~lib/math/NativeMath.rem f64.const -0.0106815621160685 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37960,8 +38631,10 @@ end f64.const 0 f64.const 1 + call $~lib/math/NativeMath.rem + f64.const 0 f64.const 0 - call $std/math/test_rem + call $std/math/check i32.eqz if i32.const 0 @@ -37973,8 +38646,10 @@ end f64.const -0 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37986,8 +38661,10 @@ end f64.const 0.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -37999,8 +38676,10 @@ end f64.const -0.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38012,8 +38691,10 @@ end f64.const 1 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38025,8 +38706,10 @@ end f64.const -1 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38038,8 +38721,10 @@ end f64.const 1.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38051,8 +38736,10 @@ end f64.const -1.5 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38064,8 +38751,10 @@ end f64.const 2 f64.const 1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38077,8 +38766,10 @@ end f64.const -2 f64.const 1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38090,8 +38781,10 @@ end f64.const inf f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38103,8 +38796,10 @@ end f64.const -inf f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38116,8 +38811,10 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38129,8 +38826,10 @@ end f64.const 0 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38142,8 +38841,10 @@ end f64.const -0 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38155,8 +38856,10 @@ end f64.const 0.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38168,8 +38871,10 @@ end f64.const -0.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38181,8 +38886,10 @@ end f64.const 1 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38194,8 +38901,10 @@ end f64.const -1 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38207,8 +38916,10 @@ end f64.const 1.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38220,8 +38931,10 @@ end f64.const -1.5 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0.5 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38233,8 +38946,10 @@ end f64.const 2 f64.const -1 + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38246,8 +38961,10 @@ end f64.const -2 f64.const -1 + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38259,8 +38976,10 @@ end f64.const inf f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38272,8 +38991,10 @@ end f64.const -inf f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38285,8 +39006,10 @@ end f64.const nan:0x8000000000000 f64.const -1 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38298,8 +39021,10 @@ end f64.const 0 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38311,8 +39036,10 @@ end f64.const 0 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38324,8 +39051,10 @@ end f64.const 0 f64.const inf + call $~lib/math/NativeMath.rem + f64.const 0 f64.const 0 - call $std/math/test_rem + call $std/math/check i32.eqz if i32.const 0 @@ -38337,8 +39066,10 @@ end f64.const 0 f64.const -inf + call $~lib/math/NativeMath.rem f64.const 0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38350,8 +39081,10 @@ end f64.const 0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38363,8 +39096,10 @@ end f64.const -0 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38376,8 +39111,10 @@ end f64.const -0 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38389,8 +39126,10 @@ end f64.const -0 f64.const inf + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38402,8 +39141,10 @@ end f64.const -0 f64.const -inf + call $~lib/math/NativeMath.rem f64.const -0 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38415,8 +39156,10 @@ end f64.const -0 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38428,8 +39171,10 @@ end f64.const 1 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38441,8 +39186,10 @@ end f64.const -1 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38454,8 +39201,10 @@ end f64.const inf f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38467,8 +39216,10 @@ end f64.const -inf f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38480,8 +39231,10 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38493,8 +39246,10 @@ end f64.const -1 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38506,8 +39261,10 @@ end f64.const inf f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38519,8 +39276,10 @@ end f64.const -inf f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38532,8 +39291,10 @@ end f64.const nan:0x8000000000000 f64.const -0 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38545,8 +39306,10 @@ end f64.const inf f64.const 2 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38558,8 +39321,10 @@ end f64.const inf f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38571,8 +39336,10 @@ end f64.const inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38584,8 +39351,10 @@ end f64.const -inf f64.const 2 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38597,8 +39366,10 @@ end f64.const -inf f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38610,8 +39381,10 @@ end f64.const -inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38623,8 +39396,10 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38636,8 +39411,10 @@ end f64.const 1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38649,8 +39426,10 @@ end f64.const -1 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38662,8 +39441,10 @@ end f64.const 1 f64.const inf + call $~lib/math/NativeMath.rem f64.const 1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38675,8 +39456,10 @@ end f64.const -1 f64.const inf + call $~lib/math/NativeMath.rem f64.const -1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38688,8 +39471,10 @@ end f64.const inf f64.const inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38701,8 +39486,10 @@ end f64.const -inf f64.const inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38714,8 +39501,10 @@ end f64.const 1 f64.const -inf + call $~lib/math/NativeMath.rem f64.const 1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38727,8 +39516,10 @@ end f64.const -1 f64.const -inf + call $~lib/math/NativeMath.rem f64.const -1 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38740,8 +39531,10 @@ end f64.const inf f64.const -inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38753,8 +39546,10 @@ end f64.const -inf f64.const -inf + call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38766,8 +39561,10 @@ end f64.const 1.75 f64.const 0.5 + call $~lib/math/NativeMath.rem f64.const -0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38779,8 +39576,10 @@ end f64.const -1.75 f64.const 0.5 + call $~lib/math/NativeMath.rem f64.const 0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38792,8 +39591,10 @@ end f64.const 1.75 f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const -0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38805,8 +39606,10 @@ end f64.const -1.75 f64.const -0.5 + call $~lib/math/NativeMath.rem f64.const 0.25 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38818,8 +39621,10 @@ end f64.const 8e-323 f64.const inf + call $~lib/math/NativeMath.rem f64.const 8e-323 - call $std/math/test_rem + f64.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38831,8 +39636,10 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 + call $~lib/math/NativeMathf.rem f32.const 1.004476547241211 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38844,8 +39651,10 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 + call $~lib/math/NativeMathf.rem f32.const 4.345239639282227 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38857,8 +39666,10 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 + call $~lib/math/NativeMathf.rem f32.const -0.09061169624328613 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38870,8 +39681,10 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 + call $~lib/math/NativeMathf.rem f32.const -1.9641380310058594 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38883,8 +39696,10 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 + call $~lib/math/NativeMathf.rem f32.const -0.3557271957397461 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38896,8 +39711,10 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 + call $~lib/math/NativeMathf.rem f32.const 0.17067205905914307 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38909,8 +39726,10 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 + call $~lib/math/NativeMathf.rem f32.const -0.016443386673927307 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38922,8 +39741,10 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 + call $~lib/math/NativeMathf.rem f32.const -0.7920545339584351 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38935,8 +39756,10 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 + call $~lib/math/NativeMathf.rem f32.const 0.6157026886940002 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38948,8 +39771,10 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 + call $~lib/math/NativeMathf.rem f32.const -0.010681532323360443 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38961,8 +39786,10 @@ end f32.const 0 f32.const 1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -38974,8 +39801,10 @@ end f32.const -0 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38987,8 +39816,10 @@ end f32.const 0.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39000,8 +39831,10 @@ end f32.const -0.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39013,8 +39846,10 @@ end f32.const 1 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const 0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39026,8 +39861,10 @@ end f32.const -1 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39039,8 +39876,10 @@ end f32.const 1.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39052,8 +39891,10 @@ end f32.const -1.5 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39065,8 +39906,10 @@ end f32.const 2 f32.const 1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39078,8 +39921,10 @@ end f32.const -2 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39091,8 +39936,10 @@ end f32.const inf f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39104,8 +39951,10 @@ end f32.const -inf f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39117,8 +39966,10 @@ end f32.const nan:0x400000 f32.const 1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39130,8 +39981,10 @@ end f32.const 0 f32.const -1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39143,8 +39996,10 @@ end f32.const -0 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39156,8 +40011,10 @@ end f32.const 0.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39169,8 +40026,10 @@ end f32.const -0.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39182,8 +40041,10 @@ end f32.const 1 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const 0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39195,8 +40056,10 @@ end f32.const -1 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39208,8 +40071,10 @@ end f32.const 1.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39221,8 +40086,10 @@ end f32.const -1.5 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const 0.5 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39234,8 +40101,10 @@ end f32.const 2 f32.const -1 + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39247,8 +40116,10 @@ end f32.const -2 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39260,8 +40131,10 @@ end f32.const inf f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39273,8 +40146,10 @@ end f32.const -inf f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39286,8 +40161,10 @@ end f32.const nan:0x400000 f32.const -1 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39299,8 +40176,10 @@ end f32.const 0 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39312,8 +40191,10 @@ end f32.const 0 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39325,8 +40206,10 @@ end f32.const 0 f32.const inf + call $~lib/math/NativeMathf.rem f32.const 0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39338,8 +40221,10 @@ end f32.const 0 f32.const -inf + call $~lib/math/NativeMathf.rem + f32.const 0 f32.const 0 - call $std/math/test_remf + call $std/math/check i32.eqz if i32.const 0 @@ -39351,8 +40236,10 @@ end f32.const 0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39364,8 +40251,10 @@ end f32.const -0 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39377,8 +40266,10 @@ end f32.const -0 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39390,8 +40281,10 @@ end f32.const -0 f32.const inf + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39403,8 +40296,10 @@ end f32.const -0 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const -0 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39416,8 +40311,10 @@ end f32.const -0 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39429,8 +40326,10 @@ end f32.const 1 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39442,8 +40341,10 @@ end f32.const -1 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39455,8 +40356,10 @@ end f32.const inf f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39468,8 +40371,10 @@ end f32.const -inf f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39481,8 +40386,10 @@ end f32.const nan:0x400000 f32.const 0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39494,8 +40401,10 @@ end f32.const -1 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39507,8 +40416,10 @@ end f32.const inf f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39520,8 +40431,10 @@ end f32.const -inf f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39533,8 +40446,10 @@ end f32.const nan:0x400000 f32.const -0 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39546,8 +40461,10 @@ end f32.const inf f32.const 2 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39559,8 +40476,10 @@ end f32.const inf f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39572,8 +40491,10 @@ end f32.const inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39585,8 +40506,10 @@ end f32.const -inf f32.const 2 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39598,8 +40521,10 @@ end f32.const -inf f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39611,8 +40536,10 @@ end f32.const -inf f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39624,8 +40551,10 @@ end f32.const nan:0x400000 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39637,8 +40566,10 @@ end f32.const 1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39650,8 +40581,10 @@ end f32.const -1 f32.const nan:0x400000 + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39663,8 +40596,10 @@ end f32.const 1 f32.const inf + call $~lib/math/NativeMathf.rem f32.const 1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39676,8 +40611,10 @@ end f32.const -1 f32.const inf + call $~lib/math/NativeMathf.rem f32.const -1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39689,8 +40626,10 @@ end f32.const inf f32.const inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39702,8 +40641,10 @@ end f32.const -inf f32.const inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39715,8 +40656,10 @@ end f32.const 1 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const 1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39728,8 +40671,10 @@ end f32.const -1 f32.const -inf + call $~lib/math/NativeMathf.rem f32.const -1 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39741,8 +40686,10 @@ end f32.const inf f32.const -inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39754,8 +40701,10 @@ end f32.const -inf f32.const -inf + call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39767,8 +40716,10 @@ end f32.const 1.75 f32.const 0.5 + call $~lib/math/NativeMathf.rem f32.const -0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39780,8 +40731,10 @@ end f32.const -1.75 f32.const 0.5 + call $~lib/math/NativeMathf.rem f32.const 0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39793,8 +40746,10 @@ end f32.const 1.75 f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const -0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39806,8 +40761,10 @@ end f32.const -1.75 f32.const -0.5 + call $~lib/math/NativeMathf.rem f32.const 0.25 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -39819,8 +40776,10 @@ end f32.const 5.877471754111438e-39 f32.const inf + call $~lib/math/NativeMathf.rem f32.const 5.877471754111438e-39 - call $std/math/test_remf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40737,9 +41696,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.sin f32.const -0.977429211139679 f32.const 0.0801057294011116 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40750,9 +41710,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.sin f32.const -0.933354377746582 f32.const 0.34475627541542053 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40763,9 +41724,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.sin f32.const -0.8640924692153931 f32.const -0.468659907579422 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40776,9 +41738,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.sin f32.const -0.24593880772590637 f32.const -0.3955177664756775 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40789,9 +41752,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.sin f32.const 0.1570674479007721 f32.const -0.24006809294223785 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40802,9 +41766,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.sin f32.const 0.6146844625473022 f32.const -0.07707194238901138 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40815,9 +41780,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.sin f32.const -0.39549243450164795 f32.const -0.11720617115497589 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40828,9 +41794,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.sin f32.const 0.5326763391494751 f32.const -0.16059114038944244 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40841,9 +41808,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.sin f32.const 0.699110209941864 f32.const 0.26384368538856506 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40854,9 +41822,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.sin f32.const -0.627831220626831 f32.const 0.005127954296767712 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40867,9 +41836,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.sin f32.const 0 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40880,9 +41850,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.sin f32.const -0 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40893,9 +41864,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40906,9 +41878,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40919,9 +41892,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40932,9 +41906,10 @@ unreachable end f32.const 1.862645149230957e-09 + call $~lib/math/NativeMathf.sin f32.const 1.862645149230957e-09 f32.const 4.850638554015907e-12 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40945,9 +41920,10 @@ unreachable end f32.const -1.862645149230957e-09 + call $~lib/math/NativeMathf.sin f32.const -1.862645149230957e-09 f32.const -4.850638554015907e-12 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40958,9 +41934,10 @@ unreachable end f32.const 1.1754943508222875e-38 + call $~lib/math/NativeMathf.sin f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40971,9 +41948,10 @@ unreachable end f32.const -1.1754943508222875e-38 + call $~lib/math/NativeMathf.sin f32.const -1.1754943508222875e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40984,9 +41962,10 @@ unreachable end f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.sin f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -40997,9 +41976,10 @@ unreachable end f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.sin f32.const -1.401298464324817e-45 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41010,9 +41990,10 @@ unreachable end f32.const 1.175494490952134e-38 + call $~lib/math/NativeMathf.sin f32.const 1.175494490952134e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41023,9 +42004,10 @@ unreachable end f32.const 1.1754946310819804e-38 + call $~lib/math/NativeMathf.sin f32.const 1.1754946310819804e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41036,9 +42018,10 @@ unreachable end f32.const 2.3509880009953429e-38 + call $~lib/math/NativeMathf.sin f32.const 2.3509880009953429e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41049,9 +42032,10 @@ unreachable end f32.const 2.350988701644575e-38 + call $~lib/math/NativeMathf.sin f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41062,9 +42046,10 @@ unreachable end f32.const 2.3509895424236536e-38 + call $~lib/math/NativeMathf.sin f32.const 2.3509895424236536e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41075,9 +42060,10 @@ unreachable end f32.const 4.70197740328915e-38 + call $~lib/math/NativeMathf.sin f32.const 4.70197740328915e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41088,9 +42074,10 @@ unreachable end f32.const 1.1175870895385742e-08 + call $~lib/math/NativeMathf.sin f32.const 1.1175870895385742e-08 f32.const 2.6193447411060333e-10 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41101,9 +42088,10 @@ unreachable end f32.const 1.4901161193847656e-08 + call $~lib/math/NativeMathf.sin f32.const 1.4901161193847656e-08 f32.const 3.1044086745701804e-10 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41114,9 +42102,10 @@ unreachable end f32.const 0.000244140625 + call $~lib/math/NativeMathf.sin f32.const 0.000244140625 f32.const 0.0833333358168602 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41127,9 +42116,10 @@ unreachable end f32.const 0.0003662109375 + call $~lib/math/NativeMathf.sin f32.const 0.0003662109375 f32.const 0.28125 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41140,9 +42130,10 @@ unreachable end f32.const -1.175494490952134e-38 + call $~lib/math/NativeMathf.sin f32.const -1.175494490952134e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41153,9 +42144,10 @@ unreachable end f32.const -1.1754946310819804e-38 + call $~lib/math/NativeMathf.sin f32.const -1.1754946310819804e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41166,9 +42158,10 @@ unreachable end f32.const -2.3509880009953429e-38 + call $~lib/math/NativeMathf.sin f32.const -2.3509880009953429e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41179,9 +42172,10 @@ unreachable end f32.const -2.350988701644575e-38 + call $~lib/math/NativeMathf.sin f32.const -2.350988701644575e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41192,9 +42186,10 @@ unreachable end f32.const -2.3509895424236536e-38 + call $~lib/math/NativeMathf.sin f32.const -2.3509895424236536e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41205,9 +42200,10 @@ unreachable end f32.const -4.70197740328915e-38 + call $~lib/math/NativeMathf.sin f32.const -4.70197740328915e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41218,9 +42214,10 @@ unreachable end f32.const -1.1175870895385742e-08 + call $~lib/math/NativeMathf.sin f32.const -1.1175870895385742e-08 f32.const -2.6193447411060333e-10 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41231,9 +42228,10 @@ unreachable end f32.const -1.4901161193847656e-08 + call $~lib/math/NativeMathf.sin f32.const -1.4901161193847656e-08 f32.const -3.1044086745701804e-10 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41244,9 +42242,10 @@ unreachable end f32.const -0.000244140625 + call $~lib/math/NativeMathf.sin f32.const -0.000244140625 f32.const -0.0833333358168602 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41257,9 +42256,10 @@ unreachable end f32.const -0.0003662109375 + call $~lib/math/NativeMathf.sin f32.const -0.0003662109375 f32.const -0.28125 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41270,9 +42270,10 @@ unreachable end f32.const 2.802596928649634e-45 + call $~lib/math/NativeMathf.sin f32.const 2.802596928649634e-45 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41283,9 +42284,10 @@ unreachable end f32.const 1.2611686178923354e-44 + call $~lib/math/NativeMathf.sin f32.const 1.2611686178923354e-44 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41296,9 +42298,10 @@ unreachable end f32.const 2.938735877055719e-39 + call $~lib/math/NativeMathf.sin f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41309,9 +42312,10 @@ unreachable end f32.const 5.877471754111438e-39 + call $~lib/math/NativeMathf.sin f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41322,9 +42326,10 @@ unreachable end f32.const 1.1754940705625946e-38 + call $~lib/math/NativeMathf.sin f32.const 1.1754940705625946e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41335,9 +42340,10 @@ unreachable end f32.const 1.1754942106924411e-38 + call $~lib/math/NativeMathf.sin f32.const 1.1754942106924411e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41348,9 +42354,10 @@ unreachable end f32.const -2.802596928649634e-45 + call $~lib/math/NativeMathf.sin f32.const -2.802596928649634e-45 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41361,9 +42368,10 @@ unreachable end f32.const -1.2611686178923354e-44 + call $~lib/math/NativeMathf.sin f32.const -1.2611686178923354e-44 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41374,9 +42382,10 @@ unreachable end f32.const -2.938735877055719e-39 + call $~lib/math/NativeMathf.sin f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41387,9 +42396,10 @@ unreachable end f32.const -5.877471754111438e-39 + call $~lib/math/NativeMathf.sin f32.const -5.877471754111438e-39 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41400,9 +42410,10 @@ unreachable end f32.const -1.1754940705625946e-38 + call $~lib/math/NativeMathf.sin f32.const -1.1754940705625946e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41413,9 +42424,10 @@ unreachable end f32.const -1.1754942106924411e-38 + call $~lib/math/NativeMathf.sin f32.const -1.1754942106924411e-38 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41426,9 +42438,10 @@ unreachable end f32.const 255.99993896484375 + call $~lib/math/NativeMathf.sin f32.const -0.9992055892944336 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41439,9 +42452,10 @@ unreachable end f32.const 5033165 + call $~lib/math/NativeMathf.sin f32.const 0.5312945246696472 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41452,9 +42466,10 @@ unreachable end f32.const 421657440 + call $~lib/math/NativeMathf.sin f32.const -0.7397398948669434 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41465,9 +42480,10 @@ unreachable end f32.const 2147483392 + call $~lib/math/NativeMathf.sin f32.const 0.2762770354747772 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41478,9 +42494,10 @@ unreachable end f32.const 68719476736 + call $~lib/math/NativeMathf.sin f32.const 0.9855440855026245 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41491,9 +42508,10 @@ unreachable end f32.const 549755813888 + call $~lib/math/NativeMathf.sin f32.const -0.9782648086547852 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41504,9 +42522,10 @@ unreachable end f32.const 3402823466385288598117041e14 + call $~lib/math/NativeMathf.sin f32.const -0.5218765139579773 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41517,9 +42536,10 @@ unreachable end f32.const -255.99993896484375 + call $~lib/math/NativeMathf.sin f32.const 0.9992055892944336 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41530,9 +42550,10 @@ unreachable end f32.const -5033165 + call $~lib/math/NativeMathf.sin f32.const -0.5312945246696472 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41543,9 +42564,10 @@ unreachable end f32.const -421657440 + call $~lib/math/NativeMathf.sin f32.const 0.7397398948669434 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41556,9 +42578,10 @@ unreachable end f32.const -2147483392 + call $~lib/math/NativeMathf.sin f32.const -0.2762770354747772 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41569,9 +42592,10 @@ unreachable end f32.const -68719476736 + call $~lib/math/NativeMathf.sin f32.const -0.9855440855026245 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41582,9 +42606,10 @@ unreachable end f32.const -549755813888 + call $~lib/math/NativeMathf.sin f32.const 0.9782648086547852 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41595,9 +42620,10 @@ unreachable end f32.const -3402823466385288598117041e14 + call $~lib/math/NativeMathf.sin f32.const 0.5218765139579773 f32.const 0 - call $std/math/test_sinf + call $std/math/check i32.eqz if i32.const 0 @@ -41803,9 +42829,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.sinh f32.const -1593.521240234375 f32.const 0.1671663224697113 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41816,9 +42843,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.sinh f32.const 38.548770904541016 f32.const -0.49340328574180603 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41829,9 +42857,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.sinh f32.const -2182.630859375 f32.const 0.0849970355629921 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41842,9 +42871,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.sinh f32.const -343.2723388671875 f32.const 0.0704190656542778 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41855,9 +42885,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.sinh f32.const 5291.78125 f32.const -0.44362515211105347 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41868,9 +42899,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.sinh f32.const 0.7114062309265137 f32.const 0.058103885501623154 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41881,9 +42913,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.sinh f32.const -0.4179006516933441 f32.const 0.39349499344825745 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41894,9 +42927,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.sinh f32.const 0.5917755961418152 f32.const -0.4183797240257263 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41907,9 +42941,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.sinh f32.const 0.8538292050361633 f32.const 0.45992106199264526 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41920,9 +42955,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.sinh f32.const -0.7320976257324219 f32.const -0.48159059882164 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41933,9 +42969,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.sinh f32.const 0 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41946,9 +42983,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.sinh f32.const -0 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41959,9 +42997,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.sinh f32.const inf f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41972,9 +43011,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.sinh f32.const -inf f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -41985,9 +43025,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.sinh f32.const nan:0x400000 f32.const 0 - call $std/math/test_sinhf + call $std/math/check i32.eqz if i32.const 0 @@ -43089,10 +44130,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43102,10 +44143,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 + f32.const 2.084523916244507 f32.const 2.084523916244507 f32.const 0.3200402557849884 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43115,10 +44156,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43128,10 +44169,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43141,10 +44182,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 + f32.const 3.0441842079162598 f32.const 3.0441842079162598 f32.const 0.05022354796528816 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43154,10 +44195,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 + f32.const 0.813625156879425 f32.const 0.813625156879425 f32.const 0.2240506112575531 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43167,10 +44208,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43180,10 +44221,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 + f32.const 0.7495063543319702 f32.const 0.7495063543319702 f32.const 0.05895441770553589 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43193,10 +44234,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 + f32.const 0.879859209060669 f32.const 0.879859209060669 f32.const -0.4874873757362366 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43206,10 +44247,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43222,7 +44263,7 @@ f32.const nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43235,7 +44276,7 @@ f32.const inf f32.const inf f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43245,10 +44286,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43261,7 +44302,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43274,7 +44315,7 @@ f32.const -0 f32.const -0 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43287,7 +44328,7 @@ f32.const 1 f32.const 1 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43297,10 +44338,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43310,10 +44351,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4 + f32.const 2 f32.const 2 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43323,10 +44364,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.802596928649634e-45 + f32.const 5.293955920339377e-23 f32.const 5.293955920339377e-23 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43336,10 +44377,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.203895392974451e-45 + f32.const 6.483745598763743e-23 f32.const 6.483745598763743e-23 f32.const 0.37388554215431213 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43349,10 +44390,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.401298464324817e-45 + f32.const 3.743392066509216e-23 f32.const 3.743392066509216e-23 f32.const -0.20303145051002502 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43362,10 +44403,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.401298464324817e-45 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43375,10 +44416,10 @@ call $~lib/builtins/abort unreachable end - f32.const 3402823466385288598117041e14 + f32.const 18446742974197923840 f32.const 18446742974197923840 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43388,10 +44429,10 @@ call $~lib/builtins/abort unreachable end - f32.const -3402823466385288598117041e14 + f32.const -nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43401,10 +44442,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999998807907104 + f32.const 0.9999999403953552 f32.const 0.9999999403953552 f32.const 2.980232594040899e-08 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43417,7 +44458,7 @@ f32.const 0.9999999403953552 f32.const 0.9999999403953552 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43427,10 +44468,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.999999761581421 + f32.const 1.4142134189605713 f32.const 1.4142134189605713 f32.const -0.4959246516227722 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43440,10 +44481,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.9999998807907104 + f32.const 1.4142135381698608 f32.const 1.4142135381698608 f32.const 0.15052194893360138 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43453,10 +44494,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000001192092896 + f32.const 1 f32.const 1 f32.const -0.5 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43466,10 +44507,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.000000238418579 + f32.const 1.0000001192092896 f32.const 1.0000001192092896 f32.const 5.960463766996327e-08 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43479,10 +44520,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.000000238418579 + f32.const 1.4142136573791504 f32.const 1.4142136573791504 f32.const 0.08986179530620575 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -43492,10 +44533,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.000000476837158 + f32.const 1.41421377658844 f32.const 1.41421377658844 f32.const 0.3827550709247589 - call $std/math/test_sqrtf + call $std/math/check i32.eqz if i32.const 0 @@ -44403,9 +45444,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.tan f32.const 4.626595497131348 f32.const 0.2455666959285736 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44416,9 +45458,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.tan f32.const 2.6001901626586914 f32.const 0.3652407228946686 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44429,9 +45472,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.tan f32.const 1.716740608215332 f32.const 0.08169349282979965 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44442,9 +45486,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.tan f32.const -0.2537320852279663 f32.const 0.23186513781547546 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44455,9 +45500,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.tan f32.const -0.15904149413108826 f32.const -0.009332014247775078 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44468,9 +45514,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.tan f32.const 0.7792918682098389 f32.const -0.06759700924158096 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44481,9 +45528,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.tan f32.const -0.43059954047203064 f32.const 0.005771996453404427 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44494,9 +45542,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.tan f32.const 0.6294037103652954 f32.const -0.16838163137435913 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44507,9 +45556,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.tan f32.const 0.977757453918457 f32.const 0.38969388604164124 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44520,9 +45570,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.tan f32.const -0.8066186308860779 f32.const 0.12294059991836548 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44533,9 +45584,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.tan f32.const 0 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44546,9 +45598,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.tan f32.const -0 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44559,9 +45612,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44572,9 +45626,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44585,9 +45640,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44598,9 +45654,10 @@ unreachable end f32.const 1.862645149230957e-09 + call $~lib/math/NativeMathf.tan f32.const 1.862645149230957e-09 f32.const -9.701277108031814e-12 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44611,9 +45668,10 @@ unreachable end f32.const -1.862645149230957e-09 + call $~lib/math/NativeMathf.tan f32.const -1.862645149230957e-09 f32.const 9.701277108031814e-12 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44624,9 +45682,10 @@ unreachable end f32.const 1.1754943508222875e-38 + call $~lib/math/NativeMathf.tan f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44637,9 +45696,10 @@ unreachable end f32.const -1.1754943508222875e-38 + call $~lib/math/NativeMathf.tan f32.const -1.1754943508222875e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44650,9 +45710,10 @@ unreachable end f32.const 1.401298464324817e-45 + call $~lib/math/NativeMathf.tan f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44663,9 +45724,10 @@ unreachable end f32.const -1.401298464324817e-45 + call $~lib/math/NativeMathf.tan f32.const -1.401298464324817e-45 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44676,9 +45738,10 @@ unreachable end f32.const 1.175494490952134e-38 + call $~lib/math/NativeMathf.tan f32.const 1.175494490952134e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44689,9 +45752,10 @@ unreachable end f32.const 1.1754946310819804e-38 + call $~lib/math/NativeMathf.tan f32.const 1.1754946310819804e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44702,9 +45766,10 @@ unreachable end f32.const 2.3509880009953429e-38 + call $~lib/math/NativeMathf.tan f32.const 2.3509880009953429e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44715,9 +45780,10 @@ unreachable end f32.const 2.350988701644575e-38 + call $~lib/math/NativeMathf.tan f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44728,9 +45794,10 @@ unreachable end f32.const 2.3509895424236536e-38 + call $~lib/math/NativeMathf.tan f32.const 2.3509895424236536e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44741,9 +45808,10 @@ unreachable end f32.const 4.70197740328915e-38 + call $~lib/math/NativeMathf.tan f32.const 4.70197740328915e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44754,9 +45822,10 @@ unreachable end f32.const 1.1175870895385742e-08 + call $~lib/math/NativeMathf.tan f32.const 1.1175870895385742e-08 f32.const -5.238689482212067e-10 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44767,9 +45836,10 @@ unreachable end f32.const 1.4901161193847656e-08 + call $~lib/math/NativeMathf.tan f32.const 1.4901161193847656e-08 f32.const -6.208817349140361e-10 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44780,9 +45850,10 @@ unreachable end f32.const 0.000244140625 + call $~lib/math/NativeMathf.tan f32.const 0.000244140625 f32.const -0.1666666716337204 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44793,9 +45864,10 @@ unreachable end f32.const -1.175494490952134e-38 + call $~lib/math/NativeMathf.tan f32.const -1.175494490952134e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44806,9 +45878,10 @@ unreachable end f32.const -1.1754946310819804e-38 + call $~lib/math/NativeMathf.tan f32.const -1.1754946310819804e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44819,9 +45892,10 @@ unreachable end f32.const -2.3509880009953429e-38 + call $~lib/math/NativeMathf.tan f32.const -2.3509880009953429e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44832,9 +45906,10 @@ unreachable end f32.const 2.350988701644575e-38 + call $~lib/math/NativeMathf.tan f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44845,9 +45920,10 @@ unreachable end f32.const -2.3509895424236536e-38 + call $~lib/math/NativeMathf.tan f32.const -2.3509895424236536e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44858,9 +45934,10 @@ unreachable end f32.const -4.70197740328915e-38 + call $~lib/math/NativeMathf.tan f32.const -4.70197740328915e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44871,9 +45948,10 @@ unreachable end f32.const -1.1175870895385742e-08 + call $~lib/math/NativeMathf.tan f32.const -1.1175870895385742e-08 f32.const 5.238689482212067e-10 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44884,9 +45962,10 @@ unreachable end f32.const -1.4901161193847656e-08 + call $~lib/math/NativeMathf.tan f32.const -1.4901161193847656e-08 f32.const 6.208817349140361e-10 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44897,9 +45976,10 @@ unreachable end f32.const -0.000244140625 + call $~lib/math/NativeMathf.tan f32.const -0.000244140625 f32.const 0.1666666716337204 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44910,9 +45990,10 @@ unreachable end f32.const 2.802596928649634e-45 + call $~lib/math/NativeMathf.tan f32.const 2.802596928649634e-45 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44923,9 +46004,10 @@ unreachable end f32.const 1.2611686178923354e-44 + call $~lib/math/NativeMathf.tan f32.const 1.2611686178923354e-44 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44936,9 +46018,10 @@ unreachable end f32.const 2.938735877055719e-39 + call $~lib/math/NativeMathf.tan f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44949,9 +46032,10 @@ unreachable end f32.const 5.877471754111438e-39 + call $~lib/math/NativeMathf.tan f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44962,9 +46046,10 @@ unreachable end f32.const 1.1754940705625946e-38 + call $~lib/math/NativeMathf.tan f32.const 1.1754940705625946e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44975,9 +46060,10 @@ unreachable end f32.const 1.1754942106924411e-38 + call $~lib/math/NativeMathf.tan f32.const 1.1754942106924411e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -44988,9 +46074,10 @@ unreachable end f32.const -2.802596928649634e-45 + call $~lib/math/NativeMathf.tan f32.const -2.802596928649634e-45 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45001,9 +46088,10 @@ unreachable end f32.const -1.2611686178923354e-44 + call $~lib/math/NativeMathf.tan f32.const -1.2611686178923354e-44 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45014,9 +46102,10 @@ unreachable end f32.const -2.938735877055719e-39 + call $~lib/math/NativeMathf.tan f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45027,9 +46116,10 @@ unreachable end f32.const -5.877471754111438e-39 + call $~lib/math/NativeMathf.tan f32.const -5.877471754111438e-39 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45040,9 +46130,10 @@ unreachable end f32.const -1.1754940705625946e-38 + call $~lib/math/NativeMathf.tan f32.const -1.1754940705625946e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45053,9 +46144,10 @@ unreachable end f32.const -1.1754942106924411e-38 + call $~lib/math/NativeMathf.tan f32.const -1.1754942106924411e-38 f32.const 0 - call $std/math/test_tanf + call $std/math/check i32.eqz if i32.const 0 @@ -45261,9 +46353,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.tanh f32.const -0.9999998211860657 f32.const -0.3034979999065399 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45274,9 +46367,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.tanh f32.const 0.9996637105941772 f32.const 0.2154078334569931 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45287,9 +46381,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.tanh f32.const -0.9999998807907104 f32.const 0.23912210762500763 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45300,9 +46395,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.tanh f32.const -0.999995768070221 f32.const -0.18844597041606903 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45313,9 +46409,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.tanh f32.const 1 f32.const 0.1497807800769806 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45326,9 +46423,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.tanh f32.const 0.5796834826469421 f32.const -0.05590476095676422 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45339,9 +46437,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.tanh f32.const -0.38558530807495117 f32.const 0.349787175655365 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45352,9 +46451,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.tanh f32.const 0.5092819333076477 f32.const -0.1528785079717636 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45365,9 +46465,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.tanh f32.const 0.6493374705314636 f32.const 0.4317026138305664 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45378,9 +46479,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.tanh f32.const -0.5907150506973267 f32.const 0.4079873859882355 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45391,9 +46493,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.tanh f32.const 0 f32.const 0 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45404,9 +46507,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.tanh f32.const -0 f32.const 0 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45417,9 +46521,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.tanh f32.const 1 f32.const 0 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45430,9 +46535,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.tanh f32.const -1 f32.const 0 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45443,9 +46549,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.tanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_tanhf + call $std/math/check i32.eqz if i32.const 0 @@ -45755,9 +46862,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.066848754882812 f32.const -8 - call $std/math/test_truncf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45767,9 +46875,10 @@ call $~lib/builtins/abort unreachable end - f32.const 4.345239639282227 f32.const 4 - call $std/math/test_truncf + f32.const 4 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45779,9 +46888,10 @@ call $~lib/builtins/abort unreachable end - f32.const -8.381433486938477 f32.const -8 - call $std/math/test_truncf + f32.const -8 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45791,9 +46901,10 @@ call $~lib/builtins/abort unreachable end - f32.const -6.531673431396484 f32.const -6 - call $std/math/test_truncf + f32.const -6 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45803,9 +46914,10 @@ call $~lib/builtins/abort unreachable end - f32.const 9.267057418823242 f32.const 9 - call $std/math/test_truncf + f32.const 9 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45815,9 +46927,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.6619858741760254 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45827,9 +46940,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.40660393238067627 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45839,9 +46953,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5617597699165344 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45851,9 +46966,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7741522789001465 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45863,9 +46979,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.6787636876106262 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45877,7 +46994,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45889,7 +47007,8 @@ end f32.const inf f32.const inf - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45901,7 +47020,8 @@ end f32.const -inf f32.const -inf - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45913,7 +47033,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45925,7 +47046,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45937,7 +47059,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45949,7 +47072,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_truncf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45959,9 +47083,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.5 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45971,9 +47096,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.5 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45983,9 +47109,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000152587890625 f32.const 1 - call $std/math/test_truncf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -45995,9 +47122,10 @@ call $~lib/builtins/abort unreachable end - f32.const -1.0000152587890625 f32.const -1 - call $std/math/test_truncf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46007,9 +47135,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999923706054688 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46019,9 +47148,10 @@ call $~lib/builtins/abort unreachable end - f32.const -0.9999923706054688 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46031,9 +47161,10 @@ call $~lib/builtins/abort unreachable end - f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_truncf + f32.const 0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -46043,9 +47174,10 @@ call $~lib/builtins/abort unreachable end - f32.const -7.888609052210118e-31 f32.const -0 - call $std/math/test_truncf + f32.const -0 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -47254,7 +48386,7 @@ unreachable end ) - (func $~start (; 176 ;) + (func $~start (; 133 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index e62f33511e..e599ba26f6 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) @@ -452,41 +451,37 @@ local.get $0 f32.mul ) - (func $std/mod/check (; 6 ;) (param $0 f32) (param $1 f32) (result i32) - local.get $1 - local.get $1 - f32.ne - if + (func $std/mod/test_fmodf (; 6 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + block $__inlined_func$std/mod/check (result i32) local.get $0 + local.get $1 + call $~lib/math/NativeMathf.mod + local.tee $0 local.get $0 f32.ne - return - end - local.get $1 - f32.const 0 - f32.eq - if + local.get $2 + local.get $2 + f32.ne + br_if $__inlined_func$std/mod/check + drop f32.const 1 - local.get $1 + local.get $2 f32.div f32.const 1 local.get $0 f32.div f32.eq - return + local.get $2 + f32.const 0 + f32.eq + br_if $__inlined_func$std/mod/check + drop + local.get $0 + local.get $2 + f32.eq end - local.get $0 - local.get $1 - f32.eq - ) - (func $std/mod/test_fmodf (; 7 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMathf.mod - local.get $2 - call $std/mod/check ) - (func $start:std/mod (; 8 ;) + (func $start:std/mod (; 7 ;) f64.const 3 f64.const 2 f64.const 1 @@ -2243,7 +2238,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 8 ;) call $start:std/mod ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 04f4800a66..ad93153023 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,25 +1,32 @@ (module - (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,18 +56,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -75,10 +71,14 @@ local.get $0 i32.const 8 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $std/new/AClass#constructor (; 2 ;) (result i32) + (func $~start (; 1 ;) (local $0 i32) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset call $~lib/rt/stub/__alloc local.tee $0 i32.const 1 @@ -96,13 +96,6 @@ f32.const 3 f32.store offset=4 local.get $0 - ) - (func $~start (; 3 ;) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 97d0bbb311..987e6b37a6 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,8 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (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_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -12,20 +11,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -33,16 +58,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -51,42 +76,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -97,17 +93,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 - ) - (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.get $4 ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -182,37 +170,8 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 5 ;) (param $0 i32) (result i32) + (func $std/object-literal/bar (; 3 ;) (param $0 i32) (local $1 i32) - local.get $0 - i32.const 32 - i32.eq - if - i32.const 1 - return - end - block $folding-inner0 - i32.const 0 - i32.const 1 - local.get $0 - select - br_if $folding-inner0 - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.const 32 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz - return - end - i32.const 0 - ) - (func $std/object-literal/bar (; 6 ;) (param $0 i32) local.get $0 i32.load i32.const 1 @@ -225,9 +184,42 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - call $~lib/string/String.__eq + block $__inlined_func$~lib/string/String.__eq (result i32) + i32.const 1 + local.get $0 + i32.load offset=4 + local.tee $0 + i32.const 32 + i32.eq + br_if $__inlined_func$~lib/string/String.__eq + drop + block $folding-inner0 + i32.const 0 + i32.const 1 + local.get $0 + select + br_if $folding-inner0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 28 + 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.eqz if i32.const 0 @@ -238,7 +230,7 @@ unreachable end ) - (func $start:std/object-literal (; 7 ;) + (func $start:std/object-literal (; 4 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -292,7 +284,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 5 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index aca751e24b..598fb0208e 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -1,8 +1,7 @@ (module - (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 (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 $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) @@ -55,29 +54,7 @@ f32.ne i32.and ) - (func $~lib/object/Object.is (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - i32.eq - ) - (func $~lib/object/Object.is (; 4 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 - i32.ne - local.get $1 - i32.const 0 - i32.ne - i32.eq - ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -153,44 +130,48 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is<~lib/string/String> (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if + block $__inlined_func$~lib/string/String.__eq (result i32) i32.const 1 - return - end - block $folding-inner0 - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length - local.tee $2 local.get $1 - call $~lib/string/String#get:length - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - return + i32.eq + br_if $__inlined_func$~lib/string/String.__eq + drop + block $folding-inner0 + local.get $1 + i32.eqz + i32.const 1 + local.get $0 + select + br_if $folding-inner0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.ne + br_if $folding-inner0 + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + br $__inlined_func$~lib/string/String.__eq + end + i32.const 0 end - i32.const 0 - ) - (func $~lib/object/Object.is<~lib/string/String> (; 8 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/string/String.__eq ) - (func $start:std/object (; 9 ;) + (func $start:std/object (; 5 ;) f64.const 0 f64.const 0 call $~lib/object/Object.is @@ -532,67 +513,6 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 0 - call $~lib/object/Object.is - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 38 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const -1 - call $~lib/object/Object.is - if - i32.const 0 - i32.const 32 - i32.const 39 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 1 - call $~lib/object/Object.is - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 41 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 0 - call $~lib/object/Object.is - if - i32.const 0 - i32.const 32 - i32.const 42 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 0 - call $~lib/object/Object.is - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 43 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 80 i32.const 80 call $~lib/object/Object.is<~lib/string/String> @@ -664,7 +584,7 @@ unreachable end ) - (func $~start (; 10 ;) + (func $~start (; 6 ;) call $start:std/object ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index cf08182ac6..6ed93ff3a3 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,7 +1,6 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) + (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 $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -79,20 +78,28 @@ (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -100,16 +107,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -118,20 +125,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -146,21 +142,9 @@ local.get $1 i32.const 8 i32.store offset=12 - local.get $2 - ) - (func $std/operator-overloading/Tester#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 + local.get $3 ) - (func $~lib/math/NativeMath.scalbn (; 4 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 2 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -237,7 +221,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 5 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 3 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1193,26 +1177,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 6 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load - f64.convert_i32_s - local.get $1 - i32.load - f64.convert_i32_s - call $~lib/math/NativeMath.pow - i32.trunc_f64_s - local.get $0 - i32.load offset=4 - f64.convert_i32_s - local.get $1 - i32.load offset=4 - f64.convert_i32_s - call $~lib/math/NativeMath.pow - i32.trunc_f64_s - call $std/operator-overloading/Tester#constructor - ) - (func $std/operator-overloading/Tester.equals (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 4 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1228,7 +1193,7 @@ i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1244,44 +1209,34 @@ i32.const 0 end ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 9 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 10 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - i32.const 5 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $2 - ) - (func $start:std/operator-overloading (; 11 ;) + (func $start:std/operator-overloading (; 6 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 96 global.set $~lib/rt/stub/startOffset i32.const 96 global.set $~lib/rt/stub/offset + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/a1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/a2 global.get $std/operator-overloading/a1 local.tee $0 @@ -1290,12 +1245,22 @@ local.tee $1 i32.load i32.add + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/a global.get $std/operator-overloading/a i32.load @@ -1318,13 +1283,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/s1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const -3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/s2 global.get $std/operator-overloading/s1 local.tee $0 @@ -1333,12 +1310,22 @@ local.tee $1 i32.load i32.sub + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.sub - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/s global.get $std/operator-overloading/s i32.load @@ -1359,13 +1346,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 5 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/m1 i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + i32.const 3 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/m2 global.get $std/operator-overloading/m1 local.tee $0 @@ -1374,12 +1373,22 @@ local.tee $1 i32.load i32.mul + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.mul - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/m global.get $std/operator-overloading/m i32.load @@ -1402,13 +1411,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 6 + i32.store + local.get $0 i32.const 50 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/d1 i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + i32.const 3 + i32.store + local.get $0 i32.const 10 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/d2 global.get $std/operator-overloading/d1 local.tee $0 @@ -1417,12 +1438,22 @@ local.tee $1 i32.load i32.div_s + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.div_s - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/d global.get $std/operator-overloading/d i32.load @@ -1445,13 +1476,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 10 + i32.store + local.get $0 i32.const 10 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/f1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 6 + i32.store + local.get $0 i32.const 10 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/f2 global.get $std/operator-overloading/f1 local.tee $0 @@ -1460,12 +1503,22 @@ local.tee $1 i32.load i32.rem_s + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.rem_s - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/f global.get $std/operator-overloading/f i32.load @@ -1487,17 +1540,55 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/p1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 4 + i32.store + local.get $0 i32.const 5 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/p2 global.get $std/operator-overloading/p1 + local.tee $0 + i32.load + f64.convert_i32_s global.get $std/operator-overloading/p2 - call $std/operator-overloading/Tester.pow + local.tee $1 + i32.load + f64.convert_i32_s + call $~lib/math/NativeMath.pow + i32.trunc_f64_s + local.set $2 + local.get $0 + i32.load offset=4 + f64.convert_i32_s + local.get $1 + i32.load offset=4 + f64.convert_i32_s + call $~lib/math/NativeMath.pow + i32.trunc_f64_s + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/p global.get $std/operator-overloading/p i32.load @@ -1520,14 +1611,26 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 255 + i32.store + local.get $0 i32.const 15 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/n1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 15 + i32.store + local.get $0 i32.const 255 - call $std/operator-overloading/Tester#constructor - global.set $std/operator-overloading/n2 + i32.store offset=4 + local.get $0 + global.set $std/operator-overloading/n2 global.get $std/operator-overloading/n1 local.tee $0 i32.load @@ -1535,12 +1638,22 @@ local.tee $1 i32.load i32.and + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.and - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/n global.get $std/operator-overloading/n i32.load @@ -1563,13 +1676,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 3855 + i32.store + local.get $0 i32.const 255 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/o1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 61680 + i32.store + local.get $0 i32.const 0 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/o2 global.get $std/operator-overloading/o1 local.tee $0 @@ -1578,12 +1703,22 @@ local.tee $1 i32.load i32.or + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.or - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/o global.get $std/operator-overloading/o i32.load @@ -1606,13 +1741,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 255 + i32.store + local.get $0 i32.const 255 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/x1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 65280 + i32.store + local.get $0 i32.const 0 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/x2 global.get $std/operator-overloading/x1 local.tee $0 @@ -1621,12 +1768,22 @@ local.tee $1 i32.load i32.xor + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.xor - call $std/operator-overloading/Tester#constructor + local.set $1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/x global.get $std/operator-overloading/x i32.load @@ -1649,13 +1806,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const -2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/eq1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const -2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/eq2 global.get $std/operator-overloading/eq1 global.get $std/operator-overloading/eq2 @@ -1672,13 +1841,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 0 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/eq3 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 0 + i32.store + local.get $0 i32.const 1 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/eq4 global.get $std/operator-overloading/eq3 global.get $std/operator-overloading/eq4 @@ -1721,13 +1902,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 2147483647 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/gt1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 0 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/gt2 global.get $std/operator-overloading/gt1 local.tee $0 @@ -1757,13 +1950,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/gte1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/gte2 global.get $std/operator-overloading/gte1 local.tee $0 @@ -1793,13 +1998,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 5 + i32.store + local.get $0 i32.const -1 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/le1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 6 + i32.store + local.get $0 i32.const 6 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/le2 global.get $std/operator-overloading/le1 local.tee $0 @@ -1829,13 +2046,25 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 4 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/leq1 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 4 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/leq2 global.get $std/operator-overloading/leq1 local.tee $0 @@ -1865,20 +2094,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 8 + i32.store + local.get $0 i32.const 16 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/shr global.get $std/operator-overloading/shr local.tee $0 i32.load i32.const 3 i32.shr_s + local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shr_s - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres i32.load @@ -1901,20 +2146,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const -8 + i32.store + local.get $0 i32.const -16 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/shu global.get $std/operator-overloading/shu local.tee $0 i32.load i32.const 3 i32.shr_u + local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shr_u - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/ures global.get $std/operator-overloading/ures i32.load @@ -1937,20 +2198,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/shl global.get $std/operator-overloading/shl local.tee $0 i32.load i32.const 3 i32.shl + local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shl - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres i32.load @@ -1973,16 +2250,32 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const -2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/pos global.get $std/operator-overloading/pos local.tee $0 i32.load + local.set $1 local.get $0 i32.load offset=4 - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/pres global.get $std/operator-overloading/pres i32.load @@ -2007,20 +2300,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const -1 + i32.store + local.get $0 i32.const -2 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/neg i32.const 0 global.get $std/operator-overloading/neg local.tee $0 i32.load i32.sub + local.set $1 i32.const 0 local.get $0 i32.load offset=4 i32.sub - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/nres global.get $std/operator-overloading/nres i32.load @@ -2049,20 +2358,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 255 + i32.store + local.get $0 i32.const 16 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/not global.get $std/operator-overloading/not local.tee $0 i32.load i32.const -1 i32.xor + local.set $1 local.get $0 i32.load offset=4 i32.const -1 i32.xor - call $std/operator-overloading/Tester#constructor + local.set $2 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/res global.get $std/operator-overloading/res i32.load @@ -2091,9 +2416,15 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 0 + i32.store + local.get $0 i32.const 0 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 @@ -2136,9 +2467,15 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 0 + i32.store + local.get $0 i32.const 1 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 @@ -2210,20 +2547,36 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 0 + i32.store + local.get $0 i32.const 1 - call $std/operator-overloading/Tester#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 i32.load i32.const 1 i32.add + local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/Tester#constructor + local.set $3 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $1 + local.get $2 + i32.store + local.get $1 + local.get $3 + i32.store offset=4 + local.get $1 global.set $std/operator-overloading/incdec local.get $0 global.set $std/operator-overloading/tmp @@ -2272,11 +2625,21 @@ i32.load i32.const 1 i32.sub + local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.sub - call $std/operator-overloading/Tester#constructor + local.set $3 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $1 + local.get $2 + i32.store + local.get $1 + local.get $3 + i32.store offset=4 + local.get $1 global.set $std/operator-overloading/incdec local.get $0 global.set $std/operator-overloading/tmp @@ -2320,24 +2683,46 @@ call $~lib/builtins/abort unreachable end + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/TesterInlineStatic#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/ais1 global.get $std/operator-overloading/ais1 local.tee $0 i32.load i32.const 1 i32.add + local.set $1 local.get $0 i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/TesterInlineStatic#constructor + local.set $2 + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/ais1 + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/TesterInlineStatic#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/ais2 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2346,12 +2731,22 @@ local.tee $1 i32.load i32.add + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/TesterInlineStatic#constructor + local.set $1 + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/ais global.get $std/operator-overloading/ais i32.load @@ -2374,24 +2769,46 @@ call $~lib/builtins/abort unreachable end + i32.const 5 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 + i32.store + local.get $0 i32.const 2 - call $std/operator-overloading/TesterInlineInstance#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/aii1 global.get $std/operator-overloading/aii1 local.tee $0 i32.load i32.const 1 i32.add + local.set $1 local.get $0 i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/TesterInlineInstance#constructor + local.set $2 + i32.const 5 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/aii1 + i32.const 5 + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 2 + i32.store + local.get $0 i32.const 3 - call $std/operator-overloading/TesterInlineInstance#constructor + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/aii2 global.get $std/operator-overloading/aii1 local.tee $0 @@ -2400,12 +2817,22 @@ local.tee $1 i32.load i32.add + local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/TesterInlineInstance#constructor + local.set $1 + i32.const 5 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $2 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 global.set $std/operator-overloading/aii global.get $std/operator-overloading/aii i32.load @@ -2429,7 +2856,7 @@ unreachable end ) - (func $~start (; 12 ;) + (func $~start (; 7 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 6d695441d9..bf666a1e01 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param 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))) @@ -14,51 +13,7 @@ (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/memory/memory.fill (; 1 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -232,7 +187,7 @@ end end ) - (func $start:std/pointer (; 3 ;) + (func $start:std/pointer (; 2 ;) (local $0 i32) (local $1 i32) i32.const 8 @@ -402,7 +357,46 @@ call $~lib/memory/memory.copy else local.get $0 - call $~lib/memory/memory.fill + i32.const 0 + i32.store8 + local.get $0 + i32.const 8 + i32.add + local.tee $1 + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 4 + i32.sub + i32.const 0 + i32.store8 end global.get $std/pointer/one global.get $std/pointer/two @@ -596,7 +590,7 @@ unreachable end ) - (func $~start (; 4 ;) + (func $~start (; 3 ;) call $start:std/pointer ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 733734f5a0..f340d9ea57 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,24 +1,22 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (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_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -1068,56 +1066,9 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 444 i32.gt_u @@ -1125,11 +1076,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1340,7 +1328,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1353,34 +1341,35 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 18 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 + i32.load + local.tee $2 i32.const 444 i32.gt_u if - local.get $0 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - ) - (func $~lib/set/Set#clear (; 21 ;) (param $0 i32) - (local $1 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.load - call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1392,7 +1381,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -1406,11 +1403,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 22 ;) (result i32) + (func $~lib/set/Set#constructor (; 19 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -1434,14 +1434,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - ) - (func $~lib/set/Set#find (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1484,7 +1477,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 21 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1492,12 +1485,15 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 22 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1551,10 +1547,13 @@ i32.store8 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_s - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -1588,7 +1587,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -1607,7 +1613,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1620,23 +1633,42 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 - local.tee $3 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -1711,7 +1743,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1727,21 +1759,27 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1755,8 +1793,7 @@ i32.const 0 i32.store offset=8 local.get $2 - local.set $1 - local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 @@ -1766,7 +1803,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1779,49 +1823,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1994,7 +1996,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 26 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2007,7 +2009,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2110,13 +2112,15 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $2 i32.shr_u i32.gt_u @@ -2136,33 +2140,74 @@ end local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.set $3 local.get $1 local.get $2 i32.shl local.tee $2 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - local.tee $1 - i32.add - local.get $2 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + local.set $6 local.get $3 + i32.const 16 i32.sub - call $~lib/memory/memory.fill - local.get $1 - local.get $4 - i32.ne - if - local.get $0 - local.get $1 - i32.store - local.get $0 - local.get $1 + local.set $1 + local.get $3 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $3 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $6 + local.get $1 + local.get $5 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $1 + i32.add + local.get $2 + local.get $4 + i32.sub + call $~lib/memory/memory.fill + local.get $1 + local.get $3 + i32.ne + if + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 i32.store offset=4 end local.get $0 @@ -2170,7 +2215,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2206,71 +2251,7 @@ local.get $2 i32.store8 ) - (func $~lib/set/Set#values (; 35 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2289,7 +2270,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 31 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2298,7 +2279,10 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2352,11 +2336,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 38 ;) + (func $std/set/testNumeric (; 32 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -2382,7 +2370,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -2440,7 +2436,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -2473,10 +2477,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 @@ -2499,12 +2558,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -2512,7 +2579,7 @@ br $for-loop|4 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -2606,7 +2673,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -2665,17 +2740,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 39 ;) (result i32) + (func $~lib/set/Set#constructor (; 33 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2699,18 +2798,21 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2764,10 +2866,13 @@ i32.store8 local.get $3 local.get $5 + local.get $1 local.get $2 i32.load8_u - call $~lib/util/hash/hash8 - local.get $1 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul i32.and i32.const 2 i32.shl @@ -2801,7 +2906,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -2820,7 +2932,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -2833,21 +2952,40 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (; 42 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/set/Set#add (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 - local.tee $3 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + local.tee $2 + local.set $3 + local.get $0 + local.get $1 + local.get $2 call $~lib/set/Set#find i32.eqz if @@ -2922,71 +3060,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 43 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3005,14 +3079,17 @@ i32.add i32.load8_u ) - (func $~lib/set/Set#delete (; 45 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 38 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - call $~lib/util/hash/hash8 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul call $~lib/set/Set#find local.tee $1 i32.eqz @@ -3066,11 +3143,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 46 ;) + (func $std/set/testNumeric (; 39 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -3094,7 +3175,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -3150,7 +3239,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -3183,10 +3280,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 @@ -3209,12 +3361,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -3222,7 +3382,7 @@ br $for-loop|4 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -3312,7 +3472,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -3371,17 +3539,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 47 ;) (result i32) + (func $~lib/set/Set#constructor (; 40 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -3405,7 +3597,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 48 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 41 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3420,7 +3612,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3463,7 +3655,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 43 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3476,7 +3668,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3567,7 +3759,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -3586,7 +3785,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -3599,11 +3805,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 45 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3690,7 +3910,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3728,71 +3948,7 @@ local.get $2 i32.store16 ) - (func $~lib/set/Set#values (; 54 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 8 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 47 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3813,7 +3969,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 56 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 48 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3876,11 +4032,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 57 ;) + (func $std/set/testNumeric (; 49 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -3906,7 +4066,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -3964,7 +4132,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -3997,10 +4173,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 @@ -4023,12 +4254,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -4036,7 +4275,7 @@ br $for-loop|4 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -4130,7 +4369,15 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 call $~lib/set/Set#has @@ -4189,17 +4436,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 58 ;) (result i32) + (func $~lib/set/Set#constructor (; 50 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -4223,18 +4494,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 59 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 51 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4325,7 +4585,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -4344,7 +4611,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -4357,11 +4631,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 52 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4446,71 +4734,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 62 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4531,7 +4755,7 @@ i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4592,12 +4816,16 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 65 ;) + (func $std/set/testNumeric (; 55 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $~lib/set/Set#constructor + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 local.get $0 @@ -4608,7 +4836,11 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4620,10 +4852,22 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4663,7 +4907,11 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4676,10 +4924,22 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4709,10 +4969,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 @@ -4725,7 +5040,12 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $3 + local.get $3 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4735,12 +5055,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -4748,7 +5076,7 @@ br $for-loop|4 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -4772,7 +5100,11 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4787,7 +5119,11 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4826,7 +5162,11 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4838,10 +5178,22 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4856,7 +5208,11 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4897,17 +5253,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 66 ;) (result i32) + (func $~lib/set/Set#constructor (; 56 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -4931,7 +5311,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 67 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 57 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4962,7 +5342,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5003,16 +5383,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 69 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 70 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5103,7 +5474,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -5122,7 +5500,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -5135,11 +5520,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 71 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 60 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5222,7 +5621,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5260,71 +5659,7 @@ local.get $2 i32.store ) - (func $~lib/set/Set#values (; 73 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 62 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5345,7 +5680,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 75 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 63 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5404,11 +5739,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 76 ;) + (func $std/set/testNumeric (; 64 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -5418,7 +5757,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -5430,10 +5771,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5471,7 +5822,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5484,10 +5837,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5517,10 +5880,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor - local.set $3 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|05 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|05 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|2 @@ -5533,7 +5951,10 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $3 + local.get $3 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5543,12 +5964,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -5556,7 +5985,7 @@ br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -5578,7 +6007,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5593,7 +6024,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -5630,7 +6063,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -5642,10 +6077,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5660,7 +6105,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -5701,17 +6148,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 77 ;) (result i32) + (func $~lib/set/Set#constructor (; 65 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -5735,75 +6206,15 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 78 ;) (param $0 i32) (result i32) + (func $std/set/testNumeric (; 66 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/set/testNumeric (; 79 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -5813,7 +6224,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -5825,10 +6238,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5866,7 +6289,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5879,10 +6304,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5912,10 +6347,65 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 - call $~lib/set/Set#constructor + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|05 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $4 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|05 + end + end + call $~lib/set/Set#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|2 @@ -5928,7 +6418,10 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $3 + local.get $3 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5938,12 +6431,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -5951,7 +6452,7 @@ br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -5973,7 +6474,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -5988,7 +6491,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6025,7 +6530,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6037,10 +6544,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6055,7 +6572,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6096,20 +6615,50 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#clear (; 80 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 67 ;) (param $0 i32) (local $1 i32) + (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store @@ -6121,7 +6670,15 @@ local.set $1 local.get $0 i32.load offset=8 - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 i32.store offset=8 @@ -6135,11 +6692,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 81 ;) (result i32) + (func $~lib/set/Set#constructor (; 68 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 15 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -6163,7 +6723,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 82 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 69 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6229,7 +6789,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 83 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6270,16 +6830,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 84 ;) (param $0 i32) (param $1 i64) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 85 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 71 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6370,7 +6921,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -6389,7 +6947,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -6402,11 +6967,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 86 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 72 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6489,7 +7068,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -6527,71 +7106,7 @@ local.get $2 i64.store ) - (func $~lib/set/Set#values (; 88 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 89 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -6612,7 +7127,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 90 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 75 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -6672,12 +7187,17 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 91 ;) + (func $std/set/testNumeric (; 76 ;) (local $0 i64) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -6687,7 +7207,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6699,10 +7221,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6740,7 +7272,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6753,10 +7287,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6786,21 +7330,77 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $6 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $6 + i32.store offset=12 + loop $for-loop|05 + local.get $7 + local.get $6 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.tee $4 + i32.const 1 + i32.add + local.set $3 + local.get $2 + local.get $4 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|05 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $5 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6810,20 +7410,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $3 + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -6845,7 +7453,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6860,7 +7470,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6897,7 +7509,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6909,10 +7523,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -6927,7 +7551,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -6968,28 +7594,52 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (; 92 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 17 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $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 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/set/Set#constructor (; 77 ;) (result i32) + (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 17 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $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 $0 @@ -7002,76 +7652,17 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 93 ;) (param $0 i32) (result i32) + (func $std/set/testNumeric (; 78 ;) + (local $0 i64) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/set/testNumeric (; 94 ;) - (local $0 i64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7081,7 +7672,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -7093,10 +7686,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7134,7 +7737,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7147,10 +7752,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7180,21 +7795,77 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $6 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $6 + i32.store offset=12 + loop $for-loop|05 + local.get $7 + local.get $6 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.tee $4 + i32.const 1 + i32.add + local.set $3 + local.get $2 + local.get $4 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|05 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $5 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7204,20 +7875,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $3 + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7239,7 +7918,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7254,7 +7935,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -7291,7 +7974,9 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -7303,10 +7988,20 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7321,7 +8016,9 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -7362,17 +8059,41 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#constructor (; 95 ;) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (result i32) (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 19 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -7396,7 +8117,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 96 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 80 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -7437,17 +8158,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 97 ;) (param $0 i32) (param $1 f32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 98 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 81 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7539,7 +8250,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -7558,7 +8276,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -7571,16 +8296,30 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#add (; 99 ;) (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/set/Set#add (; 82 ;) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.get $1 local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 @@ -7659,109 +8398,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 100 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/set/Set#values (; 101 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 20 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - f32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -7782,7 +8419,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 103 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 84 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -7843,12 +8480,17 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 104 ;) + (func $std/set/testNumeric (; 85 ;) (local $0 f32) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7858,7 +8500,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -7870,10 +8515,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7911,7 +8567,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7924,10 +8583,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7957,21 +8627,111 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $9 + local.get $1 + i32.load offset=16 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 20 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $6 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $6 + i32.store offset=12 + loop $for-loop|05 + local.get $7 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.tee $8 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + local.tee $3 + i32.const 1 + i32.add + local.set $4 + local.get $8 + f32.load + local.set $0 + local.get $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + local.get $3 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.add + local.tee $8 + i32.const 2 + call $~lib/array/ensureSize + local.get $2 + local.get $8 + i32.store offset=12 + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + f32.store + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|05 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $5 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -7981,20 +8741,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $3 + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -8016,7 +8784,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8031,7 +8802,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8068,7 +8842,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8080,10 +8857,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8098,7 +8886,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8139,20 +8930,44 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/set/Set#constructor (; 105 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 21 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/set/Set#constructor (; 86 ;) (result i32) + (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 24 + i32.const 21 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 i32.store local.get $0 i32.const 0 @@ -8173,7 +8988,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 106 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 87 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8214,17 +9029,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 107 ;) (param $0 i32) (param $1 f64) (result i32) - local.get $0 - local.get $1 - local.get $1 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 108 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 88 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8316,7 +9121,14 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $2 @@ -8335,7 +9147,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -8348,11 +9167,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/set/Set#add (; 109 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 89 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8436,109 +9269,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 110 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/set/Set#values (; 111 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 22 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - f64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 112 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -8559,7 +9290,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 113 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 91 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -8620,12 +9351,17 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 114 ;) + (func $std/set/testNumeric (; 92 ;) (local $0 f64) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -8635,7 +9371,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8647,10 +9386,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8688,7 +9438,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8701,10 +9454,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $2 + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8734,21 +9498,111 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $9 + local.get $1 + i32.load offset=16 + local.set $6 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 22 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $6 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $6 + i32.store offset=12 + loop $for-loop|05 + local.get $7 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $7 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + local.tee $3 + i32.const 1 + i32.add + local.set $4 + local.get $8 + f64.load + local.set $0 + local.get $3 + local.get $2 + i32.load offset=12 + i32.ge_u + if + local.get $3 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $3 + i32.const 1 + i32.add + local.tee $8 + i32.const 3 + call $~lib/array/ensureSize + local.get $2 + local.get $8 + i32.store offset=12 + end + local.get $2 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.get $0 + f64.store + end + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|05 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $5 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $5 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $0 + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8758,20 +9612,28 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $5 call $~lib/array/Array#__get call $~lib/set/Set#add - call $~lib/rt/pure/__release - local.get $3 + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $5 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -8793,7 +9655,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8808,7 +9673,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8845,7 +9713,10 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8857,10 +9728,21 @@ local.get $1 local.get $0 call $~lib/set/Set#add - call $~lib/rt/pure/__release + local.tee $4 + i32.const 444 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -8875,7 +9757,10 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -8916,13 +9801,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 444 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 444 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 115 ;) + (func $~start (; 93 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -8934,9 +9840,10 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 116 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 94 ;) (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -8961,10 +9868,60 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $folding-inner0 + block $block$4$break + block $switch$1$default + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $switch$1$default + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 444 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $1 + i32.load + local.tee $3 + i32.const 444 + i32.ge_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.load offset=8 + local.tee $1 + i32.const 444 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end local.get $2 i32.const -2147483648 i32.and @@ -9002,47 +9959,4 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 117 ;) (param $0 i32) - local.get $0 - i32.const 444 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/rt/__visit_members (; 118 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - 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 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $folding-inner0 $block$4$break $switch$1$default - end - return - end - unreachable - 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 - call $~lib/rt/pure/__visit - local.get $0 - i32.load offset=8 - call $~lib/rt/pure/__visit - ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 916f5a9d87..b16f11b7f6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -92,52 +92,7 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 - i32.const 16 - i32.sub - local.tee $2 - local.get $4 - i32.store - local.get $2 - i32.const 1 - i32.store offset=4 - local.get $2 - local.get $1 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - ) - (func $~lib/memory/memory.copy (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -310,11 +265,13 @@ end end ) - (func $~lib/rt/stub/__realloc (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__realloc (; 4 ;) (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.get $0 i32.const 15 i32.and @@ -334,10 +291,10 @@ local.get $0 i32.const 16 i32.sub - local.tee $3 + local.tee $4 i32.load - local.set $4 - local.get $3 + local.set $2 + local.get $4 i32.load offset=4 i32.const 1 i32.ne @@ -351,7 +308,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $4 + local.get $2 i32.add i32.eq local.set $5 @@ -360,9 +317,9 @@ i32.add i32.const -16 i32.and - local.set $2 + local.set $3 local.get $1 - local.get $4 + local.get $2 i32.gt_u if local.get $5 @@ -374,54 +331,93 @@ unreachable end local.get $0 - local.get $2 + local.get $3 i32.add call $~lib/rt/stub/maybeGrowMemory + local.get $4 local.get $3 - local.get $2 i32.store else - local.get $2 local.get $4 + i32.load offset=8 + local.set $6 + local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $4 + local.tee $2 + local.get $3 local.get $2 - local.get $4 i32.gt_u select + local.tee $5 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $5 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $7 + i32.add + call $~lib/rt/stub/maybeGrowMemory local.get $3 - i32.load offset=8 - call $~lib/rt/stub/__alloc + i32.const 16 + i32.sub local.tee $2 - local.get $0 + local.get $7 + i32.store + local.get $2 + i32.const 1 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $5 + i32.store offset=12 local.get $3 + local.get $0 + local.get $4 i32.load offset=12 call $~lib/memory/memory.copy - local.get $2 + local.get $3 local.tee $0 i32.const 16 i32.sub - local.set $3 + local.set $4 end else local.get $5 if local.get $0 - local.get $2 + local.get $3 i32.add global.set $~lib/rt/stub/offset + local.get $4 local.get $3 - local.get $2 i32.store end end - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 5 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -632,7 +628,7 @@ end end ) - (func $~lib/array/ensureSize (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -688,25 +684,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 8 ;) - i32.const 0 - i32.const 76 - i32.load - i32.ge_u - if - i32.const 64 - i32.const 2 - call $~lib/array/ensureSize - i32.const 76 - i32.const 1 - i32.store - end - i32.const 68 - i32.load - i32.const 2 - i32.store - ) - (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i64) local.get $0 i32.const 140 i32.load @@ -727,25 +705,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__set (; 10 ;) - i32.const 0 - i32.const 140 - i32.load - i32.ge_u - if - i32.const 128 - i32.const 3 - call $~lib/array/ensureSize - i32.const 140 - i32.const 1 - i32.store - end - i32.const 132 - i32.load - i64.const 4 - i64.store - ) - (func $~lib/array/Array#__get (; 11 ;) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result f32) local.get $0 i32.const 204 i32.load @@ -766,25 +726,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__set (; 12 ;) - i32.const 0 - i32.const 204 - i32.load - i32.ge_u - if - i32.const 192 - i32.const 2 - call $~lib/array/ensureSize - i32.const 204 - i32.const 1 - i32.store - end - i32.const 196 - i32.load - f32.const 2.5 - f32.store - ) - (func $~lib/array/Array#__get (; 13 ;) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f64) local.get $0 i32.const 268 i32.load @@ -805,25 +747,7 @@ i32.add f64.load ) - (func $~lib/array/Array#__set (; 14 ;) - i32.const 0 - i32.const 268 - i32.load - i32.ge_u - if - i32.const 256 - i32.const 3 - call $~lib/array/ensureSize - i32.const 268 - i32.const 1 - i32.store - end - i32.const 260 - i32.load - f64.const 2.25 - f64.store - ) - (func $start:std/static-array (; 15 ;) + (func $start:std/static-array (; 10 ;) i32.const 76 i32.load i32.const 2 @@ -864,7 +788,22 @@ global.set $~lib/rt/stub/startOffset i32.const 544 global.set $~lib/rt/stub/offset - call $~lib/array/Array#__set + i32.const 0 + i32.const 76 + i32.load + i32.ge_u + if + i32.const 64 + i32.const 2 + call $~lib/array/ensureSize + i32.const 76 + i32.const 1 + i32.store + end + i32.const 68 + i32.load + i32.const 2 + i32.store i32.const 0 call $~lib/array/Array#__get i32.const 2 @@ -913,7 +852,22 @@ call $~lib/builtins/abort unreachable end - call $~lib/array/Array#__set + i32.const 0 + i32.const 140 + i32.load + i32.ge_u + if + i32.const 128 + i32.const 3 + call $~lib/array/ensureSize + i32.const 140 + i32.const 1 + i32.store + end + i32.const 132 + i32.load + i64.const 4 + i64.store i32.const 0 call $~lib/array/Array#__get i64.const 4 @@ -962,7 +916,22 @@ call $~lib/builtins/abort unreachable end - call $~lib/array/Array#__set + i32.const 0 + i32.const 204 + i32.load + i32.ge_u + if + i32.const 192 + i32.const 2 + call $~lib/array/ensureSize + i32.const 204 + i32.const 1 + i32.store + end + i32.const 196 + i32.load + f32.const 2.5 + f32.store i32.const 0 call $~lib/array/Array#__get f32.const 2.5 @@ -1011,7 +980,22 @@ call $~lib/builtins/abort unreachable end - call $~lib/array/Array#__set + i32.const 0 + i32.const 268 + i32.load + i32.ge_u + if + i32.const 256 + i32.const 3 + call $~lib/array/ensureSize + i32.const 268 + i32.const 1 + i32.store + end + i32.const 260 + i32.load + f64.const 2.25 + f64.store i32.const 0 call $~lib/array/Array#__get f64.const 2.25 @@ -1025,7 +1009,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 11 ;) call $start:std/static-array ) ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 980c7019ff..91ecdb9591 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -2,12 +2,12 @@ (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 $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (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_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -30,18 +30,14 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/staticarray/StaticArray#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/staticarray/StaticArray#__get (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 2 i32.shr_u - ) - (func $~lib/staticarray/StaticArray#__get (; 6 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - call $~lib/staticarray/StaticArray#get:length i32.ge_u if i32.const 64 @@ -58,10 +54,14 @@ i32.add i32.load ) - (func $~lib/staticarray/StaticArray#__set (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/staticarray/StaticArray#__set (; 6 ;) (param $0 i32) (param $1 i32) i32.const 1 local.get $0 - call $~lib/staticarray/StaticArray#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_u i32.ge_u if i32.const 64 @@ -77,7 +77,7 @@ local.get $1 i32.store ) - (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -243,7 +243,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -526,7 +526,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -640,7 +640,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -727,31 +727,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1073741808 - i32.ge_u - if - i32.const 368 - i32.const 320 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $0 - i32.const 16 - local.get $0 - i32.const 16 - i32.gt_u - select - ) - (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -882,7 +858,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -944,7 +920,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1020,7 +996,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1032,9 +1008,29 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.const 1073741808 + i32.ge_u + if + i32.const 368 + i32.const 320 + i32.const 457 + i32.const 29 + call $~lib/builtins/abort + unreachable + end local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareSize + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $3 + i32.const 16 + local.get $3 + i32.const 16 + i32.gt_u + select local.tee $4 call $~lib/rt/tlsf/searchBlock local.tee $3 @@ -1102,15 +1098,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1283,10 +1271,13 @@ end end ) - (func $~lib/rt/__allocBuffer (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocBuffer (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -1297,48 +1288,9 @@ end local.get $1 ) - (func $~lib/rt/pure/increment (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 432 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 432 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 21 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 464 i32.gt_u @@ -1346,35 +1298,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 432 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 432 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $std/staticarray/test (; 22 ;) (result i32) - i32.const 12 - i32.const 3 - i32.const 288 - call $~lib/rt/__allocBuffer - call $~lib/rt/pure/__retain - ) - (func $~lib/rt/pure/__release (; 23 ;) (param $0 i32) - local.get $0 - i32.const 464 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/staticarray/Ref#constructor (; 24 ;) (result i32) - i32.const 0 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - ) - (func $start:std/staticarray (; 25 ;) + (func $start:std/staticarray (; 18 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1390,8 +1355,10 @@ call $~lib/builtins/abort unreachable end - i32.const 32 - call $~lib/staticarray/StaticArray#get:length + i32.const 28 + i32.load + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1431,8 +1398,10 @@ call $~lib/builtins/abort unreachable end - i32.const 256 - call $~lib/staticarray/StaticArray#get:length + i32.const 252 + i32.load + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1459,7 +1428,11 @@ call $~lib/builtins/abort unreachable end - call $std/staticarray/test + i32.const 12 + i32.const 3 + i32.const 288 + call $~lib/rt/__allocBuffer + call $~lib/rt/pure/__retain global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 0 @@ -1501,7 +1474,11 @@ unreachable end global.get $std/staticarray/arr3 - call $~lib/staticarray/StaticArray#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -1528,9 +1505,21 @@ call $~lib/builtins/abort unreachable end - call $std/staticarray/test + i32.const 12 + i32.const 3 + i32.const 288 + call $~lib/rt/__allocBuffer + call $~lib/rt/pure/__retain global.get $std/staticarray/arr3 - call $~lib/rt/pure/__release + local.tee $0 + i32.const 464 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 1 @@ -1550,35 +1539,60 @@ i32.const 0 call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain - local.tee $0 - call $std/staticarray/Ref#constructor + local.tee $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store - local.get $0 - call $std/staticarray/Ref#constructor + local.get $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 0 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.store offset=4 - local.get $0 + local.get $1 global.set $std/staticarray/arr4 i32.const 0 - local.tee $0 + local.set $1 global.get $std/staticarray/arr3 - local.tee $1 - i32.ne + local.tee $0 if - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 464 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $std/staticarray/arr3 global.get $std/staticarray/arr4 - local.tee $1 + local.tee $0 if - local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.const 464 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 26 ;) + (func $~start (; 19 ;) global.get $~started if return @@ -1588,9 +1602,11 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -1615,10 +1631,72 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$7 + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$7 $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 464 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $1 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.add + local.set $4 + loop $while-continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $3 + if + local.get $3 + i32.const 464 + i32.ge_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1664,77 +1742,4 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 28 ;) (param $0 i32) - local.get $0 - i32.const 464 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/staticarray/StaticArray#__visit_impl (; 29 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.add - local.set $1 - loop $while-continue|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $0 - i32.load - local.tee $2 - if - local.get $2 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $while-continue|0 - end - end - ) - (func $~lib/rt/__visit_members (; 30 ;) (param $0 i32) - block $switch$1$default - block $switch$1$case$7 - 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$7 $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 - return - end - local.get $0 - call $~lib/staticarray/StaticArray#__visit_impl - return - end - unreachable - ) ) diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index f01464cab0..85c12bc7b6 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,8 +1,8 @@ (module - (type $i32_=>_none (func (param i32))) - (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_=>_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 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) @@ -297,56 +297,9 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 48 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 48 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 17376 i32.gt_u @@ -354,11 +307,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 48 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -524,7 +514,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -807,7 +797,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -921,7 +911,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1008,7 +998,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1032,7 +1022,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1163,7 +1153,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1225,7 +1215,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1301,7 +1291,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1383,15 +1373,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/util/casemap/casemap (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1542,49 +1524,7 @@ i32.and i32.add ) - (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1757,7 +1697,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 21 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1770,7 +1710,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1873,16 +1813,55 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 - call $~lib/rt/tlsf/checkUsedBlock + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 28 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 24 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1894,7 +1873,11 @@ (local $9 i32) (local $10 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $7 i32.eqz if @@ -1902,28 +1885,34 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $7 i32.const 3 i32.mul i32.const 1 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 - i32.const 208 - call $~lib/string/String#get:length + i32.const 204 + i32.load + i32.const 1 + i32.shr_u local.set $9 loop $for-loop|0 local.get $6 local.get $7 i32.lt_u if + local.get $0 local.get $6 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u - local.tee $1 + local.tee $3 i32.const 7 i32.shr_u if @@ -1934,17 +1923,17 @@ i32.sub i32.lt_u i32.const 0 - local.get $1 + local.get $3 i32.const 55295 i32.sub i32.const 1025 i32.lt_u select if + local.get $0 local.get $6 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u offset=2 local.tee $4 @@ -1960,8 +1949,8 @@ local.get $4 i32.const 1023 i32.and - local.get $1 - local.tee $3 + local.get $3 + local.tee $1 i32.const 1023 i32.and i32.const 10 @@ -1969,19 +1958,19 @@ i32.or i32.const 65536 i32.add - local.tee $1 + local.tee $3 i32.const 131072 i32.ge_u if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add + local.get $1 local.get $4 i32.const 16 i32.shl - local.get $3 i32.or i32.store local.get $2 @@ -1992,25 +1981,25 @@ end end end - local.get $1 + local.get $3 i32.const 9424 i32.sub i32.const 25 i32.le_u if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add - local.get $1 + local.get $3 i32.const 26 i32.sub i32.store16 else i32.const -1 - local.set $3 - local.get $1 + local.set $1 + local.get $3 i32.const 223 i32.sub i32.const 64056 @@ -2018,15 +2007,15 @@ if block $~lib/util/casemap/bsearch|inlined.0 (result i32) local.get $9 - local.set $3 + local.set $1 i32.const 0 local.set $8 loop $while-continue|1 local.get $8 - local.get $3 + local.get $1 i32.le_s if - local.get $3 + local.get $1 local.get $8 i32.add i32.const 3 @@ -2039,7 +2028,7 @@ i32.const 208 i32.add i32.load16_u - local.get $1 + local.get $3 i32.sub local.tee $10 if @@ -2055,7 +2044,7 @@ local.get $4 i32.const 4 i32.sub - local.set $3 + local.set $1 end else local.get $4 @@ -2066,44 +2055,42 @@ end i32.const -1 end - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.const -1 i32.xor if - local.get $3 + local.get $1 i32.const 1 i32.shl i32.const 208 i32.add - local.tee $1 - i32.load offset=2 - local.set $3 - local.get $1 + local.tee $3 i32.load16_u offset=6 local.set $1 + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.tee $4 local.get $3 + i32.load offset=2 i32.store local.get $4 local.get $1 i32.store16 offset=4 + local.get $2 local.get $1 i32.const 0 i32.ne i32.const 1 i32.add - local.get $2 i32.add local.set $2 else - local.get $1 + local.get $3 i32.const 1 call $~lib/util/casemap/casemap i32.const 2097151 @@ -2112,18 +2099,18 @@ i32.const 65536 i32.lt_s if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 i32.store16 else + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 i32.const 65536 @@ -2151,12 +2138,13 @@ end end else + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add - local.get $1 + local.get $3 + local.get $3 i32.const 97 i32.sub i32.const 26 @@ -2167,7 +2155,6 @@ i32.shl i32.const -1 i32.xor - local.get $1 i32.and i32.store16 end @@ -2189,18 +2176,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 29 ;) (param $0 i32) - local.get $0 - i32.const 17376 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/util/string/compareImpl (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2276,7 +2252,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2295,10 +2271,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -2310,7 +2294,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2335,7 +2319,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 33 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 28 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2346,9 +2330,12 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $7 i32.eqz if @@ -2356,18 +2343,22 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $7 i32.const 2 i32.shl - call $~lib/rt/tlsf/__alloc - local.set $4 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $5 loop $for-loop|0 - local.get $5 + local.get $6 local.get $7 i32.lt_u if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add @@ -2377,7 +2368,7 @@ i32.shr_u if block $for-continue|0 - local.get $5 + local.get $6 local.get $7 i32.const 1 i32.sub @@ -2391,26 +2382,26 @@ select if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $3 + local.tee $4 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 - local.get $3 + local.set $6 + local.get $4 i32.const 1023 i32.and local.get $1 - local.tee $8 + local.tee $3 i32.const 1023 i32.and i32.const 10 @@ -2422,13 +2413,13 @@ i32.const 131072 i32.ge_u if - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 local.get $3 + local.get $4 i32.const 16 i32.shl i32.or @@ -2445,7 +2436,7 @@ i32.const 304 i32.eq if - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2461,7 +2452,7 @@ i32.const 931 i32.eq if - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2471,39 +2462,35 @@ i32.gt_u if (result i32) block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - local.get $0 - local.set $8 i32.const 0 - local.set $9 + local.set $8 i32.const 0 - local.get $5 + local.get $6 local.tee $3 local.tee $1 i32.const 30 i32.sub - local.tee $6 + local.tee $4 i32.const 0 - local.get $6 + local.get $4 i32.gt_s select - local.set $11 + local.set $9 loop $while-continue|1 local.get $1 - local.get $11 + local.get $9 i32.gt_s if - block $~lib/util/string/codePointBefore|inlined.0 + block $~lib/util/string/codePointBefore|inlined.0 (result i32) + i32.const -1 local.get $1 - local.tee $6 + local.tee $4 i32.const 0 i32.le_s - if - i32.const -1 - local.set $1 - br $~lib/util/string/codePointBefore|inlined.0 - end - local.get $8 - local.get $6 + br_if $~lib/util/string/codePointBefore|inlined.0 + drop + local.get $0 + local.get $4 i32.const 1 i32.sub i32.const 1 @@ -2515,15 +2502,15 @@ i32.and i32.const 56320 i32.eq - local.get $6 + local.get $4 i32.const 2 i32.sub i32.const 0 i32.ge_s i32.and if - local.get $8 - local.get $6 + local.get $0 + local.get $4 i32.const 2 i32.sub i32.const 1 @@ -2547,34 +2534,31 @@ i32.add i32.const 65536 i32.add - local.set $1 br $~lib/util/string/codePointBefore|inlined.0 end end + i32.const 65533 + local.get $1 local.get $1 i32.const 63488 i32.and i32.const 55296 i32.eq - if - i32.const 65533 - local.set $1 - end + select end - local.get $1 - local.set $10 - local.get $1 + local.tee $1 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $10 + local.get $1 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if + i32.const 0 local.get $1 i32.const 127370 i32.lt_u @@ -2585,15 +2569,13 @@ else i32.const 0 end - if (result i32) - i32.const 1 - else - i32.const 0 - br $~lib/util/string/isFinalSigma|inlined.0 - end - local.set $9 + i32.eqz + br_if $~lib/util/string/isFinalSigma|inlined.0 + drop + i32.const 1 + local.set $8 end - local.get $6 + local.get $4 local.get $1 i32.const 65536 i32.ge_s @@ -2605,7 +2587,7 @@ end end i32.const 0 - local.get $9 + local.get $8 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop @@ -2621,13 +2603,13 @@ local.get $7 i32.lt_s select - local.set $9 + local.set $8 loop $while-continue|2 local.get $1 - local.get $9 + local.get $8 i32.lt_s if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl @@ -2645,22 +2627,22 @@ i32.ne i32.and if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $6 + local.tee $4 i32.const 64512 i32.and i32.const 56320 i32.eq if + local.get $4 local.get $3 i32.const 10 i32.shl - local.get $6 i32.add i32.const -56613888 i32.add @@ -2721,7 +2703,7 @@ i32.const 25 i32.le_u if - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2740,7 +2722,7 @@ i32.const 65536 i32.lt_s if - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2748,7 +2730,7 @@ local.get $1 i32.store16 else - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2780,7 +2762,7 @@ end end else - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -2798,10 +2780,10 @@ i32.or i32.store16 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $2 i32.const 1 i32.add @@ -2809,14 +2791,14 @@ br $for-loop|0 end end - local.get $4 + local.get $5 local.get $2 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 34 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 29 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2830,13 +2812,17 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 i32.gt_s local.tee $2 i32.shl - call $~lib/rt/tlsf/__alloc + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -2866,13 +2852,19 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 30 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $1 local.get $0 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.set $3 + local.get $1 + local.get $2 i32.ge_u if i32.const -1 @@ -2917,15 +2909,15 @@ local.get $2 return end + local.get $0 local.get $2 i32.const 10 i32.shl - local.get $0 i32.add i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 36 ;) + (func $start:std/string-casemapping (; 31 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -2933,8 +2925,8 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) (local $9 i32) (local $10 i32) (local $11 i32) @@ -4172,10 +4164,10 @@ if local.get $0 call $~lib/string/String.fromCodePoint - local.tee $8 + local.tee $7 call $~lib/string/String#toLowerCase local.set $5 - local.get $8 + local.get $7 call $~lib/string/String#toUpperCase local.set $6 local.get $5 @@ -4292,12 +4284,12 @@ i32.const 1 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $7 + local.tee $8 i64.const 0 i64.ge_u if local.get $3 - local.get $7 + local.get $8 i64.const 16 i64.shl i64.add @@ -4307,12 +4299,12 @@ i32.const 2 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $7 + local.tee $8 i64.const 0 i64.ge_u if local.get $3 - local.get $7 + local.get $8 i64.const 32 i64.shl i64.add @@ -4372,12 +4364,33 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/rt/pure/__release + local.get $7 + i32.const 17376 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 1 i32.add @@ -4386,179 +4399,781 @@ end end local.get $9 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $12 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $13 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $14 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $15 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $16 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $26 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $29 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $30 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $30 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $31 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $32 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $32 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $33 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $34 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $35 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $35 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $36 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $36 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $37 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $37 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $38 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $39 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $40 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $41 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $42 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $43 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $44 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $45 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $47 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $50 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $51 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $52 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $53 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $54 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $55 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $57 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $58 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $60 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $62 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $62 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $63 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $63 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $64 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $64 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $65 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $65 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $66 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $66 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $67 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $67 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $68 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $68 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $69 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $69 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $70 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $70 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $71 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $71 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $72 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $72 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $73 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $73 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $74 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $74 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $75 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $75 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $76 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $76 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $77 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $77 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $78 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $78 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $79 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $79 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $80 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $80 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $81 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $81 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $82 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $82 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $83 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $83 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $84 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $84 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $85 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $85 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $86 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $86 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $87 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $87 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $88 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $88 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $89 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $89 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $90 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $90 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $91 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $91 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $92 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $92 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $93 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $93 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $94 - call $~lib/rt/pure/__release + i32.const 17376 + i32.gt_u + if + local.get $94 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~start (; 37 ;) + (func $~start (; 32 ;) global.get $~started if return @@ -4568,7 +5183,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 33 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -4595,10 +5210,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 17376 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -4636,36 +5277,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 39 ;) (param $0 i32) - block $folding-inner0 - block $switch$1$default - 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 $folding-inner0 $folding-inner0 $folding-inner0 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 17376 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - end - ) ) diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 63da50a5de..7462990e87 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 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_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 $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -35,60 +35,9 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (local $2 i32) local.get $0 i32.const 21052 i32.gt_u @@ -96,16 +45,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/decrement + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 64 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end - ) - (func $~lib/string/String.UTF16.byteLength (; 9 ;) (param $0 i32) (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 ) - (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -271,7 +252,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -554,7 +535,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -668,7 +649,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -755,7 +736,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -779,7 +760,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -910,7 +891,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -972,7 +953,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1048,7 +1029,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1130,15 +1111,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.copy (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1311,14 +1284,20 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 21 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 17 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - call $~lib/string/String.UTF16.byteLength - local.tee $1 + i32.const 16 + i32.sub + i32.load offset=12 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -1326,14 +1305,16 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 22 ;) + (func $std/string-encoding/testUTF16Encode (; 18 ;) (local $0 i32) (local $1 i32) i32.const 32 call $~lib/string/String.UTF16.encode local.tee $1 local.tee $0 - call $~lib/string/String.UTF16.byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 12 i32.ne if @@ -1485,16 +1466,26 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const -2 i32.and local.tee $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -1502,21 +1493,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (; 24 ;) (param $0 i32) (result i32) - local.get $0 - local.get $0 - call $~lib/string/String.UTF16.byteLength - call $~lib/string/String.UTF16.decodeUnsafe - ) - (func $~lib/string/String#get:length (; 25 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1592,7 +1569,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1611,10 +1588,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1626,31 +1611,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16Decode (; 28 ;) - (local $0 i32) - (local $1 i32) - i32.const 32 - call $~lib/string/String.UTF16.encode - local.tee $0 - call $~lib/string/String.UTF16.decode - local.tee $1 - i32.const 32 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 33 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 29 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 22 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1661,15 +1622,14 @@ (local $7 i32) i32.const 32 call $~lib/string/String.UTF16.encode - local.set $2 - i32.const 32 - call $~lib/string/String.UTF16.byteLength + local.set $0 + i32.const 28 + i32.load local.set $1 - local.get $2 - local.tee $0 + local.get $0 i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $3 + local.tee $2 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1684,7 +1644,7 @@ local.get $0 local.get $1 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $4 + local.tee $1 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1699,7 +1659,7 @@ local.get $0 i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $5 + local.tee $3 i32.const 304 call $~lib/string/String.__eq i32.eqz @@ -1716,7 +1676,7 @@ i32.add i32.const 2 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $6 + local.tee $4 i32.const 336 call $~lib/string/String.__eq i32.eqz @@ -1733,7 +1693,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $7 + local.tee $5 i32.const 368 call $~lib/string/String.__eq i32.eqz @@ -1750,7 +1710,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $1 + local.tee $6 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -1767,7 +1727,7 @@ i32.add i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $0 + local.tee $7 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1779,24 +1739,80 @@ call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 21052 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/string/String.UTF8.byteLength (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1887,35 +1903,7 @@ end local.get $2 ) - (func $std/string-encoding/testUTF8Length (; 31 ;) - i32.const 32 - i32.const 0 - call $~lib/string/String.UTF8.byteLength - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 55 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 32 - i32.const 1 - call $~lib/string/String.UTF8.byteLength - i32.const 11 - i32.ne - if - i32.const 0 - i32.const 112 - i32.const 56 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/string/String.UTF8.encode (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 24 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1929,23 +1917,25 @@ i32.sub i32.load offset=12 i32.add - local.set $6 + local.set $5 local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength local.tee $0 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 + call $~lib/rt/tlsf/maybeInitialize local.get $0 - local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $6 i32.add local.get $1 i32.const 0 i32.ne i32.sub local.set $7 - local.get $4 + local.get $6 local.set $0 loop $while-continue|0 local.get $0 @@ -1991,7 +1981,7 @@ local.get $3 i32.const 2 i32.add - local.get $6 + local.get $5 i32.lt_u i32.const 0 local.get $2 @@ -2003,7 +1993,7 @@ if local.get $3 i32.load16_u offset=2 - local.tee $5 + local.tee $4 i32.const 64512 i32.and i32.const 56320 @@ -2016,7 +2006,7 @@ i32.shl i32.const 65536 i32.add - local.get $5 + local.get $4 i32.const 1023 i32.and i32.or @@ -2025,14 +2015,14 @@ i32.and i32.const 128 i32.or - local.set $5 + local.set $4 local.get $0 local.get $2 i32.const 18 i32.shr_u i32.const 240 i32.or - local.get $5 + local.get $4 i32.const 24 i32.shl local.get $2 @@ -2106,7 +2096,7 @@ end end local.get $3 - local.get $6 + local.get $5 i32.gt_u if i32.const 0 @@ -2122,10 +2112,10 @@ i32.const 0 i32.store8 end - local.get $4 + local.get $6 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 33 ;) + (func $std/string-encoding/testUTF8Encode (; 25 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2133,7 +2123,9 @@ call $~lib/string/String.UTF8.encode local.tee $1 local.tee $0 - call $~lib/string/String.UTF16.byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 10 i32.ne if @@ -2265,9 +2257,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 34 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 26 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2275,7 +2274,9 @@ call $~lib/string/String.UTF8.encode local.tee $1 local.tee $0 - call $~lib/string/String.UTF16.byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 11 i32.ne if @@ -2417,51 +2418,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/rt/tlsf/checkUsedBlock (; 35 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz + i32.const 21052 + i32.gt_u if - i32.const 0 - i32.const 176 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 27 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2474,7 +2440,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2577,7 +2543,7 @@ end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2597,12 +2563,15 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $5 local.set $1 loop $while-continue|0 local.get $0 @@ -2629,7 +2598,7 @@ i32.load8_u i32.const 63 i32.and - local.set $5 + local.set $6 local.get $0 i32.const 1 i32.add @@ -2641,7 +2610,7 @@ i32.eq if local.get $1 - local.get $5 + local.get $6 local.get $3 i32.const 31 i32.and @@ -2675,7 +2644,7 @@ i32.and i32.const 12 i32.shl - local.get $5 + local.get $6 i32.const 6 i32.shl i32.or @@ -2695,7 +2664,7 @@ i32.and i32.const 18 i32.shl - local.get $5 + local.get $6 i32.const 12 i32.shl i32.or @@ -2760,51 +2729,57 @@ end end end - call $~lib/rt/tlsf/maybeInitialize - local.get $6 - call $~lib/rt/tlsf/checkUsedBlock local.get $1 - local.get $6 + local.get $5 i32.sub - call $~lib/rt/tlsf/reallocateBlock + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String.UTF8.decode (; 39 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $0 - call $~lib/string/String.UTF16.byteLength - local.get $1 - call $~lib/string/String.UTF8.decodeUnsafe - ) - (func $std/string-encoding/testUTF8Decode (; 40 ;) - (local $0 i32) - (local $1 i32) - i32.const 32 - i32.const 0 - call $~lib/string/String.UTF8.encode - local.tee $0 + i32.sub + local.set $0 + local.get $5 + i32.const 15 + i32.and + i32.eqz i32.const 0 - call $~lib/string/String.UTF8.decode - local.tee $1 - i32.const 32 - call $~lib/string/String.__eq + local.get $5 + select + if (result i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end i32.eqz if i32.const 0 - i32.const 112 - i32.const 97 + i32.const 176 + i32.const 570 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 41 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 30 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2815,9 +2790,13 @@ i32.const 1 call $~lib/string/String.UTF8.encode local.tee $1 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decode - local.tee $2 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $3 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -2846,7 +2825,9 @@ i32.const 1 call $~lib/string/String.UTF8.encode local.tee $0 - call $~lib/string/String.UTF16.byteLength + i32.const 16 + i32.sub + i32.load offset=12 i32.const 4 i32.ne if @@ -2871,9 +2852,13 @@ unreachable end local.get $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decode - local.tee $3 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $4 i32.const 512 call $~lib/string/String.__eq i32.eqz @@ -2888,9 +2873,13 @@ i32.const 480 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $4 + local.tee $2 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decode + call $~lib/string/String.UTF8.decodeUnsafe local.tee $5 i32.const 512 call $~lib/string/String.__eq @@ -2903,20 +2892,62 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release local.get $3 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 21052 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 21052 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 42 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 31 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2930,17 +2961,16 @@ i32.const 32 i32.const 1 call $~lib/string/String.UTF8.encode - local.set $2 + local.set $0 i32.const 32 i32.const 0 call $~lib/string/String.UTF8.byteLength local.set $1 - local.get $2 - local.tee $0 + local.get $0 i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + local.tee $2 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -2956,7 +2986,7 @@ local.get $1 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $4 + local.tee $1 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -2972,7 +3002,7 @@ i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $5 + local.tee $3 i32.const 304 call $~lib/string/String.__eq i32.eqz @@ -2990,7 +3020,7 @@ i32.const 2 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $6 + local.tee $4 i32.const 368 call $~lib/string/String.__eq i32.eqz @@ -3008,7 +3038,7 @@ i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $7 + local.tee $5 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -3026,7 +3056,7 @@ i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $8 + local.tee $6 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -3044,7 +3074,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $9 + local.tee $7 i32.const 544 call $~lib/string/String.__eq i32.eqz @@ -3062,7 +3092,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 + local.tee $8 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -3080,7 +3110,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $0 + local.tee $9 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -3092,28 +3122,98 @@ call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 21052 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/string-encoding/testLarge (; 43 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 32 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3122,9 +3222,13 @@ i32.const 0 call $~lib/string/String.UTF8.encode local.tee $1 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 i32.const 0 - call $~lib/string/String.UTF8.decode - local.tee $2 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $3 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -3138,8 +3242,12 @@ end local.get $0 call $~lib/string/String.UTF16.encode - local.tee $3 - call $~lib/string/String.UTF16.decode + local.tee $2 + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/string/String.UTF16.decodeUnsafe local.tee $4 local.get $0 call $~lib/string/String.__eq @@ -3152,18 +3260,48 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release + local.get $3 + i32.const 21052 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 21052 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $start:std/string-encoding (; 44 ;) - i32.const 32 - call $~lib/string/String.UTF16.byteLength + (func $start:std/string-encoding (; 33 ;) + (local $0 i32) + (local $1 i32) + i32.const 28 + i32.load i32.const 12 i32.ne if @@ -3175,12 +3313,113 @@ unreachable end call $std/string-encoding/testUTF16Encode - call $std/string-encoding/testUTF16Decode + i32.const 32 + call $~lib/string/String.UTF16.encode + local.tee $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/string/String.UTF16.decodeUnsafe + local.tee $1 + i32.const 32 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 33 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/string-encoding/testUTF16DecodeUnsafe - call $std/string-encoding/testUTF8Length + i32.const 32 + i32.const 0 + call $~lib/string/String.UTF8.byteLength + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 55 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 32 + i32.const 1 + call $~lib/string/String.UTF8.byteLength + i32.const 11 + i32.ne + if + i32.const 0 + i32.const 112 + i32.const 56 + i32.const 2 + call $~lib/builtins/abort + unreachable + end call $std/string-encoding/testUTF8Encode call $std/string-encoding/testUTF8EncodeNullTerminated - call $std/string-encoding/testUTF8Decode + i32.const 32 + i32.const 0 + call $~lib/string/String.UTF8.encode + local.tee $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 0 + call $~lib/string/String.UTF8.decodeUnsafe + local.tee $1 + i32.const 32 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 97 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 21052 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end call $std/string-encoding/testUTF8DecodeNullTerminated call $std/string-encoding/testUTF8DecodeUnsafe i32.const 576 @@ -3188,10 +3427,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 45 ;) + (func $~start (; 34 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 46 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 35 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3218,10 +3457,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 21052 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -3259,34 +3524,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 47 ;) (param $0 i32) - block $switch$1$default - 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$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 21052 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 11f55bcdbe..b0ff57a67e 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,9 +1,9 @@ (module (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_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 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 $none_=>_i32 (func (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) @@ -386,60 +386,9 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 17000 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (local $2 i32) local.get $0 i32.const 17000 i32.gt_u @@ -447,18 +396,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/decrement + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end - ) - (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u ) - (func $~lib/util/string/compareImpl (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 local.get $1 @@ -538,7 +517,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -557,10 +536,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -573,17 +560,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__not (; 12 ;) (param $0 i32) (result i32) - local.get $0 - if (result i32) - local.get $0 - call $~lib/string/String#get:length - i32.eqz - else - i32.const 1 - end - ) - (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -749,7 +726,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1032,7 +1009,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -1146,7 +1123,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1233,7 +1210,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1257,7 +1234,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1388,7 +1365,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 19 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1450,7 +1427,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1526,7 +1503,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1608,17 +1585,10 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 22 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/string/String.fromCharCode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $1 i32.const 0 @@ -1626,7 +1596,9 @@ local.tee $3 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 i32.store16 @@ -1639,7 +1611,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 19 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1658,11 +1630,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~setArgumentsLength (; 20 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 21 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1676,6 +1648,7 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 @@ -1683,7 +1656,9 @@ local.tee $2 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $2 if @@ -1713,7 +1688,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 27 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 22 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1724,75 +1699,72 @@ if i32.const 640 local.set $2 - i32.const 608 - call $~lib/rt/pure/__release i32.const 640 local.set $1 end + local.get $1 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.set $3 + local.get $2 i32.const 0 local.get $0 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.lt_s select local.tee $4 - local.get $1 - call $~lib/string/String#get:length - local.tee $2 i32.add - local.get $3 + local.get $2 i32.gt_s if local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 return end local.get $0 local.get $4 local.get $1 - local.get $2 + local.get $3 call $~lib/util/string/compareImpl i32.eqz local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/string/String#endsWith (; 28 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 536870904 - local.get $0 - call $~lib/string/String#get:length - local.tee $1 - i32.const 536870904 - local.get $1 - i32.lt_s - select - i32.const 672 - call $~lib/string/String#get:length - local.tee $1 - i32.sub - local.tee $2 - i32.const 0 - i32.lt_s + i32.const 17000 + i32.gt_u if - i32.const 0 - return + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - local.get $2 - i32.const 672 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz ) - (func $~lib/string/String#indexOf (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz if @@ -1800,7 +1772,11 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -1848,7 +1824,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2021,7 +1997,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2046,32 +2022,38 @@ end end ) - (func $~lib/string/String#padStart (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.set $5 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl - local.set $4 + local.set $3 local.get $1 i32.const 1 i32.shl - local.tee $3 - local.get $5 + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $5 i32.lt_u if (result i32) i32.const 1 else - local.get $4 + local.get $3 i32.eqz end if @@ -2079,47 +2061,49 @@ call $~lib/rt/pure/__retain return end - local.get $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 - local.get $3 + local.get $4 local.get $5 i32.sub - local.tee $3 - local.get $4 + local.tee $4 + local.get $3 i32.gt_u if - local.get $4 + local.get $1 + local.get $2 local.get $3 + local.get $4 i32.const 2 i32.sub - local.get $4 + local.get $3 i32.div_u - local.tee $7 - i32.mul - local.set $6 - local.get $1 - local.get $2 - local.get $4 - local.get $7 + local.tee $6 call $~lib/memory/memory.repeat - local.get $1 + local.get $3 local.get $6 + i32.mul + local.tee $3 + local.get $1 i32.add local.get $2 + local.get $4 local.get $3 - local.get $6 i32.sub call $~lib/memory/memory.copy else local.get $1 local.get $2 - local.get $3 + local.get $4 call $~lib/memory/memory.copy end local.get $1 - local.get $3 + local.get $4 i32.add local.get $0 local.get $5 @@ -2127,31 +2111,37 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 27 ;) (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 $0 - call $~lib/string/String#get:length + local.get $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 - local.get $2 - call $~lib/string/String#get:length + local.get $1 i32.const 1 i32.shl - local.set $4 - local.get $1 + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl - local.tee $5 - local.get $3 + local.tee $1 i32.lt_u if (result i32) i32.const 1 else - local.get $4 + local.get $3 i32.eqz end if @@ -2159,71 +2149,88 @@ call $~lib/rt/pure/__retain return end - local.get $5 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $5 local.get $0 - local.get $3 + local.get $1 call $~lib/memory/memory.copy - local.get $5 - local.get $3 + local.get $4 + local.get $1 i32.sub local.tee $0 - local.get $4 + local.get $3 i32.gt_u if - local.get $4 + local.get $1 + local.get $5 + i32.add + local.tee $1 + local.get $2 + local.get $3 local.get $0 i32.const 2 i32.sub - local.get $4 - i32.div_u - local.tee $6 - i32.mul - local.set $5 - local.get $1 local.get $3 - i32.add - local.tee $3 - local.get $2 - local.get $4 - local.get $6 + i32.div_u + local.tee $4 call $~lib/memory/memory.repeat local.get $3 - local.get $5 + local.get $4 + i32.mul + local.tee $3 + local.get $1 i32.add local.get $2 local.get $0 - local.get $5 + local.get $3 i32.sub call $~lib/memory/memory.copy else local.get $1 - local.get $3 + local.get $5 i32.add local.get $2 local.get $0 call $~lib/memory/memory.copy end - local.get $1 + local.get $5 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.eqz if local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 + local.set $5 + local.get $3 i32.eqz if i32.const -1 @@ -2236,7 +2243,7 @@ i32.gt_s select local.tee $2 - local.get $3 + local.get $5 local.get $4 i32.sub local.tee $3 @@ -2269,7 +2276,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 29 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2279,12 +2286,20 @@ i32.const 0 return end - local.get $0 - call $~lib/string/String#get:length - local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $3 i32.ne if i32.const 1 @@ -2307,7 +2322,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 36 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 30 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2371,12 +2386,16 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 37 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $2 @@ -2417,9 +2436,12 @@ i32.const 272 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -2429,11 +2451,15 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 38 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 32 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $2 @@ -2473,9 +2499,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -2483,13 +2512,19 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 39 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 33 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $1 + local.set $3 + local.get $1 i32.const 1 i32.shl local.set $1 @@ -2558,9 +2593,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $2 @@ -2570,14 +2608,18 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 40 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 34 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) (local $5 f64) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -2609,7 +2651,7 @@ local.get $1 i32.const 45 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -2626,12 +2668,11 @@ i32.add local.tee $0 i32.load16_u - local.set $1 else local.get $1 i32.const 43 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -2646,9 +2687,11 @@ i32.add local.tee $0 i32.load16_u - local.set $1 + else + local.get $1 end end + local.set $1 local.get $2 i32.const 2 i32.gt_s @@ -2787,7 +2830,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 41 ;) (result i32) + (func $~lib/util/string/strtol (; 35 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2796,8 +2839,10 @@ (local $5 i32) i32.const 1904 local.set $1 - i32.const 1904 - call $~lib/string/String#get:length + i32.const 1900 + i32.load + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -2829,7 +2874,7 @@ local.get $0 i32.const 45 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -2846,12 +2891,11 @@ i32.add local.tee $1 i32.load16_u - local.set $0 else local.get $0 i32.const 43 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -2866,9 +2910,11 @@ i32.add local.tee $1 i32.load16_u - local.set $0 + else + local.get $0 end end + local.set $0 local.get $2 i32.const 2 i32.gt_s @@ -3005,7 +3051,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 42 ;) (result i64) + (func $~lib/util/string/strtol (; 36 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3014,8 +3060,10 @@ (local $5 i64) i32.const 1952 local.set $1 - i32.const 1952 - call $~lib/string/String#get:length + i32.const 1948 + i32.load + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -3047,7 +3095,7 @@ local.get $0 i32.const 45 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -3064,12 +3112,11 @@ i32.add local.tee $1 i32.load16_u - local.set $0 else local.get $0 i32.const 43 i32.eq - if + if (result i32) local.get $2 i32.const 1 i32.sub @@ -3084,9 +3131,11 @@ i32.add local.tee $1 i32.load16_u - local.set $0 + else + local.get $0 end end + local.set $0 local.get $2 i32.const 2 i32.gt_s @@ -3225,7 +3274,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 43 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3259,7 +3308,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 44 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 38 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3336,7 +3385,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 45 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 39 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -3346,25 +3395,29 @@ (local $7 i64) (local $8 i64) (local $9 f64) - (local $10 i64) - (local $11 f64) - (local $12 i32) + (local $10 f64) + (local $11 i32) + (local $12 i64) (local $13 i64) block $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 i32.eqz br_if $folding-inner0 local.get $0 i32.load16_u - local.set $6 + local.set $3 f64.const 1 - local.set $11 + local.set $10 loop $while-continue|0 local.get $1 if (result i32) - local.get $6 + local.get $3 call $~lib/util/string/isSpace else i32.const 0 @@ -3375,7 +3428,7 @@ i32.add local.tee $0 i32.load16_u - local.set $6 + local.set $3 local.get $1 i32.const 1 i32.sub @@ -3386,10 +3439,10 @@ local.get $1 i32.eqz br_if $folding-inner0 - local.get $6 + local.get $3 i32.const 45 i32.eq - if (result i32) + if local.get $1 i32.const 1 i32.sub @@ -3397,17 +3450,18 @@ i32.eqz br_if $folding-inner0 f64.const -1 - local.set $11 + local.set $10 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u + local.set $3 else - local.get $6 + local.get $3 i32.const 43 i32.eq - if (result i32) + if local.get $1 i32.const 1 i32.sub @@ -3419,11 +3473,10 @@ i32.add local.tee $0 i32.load16_u - else - local.get $6 + local.set $3 end end - local.tee $6 + local.get $3 i32.const 73 i32.eq i32.const 0 @@ -3446,27 +3499,27 @@ end if f64.const inf - local.get $11 + local.get $10 f64.copysign return end br $folding-inner0 end - local.get $6 + local.get $3 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $6 + local.get $3 i32.const 46 i32.ne select br_if $folding-inner0 local.get $0 - local.set $3 + local.set $4 loop $while-continue|1 - local.get $6 + local.get $3 i32.const 48 i32.eq if @@ -3475,7 +3528,7 @@ i32.add local.tee $0 i32.load16_u - local.set $6 + local.set $3 local.get $1 i32.const 1 i32.sub @@ -3490,15 +3543,15 @@ f64.const 0 return end - local.get $6 + local.get $3 i32.const 46 i32.eq if - local.get $3 + local.get $4 local.get $0 i32.sub i32.eqz - local.set $3 + local.set $4 local.get $0 i32.const 2 i32.add @@ -3510,15 +3563,15 @@ if (result i32) i32.const 0 else - local.get $3 + local.get $4 end br_if $folding-inner0 i32.const 1 - local.set $12 + local.set $11 loop $for-loop|2 local.get $0 i32.load16_u - local.tee $6 + local.tee $3 i32.const 48 i32.eq if @@ -3544,70 +3597,68 @@ f64.const 0 return end - local.get $5 - if - i32.const 0 - local.set $3 - end - local.get $6 + local.get $3 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $3 + i32.const 0 + local.get $4 + local.get $5 + select select br_if $folding-inner0 end - local.get $6 + local.get $3 i32.const 48 i32.sub - local.set $3 + local.set $4 loop $for-loop|3 i32.const 1 - local.get $12 + local.get $11 i32.eqz i32.const 0 - local.get $6 + local.get $3 i32.const 46 i32.eq select - local.get $3 + local.get $4 i32.const 10 i32.lt_u select if block $for-break3 - local.get $3 + local.get $4 i32.const 10 i32.lt_u if - local.get $3 + local.get $4 i64.extend_i32_u local.get $2 i64.const 10 i64.mul i64.add local.get $2 - local.get $3 + local.get $4 i32.eqz i32.eqz i64.extend_i32_u i64.or - local.get $4 + local.get $6 i32.const 19 i32.lt_s select local.set $2 - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 else - local.get $4 + local.get $6 local.set $5 i32.const 1 - local.set $12 + local.set $11 end local.get $1 i32.const 1 @@ -3620,10 +3671,10 @@ i32.add local.tee $0 i32.load16_u - local.tee $6 + local.tee $3 i32.const 48 i32.sub - local.set $3 + local.set $4 br $for-loop|3 end end @@ -3631,25 +3682,25 @@ block $~lib/util/string/scientific|inlined.0 i32.const 1 local.get $5 - local.get $4 - local.get $12 + local.get $6 + local.get $11 select i32.const 19 - local.get $4 + local.get $6 i32.const 19 - local.get $4 + local.get $6 i32.lt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) local.get $0 - local.set $5 + local.set $3 i32.const 1 - local.set $4 + local.set $6 i32.const 0 local.set $0 i32.const 0 - local.get $5 + local.get $3 i32.load16_u i32.const 32 i32.or @@ -3657,15 +3708,15 @@ i32.ne br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $5 + local.get $3 i32.const 2 i32.add - local.tee $3 + local.tee $4 i32.load16_u local.tee $5 i32.const 45 i32.eq - if (result i32) + if i32.const 0 local.get $1 i32.const 1 @@ -3675,17 +3726,18 @@ br_if $~lib/util/string/parseExp|inlined.0 drop i32.const -1 - local.set $4 - local.get $3 + local.set $6 + local.get $4 i32.const 2 i32.add - local.tee $3 + local.tee $4 i32.load16_u + local.set $5 else local.get $5 i32.const 43 i32.eq - if (result i32) + if i32.const 0 local.get $1 i32.const 1 @@ -3694,16 +3746,14 @@ i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $4 i32.const 2 i32.add - local.tee $3 + local.tee $4 i32.load16_u - else - local.get $5 + local.set $5 end end - local.set $5 loop $while-continue|4 local.get $5 i32.const 48 @@ -3717,10 +3767,10 @@ i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $4 i32.const 2 i32.add - local.tee $3 + local.tee $4 i32.load16_u local.set $5 br $while-continue|4 @@ -3738,7 +3788,7 @@ local.get $1 select if - local.get $4 + local.get $6 i32.const 3200 i32.mul local.get $0 @@ -3756,10 +3806,10 @@ i32.const 1 i32.sub local.set $1 - local.get $3 + local.get $4 i32.const 2 i32.add - local.tee $3 + local.tee $4 i32.load16_u i32.const 48 i32.sub @@ -3768,7 +3818,7 @@ end end local.get $0 - local.get $4 + local.get $6 i32.mul end i32.add @@ -3821,9 +3871,9 @@ local.get $0 i32.const 31 i32.shr_s - local.tee $4 + local.tee $3 local.get $0 - local.get $4 + local.get $3 i32.add i32.xor i32.const 22 @@ -3869,13 +3919,13 @@ i64.shl local.set $2 local.get $0 - local.tee $4 + local.tee $6 i64.extend_i32_s local.get $7 i64.sub local.set $7 loop $for-loop|6 - local.get $4 + local.get $6 i32.const -14 i32.le_s if @@ -3886,7 +3936,7 @@ local.get $2 i64.const 6103515625 i64.div_u - local.tee $10 + local.tee $2 i64.clz local.tee $8 i64.const 18 @@ -3896,7 +3946,7 @@ f64.mul f64.nearest i64.trunc_f64_u - local.get $10 + local.get $2 local.get $8 i64.shl i64.add @@ -3905,26 +3955,26 @@ local.get $8 i64.sub local.set $7 - local.get $4 + local.get $6 i32.const 14 i32.add - local.set $4 + local.set $6 br $for-loop|6 end end local.get $2 i32.const 0 - local.get $4 + local.get $6 i32.sub call $~lib/math/ipow32 i64.extend_i32_s - local.tee $10 + local.tee $12 i64.div_u local.tee $13 i64.clz local.set $8 local.get $2 - local.get $10 + local.get $12 i64.rem_u f64.convert_i64_u i64.reinterpret_f64 @@ -3933,7 +3983,7 @@ i64.shl i64.add f64.reinterpret_i64 - local.get $10 + local.get $12 f64.convert_i64_u f64.div i64.trunc_f64_u @@ -3984,7 +4034,7 @@ i64.shr_u i32.wrap_i64 i32.clz - local.tee $4 + local.tee $3 i64.extend_i32_u i64.sub local.tee $8 @@ -3992,7 +4042,7 @@ i64.add global.set $~lib/util/string/__fixmulShift local.get $2 - local.get $4 + local.get $3 i64.extend_i32_u i64.shl i64.const 31 @@ -4000,7 +4050,7 @@ i64.const 1 i64.and local.get $7 - local.get $4 + local.get $3 i64.extend_i32_u i64.shl local.get $2 @@ -4078,13 +4128,13 @@ local.set $9 end local.get $9 - local.get $11 + local.get $10 f64.copysign return end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 40 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4100,34 +4150,60 @@ i32.ne if local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 640 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 i32.add local.tee $2 i32.eqz if + i32.const 272 + local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 272 - local.tee $0 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -4140,24 +4216,17 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 ) - (func $~lib/string/String.__concat (; 47 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 640 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat - ) - (func $~lib/string/String.__ne (; 48 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/string/String.__eq - i32.eqz - ) - (func $~lib/string/String.__gt (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 41 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4176,7 +4245,11 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -4184,7 +4257,11 @@ return end local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -4204,7 +4281,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 42 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4223,7 +4300,11 @@ return end local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -4231,7 +4312,11 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -4251,24 +4336,16 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 51 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/string/String.__lt - i32.eqz - ) - (func $~lib/string/String.__lte (; 52 ;) (param $0 i32) (result i32) - i32.const 272 - local.get $0 - call $~lib/string/String.__gt - i32.eqz - ) - (func $~lib/string/String#repeat (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i64.extend_i32_s local.get $1 @@ -4305,13 +4382,16 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.mul i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $2 @@ -4322,17 +4402,25 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $4 i32.le_u if @@ -4362,7 +4450,11 @@ i32.xor if local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $5 local.get $3 local.get $4 @@ -4371,11 +4463,14 @@ i32.add local.tee $3 if + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -4419,7 +4514,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 55 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 45 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4461,7 +4556,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 56 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 46 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -4474,7 +4569,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4577,16 +4672,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 58 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/string/String#replaceAll (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4598,15 +4684,23 @@ local.get $2 local.set $8 local.get $0 - call $~lib/string/String#get:length - local.tee $4 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $5 local.get $1 local.tee $6 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $9 i32.le_u if - local.get $4 + local.get $5 local.get $9 i32.lt_u if (result i32) @@ -4624,7 +4718,11 @@ return end local.get $8 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $2 local.get $9 i32.eqz @@ -4636,9 +4734,10 @@ call $~lib/rt/pure/__retain return end - local.get $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 local.get $2 - local.get $4 + local.get $5 i32.const 1 i32.add i32.mul @@ -4646,8 +4745,10 @@ i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $6 local.get $8 local.get $2 i32.const 1 @@ -4655,26 +4756,24 @@ call $~lib/memory/memory.copy local.get $2 local.set $1 - i32.const 0 - local.set $6 loop $for-loop|0 - local.get $6 - local.get $4 + local.get $3 + local.get $5 i32.lt_u if - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.shl i32.add local.get $0 - local.get $6 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.add @@ -4691,14 +4790,14 @@ local.get $2 i32.add local.set $1 - local.get $6 + local.get $3 i32.const 1 i32.add - local.set $6 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $6 call $~lib/rt/pure/__retain return end @@ -4706,27 +4805,30 @@ local.get $9 i32.eq if - local.get $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 i32.const 1 i32.shl - local.tee $4 + local.tee $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 - local.get $4 + local.get $3 call $~lib/memory/memory.copy loop $while-continue|1 local.get $0 local.get $6 - local.get $5 + local.get $4 call $~lib/string/String#indexOf - local.tee $4 + local.tee $3 i32.const -1 i32.xor if local.get $1 - local.get $4 + local.get $3 i32.const 1 i32.shl i32.add @@ -4735,10 +4837,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 local.get $9 i32.add - local.set $5 + local.set $4 br $while-continue|1 end end @@ -4746,12 +4848,12 @@ call $~lib/rt/pure/__retain return end - local.get $4 + local.get $5 local.set $1 loop $while-continue|2 local.get $0 local.get $6 - local.get $5 + local.get $4 call $~lib/string/String#indexOf local.tee $10 i32.const -1 @@ -4760,25 +4862,32 @@ local.get $3 i32.eqz if - local.get $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $3 end local.get $7 local.get $1 i32.gt_u if + call $~lib/rt/tlsf/maybeInitialize local.get $3 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.set $3 end local.get $3 @@ -4787,22 +4896,22 @@ i32.shl i32.add local.get $0 - local.get $5 + local.get $4 i32.const 1 i32.shl i32.add local.get $10 - local.get $5 + local.get $4 i32.sub - local.tee $5 + local.tee $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $3 - local.get $5 + local.get $4 local.get $7 i32.add - local.tee $5 + local.tee $4 i32.const 1 i32.shl i32.add @@ -4812,13 +4921,13 @@ i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $4 i32.add local.set $7 local.get $9 local.get $10 i32.add - local.set $5 + local.set $4 br $while-continue|2 end end @@ -4828,18 +4937,22 @@ local.get $1 i32.gt_u if + call $~lib/rt/tlsf/maybeInitialize local.get $3 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.set $3 end - local.get $4 local.get $5 + local.get $4 i32.sub local.tee $2 if @@ -4849,7 +4962,7 @@ i32.shl i32.add local.get $0 - local.get $5 + local.get $4 i32.const 1 i32.shl i32.add @@ -4864,25 +4977,33 @@ i32.add local.tee $0 i32.gt_u - if (result i32) + if + call $~lib/rt/tlsf/maybeInitialize local.get $3 + call $~lib/rt/tlsf/checkUsedBlock local.get $0 i32.const 1 i32.shl - call $~lib/rt/tlsf/__realloc - else - local.get $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.set $3 end + local.get $3 call $~lib/rt/pure/__retain return end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -4936,12 +5057,15 @@ i32.const 272 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 i32.shl local.tee $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -4953,7 +5077,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -4963,7 +5087,11 @@ select local.tee $2 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $3 local.get $1 i32.const 0 @@ -4996,9 +5124,12 @@ i32.const 272 return end + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -5010,7 +5141,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5021,7 +5152,11 @@ select local.tee $3 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $1 local.get $3 local.get $1 @@ -5077,9 +5212,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 local.get $2 @@ -5089,20 +5227,26 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 63 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 52 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -5117,7 +5261,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 53 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5328,7 +5472,7 @@ end end ) - (func $~lib/array/ensureSize (; 65 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5351,23 +5495,28 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 i32.load - local.tee $4 + local.set $3 + local.get $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 2 i32.shl - local.tee $3 - call $~lib/rt/tlsf/__realloc + local.tee $4 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $1 i32.add - local.get $3 + local.get $4 local.get $2 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $4 + local.get $3 i32.ne if local.get $0 @@ -5378,11 +5527,11 @@ i32.store offset=4 end local.get $0 - local.get $3 + local.get $4 i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 66 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 55 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5406,7 +5555,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5434,20 +5583,30 @@ return end local.get $0 - call $~lib/string/String#get:length - local.set $5 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.set $3 i32.const 2147483647 local.get $2 local.get $2 i32.const 0 i32.lt_s select - local.set $2 + local.set $5 local.get $1 - call $~lib/string/String#get:length - local.tee $8 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $2 + local.set $8 + local.get $2 if - local.get $5 + local.get $3 i32.eqz if i32.const 1 @@ -5461,43 +5620,46 @@ return end else - local.get $5 + local.get $3 i32.eqz br_if $folding-inner0 + local.get $3 local.get $5 - local.get $2 + local.get $3 local.get $5 - local.get $2 i32.lt_s select - local.tee $3 + local.tee $4 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.load offset=4 local.set $5 i32.const 0 local.set $1 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if + call $~lib/rt/tlsf/maybeInitialize i32.const 2 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 + local.get $0 local.get $1 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u i32.store16 + local.get $5 local.get $1 i32.const 2 i32.shl - local.get $5 i32.add local.get $2 i32.store @@ -5511,13 +5673,13 @@ br $for-loop|0 end end - local.get $4 + local.get $3 return end i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $2 loop $while-continue|1 local.get $0 local.get $1 @@ -5534,25 +5696,28 @@ i32.const 0 i32.gt_s if + call $~lib/rt/tlsf/maybeInitialize local.get $6 i32.const 1 i32.shl local.tee $6 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $9 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add local.get $6 call $~lib/memory/memory.copy - local.get $3 + local.get $2 local.get $9 call $~lib/array/Array<~lib/string/String>#push else - local.get $3 + local.get $2 i32.const 272 call $~lib/array/Array<~lib/string/String>#push end @@ -5560,10 +5725,10 @@ i32.const 1 i32.add local.tee $10 - local.get $2 + local.get $5 i32.eq if - local.get $3 + local.get $2 return end local.get $7 @@ -5576,49 +5741,52 @@ local.get $4 i32.eqz if - local.get $3 + local.get $2 local.get $0 call $~lib/array/Array<~lib/string/String>#push - local.get $3 + local.get $2 return end - local.get $5 + local.get $3 local.get $4 i32.sub local.tee $1 i32.const 0 i32.gt_s if + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $3 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add local.get $1 call $~lib/memory/memory.copy - local.get $3 local.get $2 + local.get $3 call $~lib/array/Array<~lib/string/String>#push else - local.get $3 + local.get $2 i32.const 272 call $~lib/array/Array<~lib/string/String>#push end - local.get $3 + local.get $2 return end i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5643,7 +5811,14 @@ i32.eqz if local.get $0 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 12272 i32.const 12160 i32.const 97 @@ -5653,7 +5828,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 69 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 58 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5701,7 +5876,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5725,7 +5900,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 71 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 60 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5738,7 +5913,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -5747,27 +5922,32 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 72 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 61 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5778,19 +5958,24 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple local.get $2 + call $~lib/util/number/utoa_simple + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 73 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 62 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -5843,7 +6028,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 74 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 63 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -5870,7 +6055,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 75 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 64 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5886,34 +6071,44 @@ if local.get $0 i32.wrap_i64 - local.tee $1 + local.tee $2 call $~lib/util/number/decimalCount32 local.tee $3 i32.const 1 i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $1 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $2 local.get $3 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 + local.get $2 call $~lib/util/number/utoa_simple end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 76 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 65 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5927,7 +6122,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $1 + local.tee $2 if i64.const 0 local.get $0 @@ -5940,44 +6135,54 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $3 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $4 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $3 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $2 + local.get $3 call $~lib/util/number/utoa_simple end - local.get $1 + local.get $2 if - local.get $3 + local.get $1 i32.const 45 i32.store16 end - local.get $3 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 77 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6367,7 +6572,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6612,7 +6817,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 79 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 68 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -6921,7 +7126,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 80 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 69 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6953,9 +7158,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/util/number/dtoa_core @@ -6976,7 +7184,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 81 ;) + (func $start:std/string (; 70 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7189,6 +7397,7 @@ (local $209 i32) (local $210 i32) (local $211 i32) + (local $212 i32) global.get $std/string/str i32.const 32 i32.ne @@ -7237,7 +7446,11 @@ unreachable end global.get $std/string/str - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 16 i32.ne if @@ -7252,12 +7465,16 @@ i32.const -1 i32.const 0 global.get $std/string/str - local.tee $1 - call $~lib/string/String#get:length + local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ge_u br_if $__inlined_func$~lib/string/String#charCodeAt drop - local.get $1 + local.get $2 i32.load16_u end i32.const 104 @@ -7270,10 +7487,11 @@ call $~lib/builtins/abort unreachable end - i32.const 272 - call $~lib/string/String.__not - i32.eqz - if + i32.const 268 + i32.load + i32.const 1 + i32.shr_u + if i32.const 0 i32.const 80 i32.const 17 @@ -7281,8 +7499,11 @@ call $~lib/builtins/abort unreachable end - i32.const 288 - call $~lib/string/String.__not + i32.const 284 + i32.load + i32.const 1 + i32.shr_u + i32.eqz i32.eqz i32.const 1 i32.ne @@ -7294,8 +7515,11 @@ call $~lib/builtins/abort unreachable end - i32.const 320 - call $~lib/string/String.__not + i32.const 316 + i32.load + i32.const 1 + i32.shr_u + i32.eqz i32.eqz i32.const 1 i32.ne @@ -7311,7 +7535,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode|trampoline - local.tee $5 + local.tee $9 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7327,7 +7551,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode|trampoline - local.tee $6 + local.tee $10 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7343,7 +7567,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode|trampoline - local.tee $7 + local.tee $11 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7358,7 +7582,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $8 + local.tee $12 i32.const 496 call $~lib/string/String.__eq i32.eqz @@ -7372,7 +7596,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $9 + local.tee $13 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7386,7 +7610,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $10 + local.tee $14 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7400,7 +7624,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $11 + local.tee $15 i32.const 576 call $~lib/string/String.__eq i32.eqz @@ -7423,8 +7647,41 @@ call $~lib/builtins/abort unreachable end - global.get $std/string/str - call $~lib/string/String#endsWith + block $__inlined_func$~lib/string/String#endsWith (result i32) + i32.const 668 + i32.load + i32.const 1 + i32.shr_u + local.tee $2 + local.set $4 + i32.const 0 + i32.const 536870904 + global.get $std/string/str + local.tee $5 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + local.tee $6 + i32.const 536870904 + local.get $6 + i32.lt_s + select + local.get $2 + i32.sub + local.tee $2 + i32.const 0 + i32.lt_s + br_if $__inlined_func$~lib/string/String#endsWith + drop + local.get $5 + local.get $2 + i32.const 672 + local.get $4 + call $~lib/util/string/compareImpl + i32.eqz + end i32.eqz if i32.const 0 @@ -7452,7 +7709,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padStart - local.tee $12 + local.tee $16 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7468,7 +7725,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padStart - local.tee $13 + local.tee $17 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7484,7 +7741,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padStart - local.tee $14 + local.tee $18 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7500,7 +7757,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padStart - local.tee $15 + local.tee $19 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7516,7 +7773,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padStart - local.tee $16 + local.tee $20 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7532,7 +7789,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padStart - local.tee $17 + local.tee $21 i32.const 832 call $~lib/string/String.__eq i32.eqz @@ -7548,7 +7805,7 @@ i32.const 6 i32.const 864 call $~lib/string/String#padStart - local.tee $18 + local.tee $22 i32.const 896 call $~lib/string/String.__eq i32.eqz @@ -7564,7 +7821,7 @@ i32.const 8 i32.const 864 call $~lib/string/String#padStart - local.tee $19 + local.tee $23 i32.const 928 call $~lib/string/String.__eq i32.eqz @@ -7580,7 +7837,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padEnd - local.tee $20 + local.tee $24 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7596,7 +7853,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padEnd - local.tee $21 + local.tee $25 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7612,7 +7869,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padEnd - local.tee $22 + local.tee $26 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7628,7 +7885,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padEnd - local.tee $23 + local.tee $27 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7644,7 +7901,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padEnd - local.tee $24 + local.tee $28 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7660,7 +7917,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padEnd - local.tee $25 + local.tee $29 i32.const 960 call $~lib/string/String.__eq i32.eqz @@ -7676,7 +7933,7 @@ i32.const 6 i32.const 800 call $~lib/string/String#padEnd - local.tee $26 + local.tee $30 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -7692,7 +7949,7 @@ i32.const 8 i32.const 800 call $~lib/string/String#padEnd - local.tee $27 + local.tee $31 i32.const 1024 call $~lib/string/String.__eq i32.eqz @@ -7867,7 +8124,11 @@ i32.const 2147483647 call $~lib/string/String#lastIndexOf global.get $std/string/str - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -8115,7 +8376,7 @@ end i32.const 272 call $~lib/string/String#trimStart - local.tee $28 + local.tee $32 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8129,7 +8390,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $29 + local.tee $33 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8143,7 +8404,7 @@ end i32.const 1312 call $~lib/string/String#trimStart - local.tee $30 + local.tee $34 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8157,7 +8418,7 @@ end i32.const 272 call $~lib/string/String#trimEnd - local.tee $31 + local.tee $35 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8171,7 +8432,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $32 + local.tee $36 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8185,7 +8446,7 @@ end i32.const 1312 call $~lib/string/String#trimEnd - local.tee $33 + local.tee $37 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -8199,7 +8460,7 @@ end i32.const 272 call $~lib/string/String#trim - local.tee $34 + local.tee $38 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8213,7 +8474,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $35 + local.tee $39 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8227,7 +8488,7 @@ end i32.const 1312 call $~lib/string/String#trim - local.tee $36 + local.tee $40 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -9903,17 +10164,26 @@ end i32.const 6864 i32.const 7024 - call $~lib/string/String.__concat - local.tee $37 + call $~lib/string/String#concat + local.tee $4 + i32.const 640 + local.get $4 + select i32.const 7184 - call $~lib/string/String.__concat - local.tee $38 + call $~lib/string/String#concat + local.tee $5 + i32.const 640 + local.get $5 + select i32.const 7344 - call $~lib/string/String.__concat - local.tee $39 + call $~lib/string/String#concat + local.tee $6 + i32.const 640 + local.get $6 + select i32.const 7504 - call $~lib/string/String.__concat - local.tee $40 + call $~lib/string/String#concat + local.tee $41 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10240,7 +10510,7 @@ end i32.const 320 i32.const 10416 - call $~lib/string/String.__concat + call $~lib/string/String#concat local.tee $2 local.get $2 i32.const 10448 @@ -10255,8 +10525,7 @@ unreachable end i32.const 320 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10266,7 +10535,14 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 272 i32.const 272 call $~lib/string/String.__eq @@ -10281,8 +10557,7 @@ end i32.const 272 i32.const 0 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10293,8 +10568,7 @@ end i32.const 0 i32.const 272 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10305,8 +10579,7 @@ end i32.const 320 i32.const 10416 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10329,8 +10602,7 @@ end i32.const 10480 i32.const 10512 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10353,8 +10625,7 @@ end i32.const 10544 i32.const 10576 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10365,8 +10636,7 @@ end i32.const 10608 i32.const 10640 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10389,8 +10659,7 @@ end i32.const 10672 i32.const 10704 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10401,8 +10670,7 @@ end i32.const 10736 i32.const 10784 - call $~lib/string/String.__ne - i32.eqz + call $~lib/string/String.__eq if i32.const 0 i32.const 80 @@ -10437,8 +10705,7 @@ end i32.const 10832 i32.const 10864 - call $~lib/string/String.__gte - i32.eqz + call $~lib/string/String.__lt if i32.const 0 i32.const 80 @@ -10518,8 +10785,7 @@ end i32.const 800 i32.const 272 - call $~lib/string/String.__gte - i32.eqz + call $~lib/string/String.__lt if i32.const 0 i32.const 80 @@ -10528,9 +10794,9 @@ call $~lib/builtins/abort unreachable end + i32.const 272 i32.const 800 - call $~lib/string/String.__lte - i32.eqz + call $~lib/string/String.__gt if i32.const 0 i32.const 80 @@ -10585,8 +10851,7 @@ end i32.const 272 i32.const 272 - call $~lib/string/String.__gte - i32.eqz + call $~lib/string/String.__lt if i32.const 0 i32.const 80 @@ -10596,8 +10861,8 @@ unreachable end i32.const 272 - call $~lib/string/String.__lte - i32.eqz + i32.const 272 + call $~lib/string/String.__gt if i32.const 0 i32.const 80 @@ -10608,15 +10873,18 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $0 + local.tee $1 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $4 + local.tee $2 + i32.const 640 + local.get $2 + select i32.const 56322 call $~lib/string/String.fromCodePoint - local.tee $2 - call $~lib/string/String.__concat - local.tee $1 + local.tee $7 + call $~lib/string/String#concat + local.tee $8 call $~lib/string/String.__gt i32.eqz if @@ -10627,16 +10895,46 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $1 - call $~lib/rt/pure/__release - i32.const 864 - call $~lib/string/String#get:length + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 17000 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 17000 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 860 + i32.load + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -10650,7 +10948,7 @@ i32.const 272 i32.const 100 call $~lib/string/String#repeat - local.tee $41 + local.tee $7 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10665,7 +10963,7 @@ i32.const 320 i32.const 0 call $~lib/string/String#repeat - local.tee $42 + local.tee $8 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10680,7 +10978,7 @@ i32.const 320 i32.const 1 call $~lib/string/String#repeat - local.tee $43 + local.tee $42 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -10695,7 +10993,7 @@ i32.const 320 i32.const 2 call $~lib/string/String#repeat - local.tee $44 + local.tee $43 i32.const 10864 call $~lib/string/String.__eq i32.eqz @@ -10710,7 +11008,7 @@ i32.const 320 i32.const 3 call $~lib/string/String#repeat - local.tee $45 + local.tee $44 i32.const 10944 call $~lib/string/String.__eq i32.eqz @@ -10725,7 +11023,7 @@ i32.const 10448 i32.const 4 call $~lib/string/String#repeat - local.tee $46 + local.tee $45 i32.const 10976 call $~lib/string/String.__eq i32.eqz @@ -10740,7 +11038,7 @@ i32.const 320 i32.const 5 call $~lib/string/String#repeat - local.tee $47 + local.tee $46 i32.const 11008 call $~lib/string/String.__eq i32.eqz @@ -10755,7 +11053,7 @@ i32.const 320 i32.const 6 call $~lib/string/String#repeat - local.tee $48 + local.tee $47 i32.const 11040 call $~lib/string/String.__eq i32.eqz @@ -10770,7 +11068,7 @@ i32.const 320 i32.const 7 call $~lib/string/String#repeat - local.tee $49 + local.tee $48 i32.const 11072 call $~lib/string/String.__eq i32.eqz @@ -10786,7 +11084,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $50 + local.tee $49 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10802,7 +11100,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $51 + local.tee $50 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10818,7 +11116,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replace - local.tee $52 + local.tee $51 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10834,7 +11132,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $53 + local.tee $52 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10850,7 +11148,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $54 + local.tee $53 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10866,7 +11164,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replace - local.tee $55 + local.tee $54 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10882,7 +11180,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replace - local.tee $56 + local.tee $55 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10898,7 +11196,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replace - local.tee $57 + local.tee $56 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10914,7 +11212,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $58 + local.tee $57 i32.const 11136 call $~lib/string/String.__eq i32.eqz @@ -10930,7 +11228,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $59 + local.tee $58 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10946,7 +11244,7 @@ i32.const 11232 i32.const 4576 call $~lib/string/String#replace - local.tee $60 + local.tee $59 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10962,7 +11260,7 @@ i32.const 11264 i32.const 11296 call $~lib/string/String#replace - local.tee $61 + local.tee $60 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -10978,7 +11276,7 @@ i32.const 11264 i32.const 272 call $~lib/string/String#replace - local.tee $62 + local.tee $61 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10994,7 +11292,7 @@ i32.const 272 i32.const 800 call $~lib/string/String#replaceAll - local.tee $63 + local.tee $62 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11010,7 +11308,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $64 + local.tee $63 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11026,7 +11324,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $65 + local.tee $64 i32.const 11296 call $~lib/string/String.__eq i32.eqz @@ -11042,7 +11340,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $66 + local.tee $65 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -11058,7 +11356,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replaceAll - local.tee $67 + local.tee $66 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -11074,7 +11372,7 @@ i32.const 320 i32.const 11408 call $~lib/string/String#replaceAll - local.tee $68 + local.tee $67 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -11090,7 +11388,7 @@ i32.const 10448 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $69 + local.tee $68 i32.const 11520 call $~lib/string/String.__eq i32.eqz @@ -11106,7 +11404,7 @@ i32.const 11584 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $70 + local.tee $69 i32.const 11616 call $~lib/string/String.__eq i32.eqz @@ -11122,7 +11420,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $71 + local.tee $70 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11138,7 +11436,7 @@ i32.const 11648 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $72 + local.tee $71 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11154,7 +11452,7 @@ i32.const 11680 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $73 + local.tee $72 i32.const 11712 call $~lib/string/String.__eq i32.eqz @@ -11170,7 +11468,7 @@ i32.const 10448 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $74 + local.tee $73 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11186,7 +11484,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $75 + local.tee $74 i32.const 11744 call $~lib/string/String.__eq i32.eqz @@ -11202,7 +11500,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $76 + local.tee $75 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11218,7 +11516,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $77 + local.tee $76 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11234,7 +11532,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replaceAll - local.tee $78 + local.tee $77 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11250,7 +11548,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $79 + local.tee $78 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11266,7 +11564,7 @@ i32.const 800 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $80 + local.tee $79 i32.const 4608 call $~lib/string/String.__eq i32.eqz @@ -11282,7 +11580,7 @@ i32.const 1216 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $81 + local.tee $80 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11298,7 +11596,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $82 + local.tee $81 i32.const 11776 call $~lib/string/String.__eq i32.eqz @@ -11314,7 +11612,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $83 + local.tee $82 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11327,14 +11625,22 @@ unreachable end global.get $std/string/str - call $~lib/rt/pure/__release + local.tee $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 11808 global.set $std/string/str i32.const 11808 i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $84 + local.tee $83 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11350,7 +11656,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $85 + local.tee $84 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11366,7 +11672,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $86 + local.tee $85 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11382,7 +11688,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $87 + local.tee $86 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11398,7 +11704,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - local.tee $88 + local.tee $87 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -11414,7 +11720,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $89 + local.tee $88 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11430,7 +11736,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $90 + local.tee $89 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -11446,7 +11752,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $91 + local.tee $90 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11462,7 +11768,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $92 + local.tee $91 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11478,7 +11784,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $93 + local.tee $92 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11494,7 +11800,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $94 + local.tee $93 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -11510,7 +11816,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $95 + local.tee $94 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11526,7 +11832,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $96 + local.tee $95 i32.const 12064 call $~lib/string/String.__eq i32.eqz @@ -11542,7 +11848,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $97 + local.tee $96 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11558,7 +11864,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $98 + local.tee $97 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11574,7 +11880,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $99 + local.tee $98 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -11590,7 +11896,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $100 + local.tee $99 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11606,7 +11912,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $101 + local.tee $100 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11622,7 +11928,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $102 + local.tee $101 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11638,7 +11944,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $103 + local.tee $102 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11654,7 +11960,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $104 + local.tee $103 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11670,7 +11976,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $105 + local.tee $104 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11686,7 +11992,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $106 + local.tee $105 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -11702,7 +12008,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $107 + local.tee $106 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11718,7 +12024,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $108 + local.tee $107 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11734,7 +12040,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $109 + local.tee $108 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11750,7 +12056,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $110 + local.tee $109 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11766,23 +12072,27 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#split - local.tee $4 + local.tee $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $4 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 272 call $~lib/string/String.__eq local.set $0 - local.get $1 - call $~lib/rt/pure/__release - else - i32.const 0 - local.set $0 + local.get $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 i32.eqz @@ -11799,8 +12109,15 @@ i32.const 2147483647 call $~lib/string/String#split local.set $2 - local.get $4 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 i32.load offset=12 if @@ -11816,7 +12133,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 1 @@ -11830,7 +12154,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11850,7 +12181,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 1 @@ -11864,7 +12202,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11884,7 +12229,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 3 @@ -11898,7 +12250,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11913,7 +12272,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11928,7 +12294,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11948,7 +12321,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 3 @@ -11962,7 +12342,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11977,7 +12364,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -11992,7 +12386,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12012,7 +12413,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 4 @@ -12026,7 +12434,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12041,7 +12456,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12056,7 +12478,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12071,10 +12500,17 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release - else - i32.const 0 - local.set $0 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + else + i32.const 0 + local.set $0 end local.get $0 i32.eqz @@ -12091,7 +12527,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 4 @@ -12105,7 +12548,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12120,7 +12570,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12135,7 +12592,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12150,7 +12614,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12170,7 +12641,14 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 4 @@ -12184,7 +12662,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12199,7 +12684,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12214,7 +12706,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12229,7 +12728,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12248,53 +12754,80 @@ i32.const 272 i32.const 2147483647 call $~lib/string/String#split - local.set $1 local.get $2 - call $~lib/rt/pure/__release - local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $2 i32.load offset=12 i32.const 3 i32.eq if - local.get $1 + local.get $2 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 320 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 end local.get $0 if - local.get $1 + local.get $2 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 10416 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 end local.get $0 if - local.get $1 + local.get $2 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 11264 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12313,10 +12846,16 @@ i32.const 272 i32.const 0 call $~lib/string/String#split - local.set $2 - local.get $1 - call $~lib/rt/pure/__release local.get $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $2 i32.load offset=12 if i32.const 0 @@ -12331,7 +12870,14 @@ i32.const 1 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 1 @@ -12345,7 +12891,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12365,7 +12918,14 @@ i32.const 1 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 1 @@ -12379,7 +12939,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12399,7 +12966,14 @@ i32.const 4 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 3 @@ -12413,7 +12987,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12428,7 +13009,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12443,7 +13031,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12463,7 +13058,14 @@ i32.const -1 call $~lib/string/String#split local.get $2 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.tee $2 i32.load offset=12 i32.const 3 @@ -12477,7 +13079,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12492,7 +13101,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12507,7 +13123,14 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 @@ -12526,58 +13149,85 @@ i32.const 1056 i32.const -1 call $~lib/string/String#split - local.set $1 local.get $2 - call $~lib/rt/pure/__release - local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $2 i32.load offset=12 i32.const 3 i32.eq if - local.get $1 + local.get $2 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 320 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 end local.get $0 if - local.get $1 + local.get $2 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 10416 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end else i32.const 0 local.set $0 end local.get $0 if - local.get $1 + local.get $2 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 11264 call $~lib/string/String.__eq local.set $0 - local.get $2 - call $~lib/rt/pure/__release - else - i32.const 0 - local.set $0 - end - local.get $0 + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + else + i32.const 0 + local.set $0 + end + local.get $0 i32.eqz if i32.const 0 @@ -12587,11 +13237,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 call $~lib/util/number/itoa32 - local.tee $111 + local.tee $2 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12605,7 +13262,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $112 + local.tee $0 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -12619,7 +13276,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $113 + local.tee $1 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -12633,7 +13290,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $114 + local.tee $110 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12647,7 +13304,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $115 + local.tee $111 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12661,7 +13318,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $116 + local.tee $112 i32.const 12640 call $~lib/string/String.__eq i32.eqz @@ -12675,7 +13332,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $117 + local.tee $113 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12689,7 +13346,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $118 + local.tee $114 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12703,7 +13360,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $119 + local.tee $115 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12717,7 +13374,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $120 + local.tee $116 i32.const 12768 call $~lib/string/String.__eq i32.eqz @@ -12731,7 +13388,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $121 + local.tee $117 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12745,7 +13402,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $122 + local.tee $118 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -12759,7 +13416,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $123 + local.tee $119 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -12773,7 +13430,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $124 + local.tee $120 i32.const 12912 call $~lib/string/String.__eq i32.eqz @@ -12787,7 +13444,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $125 + local.tee $121 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12801,7 +13458,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $126 + local.tee $122 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -12815,7 +13472,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $127 + local.tee $123 i32.const 13056 call $~lib/string/String.__eq i32.eqz @@ -12829,7 +13486,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $128 + local.tee $124 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12843,7 +13500,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $129 + local.tee $125 i32.const 13088 call $~lib/string/String.__eq i32.eqz @@ -12857,7 +13514,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $130 + local.tee $126 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12871,7 +13528,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $131 + local.tee $127 i32.const 13120 call $~lib/string/String.__eq i32.eqz @@ -12885,7 +13542,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $132 + local.tee $128 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12899,7 +13556,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $133 + local.tee $129 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12913,7 +13570,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $134 + local.tee $130 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12927,7 +13584,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $135 + local.tee $131 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12941,7 +13598,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $136 + local.tee $132 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12955,7 +13612,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $137 + local.tee $133 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12969,7 +13626,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $138 + local.tee $134 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12983,7 +13640,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $139 + local.tee $135 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12997,7 +13654,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $140 + local.tee $136 i32.const 13216 call $~lib/string/String.__eq i32.eqz @@ -13011,7 +13668,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $141 + local.tee $137 i32.const 13248 call $~lib/string/String.__eq i32.eqz @@ -13025,7 +13682,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $142 + local.tee $138 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13039,7 +13696,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $143 + local.tee $139 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13053,7 +13710,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $144 + local.tee $140 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13067,7 +13724,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $145 + local.tee $141 i32.const 13392 call $~lib/string/String.__eq i32.eqz @@ -13081,7 +13738,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $146 + local.tee $142 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -13095,7 +13752,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $147 + local.tee $143 i32.const 13488 call $~lib/string/String.__eq i32.eqz @@ -13109,7 +13766,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $148 + local.tee $144 i32.const 13536 call $~lib/string/String.__eq i32.eqz @@ -13123,7 +13780,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $149 + local.tee $145 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -13137,7 +13794,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $150 + local.tee $146 i32.const 13632 call $~lib/string/String.__eq i32.eqz @@ -13151,7 +13808,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $151 + local.tee $147 i32.const 13696 call $~lib/string/String.__eq i32.eqz @@ -13165,7 +13822,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $152 + local.tee $148 i32.const 13760 call $~lib/string/String.__eq i32.eqz @@ -13179,7 +13836,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $153 + local.tee $149 i32.const 13824 call $~lib/string/String.__eq i32.eqz @@ -13193,7 +13850,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $154 + local.tee $150 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13207,7 +13864,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $155 + local.tee $151 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -13221,7 +13878,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $156 + local.tee $152 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13235,7 +13892,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $157 + local.tee $153 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13249,7 +13906,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $158 + local.tee $154 i32.const 13920 call $~lib/string/String.__eq i32.eqz @@ -13263,7 +13920,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $159 + local.tee $155 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13277,7 +13934,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $160 + local.tee $156 i32.const 13968 call $~lib/string/String.__eq i32.eqz @@ -13291,7 +13948,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $161 + local.tee $157 i32.const 14016 call $~lib/string/String.__eq i32.eqz @@ -13305,7 +13962,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $162 + local.tee $158 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -13319,7 +13976,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $163 + local.tee $159 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -13333,7 +13990,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $164 + local.tee $160 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -13347,7 +14004,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $165 + local.tee $161 i32.const 14240 call $~lib/string/String.__eq i32.eqz @@ -13361,7 +14018,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $166 + local.tee $162 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13375,7 +14032,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $167 + local.tee $163 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13389,7 +14046,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $168 + local.tee $164 i32.const 4832 call $~lib/string/String.__eq i32.eqz @@ -13403,7 +14060,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $169 + local.tee $165 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13417,7 +14074,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $170 + local.tee $166 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13431,7 +14088,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $171 + local.tee $167 i32.const 5344 call $~lib/string/String.__eq i32.eqz @@ -13445,7 +14102,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $172 + local.tee $168 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -13459,7 +14116,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $173 + local.tee $169 i32.const 5408 call $~lib/string/String.__eq i32.eqz @@ -13473,7 +14130,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $174 + local.tee $170 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -13487,7 +14144,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $175 + local.tee $171 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -13501,7 +14158,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $176 + local.tee $172 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -13515,7 +14172,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $177 + local.tee $173 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -13529,7 +14186,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $178 + local.tee $174 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -13543,7 +14200,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $179 + local.tee $175 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -13557,7 +14214,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $180 + local.tee $176 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -13571,7 +14228,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $181 + local.tee $177 i32.const 5472 call $~lib/string/String.__eq i32.eqz @@ -13585,7 +14242,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $182 + local.tee $178 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13599,7 +14256,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $183 + local.tee $179 i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -13613,7 +14270,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $184 + local.tee $180 i32.const 15872 call $~lib/string/String.__eq i32.eqz @@ -13627,7 +14284,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $185 + local.tee $181 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -13641,7 +14298,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $186 + local.tee $182 i32.const 15936 call $~lib/string/String.__eq i32.eqz @@ -13655,7 +14312,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $187 + local.tee $183 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -13669,7 +14326,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $188 + local.tee $184 i32.const 16016 call $~lib/string/String.__eq i32.eqz @@ -13683,7 +14340,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $189 + local.tee $185 i32.const 16064 call $~lib/string/String.__eq i32.eqz @@ -13697,7 +14354,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $190 + local.tee $186 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -13711,7 +14368,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $191 + local.tee $187 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -13725,7 +14382,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $192 + local.tee $188 i32.const 2704 call $~lib/string/String.__eq i32.eqz @@ -13739,7 +14396,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $193 + local.tee $189 i32.const 16192 call $~lib/string/String.__eq i32.eqz @@ -13753,7 +14410,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $194 + local.tee $190 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13767,7 +14424,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $195 + local.tee $191 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13781,7 +14438,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $196 + local.tee $192 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -13795,7 +14452,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $197 + local.tee $193 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -13809,7 +14466,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $198 + local.tee $194 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -13823,7 +14480,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $199 + local.tee $195 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -13837,7 +14494,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $200 + local.tee $196 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13851,7 +14508,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $201 + local.tee $197 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -13865,7 +14522,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $202 + local.tee $198 i32.const 16400 call $~lib/string/String.__eq i32.eqz @@ -13879,7 +14536,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $203 + local.tee $199 i32.const 16464 call $~lib/string/String.__eq i32.eqz @@ -13893,7 +14550,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $204 + local.tee $200 i32.const 16528 call $~lib/string/String.__eq i32.eqz @@ -13907,7 +14564,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $205 + local.tee $201 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13921,7 +14578,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $206 + local.tee $202 i32.const 16592 call $~lib/string/String.__eq i32.eqz @@ -13935,7 +14592,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $207 + local.tee $203 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13949,7 +14606,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $208 + local.tee $204 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -13963,7 +14620,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $209 + local.tee $205 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13977,7 +14634,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $210 + local.tee $206 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -13991,7 +14648,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $211 + local.tee $207 i32.const 16832 call $~lib/string/String.__eq i32.eqz @@ -14005,7 +14662,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - local.tee $0 + local.tee $208 i32.const 16880 call $~lib/string/String.__eq i32.eqz @@ -14019,7 +14676,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - local.tee $4 + local.tee $209 i32.const 16912 call $~lib/string/String.__eq i32.eqz @@ -14033,7 +14690,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - local.tee $2 + local.tee $210 i32.const 16944 call $~lib/string/String.__eq i32.eqz @@ -14047,7 +14704,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - local.tee $1 + local.tee $211 i32.const 16976 call $~lib/string/String.__eq i32.eqz @@ -14060,435 +14717,1920 @@ unreachable end global.get $std/string/str - 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 $8 - call $~lib/rt/pure/__release + local.tee $212 + i32.const 17000 + i32.gt_u + if + local.get $212 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $11 + i32.const 17000 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $12 + i32.const 17000 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $13 + i32.const 17000 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $14 + i32.const 17000 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $15 + i32.const 17000 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $16 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $26 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $27 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $27 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $28 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $28 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $29 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $29 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $30 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $30 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $31 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $31 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $32 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $32 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $33 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $33 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $34 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $34 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $35 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $35 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $36 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $36 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $37 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $37 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $38 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $38 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $39 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $39 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $40 - call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $45 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $40 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 17000 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 17000 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 17000 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $41 + i32.const 17000 + i32.gt_u + if + local.get $41 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $43 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $43 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $44 + i32.const 17000 + i32.gt_u + if + local.get $44 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $42 - call $~lib/rt/pure/__release - local.get $41 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $42 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 17000 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 17000 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $45 + i32.const 17000 + i32.gt_u + if + local.get $45 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $46 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $46 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $47 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $47 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $48 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $48 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $49 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $49 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $50 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $50 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $51 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $51 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $52 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $52 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $53 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $53 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $54 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $54 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $55 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $55 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $56 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $56 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $57 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $57 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $58 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $58 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $59 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $59 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $60 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $60 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $61 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $61 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $62 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $62 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $63 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $63 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $64 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $64 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $65 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $65 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $66 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $66 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $67 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $67 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $68 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $68 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $69 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $69 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $70 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $70 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $71 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $71 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $72 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $72 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $73 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $73 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $74 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $74 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $75 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $75 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $76 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $76 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $77 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $77 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $78 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $78 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $79 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $79 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $80 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $80 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $81 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $81 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $82 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $82 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $83 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $83 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $84 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $84 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $85 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $85 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $86 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $86 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $87 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $87 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $88 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $88 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $89 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $89 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $90 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $90 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $91 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $91 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $92 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $92 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $93 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $93 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $94 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $94 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $95 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $95 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $96 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $96 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $97 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $97 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $98 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $98 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $99 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $99 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $100 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $100 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $101 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $101 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $102 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $102 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $103 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $103 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $104 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $104 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $105 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $105 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $106 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $106 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $107 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $107 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $108 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $108 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $109 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $109 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 17000 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 17000 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 17000 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $110 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $110 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $111 - call $~lib/rt/pure/__release - local.get $113 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $111 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $112 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $112 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $113 + i32.const 17000 + i32.gt_u + if + local.get $113 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $114 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $114 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $115 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $115 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $116 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $116 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $117 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $117 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $118 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $118 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $119 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $119 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $120 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $120 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $121 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $121 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $122 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $122 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $123 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $123 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $124 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $124 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $125 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $125 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $126 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $126 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $127 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $127 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $128 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $128 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $129 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $129 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $130 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $130 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $131 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $131 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $132 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $132 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $133 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $133 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $134 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $134 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $135 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $135 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $136 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $136 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $137 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $137 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $138 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $138 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $139 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $139 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $140 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $140 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $141 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $141 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $142 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $142 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $143 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $143 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $144 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $144 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $145 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $145 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $146 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $146 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $147 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $147 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $148 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $148 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $149 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $149 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $150 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $150 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $151 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $151 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $152 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $152 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $153 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $153 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $154 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $154 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $155 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $155 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $156 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $156 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $157 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $157 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $158 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $158 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $159 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $159 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $160 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $160 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $161 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $161 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $162 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $162 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $163 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $163 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $164 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $164 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $165 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $165 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $166 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $166 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $167 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $167 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $168 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $168 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $169 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $169 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $170 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $170 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $171 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $171 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $172 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $172 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $173 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $173 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $174 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $174 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $175 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $175 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $176 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $176 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $177 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $177 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $178 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $178 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $179 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $179 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $180 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $180 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $181 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $181 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $182 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $182 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $183 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $183 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $184 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $184 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $185 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $185 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $186 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $186 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $187 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $187 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $188 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $188 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $189 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $189 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $190 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $190 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $191 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $191 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $192 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $192 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $193 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $193 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $194 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $194 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $195 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $195 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $196 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $196 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $197 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $197 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $198 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $198 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $199 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $199 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $200 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $200 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $201 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $201 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $202 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $202 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $203 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $203 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $204 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $204 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $205 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $205 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $206 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $206 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $207 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $207 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $208 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $208 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $209 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $209 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $210 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $210 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $211 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 17000 + i32.gt_u + if + local.get $211 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/string/getString (; 82 ;) (result i32) + (func $std/string/getString (; 71 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 83 ;) + (func $~start (; 72 ;) global.get $~started if return @@ -14498,12 +16640,15 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 84 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 73 ;) (param $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 268435455 i32.and local.set $1 @@ -14525,11 +16670,74 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members - local.get $2 + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + block $switch$1$case$6 + local.get $0 + i32.const 16 + 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 $block$4$break $__inlined_func$~lib/rt/__visit_members $switch$1$case$6 $block$4$break $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $2 + i32.load offset=4 + local.tee $1 + local.get $2 + i32.load offset=12 + i32.const 2 + i32.shl + i32.add + local.set $5 + loop $while-continue|0 + local.get $1 + local.get $5 + i32.lt_u + if + local.get $1 + i32.load + local.tee $4 + if + local.get $4 + i32.const 17000 + i32.ge_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $while-continue|0 + end + end + br $block$4$break + end + unreachable + end + local.get $2 + i32.load + local.tee $1 + if + local.get $1 + i32.const 17000 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + end + local.get $3 i32.const -2147483648 i32.and if @@ -14559,84 +16767,11 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $3 i32.const -268435456 i32.and i32.or i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 85 ;) (param $0 i32) - local.get $0 - i32.const 17000 - i32.lt_u - if - return - end - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 86 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - local.get $0 - i32.load offset=12 - i32.const 2 - i32.shl - i32.add - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - local.tee $2 - if - local.get $2 - call $~lib/rt/pure/__visit - end - local.get $1 - i32.const 4 - i32.add - local.set $1 - br $while-continue|0 - end - end - ) - (func $~lib/rt/__visit_members (; 87 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - block $switch$1$case$6 - 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 $block$4$break $folding-inner0 $switch$1$case$6 $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $switch$1$default - end - return - end - local.get $0 - call $~lib/array/Array<~lib/string/String>#__visit_impl - br $block$4$break - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - end - ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 5f401ce42c..1be9a7736d 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,11 +1,11 @@ (module + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -66,20 +66,46 @@ end local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -87,16 +113,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -105,42 +131,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -151,9 +148,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 4 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -364,7 +361,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -385,7 +382,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -418,69 +415,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 7 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map<~lib/string/String,usize>#clear - local.get $0 - ) - (func $~lib/map/Map#constructor (; 8 ;) (result i32) - (local $0 i32) - i32.const 24 - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map<~lib/string/String,usize>#clear - local.get $0 - ) - (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/hash/hashStr (; 10 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -492,7 +427,11 @@ i32.const 0 local.set $0 local.get $2 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.const 1 i32.shl local.set $3 @@ -520,7 +459,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -596,7 +535,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -613,10 +552,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -628,7 +575,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 9 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -669,25 +616,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#get (; 14 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 32 - call $~lib/util/hash/hashStr - call $~lib/map/Map<~lib/string/String,usize>#find - local.tee $0 - i32.eqz - if - i32.const 224 - i32.const 288 - i32.const 111 - i32.const 16 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -800,7 +729,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -887,7 +816,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 17 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -918,7 +847,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -959,7 +888,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 19 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1072,7 +1001,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 20 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1166,7 +1095,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 21 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 16 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1176,13 +1105,73 @@ call $~lib/map/Map<~lib/string/String,usize>#find if global.get $~lib/symbol/stringToId - call $~lib/map/Map<~lib/string/String,usize>#get + i32.const 32 + call $~lib/util/hash/hashStr + call $~lib/map/Map<~lib/string/String,usize>#find + local.tee $0 + i32.eqz + if + i32.const 224 + i32.const 288 + i32.const 111 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 return end else - call $~lib/map/Map<~lib/string/String,usize>#constructor + i32.const 24 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map<~lib/string/String,usize>#clear + local.get $0 global.set $~lib/symbol/stringToId - call $~lib/map/Map#constructor + i32.const 24 + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $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 $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map<~lib/string/String,usize>#clear + local.get $0 global.set $~lib/symbol/idToString end global.get $~lib/symbol/nextId @@ -1203,16 +1192,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 22 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#get (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 17 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1231,12 +1211,14 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 24 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 18 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find else i32.const 0 end @@ -1248,7 +1230,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1421,55 +1403,62 @@ end end ) - (func $~lib/string/String#concat (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - i32.const 832 - local.get $1 - select - local.tee $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if - i32.const 336 - return + block $__inlined_func$~lib/string/String#concat + local.get $1 + i32.const 832 + local.get $1 + select + local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $3 + local.get $0 + i32.const 832 + local.get $0 + select + local.tee $4 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $1 + i32.add + local.tee $0 + i32.eqz + if + i32.const 336 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/memory/memory.copy + local.get $0 + local.get $1 + i32.add + local.get $2 + local.get $3 + call $~lib/memory/memory.copy end - local.get $2 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $2 - ) - (func $~lib/string/String.__concat (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 832 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 28 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 21 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1529,7 +1518,9 @@ if (result i32) global.get $~lib/symbol/idToString local.get $0 - call $~lib/map/Map#has + local.get $0 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find else i32.const 0 end @@ -1545,7 +1536,7 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 29 ;) + (func $start:std/symbol (; 22 ;) (local $0 i32) call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -1714,7 +1705,7 @@ unreachable end ) - (func $~start (; 30 ;) + (func $~start (; 23 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 012bd33244..e74ef5a64e 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,17 +1,16 @@ (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_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 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))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) @@ -20,8 +19,7 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i32_=>_f32 (func (param i32) (result f32))) - (type $i32_=>_f64 (func (param i32) (result f64))) + (type $i64_=>_i32 (func (param i64) (result 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_f64_=>_none (func (param i32 i32 f64))) @@ -1234,15 +1232,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1467,48 +1457,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1516,22 +1467,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1547,12 +1524,15 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 i32.const 0 local.get $3 @@ -1560,9 +1540,12 @@ local.get $0 i32.eqz if + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $0 end @@ -1576,8 +1559,7 @@ i32.const 0 i32.store offset=8 local.get $2 - local.set $1 - local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 @@ -1587,7 +1569,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $0 local.get $1 @@ -1600,131 +1589,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 22 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub - ) - (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 25 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int16Array#constructor (; 26 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int16Array#get:length (; 27 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - ) - (func $~lib/typedarray/Uint16Array#constructor (; 28 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int32Array#constructor (; 29 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int32Array#get:length (; 30 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - ) - (func $~lib/typedarray/Uint32Array#constructor (; 31 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int64Array#constructor (; 32 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Int64Array#get:length (; 33 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - ) - (func $~lib/typedarray/Uint64Array#constructor (; 34 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Float32Array#constructor (; 35 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $~lib/typedarray/Float64Array#constructor (; 36 ;) (param $0 i32) (result i32) - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - ) - (func $std/typedarray/testInstantiate (; 37 ;) (param $0 i32) + (func $std/typedarray/testInstantiate (; 19 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1736,10 +1601,21 @@ (local $9 i32) (local $10 i32) (local $11 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1772,10 +1648,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $2 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1808,10 +1695,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $3 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1844,10 +1742,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $4 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $4 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1870,9 +1779,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/typedarray/Int16Array#get:length local.get $0 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1882,10 +1793,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $5 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1908,9 +1830,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/typedarray/Int16Array#get:length local.get $0 + local.get $5 + i32.load offset=8 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1920,10 +1844,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $6 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $6 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1946,9 +1881,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 - call $~lib/typedarray/Int32Array#get:length local.get $0 + local.get $6 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.ne if i32.const 0 @@ -1958,10 +1895,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $7 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $7 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -1984,9 +1932,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - call $~lib/typedarray/Int32Array#get:length local.get $0 + local.get $7 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.ne if i32.const 0 @@ -1996,10 +1946,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $8 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $8 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -2022,9 +1983,11 @@ call $~lib/builtins/abort unreachable end - local.get $8 - call $~lib/typedarray/Int64Array#get:length local.get $0 + local.get $8 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.ne if i32.const 0 @@ -2034,10 +1997,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Uint64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $9 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $9 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -2060,9 +2034,11 @@ call $~lib/builtins/abort unreachable end - local.get $9 - call $~lib/typedarray/Int64Array#get:length local.get $0 + local.get $9 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.ne if i32.const 0 @@ -2072,10 +2048,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Float32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $10 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $10 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -2098,9 +2085,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 - call $~lib/typedarray/Int32Array#get:length local.get $0 + local.get $10 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.ne if i32.const 0 @@ -2110,10 +2099,21 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $0 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $11 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $11 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -2136,9 +2136,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 - call $~lib/typedarray/Int64Array#get:length local.get $0 + local.get $11 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.ne if i32.const 0 @@ -2149,29 +2151,106 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#__set (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2195,7 +2274,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 21 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2218,12 +2297,14 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 local.tee $4 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2269,9 +2350,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $4 i32.load @@ -2300,7 +2384,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 23 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2324,12 +2408,14 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 local.tee $4 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2375,9 +2461,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $4 i32.load @@ -2406,11 +2495,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 43 ;) (param $0 i32) + (func $~setArgumentsLength (; 25 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 26 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2488,7 +2577,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 45 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 27 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2530,7 +2619,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 46 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 28 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2543,19 +2632,14 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/__free (; 47 ;) (param $0 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/sort/weakHeapSort (; 48 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 29 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) (local $6 f64) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -2565,7 +2649,9 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $5 i32.const 0 local.get $2 @@ -2793,8 +2879,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f64.load offset=8 local.set $4 @@ -2806,7 +2894,7 @@ local.get $4 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 49 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 30 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2815,7 +2903,9 @@ local.get $0 call $~lib/rt/pure/__retain local.tee $2 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $1 i32.const 1 i32.le_s @@ -2865,7 +2955,7 @@ end local.get $2 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 50 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 31 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2894,7 +2984,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 51 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 32 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2917,7 +3007,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2949,7 +3039,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2968,7 +3058,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2988,7 +3078,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3057,7 +3147,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3230,22 +3320,28 @@ end end ) - (func $~lib/rt/__allocArray (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 i32.shl local.tee $4 local.set $6 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 local.get $3 if @@ -3268,7 +3364,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 39 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3287,33 +3383,10 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_s - ) - (func $~lib/array/Array#__get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 368 - i32.const 528 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - call $~lib/array/Array#__unchecked_get - ) - (func $std/typedarray/isInt8ArrayEqual (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 40 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=8 local.get $1 @@ -3334,9 +3407,23 @@ local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get + local.get $2 local.get $1 + i32.load offset=12 + i32.ge_u + if + i32.const 368 + i32.const 528 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end local.get $2 - call $~lib/array/Array#__get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_s i32.ne if i32.const 0 @@ -3351,7 +3438,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3402,9 +3489,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $4 i32.load @@ -3429,7 +3519,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3441,7 +3531,9 @@ i32.load offset=4 local.set $6 local.get $4 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $1 local.get $2 i32.const 0 @@ -3508,16 +3600,7 @@ end local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $~lib/array/Array#__get (; 65 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3531,23 +3614,31 @@ unreachable end local.get $0 + i32.load offset=4 local.get $1 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 66 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 - call $~lib/typedarray/Int32Array#get:length local.get $1 i32.load offset=12 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.ne if i32.const 0 return end local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $3 loop $for-loop|0 local.get $2 @@ -3574,11 +3665,13 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -3602,6 +3695,13 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $2 i32.const 0 i32.lt_s @@ -3631,11 +3731,12 @@ i32.const 0 i32.gt_s select - local.tee $4 - call $~lib/typedarray/Int32Array#constructor local.tee $3 - call $~lib/rt/pure/__retain + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 + call $~lib/rt/pure/__retain + local.tee $4 i32.load offset=4 local.get $0 i32.load offset=4 @@ -3643,15 +3744,22 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $3 - call $~lib/rt/pure/__release local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3659,7 +3767,9 @@ local.get $0 call $~lib/rt/pure/__retain local.tee $5 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $4 local.get $3 local.get $4 @@ -3690,7 +3800,7 @@ i32.lt_s select end - local.tee $0 + local.tee $1 i32.const 2 i32.shl i32.add @@ -3702,9 +3812,9 @@ local.get $2 local.get $4 i32.add - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select @@ -3716,7 +3826,7 @@ i32.lt_s select end - local.tee $1 + local.tee $0 i32.const 2 i32.shl i32.add @@ -3741,14 +3851,14 @@ i32.lt_s select end - local.get $1 + local.get $0 i32.sub - local.tee $1 + local.tee $2 local.get $4 - local.get $0 + local.get $1 i32.sub local.tee $0 - local.get $1 + local.get $2 local.get $0 i32.lt_s select @@ -3757,38 +3867,60 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 70 ;) (param $0 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 48 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + 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.load offset=4 - local.set $3 + local.set $4 local.get $0 i32.load offset=8 - local.set $4 + local.set $0 loop $for-loop|0 local.get $1 - local.get $4 + local.get $0 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $2 - local.get $1 local.get $3 + local.get $1 + local.get $4 i32.add i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $2 + i32.add + local.set $3 local.get $1 i32.const 1 i32.add @@ -3796,28 +3928,7 @@ br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 71 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - 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#reduce + local.get $3 i32.const 255 i32.and i32.const 6 @@ -3830,10 +3941,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3853,7 +3971,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 50 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3890,79 +4008,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 74 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 75 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#__set (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3986,35 +4032,59 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 77 ;) (param $0 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 52 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 - local.set $3 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + 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 $0 loop $for-loop|0 local.get $1 - local.get $4 + local.get $0 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 + local.get $4 local.get $1 i32.const 1 i32.shl i32.add i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $2 + i32.add + local.set $3 local.get $1 i32.const 1 i32.add @@ -4022,28 +4092,7 @@ br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 78 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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#reduce + local.get $3 i32.const 65535 i32.and i32.const 6 @@ -4056,10 +4105,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#__set (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4083,35 +4139,59 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 80 ;) (param $0 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 54 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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/Int16Array#get:length + i32.load offset=4 local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $0 loop $for-loop|0 local.get $1 - local.get $4 + local.get $0 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 + local.get $4 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $2 + i32.add + local.set $3 local.get $1 i32.const 1 i32.add @@ -4119,28 +4199,7 @@ br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 81 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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#reduce + local.get $3 i32.const 65535 i32.and i32.const 6 @@ -4153,10 +4212,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#reduce (; 82 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 55 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4165,7 +4231,9 @@ i32.load offset=4 local.set $4 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -4195,41 +4263,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 83 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#__set (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4253,41 +4287,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 85 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#__set (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4311,12 +4311,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 87 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 58 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 88 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 59 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4325,7 +4325,9 @@ i32.load offset=4 local.set $4 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 @@ -4355,41 +4357,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 89 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#__set (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4413,41 +4381,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 91 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#__set (; 92 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 61 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4471,40 +4405,64 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 93 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 62 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 94 ;) (param $0 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 63 ;) + (local $0 i32) (local $1 i32) - (local $2 f32) - (local $3 i32) + (local $2 i32) + (local $3 f32) (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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/Int32Array#get:length + i32.load offset=4 local.set $4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $0 loop $for-loop|0 local.get $1 - local.get $4 + local.get $0 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 + local.get $4 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.set $2 + f32.add + local.set $3 local.get $1 i32.const 1 i32.add @@ -4512,28 +4470,7 @@ br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 95 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - 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#reduce + local.get $3 f32.const 6 f32.ne if @@ -4544,43 +4481,74 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 96 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 64 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 97 ;) (param $0 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 65 ;) + (local $0 i32) (local $1 i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) + (local $3 f64) (local $4 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 - local.set $3 + 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/Int64Array#get:length + i32.load offset=4 local.set $4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $0 loop $for-loop|0 local.get $1 - local.get $4 + local.get $0 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 + local.get $4 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.set $2 + f64.add + local.set $3 local.get $1 i32.const 1 i32.add @@ -4588,28 +4556,7 @@ br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 98 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - 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#reduce + local.get $3 f64.const 6 f64.ne if @@ -4620,13 +4567,44 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 99 ;) (param $0 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 66 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + 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.load offset=4 local.set $3 @@ -4634,52 +4612,29 @@ i32.load offset=8 i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength local.get $2 - local.get $1 + local.get $0 local.get $3 i32.add i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.add local.set $2 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $2 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 100 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - 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#reduceRight i32.const 255 i32.and i32.const 6 @@ -4693,9 +4648,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 101 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 67 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4733,28 +4695,69 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 102 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 68 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 - i32.const 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $2 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $2 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|0 + end + end + local.get $2 + i32.const 65535 i32.and i32.const 6 i32.ne @@ -4767,58 +4770,55 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 103 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 69 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#reduceRight (; 104 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if @@ -4826,44 +4826,21 @@ global.set $~argumentsLength local.get $2 local.get $3 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add - i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.load16_u + i32.add local.set $2 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $2 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 105 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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#reduceRight i32.const 65535 i32.and i32.const 6 @@ -4877,83 +4854,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 106 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 107 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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#reduceRight - i32.const 65535 - i32.and - i32.const 6 - i32.ne + i32.const 7388 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 - call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reduceRight (; 108 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 70 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4961,7 +4871,9 @@ i32.load offset=4 local.set $4 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub local.set $2 @@ -4993,75 +4905,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 109 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - 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 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 110 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#reduceRight (; 111 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 71 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -5069,7 +4913,9 @@ i32.load offset=4 local.set $4 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 1 i32.sub local.set $2 @@ -5101,88 +4947,46 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 112 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 72 ;) (local $0 i32) (local $1 i32) + (local $2 f32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 113 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#reduceRight (; 114 ;) (param $0 i32) (result f32) - (local $1 i32) - (local $2 f32) - (local $3 i32) + f32.const 3 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if @@ -5190,44 +4994,21 @@ global.set $~argumentsLength local.get $2 local.get $3 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 + f32.add local.set $2 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $2 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 115 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - 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#reduceRight f32.const 6 f32.ne if @@ -5239,22 +5020,55 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 116 ;) (param $0 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 73 ;) + (local $0 i32) (local $1 i32) (local $2 f64) (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + 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.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if @@ -5262,44 +5076,21 @@ global.set $~argumentsLength local.get $2 local.get $3 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.get $1 - local.get $0 - call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 + f64.add local.set $2 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $2 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 117 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - 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#reduceRight f64.const 6 f64.ne if @@ -5311,14 +5102,21 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 119 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 75 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5326,35 +5124,41 @@ (local $5 i32) local.get $0 i32.load offset=8 - local.set $3 + local.set $2 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $2 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $3 loop $for-loop|0 local.get $1 - local.get $3 + local.get $2 i32.lt_s if i32.const 3 global.set $~argumentsLength local.get $1 - local.get $4 + local.get $3 i32.add local.get $1 - local.get $5 + local.get $4 i32.add i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.tee $5 + local.get $5 + i32.mul i32.store8 local.get $1 i32.const 1 @@ -5363,25 +5167,32 @@ br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $0 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store offset=4 + local.get $0 local.get $2 - local.get $3 i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 120 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 76 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -5396,7 +5207,7 @@ call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 1 @@ -5409,7 +5220,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -5422,7 +5233,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 9 @@ -5435,12 +5246,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#map (; 121 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 77 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5448,35 +5273,41 @@ (local $5 i32) local.get $0 i32.load offset=8 - local.set $3 + local.set $2 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $2 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $3 loop $for-loop|0 local.get $1 - local.get $3 + local.get $2 i32.lt_s if i32.const 3 global.set $~argumentsLength local.get $1 - local.get $4 + local.get $3 i32.add local.get $1 - local.get $5 + local.get $4 i32.add i32.load8_u - local.get $1 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.tee $5 + local.get $5 + i32.mul i32.store8 local.get $1 i32.const 1 @@ -5485,20 +5316,20 @@ br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $0 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store offset=4 + local.get $0 local.get $2 - local.get $3 i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array#__get (; 122 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5517,12 +5348,19 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 123 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 79 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -5537,7 +5375,7 @@ call $~lib/typedarray/Uint8Array#__set local.get $0 call $~lib/typedarray/Uint8Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 1 @@ -5550,7 +5388,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -5563,7 +5401,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 9 @@ -5576,12 +5414,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 124 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 80 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5589,36 +5441,42 @@ (local $5 i32) local.get $0 i32.load offset=8 - local.set $3 + local.set $2 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $2 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $3 loop $for-loop|0 local.get $1 - local.get $3 + local.get $2 i32.lt_s if i32.const 3 global.set $~argumentsLength local.get $1 - local.get $4 + local.get $3 i32.add local.get $1 - local.get $5 + local.get $4 i32.add i32.load8_u - local.get $1 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 - i32.store8 + local.tee $5 + local.get $5 + i32.mul + i32.store8 local.get $1 i32.const 1 i32.add @@ -5626,25 +5484,32 @@ br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $0 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $0 + local.get $3 i32.store offset=4 + local.get $0 local.get $2 - local.get $3 i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 125 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 81 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -5659,7 +5524,7 @@ call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 call $~lib/typedarray/Uint8ClampedArray#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 @@ -5672,7 +5537,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -5685,7 +5550,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 @@ -5698,12 +5563,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int16Array#map (; 126 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 82 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5711,24 +5590,31 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -5743,14 +5629,14 @@ local.tee $7 i32.add i32.load16_s - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i32.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i32.store16 local.get $2 i32.const 1 @@ -5759,20 +5645,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#__get (; 127 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5795,12 +5681,19 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 128 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 84 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -5815,7 +5708,7 @@ call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int16Array#__get i32.const 1 @@ -5828,7 +5721,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int16Array#__get i32.const 4 @@ -5841,7 +5734,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int16Array#__get i32.const 9 @@ -5854,12 +5747,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#map (; 129 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 85 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5867,24 +5774,31 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -5899,14 +5813,14 @@ local.tee $7 i32.add i32.load16_u - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i32.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i32.store16 local.get $2 i32.const 1 @@ -5915,20 +5829,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 130 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5951,12 +5865,19 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 131 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 87 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -5971,7 +5892,7 @@ call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint16Array#__get i32.const 1 @@ -5984,7 +5905,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint16Array#__get i32.const 4 @@ -5997,7 +5918,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint16Array#__get i32.const 9 @@ -6010,12 +5931,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#map (; 132 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 88 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6023,24 +5958,31 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6055,14 +5997,14 @@ local.tee $7 i32.add i32.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i32.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i32.store local.get $2 i32.const 1 @@ -6071,25 +6013,32 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 133 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 89 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -6104,7 +6053,7 @@ call $~lib/typedarray/Int32Array#__set local.get $0 call $~lib/typedarray/Int32Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 1 @@ -6117,7 +6066,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 4 @@ -6130,7 +6079,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 9 @@ -6143,12 +6092,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint32Array#map (; 134 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 90 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6156,24 +6119,31 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6188,14 +6158,14 @@ local.tee $7 i32.add i32.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i32.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i32.store local.get $2 i32.const 1 @@ -6204,20 +6174,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 91 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6240,12 +6210,19 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 136 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 92 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -6260,7 +6237,7 @@ call $~lib/typedarray/Uint32Array#__set local.get $0 call $~lib/typedarray/Uint32Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 1 @@ -6273,7 +6250,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 4 @@ -6286,7 +6263,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 9 @@ -6299,42 +6276,63 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 137 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 93 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 138 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 94 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i64) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6349,14 +6347,14 @@ local.tee $7 i32.add i64.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i64.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i64.store local.get $2 i32.const 1 @@ -6365,20 +6363,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 139 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 95 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6401,12 +6399,19 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 140 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 96 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i64.const 1 @@ -6421,7 +6426,7 @@ call $~lib/typedarray/Int64Array#__set local.get $0 call $~lib/typedarray/Int64Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int64Array#__get i64.const 1 @@ -6434,7 +6439,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int64Array#__get i64.const 4 @@ -6447,7 +6452,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int64Array#__get i64.const 9 @@ -6460,37 +6465,58 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint64Array#map (; 141 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i64) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6505,14 +6531,14 @@ local.tee $7 i32.add i64.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + i64.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 i64.store local.get $2 i32.const 1 @@ -6521,20 +6547,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 142 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6557,12 +6583,19 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 143 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 99 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i64.const 1 @@ -6577,7 +6610,7 @@ call $~lib/typedarray/Uint64Array#__set local.get $0 call $~lib/typedarray/Uint64Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint64Array#__get i64.const 1 @@ -6590,7 +6623,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint64Array#__get i64.const 4 @@ -6603,7 +6636,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint64Array#__get i64.const 9 @@ -6616,42 +6649,63 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 144 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 100 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 145 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6666,14 +6720,14 @@ local.tee $7 i32.add f32.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + f32.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 f32.store local.get $2 i32.const 1 @@ -6682,20 +6736,20 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 146 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6718,12 +6772,19 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 147 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 103 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 f32.const 1 @@ -6738,7 +6799,7 @@ call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Float32Array#__get f32.const 1 @@ -6751,7 +6812,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float32Array#__get f32.const 4 @@ -6764,7 +6825,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float32Array#__get f32.const 9 @@ -6777,42 +6838,63 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 148 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 104 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 149 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 105 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f64) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 local.get $0 i32.load offset=4 local.set $5 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $0 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.set $1 loop $for-loop|0 local.get $2 local.get $4 @@ -6827,14 +6909,14 @@ local.tee $7 i32.add f64.load - local.get $2 - local.get $0 - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.set $8 + local.tee $3 local.get $3 + f64.mul + local.set $3 + local.get $1 local.get $7 i32.add - local.get $8 + local.get $3 f64.store local.get $2 i32.const 1 @@ -6843,25 +6925,32 @@ br $for-loop|0 end end + local.get $0 local.get $1 - local.get $3 call $~lib/rt/pure/__retain i32.store + local.get $0 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $0 local.get $6 i32.store offset=8 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 150 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 106 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 f64.const 1 @@ -6876,7 +6965,7 @@ call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#map - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 1 @@ -6889,7 +6978,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 4 @@ -6902,7 +6991,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 9 @@ -6915,12 +7004,26 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 107 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -6929,7 +7032,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 152 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 108 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7032,16 +7135,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 153 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/typedarray/Int8Array#filter (; 154 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#filter (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7049,17 +7143,22 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=8 local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 @@ -7077,17 +7176,16 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.const 2 + i32.gt_s if local.get $3 - local.tee $8 + local.tee $0 i32.const 1 i32.add local.set $3 + local.get $0 local.get $5 - local.get $8 i32.add local.get $6 i32.store8 @@ -7100,9 +7198,13 @@ end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 + call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7115,11 +7217,19 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 155 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 110 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7143,7 +7253,10 @@ local.get $0 call $~lib/typedarray/Int8Array#filter local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -7204,18 +7317,32 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 157 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7223,17 +7350,22 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=8 local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 @@ -7251,17 +7383,16 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + i32.const 2 + i32.gt_u if local.get $3 - local.tee $8 + local.tee $0 i32.const 1 i32.add local.set $3 + local.get $0 local.get $5 - local.get $8 i32.add local.get $6 i32.store8 @@ -7274,9 +7405,13 @@ end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 + call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7289,11 +7424,19 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 158 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 113 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7317,7 +7460,10 @@ local.get $0 call $~lib/typedarray/Uint8Array#filter local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -7378,11 +7524,25 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 159 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 114 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7390,17 +7550,22 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=8 local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 @@ -7418,17 +7583,16 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + i32.const 2 + i32.gt_u if local.get $3 - local.tee $8 + local.tee $0 i32.const 1 i32.add local.set $3 + local.get $0 local.get $5 - local.get $8 i32.add local.get $6 i32.store8 @@ -7441,9 +7605,13 @@ end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 + call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7456,11 +7624,19 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 160 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 115 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7484,7 +7660,10 @@ local.get $0 call $~lib/typedarray/Uint8ClampedArray#filter local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -7545,11 +7724,25 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 116 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7558,7 +7751,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 162 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 117 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7566,30 +7759,37 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add @@ -7598,55 +7798,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + i32.const 2 + i32.gt_s if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 1 i32.shl i32.add local.get $6 i32.store16 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 1 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 163 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 118 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 6 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 6 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7669,8 +7879,11 @@ call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -7679,8 +7892,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int16Array#get:length + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -7691,7 +7906,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Int16Array#__get i32.const 3 @@ -7704,7 +7919,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int16Array#__get i32.const 4 @@ -7717,7 +7932,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int16Array#__get i32.const 5 @@ -7730,19 +7945,33 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 165 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 120 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7750,30 +7979,37 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add @@ -7782,55 +8018,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + i32.const 2 + i32.gt_u if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 1 i32.shl i32.add local.get $6 i32.store16 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 1 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 166 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 121 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7853,8 +8099,11 @@ call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -7863,8 +8112,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int16Array#get:length + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -7875,7 +8126,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint16Array#__get i32.const 3 @@ -7888,7 +8139,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint16Array#__get i32.const 4 @@ -7901,7 +8152,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint16Array#__get i32.const 5 @@ -7914,17 +8165,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 122 ;) (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 (; 168 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 123 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7932,30 +8197,37 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add @@ -7964,55 +8236,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 + i32.const 2 + i32.gt_s if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 2 i32.shl i32.add local.get $6 i32.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 169 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 124 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -8035,8 +8317,11 @@ call $~lib/typedarray/Int32Array#__set local.get $0 call $~lib/typedarray/Int32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -8045,8 +8330,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int32Array#get:length + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -8057,7 +8344,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -8070,7 +8357,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 4 @@ -8083,7 +8370,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 5 @@ -8096,17 +8383,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 170 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 171 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 126 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8114,30 +8415,37 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add @@ -8146,55 +8454,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 + i32.const 2 + i32.gt_u if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 2 i32.shl i32.add local.get $6 i32.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 172 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 127 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -8217,8 +8535,11 @@ call $~lib/typedarray/Uint32Array#__set local.get $0 call $~lib/typedarray/Uint32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -8227,8 +8548,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int32Array#get:length + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -8239,7 +8562,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 3 @@ -8252,7 +8575,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 4 @@ -8265,7 +8588,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 5 @@ -8278,17 +8601,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 173 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 128 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 174 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 129 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8296,30 +8633,37 @@ (local $5 i32) (local $6 i64) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add @@ -8328,55 +8672,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 + i64.const 2 + i64.gt_s if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 3 i32.shl i32.add local.get $6 i64.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 175 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 130 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i64.const 1 @@ -8399,8 +8753,11 @@ call $~lib/typedarray/Int64Array#__set local.get $0 call $~lib/typedarray/Int64Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -8409,8 +8766,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int64Array#get:length + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 3 i32.ne if @@ -8421,7 +8780,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Int64Array#__get i64.const 3 @@ -8434,7 +8793,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int64Array#__get i64.const 4 @@ -8447,7 +8806,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int64Array#__get i64.const 5 @@ -8460,17 +8819,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 176 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 177 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 132 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8478,30 +8851,37 @@ (local $5 i32) (local $6 i64) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add @@ -8510,55 +8890,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 + i64.const 2 + i64.gt_u if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 3 i32.shl i32.add local.get $6 i64.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 178 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 133 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i64.const 1 @@ -8581,8 +8971,11 @@ call $~lib/typedarray/Uint64Array#__set local.get $0 call $~lib/typedarray/Uint64Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -8591,8 +8984,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int64Array#get:length + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 3 i32.ne if @@ -8603,7 +8998,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint64Array#__get i64.const 3 @@ -8616,7 +9011,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint64Array#__get i64.const 4 @@ -8629,7 +9024,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint64Array#__get i64.const 5 @@ -8642,17 +9037,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 179 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 134 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 180 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 135 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8660,30 +9069,37 @@ (local $5 i32) (local $6 f32) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add @@ -8692,55 +9108,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 + f32.const 2 + f32.gt if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 2 i32.shl i32.add local.get $6 f32.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 181 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 136 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 f32.const 1 @@ -8763,8 +9189,11 @@ call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -8773,8 +9202,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int32Array#get:length + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -8785,7 +9216,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Float32Array#__get f32.const 3 @@ -8798,7 +9229,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float32Array#__get f32.const 4 @@ -8811,7 +9242,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float32Array#__get f32.const 5 @@ -8824,17 +9255,31 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 182 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 183 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 138 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8842,30 +9287,37 @@ (local $5 i32) (local $6 f64) (local $7 i32) - (local $8 i32) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add @@ -8874,55 +9326,65 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 + f64.const 2 + f64.gt if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 i32.const 3 i32.shl i32.add local.get $6 f64.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 + call $~lib/rt/tlsf/maybeInitialize local.get $5 - local.get $3 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $3 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 184 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 139 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 f64.const 1 @@ -8945,18 +9407,23 @@ call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#filter - local.tee $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 + local.tee $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + if + i32.const 0 i32.const 304 i32.const 390 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/typedarray/Int64Array#get:length + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 3 i32.ne if @@ -8967,7 +9434,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 3 @@ -8980,7 +9447,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 4 @@ -8993,7 +9460,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 5 @@ -9006,19 +9473,33 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 185 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 141 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9057,17 +9538,25 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 188 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 143 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9105,9 +9594,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#some (; 189 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9146,11 +9642,19 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 190 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 145 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9188,13 +9692,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 191 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 146 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9232,16 +9751,23 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 192 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 193 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9250,7 +9776,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9282,17 +9810,25 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 194 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 195 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 150 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9330,9 +9866,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#some (; 196 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 151 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9341,7 +9884,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9373,11 +9918,19 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 197 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 152 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9415,14 +9968,21 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 198 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 199 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 154 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9431,7 +9991,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9463,15 +10025,23 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 200 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 201 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 156 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9509,13 +10079,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 202 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 157 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9553,14 +10138,21 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 203 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 158 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 204 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9569,7 +10161,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9601,15 +10195,23 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 205 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 160 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 206 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 161 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9647,13 +10249,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 207 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 162 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9691,14 +10308,21 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 208 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 163 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 209 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 164 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9707,7 +10331,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9739,16 +10365,24 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 210 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 165 ;) (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/Float32Array,f32> (; 211 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 166 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9786,14 +10420,21 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 212 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 167 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 213 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9802,7 +10443,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -9834,16 +10477,24 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 214 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 169 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 215 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 170 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9881,9 +10532,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int8Array#findIndex (; 216 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9922,18 +10580,26 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 217 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 218 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 173 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -9974,9 +10640,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 219 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 174 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10015,11 +10688,19 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 220 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 175 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10060,13 +10741,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 221 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 176 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10107,19 +10803,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int16Array#findIndex (; 222 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 177 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10127,7 +10832,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 1 @@ -10139,7 +10843,6 @@ local.get $1 call_indirect (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10148,20 +10851,30 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 223 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 224 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 179 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10202,19 +10915,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 225 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 180 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10222,7 +10944,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 1 @@ -10234,7 +10955,6 @@ local.get $1 call_indirect (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10243,13 +10963,23 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 226 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 181 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10290,19 +11020,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#findIndex (; 227 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 182 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10310,7 +11049,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 2 @@ -10322,7 +11060,6 @@ local.get $1 call_indirect (type $i32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10331,18 +11068,28 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 228 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 183 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 229 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 184 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10383,13 +11130,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 230 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 185 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10430,19 +11192,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int64Array#findIndex (; 231 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10450,7 +11221,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 3 @@ -10462,7 +11232,6 @@ local.get $1 call_indirect (type $i64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10471,18 +11240,28 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 232 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 187 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 233 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 188 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10523,13 +11302,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 234 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 189 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10570,19 +11364,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float32Array#findIndex (; 235 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 190 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10590,7 +11393,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 2 @@ -10602,7 +11404,6 @@ local.get $1 call_indirect (type $f32_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10611,18 +11412,28 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 236 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 191 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 237 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 192 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10663,19 +11474,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float64Array#findIndex (; 238 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 193 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -10683,7 +11503,6 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 local.get $3 local.get $2 i32.const 3 @@ -10695,7 +11514,6 @@ local.get $1 call_indirect (type $f64_i32_i32_=>_i32) br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -10704,18 +11522,28 @@ end end i32.const -1 + local.set $2 end + local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 239 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 194 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 240 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 195 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10756,9 +11584,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 196 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10768,7 +11603,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 242 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 197 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10808,11 +11643,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 243 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 198 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10850,15 +11693,22 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 244 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 199 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 245 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 200 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10898,11 +11748,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 246 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 201 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10940,13 +11798,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 247 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 202 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -10984,9 +11857,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 203 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10996,7 +11876,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 249 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11005,7 +11885,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11038,11 +11920,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 250 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 205 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11080,9 +11970,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#every (; 251 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 206 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11091,7 +11988,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11124,11 +12023,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 252 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 207 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11166,15 +12073,22 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 253 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 208 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 254 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 209 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11183,7 +12097,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11216,11 +12132,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 255 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 210 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11258,13 +12182,28 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 256 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 211 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11302,15 +12241,22 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 257 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 212 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 258 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 213 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11319,7 +12265,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11352,11 +12300,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 259 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 214 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11394,19 +12350,34 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 260 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 215 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 261 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 216 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11444,9 +12415,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/math/NativeMathf.mod (; 262 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 217 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11593,13 +12571,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 263 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 218 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 264 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 219 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11608,7 +12586,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11641,11 +12621,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 265 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 220 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11683,9 +12671,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/math/NativeMath.mod (; 266 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 221 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -11839,13 +12834,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 267 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 222 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 268 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 223 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11854,7 +12849,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -11887,11 +12884,19 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 269 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 224 ;) (local $0 i32) (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Float64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 i32.const 0 @@ -11929,9 +12934,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 270 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -11976,46 +12988,25 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 271 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 226 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - i32.add - i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 272 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12049,7 +13040,32 @@ i32.shr_s call $~lib/typedarray/Int8Array#__set local.get $0 - call $~lib/typedarray/Int8Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $3 + i32.add + i32.load8_s + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12061,10 +13077,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#forEach (; 273 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 227 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12097,13 +13120,21 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 274 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 228 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12146,15 +13177,30 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 275 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 229 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12197,9 +13243,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 276 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 230 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -12244,48 +13297,25 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 277 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 231 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 278 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12319,44 +13349,26 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int16Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#forEach (; 279 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 i32.load offset=4 - local.set $2 - local.get $0 - call $~lib/typedarray/Int16Array#get:length local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl i32.add - i32.load16_u + i32.load16_s local.get $1 local.get $0 call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 @@ -12367,15 +13379,46 @@ br $for-loop|0 end end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 280 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 232 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12403,7 +13446,36 @@ i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12415,10 +13487,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 281 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 233 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -12459,7 +13538,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 282 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 234 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12467,7 +13546,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -12494,13 +13575,21 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 283 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 235 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12537,15 +13626,30 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 284 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 236 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12582,9 +13686,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 285 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 237 ;) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12626,7 +13737,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 286 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 238 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12634,7 +13745,9 @@ i32.load offset=4 local.set $3 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -12661,13 +13774,21 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 287 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 239 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12707,15 +13828,30 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 288 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 240 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -12755,9 +13891,16 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 289 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 241 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12799,48 +13942,25 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 290 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 242 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 291 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12865,7 +13985,36 @@ f32.convert_i32_s call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12877,10 +14026,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 292 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 243 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12922,48 +14078,25 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 293 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 244 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 294 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12988,7 +14121,36 @@ f64.convert_i32_s call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Float64Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -13000,10 +14162,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int8Array#reverse (; 295 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 245 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13055,7 +14224,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 296 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 246 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13064,14 +14233,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Int8Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - local.set $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -13087,7 +14273,7 @@ i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -13106,7 +14292,15 @@ end local.get $2 call $~lib/typedarray/Int8Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -13144,7 +14338,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/Int8Array#subarray @@ -13202,16 +14396,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8Array#reverse (; 297 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 247 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13263,7 +14485,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 298 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 248 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13297,9 +14519,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 i32.load @@ -13324,7 +14549,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 299 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 249 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13333,14 +14558,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Uint8Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Uint8Array#constructor - local.tee $5 - local.set $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -13354,7 +14596,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -13371,7 +14613,15 @@ end local.get $2 call $~lib/typedarray/Uint8Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -13407,7 +14657,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Uint8Array#subarray local.tee $1 @@ -13464,16 +14714,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 300 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 250 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13507,9 +14785,12 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 i32.load @@ -13534,7 +14815,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 301 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 251 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13543,14 +14824,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - local.set $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -13564,7 +14862,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -13581,7 +14879,15 @@ end local.get $2 call $~lib/typedarray/Uint8Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -13617,7 +14923,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $1 @@ -13674,16 +14980,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int16Array#reverse (; 302 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 252 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13697,7 +15031,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -13739,12 +15075,14 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 303 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 253 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -13772,16 +15110,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -13789,10 +15130,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -13801,10 +15142,10 @@ i32.const 1 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 304 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 254 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13813,14 +15154,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - local.set $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -13836,7 +15194,7 @@ i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -13855,7 +15213,15 @@ end local.get $2 call $~lib/typedarray/Int16Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -13893,7 +15259,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Int16Array#subarray local.tee $1 @@ -13950,16 +15316,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint16Array#reverse (; 305 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 255 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13973,7 +15367,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -14015,12 +15411,14 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 306 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 256 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -14048,16 +15446,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -14065,10 +15466,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -14077,10 +15478,10 @@ i32.const 1 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 307 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 257 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14089,14 +15490,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Uint16Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - local.set $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -14110,7 +15528,7 @@ i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -14127,7 +15545,15 @@ end local.get $2 call $~lib/typedarray/Uint16Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -14163,7 +15589,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Uint16Array#subarray local.tee $1 @@ -14220,16 +15646,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#reverse (; 308 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 258 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14243,7 +15697,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -14285,7 +15741,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 309 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 259 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14294,14 +15750,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Int32Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - local.set $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -14313,7 +15786,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -14328,7 +15801,15 @@ end local.get $2 call $~lib/typedarray/Int32Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -14362,7 +15843,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/Int32Array#subarray @@ -14420,21 +15901,51 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint32Array#subarray (; 310 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 260 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -14462,16 +15973,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -14479,10 +15993,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -14491,10 +16005,10 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 311 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 261 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14503,14 +16017,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - local.set $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -14522,7 +16053,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -14537,7 +16068,15 @@ end local.get $2 call $~lib/typedarray/Int32Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -14571,7 +16110,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Uint32Array#subarray local.tee $1 @@ -14628,16 +16167,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int64Array#reverse (; 312 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 262 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14651,7 +16218,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -14693,12 +16262,14 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 313 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 263 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -14726,16 +16297,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -14743,10 +16317,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -14755,10 +16329,10 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 314 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 264 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14767,14 +16341,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - local.set $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -14787,7 +16378,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -14803,7 +16394,15 @@ end local.get $2 call $~lib/typedarray/Int64Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -14838,7 +16437,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Int64Array#subarray local.tee $1 @@ -14895,21 +16494,51 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint64Array#subarray (; 315 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 265 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -14937,16 +16566,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -14954,10 +16586,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -14966,10 +16598,10 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 316 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 266 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14978,14 +16610,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -14998,7 +16647,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -15014,7 +16663,15 @@ end local.get $2 call $~lib/typedarray/Int64Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -15049,7 +16706,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Uint64Array#subarray local.tee $1 @@ -15106,16 +16763,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float32Array#reverse (; 317 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 267 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15129,7 +16814,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -15171,12 +16858,14 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 318 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 268 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -15204,16 +16893,19 @@ i32.lt_s select end - local.set $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.load offset=4 local.get $3 @@ -15221,10 +16913,10 @@ i32.shl i32.add i32.store offset=4 - local.get $1 local.get $2 + local.get $1 local.get $3 - local.get $2 + local.get $1 local.get $3 i32.gt_s select @@ -15233,10 +16925,10 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 319 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 269 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15245,14 +16937,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - local.set $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -15265,7 +16974,7 @@ call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -15281,7 +16990,15 @@ end local.get $2 call $~lib/typedarray/Float32Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -15316,7 +17033,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 8 call $~lib/typedarray/Float32Array#subarray local.tee $1 @@ -15373,16 +17090,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float64Array#reverse (; 320 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 270 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15396,7 +17141,9 @@ i32.const 0 local.set $0 local.get $3 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -15438,7 +17185,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 321 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 271 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15447,14 +17194,31 @@ (local $5 i32) i32.const 1804 i32.load - local.tee $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $4 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.get $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - local.set $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + local.set $5 loop $for-loop|0 local.get $0 local.get $1 @@ -15467,7 +17231,7 @@ call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $3 + local.get $5 local.get $0 i32.const 1792 local.get $0 @@ -15483,7 +17247,15 @@ end local.get $2 call $~lib/typedarray/Float64Array#reverse - call $~lib/rt/pure/__release + local.tee $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end i32.const 0 local.set $0 loop $for-loop|1 @@ -15518,7 +17290,7 @@ br $for-loop|1 end end - local.get $3 + local.get $5 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray @@ -15576,16 +17348,44 @@ call $~lib/builtins/abort unreachable end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int8Array#indexOf (; 322 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15647,7 +17447,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 323 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 273 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15704,7 +17504,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 324 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 274 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15725,17 +17525,24 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 325 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 275 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16141,21 +17948,42 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 326 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 276 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16558,21 +18386,42 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 327 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 277 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16975,15 +18824,31 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int16Array#indexOf (; 328 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 278 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $3 if (result i32) local.get $2 @@ -17043,11 +18908,13 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 329 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -17102,7 +18969,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 330 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 280 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -17115,7 +18982,9 @@ unreachable end local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $2 end local.get $0 @@ -17123,17 +18992,24 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 331 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 281 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -17538,21 +19414,42 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 332 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 282 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -17955,15 +19852,31 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#indexOf (; 333 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 283 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 if (result i32) local.get $2 @@ -18021,11 +19934,13 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 334 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 284 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 i32.eqz if @@ -18078,7 +19993,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 335 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 285 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -18091,7 +20006,9 @@ unreachable end local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $2 end local.get $0 @@ -18099,17 +20016,24 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 336 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 286 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -18511,21 +20435,42 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 337 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 287 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -18926,15 +20871,31 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int64Array#indexOf (; 338 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 288 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $3 if (result i32) local.get $2 @@ -18992,11 +20953,13 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 339 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 289 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $3 i32.eqz if @@ -19049,7 +21012,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 340 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 290 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19062,7 +21025,9 @@ unreachable end local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $2 end local.get $0 @@ -19070,17 +21035,24 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 341 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 291 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -19482,21 +21454,42 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 342 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 292 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -19898,15 +21891,31 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float32Array#indexOf (; 343 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 293 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 if (result i32) local.get $2 @@ -19964,11 +21973,13 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 344 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 294 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 i32.eqz if @@ -20021,7 +22032,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 345 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 295 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20034,7 +22045,9 @@ unreachable end local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $2 end local.get $0 @@ -20042,17 +22055,24 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 346 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 296 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Float32Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -20454,15 +22474,31 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Float64Array#indexOf (; 347 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 297 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $3 if (result i32) local.get $2 @@ -20520,11 +22556,13 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 348 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 298 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $3 i32.eqz if @@ -20577,7 +22615,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 349 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 299 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20590,7 +22628,9 @@ unreachable end local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $2 end local.get $0 @@ -20598,17 +22638,24 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 350 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load - local.tee $0 local.set $2 - local.get $0 - call $~lib/typedarray/Float64Array#constructor + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -21011,121 +23058,25 @@ unreachable end local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#includes (; 351 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 1 - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f64.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - ) - (func $~lib/typedarray/Float32Array#includes (; 352 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop + local.get $0 + i32.const 7388 + i32.gt_u + if local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 1 - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 353 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 301 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -21173,7 +23124,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 354 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 302 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -21197,7 +23148,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 355 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 303 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21210,7 +23161,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 local.get $0 @@ -21219,35 +23170,32 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $1 + local.get $2 if - local.get $2 + local.get $1 i32.const 45 i32.store16 end - local.get $2 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#get:length (; 356 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/number/itoa_stream (; 357 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -21302,13 +23250,17 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 358 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 305 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 i32.const 0 local.get $2 @@ -21364,9 +23316,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $2 local.get $0 local.get $1 @@ -21376,7 +23331,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 359 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 306 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21401,8 +23356,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 11 i32.add @@ -21412,8 +23369,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -21474,19 +23436,19 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Int8Array#join (; 360 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/string/compareImpl (; 361 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 307 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -21562,7 +23524,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 362 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 308 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -21581,10 +23543,18 @@ return end local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -21596,14 +23566,22 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 363 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 309 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21625,7 +23603,10 @@ i32.const 5 call $~lib/typedarray/Int8Array#__set local.get $0 - call $~lib/typedarray/Int8Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21638,9 +23619,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int8Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21653,12 +23637,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/utoa32 (; 364 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 310 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -21669,19 +23675,24 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $2 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple local.get $2 + call $~lib/util/number/utoa_simple + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 365 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 311 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21711,7 +23722,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 366 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 312 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21736,8 +23747,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -21747,8 +23760,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -21809,26 +23827,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Uint8Array#join (; 367 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 368 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 313 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21850,7 +23876,10 @@ i32.const 5 call $~lib/typedarray/Uint8Array#__set local.get $0 - call $~lib/typedarray/Uint8Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21863,9 +23892,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint8Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21878,19 +23910,49 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 369 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 314 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21912,7 +23974,10 @@ i32.const 5 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - call $~lib/typedarray/Uint8Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21925,9 +23990,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint8Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21940,12 +24008,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/itoa_stream (; 370 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -22000,7 +24090,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 371 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 316 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22025,8 +24115,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 11 i32.add @@ -22036,8 +24128,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22102,26 +24199,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Int16Array#join (; 372 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 373 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 317 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22143,7 +24248,12 @@ i32.const 5 call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int16Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22156,9 +24266,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int16Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22171,12 +24286,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/itoa_stream (; 374 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 318 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22206,7 +24343,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 375 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 319 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22231,8 +24368,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -22242,8 +24381,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22308,26 +24452,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Uint16Array#join (; 376 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 377 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 320 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22349,7 +24501,12 @@ i32.const 5 call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22362,9 +24519,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint16Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22377,12 +24539,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/itoa_stream (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 321 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22424,7 +24608,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 379 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 322 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22449,8 +24633,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 11 i32.add @@ -22460,8 +24646,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22526,26 +24717,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Int32Array#join (; 380 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 381 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 323 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22567,7 +24766,12 @@ i32.const 5 call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Int32Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22580,9 +24784,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int32Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22595,12 +24804,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/itoa_stream (; 382 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 324 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22624,7 +24855,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 383 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 325 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22649,8 +24880,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 10 i32.add @@ -22660,8 +24893,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22726,26 +24964,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Uint32Array#join (; 384 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 385 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 326 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22767,7 +25013,12 @@ i32.const 5 call $~lib/typedarray/Uint32Array#__set local.get $0 - call $~lib/typedarray/Uint32Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22780,9 +25031,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint32Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22795,12 +25051,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/decimalCount64 (; 386 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 327 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -22853,7 +25131,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 387 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 328 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -22880,7 +25158,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa64 (; 388 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 329 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22894,7 +25172,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $1 + local.tee $2 if i64.const 0 local.get $0 @@ -22907,44 +25185,54 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $3 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $2 i32.add local.tee $4 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $3 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $3 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 local.get $0 - local.get $2 + local.get $3 call $~lib/util/number/utoa_simple end - local.get $1 + local.get $2 if - local.get $3 + local.get $1 i32.const 45 i32.store16 end - local.get $3 + local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 389 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 330 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -23005,7 +25293,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 390 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 331 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23030,8 +25318,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 21 i32.add @@ -23041,8 +25331,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -23107,26 +25402,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Int64Array#join (; 391 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 392 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 332 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i64.const 1 @@ -23148,7 +25451,12 @@ i64.const 5 call $~lib/typedarray/Int64Array#__set local.get $0 - call $~lib/typedarray/Int64Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -23161,9 +25469,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int64Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -23176,55 +25489,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/utoa64 (; 393 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz + i32.const 7388 + i32.gt_u if - i32.const 1936 - return + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - i64.const 4294967295 - i64.le_u + local.get $1 + i32.const 7388 + i32.gt_u if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $2 - call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 333 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -23264,12 +25556,13 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 395 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 334 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -23283,38 +25576,93 @@ local.get $3 i32.eqz if - local.get $0 - i64.load - call $~lib/util/number/utoa64 + block $__inlined_func$~lib/util/number/utoa64 (result i32) + i32.const 1936 + local.get $0 + i64.load + local.tee $4 + i64.eqz + br_if $__inlined_func$~lib/util/number/utoa64 + drop + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u + local.tee $5 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -23323,7 +25671,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -23331,23 +25679,23 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 @@ -23366,26 +25714,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Uint64Array#join (; 396 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 397 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 335 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Uint64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 i64.const 1 @@ -23407,7 +25763,12 @@ i64.const 5 call $~lib/typedarray/Uint64Array#__set local.get $0 - call $~lib/typedarray/Uint64Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -23420,9 +25781,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint64Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + local.tee $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -23435,12 +25801,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/number/genDigits (; 398 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 336 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -23830,7 +26218,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 399 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 337 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -24075,7 +26463,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 400 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 338 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -24384,7 +26772,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 401 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 339 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -24416,9 +26804,12 @@ call $~lib/rt/pure/__retain return end + call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 local.get $0 call $~lib/util/number/dtoa_core @@ -24433,10 +26824,12 @@ local.get $1 local.get $2 call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize local.get $1 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 402 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 340 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -24507,7 +26900,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 403 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 341 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24533,8 +26926,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 28 i32.add @@ -24544,8 +26939,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -24612,26 +27012,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Float32Array#join (; 404 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 405 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Float32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 f32.const 1 @@ -24653,7 +27061,12 @@ f32.const 5 call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray local.tee $2 i32.const 3168 call $~lib/string/String.__eq @@ -24666,9 +27079,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Float32Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $1 i32.const 3168 call $~lib/string/String.__eq i32.eqz @@ -24681,12 +27099,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/util/string/joinFloatArray (; 406 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 343 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24711,8 +27151,10 @@ return end local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 1964 + i32.load + i32.const 1 + i32.shr_u local.tee $4 i32.const 28 i32.add @@ -24722,8 +27164,13 @@ local.tee $6 i32.const 1 i32.shl + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 i32.const 1 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -24788,26 +27235,34 @@ local.get $0 call $~lib/string/String#substring local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end return end local.get $2 ) - (func $~lib/typedarray/Float64Array#join (; 407 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 408 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 344 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 + local.set $1 local.get $0 i32.const 0 f64.const 1 @@ -24829,7 +27284,12 @@ f64.const 5 call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Float64Array#join + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray local.tee $2 i32.const 3168 call $~lib/string/String.__eq @@ -24842,9 +27302,14 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Float64Array#join - local.tee $1 local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray + local.tee $1 i32.const 3168 call $~lib/string/String.__eq i32.eqz @@ -24857,12 +27322,34 @@ unreachable end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 409 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 345 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -24875,9 +27362,12 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $1 i32.const 0 local.get $0 @@ -24885,17 +27375,13 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 410 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $1 local.get $0 i32.const 16 i32.sub i32.load offset=12 - ) - (func $~lib/typedarray/Uint8Array.wrap (; 411 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $1 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.tee $3 i32.gt_u if @@ -24941,9 +27427,12 @@ unreachable end end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 call $~lib/rt/pure/__retain @@ -24959,7 +27448,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 412 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 347 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -24983,10 +27472,12 @@ local.get $2 call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 413 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 348 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 16 + i32.sub + i32.load offset=12 local.set $3 local.get $1 i32.const 0 @@ -25010,6 +27501,7 @@ select end local.set $1 + call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 0 i32.lt_s @@ -25041,7 +27533,9 @@ select local.tee $2 i32.const 0 - call $~lib/rt/tlsf/__alloc + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add local.tee $3 local.get $0 local.get $1 @@ -25051,54 +27545,32 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int8Array.wrap (; 414 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 415 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 349 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Int8Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25121,29 +27593,66 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Int8Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -25154,21 +27663,42 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 416 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 350 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25177,44 +27707,59 @@ (local $5 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Uint8Array#constructor + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + local.get $0 i32.load offset=8 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline local.set $4 @@ -25223,7 +27768,7 @@ local.get $3 i32.lt_s if - local.get $1 + local.get $0 local.get $2 call $~lib/typedarray/Uint8Array#__get local.get $4 @@ -25246,60 +27791,59 @@ end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray.wrap (; 417 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 local.get $1 - call $~lib/rt/pure/__retain + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 418 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 351 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Uint8ClampedArray#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25320,29 +27864,66 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Uint8ClampedArray.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -25353,79 +27934,67 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array.wrap (; 419 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $2 - i32.const 1 - i32.and + i32.const 7388 + i32.gt_u if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 420 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 352 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Int16Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25448,29 +28017,77 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Int16Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 1 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Int16Array#__get i32.ne if @@ -25481,79 +28098,67 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array.wrap (; 421 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $2 - i32.const 1 - i32.and + i32.const 7388 + i32.gt_u if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 422 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 353 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Uint16Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25574,60 +28179,28 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Uint16Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array.wrap (; 423 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 i32.gt_u if i32.const 368 @@ -25637,8 +28210,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 3 + local.get $6 + i32.const 1 i32.and if i32.const 32 @@ -25648,38 +28221,106 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $1 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $2 + local.get $6 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 424 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 354 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Int32Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25698,29 +28339,77 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Int32Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Int32Array#__get i32.ne if @@ -25731,79 +28420,67 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array.wrap (; 425 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $2 - i32.const 3 - i32.and + i32.const 7388 + i32.gt_u if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 426 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 355 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Uint32Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25822,29 +28499,77 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Uint32Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Uint32Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Uint32Array#__get i32.ne if @@ -25855,79 +28580,67 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array.wrap (; 427 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $2 - i32.const 7 - i32.and + i32.const 7388 + i32.gt_u if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 428 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 356 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Int64Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -25947,60 +28660,28 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Int64Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Int64Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Int64Array#__get - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array.wrap (; 429 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) i32.const 0 local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 i32.gt_u if i32.const 368 @@ -26010,7 +28691,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.const 7 i32.and if @@ -26021,81 +28702,36 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $1 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $2 + local.get $6 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 430 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Uint64Array.wrap - local.set $4 + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 + local.get $3 + call $~lib/typedarray/Int64Array#__get local.get $2 - call $~lib/typedarray/Uint64Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint64Array#__get + local.get $3 + call $~lib/typedarray/Int64Array#__get i64.ne if i32.const 0 @@ -26105,27 +28741,108 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array.wrap (; 431 ;) (param $0 i32) (result i32) + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 357 ;) + (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $5 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + local.get $1 + i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength i32.const 0 local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 i32.gt_u if i32.const 368 @@ -26135,8 +28852,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 3 + local.get $6 + i32.const 7 i32.and if i32.const 32 @@ -26146,38 +28863,106 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $1 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $2 + local.get $6 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 432 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 358 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Float32Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -26197,29 +28982,77 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Float32Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Float32Array#__get f32.ne if @@ -26230,79 +29063,67 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array.wrap (; 433 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/arraybuffer/ArrayBuffer#get:byteLength - local.tee $2 + i32.const 7388 i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end local.get $2 - i32.const 7 - i32.and + i32.const 7388 + i32.gt_u if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 434 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 359 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 - call $~lib/typedarray/Float64Array#constructor + local.set $4 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 @@ -26322,29 +29143,77 @@ local.get $1 i32.load local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load + i32.sub local.get $1 i32.load offset=8 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 i32.const 1 global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Float64Array.wrap - local.set $4 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 7 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Float64Array#__get f64.ne if @@ -26355,21 +29224,42 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 435 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 360 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -26420,14 +29310,15 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 436 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 361 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -26441,26 +29332,31 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get - local.tee $4 - local.get $1 + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_s local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if i32.const 3632 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_s - local.get $5 + local.get $6 f64.convert_i32_s f64.const 0 f64.const 0 @@ -26480,7 +29376,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 437 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -26547,11 +29443,13 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 438 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 363 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 @@ -26574,7 +29472,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -26601,7 +29501,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 439 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -26668,7 +29568,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 440 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 365 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -26690,11 +29590,13 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 441 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 366 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 @@ -26717,7 +29619,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -26744,7 +29648,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 442 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 367 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -26770,7 +29674,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 443 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 368 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26779,8 +29683,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -26793,8 +29705,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -26811,8 +29731,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -26825,8 +29753,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 @@ -26873,7 +29809,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> @@ -26892,37 +29835,87 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release - local.get $0 - 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 - ) - (func $~lib/array/Array#__unchecked_get (; 444 ;) (param $0 i32) (param $1 i32) (result i32) + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_u + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 445 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 369 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -26936,26 +29929,31 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint8Array#__get - local.tee $4 - local.get $1 + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_u local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if i32.const 3840 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_u - local.get $5 + local.get $6 f64.convert_i32_u f64.const 0 f64.const 0 @@ -26975,7 +29973,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 446 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 370 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27042,7 +30040,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 447 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27109,7 +30107,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 448 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 372 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27118,8 +30116,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -27132,8 +30138,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -27150,8 +30164,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -27164,8 +30186,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 @@ -27212,7 +30242,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> @@ -27231,23 +30268,79 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 449 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 373 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27312,14 +30405,15 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 450 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 374 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -27333,26 +30427,31 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint8ClampedArray#__get - local.tee $4 - local.get $1 + local.set $3 local.get $2 - call $~lib/array/Array#__unchecked_get + local.get $1 + i32.load offset=4 + i32.add + i32.load8_u local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if i32.const 4048 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_u - local.get $5 + local.get $6 f64.convert_i32_u f64.const 0 f64.const 0 @@ -27372,7 +30471,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 451 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 375 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27443,7 +30542,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 452 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 376 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -27457,9 +30556,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/typedarray/Int64Array#get:length local.get $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u i32.add local.get $0 i32.load offset=8 @@ -27481,7 +30582,9 @@ i32.load offset=4 local.set $4 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -27525,7 +30628,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 453 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 377 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27596,7 +30699,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 454 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -27610,9 +30713,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/typedarray/Int16Array#get:length local.get $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u i32.add local.get $0 i32.load offset=8 @@ -27634,7 +30739,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 i32.const 0 local.set $0 @@ -27674,7 +30781,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 455 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 379 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27741,7 +30848,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 456 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 380 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27750,8 +30857,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -27764,8 +30879,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -27782,8 +30905,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -27796,8 +30927,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> local.get $0 @@ -27845,7 +30984,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> @@ -27865,30 +31011,88 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 457 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 381 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 3372 i32.load local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -27934,14 +31138,16 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 458 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 382 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $4 local.get $1 i32.load offset=12 @@ -28002,7 +31208,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 383 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28012,7 +31218,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28071,15 +31279,19 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 460 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 384 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28098,7 +31310,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -28127,7 +31341,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 461 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 385 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28137,7 +31351,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28196,13 +31412,15 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 462 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 386 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28246,13 +31464,17 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 463 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 387 ;) (param $0 i32) (param $1 i32) local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28272,7 +31494,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 464 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28281,7 +31503,9 @@ i32.const 7 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28327,7 +31551,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 465 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 389 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28336,8 +31560,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -28350,8 +31582,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -28368,8 +31608,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -28382,8 +31630,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 @@ -28430,7 +31686,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> @@ -28449,30 +31712,88 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 466 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 390 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $4 local.get $1 i32.load offset=12 @@ -28533,7 +31854,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 467 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 391 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28543,7 +31864,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28602,7 +31925,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 468 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28612,7 +31935,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -28671,7 +31996,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 469 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 393 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28680,8 +32005,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -28694,8 +32027,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -28712,8 +32053,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -28726,8 +32075,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Uint16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 @@ -28774,7 +32131,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> @@ -28793,23 +32157,79 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 470 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -28826,7 +32246,9 @@ i32.load offset=12 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -28848,14 +32270,17 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 471 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 395 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.tee $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -28869,26 +32294,33 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int32Array#__get - local.tee $4 + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if i32.const 4880 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_s - local.get $5 + local.get $6 f64.convert_i32_s f64.const 0 f64.const 0 @@ -28908,7 +32340,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 472 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 396 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28919,7 +32351,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -28977,15 +32411,19 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 473 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 397 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29004,7 +32442,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -29033,7 +32473,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 474 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 398 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29043,7 +32483,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29102,13 +32544,15 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 475 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 399 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29152,15 +32596,19 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 476 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 400 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29179,7 +32627,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -29208,7 +32658,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 477 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 401 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29217,7 +32667,9 @@ i32.const 7 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29263,7 +32715,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 478 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 402 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29272,8 +32724,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -29286,8 +32746,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -29304,8 +32772,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -29318,8 +32794,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 3360 i32.const 0 @@ -29368,7 +32852,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> @@ -29387,30 +32878,89 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 479 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 403 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.tee $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -29424,26 +32974,33 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint32Array#__get - local.tee $4 + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + i32.load local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if i32.const 5248 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_u - local.get $5 + local.get $6 f64.convert_i32_u f64.const 0 f64.const 0 @@ -29463,7 +33020,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 480 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 404 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29474,7 +33031,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29532,7 +33091,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 481 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 405 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29542,7 +33101,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -29601,7 +33162,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 482 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 406 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29610,8 +33171,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -29624,8 +33193,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -29642,8 +33219,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -29656,8 +33241,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Uint32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 3360 i32.const 0 @@ -29706,7 +33299,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> @@ -29725,30 +33325,88 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 483 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 407 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 3372 i32.load local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -29794,23 +33452,17 @@ end end ) - (func $~lib/array/Array#__unchecked_get (; 484 ;) (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 485 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 408 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i64) + (local $6 i64) local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -29824,26 +33476,33 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int64Array#__get - local.tee $4 + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 3 + i32.shl + i32.add + i64.load local.tee $5 + local.set $6 + local.get $3 + local.get $5 i64.ne if i32.const 5648 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i64_s - local.get $5 + local.get $6 f64.convert_i64_s f64.const 0 f64.const 0 @@ -29863,7 +33522,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 486 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 409 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29873,7 +33532,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -29932,13 +33593,17 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 487 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 410 ;) (param $0 i32) (param $1 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -29958,7 +33623,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 488 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 411 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29969,7 +33634,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30027,13 +33694,15 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 489 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 412 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30077,15 +33746,19 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 490 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 413 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30104,7 +33777,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -30133,7 +33808,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 491 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30142,7 +33817,9 @@ i32.const 7 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30188,7 +33865,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 492 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 415 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30197,8 +33874,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -30211,8 +33896,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -30229,8 +33922,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -30243,8 +33944,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 i32.const 10 - call $~lib/typedarray/Int64Array#constructor + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 10 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 @@ -30291,7 +34000,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> @@ -30310,30 +34026,89 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 493 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 416 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 i32) (local $5 i64) + (local $6 i64) local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -30347,26 +34122,33 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint64Array#__get - local.tee $4 + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 3 + i32.shl + i32.add + i64.load local.tee $5 + local.set $6 + local.get $3 + local.get $5 i64.ne if i32.const 6176 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i64_u - local.get $5 + local.get $6 f64.convert_i64_u f64.const 0 f64.const 0 @@ -30386,7 +34168,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 494 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 417 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30396,7 +34178,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30455,7 +34239,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 495 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 418 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30466,7 +34250,9 @@ i32.const 2 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -30524,7 +34310,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 496 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 419 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30533,8 +34319,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -30547,8 +34341,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -30565,8 +34367,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -30579,8 +34389,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Uint64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 @@ -30627,7 +34445,14 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 local.get $1 call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> @@ -30646,84 +34471,88 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 497 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3372 - i32.load - local.get $0 - call $~lib/typedarray/Int32Array#get:length - i32.gt_s + i32.const 7388 + i32.gt_u if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 2 - i32.shl - local.tee $4 - i32.add - local.get $2 - local.get $4 - i32.add - i32.load - f32.convert_i32_s - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 498 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 420 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) (local $5 f32) (local $6 f32) local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $4 local.get $1 i32.load offset=12 @@ -30784,15 +34613,19 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 499 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 421 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -30811,7 +34644,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -30841,66 +34676,19 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 500 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 422 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $3 - i32.add - i32.load8_u - f32.convert_i32_u - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 501 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -30919,7 +34707,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -30949,7 +34739,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 502 ;) (param $0 i32) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30958,7 +34748,9 @@ i32.const 7 i32.add local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -31005,7 +34797,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 503 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 424 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31014,22 +34806,41 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $4 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $4 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -31046,100 +34857,261 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $5 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - call $~lib/typedarray/Float32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - i32.const 3424 - i32.const 3 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6784 - call $~lib/rt/__allocArray + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - local.get $1 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Float32Array#set<~lib/array/Array> - local.get $0 i32.const 10 i32.const 2 - i32.const 19 - i32.const 6848 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $7 - 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 $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.set $2 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + local.set $6 + i32.const 3364 + i32.load + local.set $8 + i32.const 3372 + i32.load + local.set $9 + loop $for-loop|0 + local.get $3 + local.get $9 + i32.lt_s + if + local.get $6 + local.get $3 + i32.const 2 + i32.shl + local.tee $2 + i32.add + local.get $2 + local.get $8 + i32.add + i32.load + f32.convert_i32_s + f32.store + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6608 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + i32.const 3424 + i32.const 3 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + local.get $4 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6784 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $1 + i32.load offset=4 + local.set $9 + local.get $1 + i32.load offset=8 + local.set $2 + loop $for-loop|00 + local.get $7 + local.get $2 + i32.lt_s + if + local.get $8 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $7 + local.get $9 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|00 + end + end + local.get $0 + local.get $5 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/typedarray/Float32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6848 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 7388 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 504 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 3372 i32.load local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31186,14 +35158,16 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 505 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 426 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) (local $5 f64) (local $6 f64) local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $4 local.get $1 i32.load offset=12 @@ -31252,7 +35226,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 506 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31261,7 +35235,9 @@ i32.const 3 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31310,16 +35286,20 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 507 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 428 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 6 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31338,7 +35318,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -31347,11 +35329,11 @@ local.get $1 i32.lt_s if + local.get $2 local.get $0 i32.const 3 i32.shl local.tee $4 - local.get $2 i32.add local.get $3 local.get $4 @@ -31367,66 +35349,19 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 508 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 429 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $3 - i32.add - i32.load8_u - f64.convert_i32_u - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 509 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.const 1 + i32.shr_u i32.const 4 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31445,7 +35380,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int16Array#get:length + i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -31475,7 +35412,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 510 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 430 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31484,7 +35421,9 @@ i32.const 7 i32.add local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31531,7 +35470,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 511 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 431 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31540,8 +35479,19 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 i32.const 0 i64.const 7 @@ -31554,8 +35504,16 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 4 - call $~lib/typedarray/Uint8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 100 @@ -31572,8 +35530,16 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int16Array#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -31586,8 +35552,16 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 10 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 call $~lib/typedarray/Float64Array#set<~lib/array/Array> local.get $0 @@ -31597,7 +35571,7 @@ i32.const 6912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> local.get $0 call $~lib/typedarray/Float64Array#set<~lib/array/Array> @@ -31608,7 +35582,7 @@ i32.const 7056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $7 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> local.get $0 local.get $2 @@ -31620,52 +35594,14 @@ i32.const 7152 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.get $1 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7248 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $7 - 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 $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 512 ;) (param $0 i32) (param $1 i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) local.get $1 - call $~lib/typedarray/Int32Array#get:length - i32.const 1 - i32.add + i32.load offset=8 local.get $0 i32.load offset=8 + i32.const 3 + i32.shr_u i32.gt_s if i32.const 368 @@ -31677,61 +35613,205 @@ end local.get $0 i32.load offset=4 - i32.const 1 - i32.add - local.set $3 + local.set $9 local.get $1 i32.load offset=4 - local.set $4 + local.set $10 local.get $1 - call $~lib/typedarray/Int32Array#get:length - local.set $1 - i32.const 0 - local.set $0 + i32.load offset=8 + local.set $4 loop $for-loop|0 - local.get $0 - local.get $1 + local.get $5 + local.get $4 i32.lt_s if - local.get $0 - local.get $3 - i32.add - local.get $4 - local.get $0 - i32.const 2 + local.get $9 + local.get $5 + i32.const 3 i32.shl i32.add - f32.load - local.tee $2 - local.get $2 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $2 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $0 + local.get $5 + local.get $10 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0 end end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 513 ;) (param $0 i32) (param $1 i32) + local.get $0 + local.get $3 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/typedarray/Float64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 432 ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + local.set $3 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $3 + i32.add + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $2 + local.get $2 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $2 + 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|0 + end + end + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 433 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 8 i32.add local.get $0 @@ -31754,7 +35834,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 i32.const 0 local.set $0 @@ -31794,12 +35876,14 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 514 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 434 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.get $0 i32.load offset=8 i32.gt_s @@ -31818,7 +35902,9 @@ i32.load offset=4 local.set $3 local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -31851,7 +35937,7 @@ end end ) - (func $start:std/typedarray (; 515 ;) + (func $start:std/typedarray (; 435 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31878,12 +35964,22 @@ (local $23 i32) (local $24 i32) (local $25 i32) + (local $26 f64) + (local $27 f32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 call $std/typedarray/testInstantiate + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -31897,7 +35993,9 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -31909,7 +36007,10 @@ unreachable end local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $0 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -31975,9 +36076,18 @@ call $~lib/typedarray/Int32Array#subarray local.set $1 local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.ne if @@ -31989,7 +36099,10 @@ unreachable end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.const 4 i32.ne if @@ -32026,9 +36139,24 @@ unreachable end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 8 - call $~lib/typedarray/Float64Array#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 f64.const 1 @@ -32067,9 +36195,18 @@ call $~lib/typedarray/Float64Array#subarray local.set $0 local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 - call $~lib/typedarray/Int64Array#get:length + i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 4 i32.ne if @@ -32081,7 +36218,10 @@ unreachable end local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 16 i32.ne if @@ -32108,7 +36248,17 @@ global.set $~argumentsLength local.get $0 call $~lib/typedarray/Float64Array#sort - call $~lib/rt/pure/__release + local.tee $1 + local.set $2 + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -32151,9 +36301,24 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const -32 @@ -32204,9 +36369,24 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -32232,7 +36412,15 @@ i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -32256,7 +36444,15 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -32280,7 +36476,15 @@ i32.const 0 i32.const -3 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -32304,7 +36508,15 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -32328,7 +36540,15 @@ i32.const 1 i32.const 0 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 0 @@ -32336,7 +36556,7 @@ i32.const 672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -32356,7 +36576,15 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.tee $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 i32.load offset=8 i32.const 3 @@ -32370,7 +36598,10 @@ unreachable end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.const 1 i32.ne if @@ -32400,7 +36631,7 @@ i32.const 704 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -32430,25 +36661,96 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -32474,7 +36776,15 @@ i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -32498,7 +36808,15 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -32522,7 +36840,15 @@ i32.const 0 i32.const -3 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -32546,7 +36872,15 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -32570,7 +36904,15 @@ i32.const 1 i32.const 0 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $0 i32.const 5 i32.const 2 @@ -32578,7 +36920,7 @@ i32.const 960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -32598,9 +36940,19 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.tee $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -32612,7 +36964,10 @@ unreachable end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.const 4 i32.ne if @@ -32642,7 +36997,7 @@ i32.const 1008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -32672,25 +37027,96 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 6 - call $~lib/typedarray/Int8Array#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -32745,7 +37171,10 @@ unreachable end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub i32.const 1 i32.ne if @@ -32798,7 +37227,10 @@ unreachable end local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $2 + i32.load + i32.sub i32.const 2 i32.ne if @@ -32851,7 +37283,10 @@ unreachable end local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $3 + i32.load + i32.sub i32.const 3 i32.ne if @@ -32875,15 +37310,51 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.const 1 @@ -32936,9 +37407,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice + local.set $0 local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 i32.const 1 i32.const 3 i32.const 2147483647 @@ -32950,7 +37429,7 @@ i32.const 1136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -32965,14 +37444,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 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 15 @@ -32994,9 +37480,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 @@ -33023,9 +37516,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const 3 i32.const 4 @@ -33052,9 +37552,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 3 i32.const 4 @@ -33081,9 +37588,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 1 i32.const 2 i32.const 4 @@ -33110,9 +37624,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const -2 i32.const 2147483647 @@ -33139,9 +37660,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const 0 i32.const -2 i32.const -1 @@ -33168,9 +37696,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -2 @@ -33197,9 +37732,16 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.tee $0 i32.const -4 i32.const -3 i32.const -1 @@ -33226,15 +37768,22 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $1 + local.tee $0 i32.const 5 i32.const 2 i32.const 15 @@ -33252,60 +37801,250 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $3 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $4 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $7 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $8 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $9 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $10 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $11 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $11 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $12 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $12 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $13 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $13 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $14 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $14 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $15 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $15 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $16 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $16 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $17 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $17 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $18 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $18 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $19 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $19 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $20 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $20 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $21 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $21 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $22 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $22 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $23 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $23 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $24 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $24 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $25 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $25 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain i32.const 5 - call $~lib/typedarray/Int32Array#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 i32.const 0 i32.const 1 @@ -33331,7 +38070,9 @@ i32.const 4 call $~lib/typedarray/Int32Array#subarray local.tee $2 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -33343,7 +38084,10 @@ unreachable end local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $2 + i32.load + i32.sub i32.const 4 i32.ne if @@ -33397,7 +38141,9 @@ unreachable end local.get $1 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 2 i32.ne if @@ -33409,7 +38155,10 @@ unreachable end local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -33448,7 +38197,9 @@ unreachable end local.get $3 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.ne if @@ -33460,7 +38211,10 @@ unreachable end local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $3 + i32.load + i32.sub if i32.const 0 i32.const 304 @@ -33497,9 +38251,13 @@ unreachable end local.get $4 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u local.get $0 - call $~lib/typedarray/Int32Array#get:length + i32.load offset=8 + i32.const 2 + i32.shr_u i32.ne if i32.const 0 @@ -33510,9 +38268,15 @@ unreachable end local.get $4 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $4 + i32.load + i32.sub local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.ne if i32.const 0 @@ -33536,409 +38300,1167 @@ unreachable end local.get $0 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $2 - call $~lib/rt/pure/__release + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - 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> - call $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> - 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 $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.const 7388 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 607 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $0 - call $~lib/typedarray/Float64Array#includes - i32.const 0 - i32.ne - i32.const 1 - i32.ne + local.get $3 + i32.const 7388 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 608 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + local.get $4 + i32.const 7388 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 613 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - local.get $1 - call $~lib/typedarray/Float32Array#includes + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 i32.const 0 - i32.ne i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/typedarray/Uint8Array#__set local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + i32.const 1 i32.const 2 - global.set $~argumentsLength + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $1 - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - if + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + block $folding-inner1 + block $folding-inner0 + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + 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> + call $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> + 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> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $0 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $26 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $26 + local.get $26 + f64.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 608 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $2 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + if (result i32) + i32.const 0 + local.get $4 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $1 + i32.load offset=4 + local.set $7 + loop $while-continue|05 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $7 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $27 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $27 + local.get $27 + f32.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|05 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + 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|trampoline + local.tee $2 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 691 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $0 + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + 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> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 10 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#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 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#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 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#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 21 + i32.const 7344 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#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 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#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 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 21 + i32.const 7376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end i32.const 0 i32.const 304 - i32.const 695 + i32.const 323 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - 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 304 + i32.const 344 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 21 - i32.const 7344 - call $~lib/rt/__allocArray - 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 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 21 - i32.const 7376 - call $~lib/rt/__allocArray - 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 + call $~lib/builtins/abort + unreachable ) - (func $~start (; 516 ;) + (func $~start (; 436 ;) global.get $~started if return @@ -33948,7 +39470,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 517 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 437 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -33975,10 +39497,35 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$default + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 7388 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + end local.get $2 i32.const -2147483648 i32.and @@ -34016,35 +39563,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 518 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - 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 $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$default - end - return - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 7388 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - end - ) ) diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 0202f18225..a1608ea03e 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -60,27 +60,7 @@ end i32.const 0 ) - (func $switch/doSwitchBreakCase (; 3 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.ne - if - i32.const 2 - return - end - i32.const 1 - ) - (func $switch/doSwitchBreakDefault (; 4 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 1 - i32.eq - if - i32.const 1 - return - end - i32.const 2 - ) - (func $start:switch (; 5 ;) + (func $start:switch (; 3 ;) i32.const 0 call $switch/doSwitch if @@ -249,152 +229,8 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 51 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakCase - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 52 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 53 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 62 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakDefault - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 63 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 64 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 73 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakCase - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 74 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakCase - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 75 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 84 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $switch/doSwitchBreakDefault - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 85 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $switch/doSwitchBreakDefault - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 86 - i32.const 0 - call $~lib/builtins/abort - unreachable - end ) - (func $~start (; 6 ;) + (func $~start (; 4 ;) call $start:switch ) ) diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 95ef342a17..e769cfa3ae 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,9 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result 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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -22,15 +20,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String#get:length (; 1 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/string/compareImpl (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -106,7 +96,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -123,10 +113,18 @@ select br_if $folding-inner0 local.get $0 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - call $~lib/string/String#get:length + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u i32.ne br_if $folding-inner0 local.get $0 @@ -138,18 +136,26 @@ end i32.const 0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 4 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -160,7 +166,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -179,18 +185,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 5 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -205,9 +200,9 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $start:typeof (; 6 ;) + (func $start:typeof (; 4 ;) i32.const 64 i32.const 64 call $~lib/string/String.__eq @@ -491,7 +486,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 5 ;) global.get $~started if return diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 8c300ec39a..2b13930dcb 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -2,10 +2,10 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (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_=>_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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,49 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $while/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNested (; 6 ;) + (func $while/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -152,154 +110,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testEmpty (; 7 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 1 - local.set $0 - loop $while-continue|0 - local.get $0 - local.tee $2 - i32.const 1 - i32.sub - local.set $0 - local.get $2 - if (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $1 - else - i32.const 0 - end - br_if $while-continue|0 - end - local.get $0 - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 45 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 46 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testAlwaysTrue (; 8 ;) - (local $0 i32) - loop $while-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $while-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 58 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testContinue (; 9 ;) - (local $0 i32) - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 108 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNestedContinue (; 10 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - i32.const 10 - local.set $1 - loop $while-continue|0 - local.get $0 - if - loop $while-continue|1 - local.get $1 - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|1 - end - end - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 32 - i32.const 127 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -465,7 +276,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -748,7 +559,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -862,7 +673,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -949,7 +760,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1006,54 +817,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1114,8 +878,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1139,8 +904,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -1188,80 +994,66 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $while/Ref#constructor (; 20 ;) (result i32) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 i32.const 208 i32.gt_u if local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) - local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $while/testRef (; 22 ;) + (func $while/testRef (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $while-continue|0 local.get $0 @@ -1278,13 +1070,31 @@ local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end else - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $2 local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end local.get $2 local.set $0 @@ -1314,19 +1124,44 @@ i32.const 1 global.set $while/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $while/testRefAutorelease (; 23 ;) + (func $while/testRefAutorelease (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $while/Ref#constructor + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.set $0 loop $while-continue|0 block $while-break|0 - call $while/Ref#constructor + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain local.tee $1 - call $~lib/rt/pure/__release + local.set $3 + local.get $1 + i32.const 208 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $1 if local.get $2 @@ -1341,7 +1176,14 @@ local.get $0 if local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end end i32.const 0 local.set $0 @@ -1374,22 +1216,59 @@ i32.const 1 global.set $while/ran local.get $0 - call $~lib/rt/pure/__release + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $start:while (; 24 ;) + (func $start:while (; 16 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $while/ran - call $while/testSimple - global.get $while/ran - i32.eqz + i32.const 10 + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 16 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran call $while/testNested @@ -1405,30 +1284,75 @@ end i32.const 0 global.set $while/ran - call $while/testEmpty - global.get $while/ran - i32.eqz + i32.const 1 + local.set $0 + loop $while-continue|00 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + if (result i32) + local.get $2 + i32.const 1 + i32.add + local.tee $2 + else + i32.const 0 + end + br_if $while-continue|00 + end + local.get $0 + i32.const -1 + i32.ne if i32.const 0 i32.const 32 - i32.const 51 + i32.const 45 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 46 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran - call $while/testAlwaysTrue - global.get $while/ran - i32.eqz + i32.const 0 + local.set $0 + loop $while-continue|01 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $while-continue|01 + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 63 - i32.const 0 + i32.const 58 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran i32.const 1 @@ -1443,30 +1367,75 @@ global.set $while/ran i32.const 0 global.set $while/ran - call $while/testContinue - global.get $while/ran - i32.eqz + i32.const 10 + local.set $0 + loop $while-continue|02 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|02 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 113 - i32.const 0 + i32.const 108 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran - call $while/testNestedContinue - global.get $while/ran - i32.eqz + i32.const 10 + local.set $0 + i32.const 10 + local.set $1 + loop $while-continue|03 + local.get $0 + if + loop $while-continue|1 + local.get $1 + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|1 + end + end + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|03 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 132 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if i32.const 0 + i32.const 32 + i32.const 127 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran call $while/testRef @@ -1494,7 +1463,7 @@ unreachable end ) - (func $~start (; 25 ;) + (func $~start (; 17 ;) global.get $~started if return @@ -1504,7 +1473,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1531,10 +1500,36 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 208 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -1580,34 +1575,4 @@ i32.store offset=4 end ) - (func $~lib/rt/__visit_members (; 27 ;) (param $0 i32) - block $switch$1$default - 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$2 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 208 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - return - end - unreachable - ) ) From bc03e645be8408ce5a99ff746575845cf51bab49 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 14:20:38 +0200 Subject: [PATCH 02/51] more --- cli/asc.js | 16 +- tests/compiler/call-super.optimized.wat | 16 +- tests/compiler/do.optimized.wat | 148 +- .../extends-baseaggregate.optimized.wat | 404 +- tests/compiler/for.optimized.wat | 148 +- tests/compiler/getter-call.optimized.wat | 15 +- .../implicit-getter-setter.optimized.wat | 147 +- tests/compiler/issues/1095.optimized.wat | 163 +- tests/compiler/managed-cast.optimized.wat | 135 +- tests/compiler/number.optimized.wat | 391 +- tests/compiler/rc/local-init.optimized.wat | 159 +- .../rc/logical-and-mismatch.optimized.wat | 144 +- .../rc/logical-or-mismatch.optimized.wat | 144 +- tests/compiler/rc/optimize.optimized.wat | 143 +- tests/compiler/rc/rereturn.optimized.wat | 139 +- .../rc/ternary-mismatch.optimized.wat | 148 +- tests/compiler/resolve-access.optimized.wat | 116 +- .../resolve-function-expression.optimized.wat | 7 +- tests/compiler/resolve-new.optimized.wat | 6 +- tests/compiler/resolve-ternary.optimized.wat | 163 +- tests/compiler/retain-i32.optimized.wat | 5 +- .../retain-release-sanity.optimized.wat | 415 +- tests/compiler/retain-return.optimized.wat | 146 +- tests/compiler/runtime-full.optimized.wat | 137 +- .../compiler/std/array-literal.optimized.wat | 139 +- tests/compiler/std/array.optimized.wat | 3071 ++--- tests/compiler/std/arraybuffer.optimized.wat | 145 +- tests/compiler/std/dataview.optimized.wat | 344 +- tests/compiler/std/date.optimized.wat | 50 +- tests/compiler/std/libm.optimized.wat | 429 +- tests/compiler/std/map.optimized.wat | 2372 ++-- tests/compiler/std/math.optimized.wat | 9466 +++++++++++--- tests/compiler/std/mod.optimized.wat | 921 +- tests/compiler/std/new.optimized.wat | 46 +- .../compiler/std/object-literal.optimized.wat | 47 +- .../std/operator-overloading.optimized.wat | 97 +- tests/compiler/std/set.optimized.wat | 513 +- tests/compiler/std/staticarray.optimized.wat | 137 +- .../std/string-casemapping.optimized.wat | 190 +- .../std/string-encoding.optimized.wat | 239 +- tests/compiler/std/string.optimized.wat | 336 +- tests/compiler/std/symbol.optimized.wat | 96 +- tests/compiler/std/typedarray.optimized.wat | 10500 +++++++--------- tests/compiler/typeof.optimized.wat | 119 +- tests/compiler/while.optimized.wat | 148 +- 45 files changed, 19707 insertions(+), 13153 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 8a56263d65..584db5351e 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -643,18 +643,14 @@ exports.main = function main(argv, options, callback) { const passes = []; function add(pass) { passes.push(pass); } - // console.log('AlwaysInlineMaxSize: ' + module.getAlwaysInlineMaxSize()); - // console.log('FlexibleInlineMaxSize: ' + module.getFlexibleInlineMaxSize()); - // console.log('OneCallerInlineMaxSize: ' + module.getOneCallerInlineMaxSize()); - + // enchance options for inline passes if (optimizeLevel >= 2 && shrinkLevel < 2) { - module.setAlwaysInlineMaxSize(10); - module.setFlexibleInlineMaxSize(50); - module.setOneCallerInlineMaxSize(50); + module.setAlwaysInlineMaxSize(12); + module.setFlexibleInlineMaxSize(60); + module.setOneCallerInlineMaxSize(60); } else { - // tune defaults - module.setAlwaysInlineMaxSize(5); // default: 2 - module.setFlexibleInlineMaxSize(30); // default: 20 + module.setAlwaysInlineMaxSize(5); // default: 2 + module.setFlexibleInlineMaxSize(30); // default: 20 module.setOneCallerInlineMaxSize(30); // default: 15 } diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 0b743e0505..2eacf03083 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,7 +1,6 @@ (module (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -94,8 +93,12 @@ i32.store offset=12 local.get $4 ) - (func $call-super/B#constructor (; 2 ;) (result i32) + (func $~start (; 2 ;) (local $0 i32) + i32.const 64 + global.set $~lib/rt/stub/startOffset + i32.const 64 + global.set $~lib/rt/stub/offset i32.const 8 i32.const 3 call $~lib/rt/stub/__alloc @@ -150,15 +153,6 @@ unreachable end local.get $0 - ) - (func $~start (; 3 ;) - (local $0 i32) - i32.const 64 - global.set $~lib/rt/stub/startOffset - i32.const 64 - global.set $~lib/rt/stub/offset - call $call-super/B#constructor - local.tee $0 i32.load i32.const 1 i32.ne diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index f813930526..705882b67d 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,8 +1,8 @@ (module (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_=>_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))) @@ -812,70 +812,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -900,11 +840,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -917,16 +857,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -935,7 +875,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -982,14 +922,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1040,7 +1034,7 @@ end local.get $0 ) - (func $do/testRef (; 14 ;) + (func $do/testRef (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1125,7 +1119,7 @@ call $~lib/rt/pure/decrement end ) - (func $do/testRefAutorelease (; 15 ;) + (func $do/testRefAutorelease (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1215,7 +1209,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:do (; 16 ;) + (func $start:do (; 15 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -1435,7 +1429,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1445,7 +1439,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 6d684d684a..c74a879ce7 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -835,69 +835,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -973,9 +911,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1004,9 +943,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1054,7 +1049,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1103,7 +1098,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1145,7 +1140,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1318,7 +1313,7 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1424,7 +1419,7 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1635,19 +1630,58 @@ end end ) - (func $~lib/array/ensureSize (; 15 ;) (param $0 i32) + (func $start:extends-baseaggregate (; 14 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 20 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + call $~lib/rt/tlsf/maybeInitialize + i32.const 20 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + 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 + i32.const 108 + i32.load + local.tee $6 + i32.const 1 + i32.add + local.tee $3 + local.set $1 + local.get $3 i32.const 104 i32.load - local.tee $1 + local.tee $4 i32.const 2 i32.shr_u i32.gt_u if - local.get $0 + local.get $1 i32.const 268435452 i32.gt_u if @@ -1660,82 +1694,42 @@ end i32.const 96 i32.load - local.set $2 - local.get $1 + local.set $5 + local.get $4 call $~lib/rt/tlsf/maybeInitialize - local.get $2 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $3 + local.tee $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $2 i32.add - local.get $3 local.get $1 + local.get $4 i32.sub call $~lib/memory/memory.fill - local.get $0 local.get $2 + local.get $5 i32.ne if i32.const 96 - local.get $0 + local.get $2 i32.store i32.const 100 - local.get $0 + local.get $2 i32.store end i32.const 104 - local.get $3 + local.get $1 i32.store end - ) - (func $~start (; 16 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 20 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - call $~lib/rt/tlsf/maybeInitialize - i32.const 20 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - 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 - i32.const 108 - i32.load - local.tee $1 - i32.const 1 - i32.add - local.tee $2 - call $~lib/array/ensureSize i32.const 100 i32.load - local.get $1 + local.get $6 i32.const 2 i32.shl i32.add @@ -1743,7 +1737,7 @@ call $~lib/rt/pure/__retain i32.store i32.const 108 - local.get $2 + local.get $3 i32.store local.get $0 i32.const 556 @@ -1755,7 +1749,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/markGray (; 17 ;) (param $0 i32) + (func $~start (; 15 ;) + call $start:extends-baseaggregate + ) + (func $~lib/rt/pure/markGray (; 16 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1779,20 +1776,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 18 ;) (param $0 i32) - local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members - ) - (func $~lib/rt/pure/scan (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 17 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1809,7 +1793,16 @@ i32.gt_u if local.get $0 - call $~lib/rt/pure/scanBlack + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members else local.get $0 local.get $1 @@ -1826,7 +1819,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 18 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1865,7 +1858,7 @@ call $~lib/rt/tlsf/insertBlock end ) - (func $~lib/rt/pure/__collect (; 21 ;) + (func $~lib/rt/pure/__collect (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1992,65 +1985,12 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 22 ;) - (local $0 i32) + (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 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.set $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $3 - i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $0 - local.get $2 - call $~lib/memory/memory.copy - local.get $0 - if - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.tee $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - call $~lib/rt/tlsf/insertBlock - 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 $3 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $5 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2158,7 +2098,54 @@ 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.set $4 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + local.tee $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $1 + call $~lib/rt/tlsf/insertBlock + 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 $4 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -2173,7 +2160,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 21 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2260,7 +2247,16 @@ i32.and if local.get $0 - call $~lib/rt/pure/scanBlack + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members end br $break|0 end @@ -2276,7 +2272,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 22 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2309,7 +2305,7 @@ end end ) - (func $~lib/rt/__visit_members (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 23 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2d37572462..e27b2a7902 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,8 +1,8 @@ (module (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_=>_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))) @@ -809,70 +809,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -897,11 +837,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -914,16 +854,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -932,7 +872,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -979,14 +919,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1037,7 +1031,7 @@ end local.get $0 ) - (func $for/testRef (; 14 ;) + (func $for/testRef (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1125,7 +1119,7 @@ call $~lib/rt/pure/decrement end ) - (func $for/testRefAutorelease (; 15 ;) + (func $for/testRefAutorelease (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1247,7 +1241,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:for (; 16 ;) + (func $start:for (; 15 ;) (local $0 i32) i32.const 0 global.set $for/ran @@ -1490,7 +1484,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1500,7 +1494,7 @@ end call $start:for ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 31848c9a8a..580033e382 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -10,7 +10,11 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) + (func $~setArgumentsLength (; 0 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 1 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -74,18 +78,11 @@ local.get $0 i32.const 0 i32.store offset=12 - ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 2 ;) (result i32) - call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 ) - (func $~start (; 3 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 5edae5728e..fa51e9e2f9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -818,69 +818,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -956,9 +894,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1006,9 +945,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1058,7 +1053,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1066,7 +1061,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1117,7 +1112,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1128,7 +1123,7 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 15 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1146,16 +1141,16 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 17 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1174,12 +1169,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 20 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1204,10 +1199,10 @@ local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 22 ;) + (func $~lib/rt/pure/__collect (; 21 ;) nop ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index ea425e6c9e..a8b32c2517 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_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))) @@ -728,70 +728,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -816,11 +756,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -833,16 +773,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -851,7 +791,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -898,14 +838,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -956,7 +950,7 @@ end local.get $0 ) - (func $start:issues/1095 (; 13 ;) + (func $~start (; 12 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -969,10 +963,8 @@ i32.const 192 i32.store local.get $0 - local.set $1 - local.get $0 i32.load - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -982,27 +974,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $1 + local.get $0 i32.load - local.tee $1 + local.tee $2 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $2 i32.const 252 i32.gt_u if - local.get $1 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 i32.const 252 @@ -1014,10 +1006,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 14 ;) - call $start:issues/1095 - ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 912d6e4fd9..de52ebd43e 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -730,68 +730,7 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) global.get $~lib/rt/tlsf/collectLock @@ -900,14 +839,68 @@ local.get $0 local.get $2 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $1 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $2 + local.get $1 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $2 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + else + local.get $2 + local.get $1 + i32.const -2 + i32.and + i32.store + local.get $2 + i32.const 16 + i32.add + local.tee $0 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $2 call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -958,7 +951,7 @@ end local.get $0 ) - (func $managed-cast/Cat#constructor (; 13 ;) (result i32) + (func $managed-cast/Cat#constructor (; 12 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 3 @@ -978,7 +971,7 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/__instanceof (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/__instanceof (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1008,7 +1001,7 @@ end i32.const 0 ) - (func $start:managed-cast (; 15 ;) + (func $start:managed-cast (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1164,7 +1157,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) global.get $~started if return @@ -1174,7 +1167,7 @@ end call $start:managed-cast ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index a85d53c769..331b57e9f7 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -5,10 +5,7 @@ (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_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) - (type $f32_=>_i32 (func (param f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\000") @@ -1374,94 +1371,10 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/util/number/dtoa (; 12 ;) (result i32) + (func $start:number (; 12 ;) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 56 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 1280 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1280 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $2 - i32.load - i32.add - i32.eq - if - local.get $2 - global.set $~lib/rt/stub/offset - end - ) - (func $~lib/number/F32.isInteger (; 13 ;) (param $0 f32) (result i32) - local.get $0 - f32.trunc - local.get $0 - f32.eq - i32.const 0 - local.get $0 - local.get $0 - f32.sub - f32.const 0 - f32.eq - select - ) - (func $~lib/number/F64.isInteger (; 14 ;) (param $0 f64) (result i32) - local.get $0 - f64.trunc - local.get $0 - f64.eq - i32.const 0 - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.eq - select - ) - (func $start:number (; 15 ;) - (local $0 i32) i32.const 1536 global.set $~lib/rt/stub/startOffset i32.const 1536 @@ -1479,7 +1392,61 @@ call $~lib/builtins/abort unreachable end - call $~lib/util/number/dtoa + i32.const 56 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.ne + if + local.get $0 + local.get $1 + call $~lib/string/String#substring + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 1280 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1280 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $2 + i32.load + i32.add + i32.eq + if + local.get $2 + global.set $~lib/rt/stub/offset + end + local.set $0 + end + local.get $0 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -1624,252 +1591,8 @@ call $~lib/builtins/abort unreachable end - f32.const 0 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 34 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -0 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 35 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const nan:0x400000 - call $~lib/number/F32.isInteger - if - i32.const 0 - i32.const 96 - i32.const 36 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const inf - call $~lib/number/F32.isInteger - if - i32.const 0 - i32.const 96 - i32.const 37 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 1.1920928955078125e-07 - call $~lib/number/F32.isInteger - if - i32.const 0 - i32.const 96 - i32.const 38 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 1 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 39 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -1 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 40 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -16777215 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 41 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 16777215 - call $~lib/number/F32.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 42 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const 0.5 - call $~lib/number/F32.isInteger - if - i32.const 0 - i32.const 96 - i32.const 43 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f32.const -1.5 - call $~lib/number/F32.isInteger - if - i32.const 0 - i32.const 96 - i32.const 44 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 0 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 57 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -0 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 58 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const nan:0x8000000000000 - call $~lib/number/F64.isInteger - if - i32.const 0 - i32.const 96 - i32.const 59 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const inf - call $~lib/number/F64.isInteger - if - i32.const 0 - i32.const 96 - i32.const 60 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 2.220446049250313e-16 - call $~lib/number/F64.isInteger - if - i32.const 0 - i32.const 96 - i32.const 61 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 1 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 62 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -1 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 63 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -9007199254740991 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 64 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 9007199254740991 - call $~lib/number/F64.isInteger - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 96 - i32.const 65 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const 0.5 - call $~lib/number/F64.isInteger - if - i32.const 0 - i32.const 96 - i32.const 66 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - f64.const -1.5 - call $~lib/number/F64.isInteger - if - i32.const 0 - i32.const 96 - i32.const 67 - i32.const 0 - call $~lib/builtins/abort - unreachable - end ) - (func $~start (; 16 ;) + (func $~start (; 13 ;) call $start:number ) ) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 5eab61bfae..741bc01de0 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,11 +1,11 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $rc/local-init/Ref#constructor (; 12 ;) (result i32) + (func $~start (; 11 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -912,14 +906,14 @@ call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $1 + local.tee $0 i32.const 192 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub - local.tee $0 + local.tee $1 i32.load offset=4 local.tee $2 i32.const -268435456 @@ -938,14 +932,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/rtrace/onincrement - local.get $0 + local.get $1 i32.load i32.const 1 i32.and @@ -958,12 +952,7 @@ unreachable end end - local.get $1 - ) - (func $~start (; 13 ;) - (local $0 i32) - call $rc/local-init/Ref#constructor - local.tee $0 + local.get $0 i32.const 192 i32.gt_u if @@ -973,7 +962,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index b4a932cf46..9b04be60b0 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_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_i32 (func (result i32))) @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,7 +949,7 @@ end local.get $0 ) - (func $start:rc/logical-and-mismatch (; 13 ;) + (func $start:rc/logical-and-mismatch (; 12 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -1056,10 +1050,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 14 ;) + (func $~start (; 13 ;) call $start:rc/logical-and-mismatch ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 6883dce343..84cf34344e 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_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_i32 (func (result i32))) @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,7 +949,7 @@ end local.get $0 ) - (func $start:rc/logical-or-mismatch (; 13 ;) + (func $start:rc/logical-or-mismatch (; 12 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -1058,10 +1052,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 14 ;) + (func $~start (; 13 ;) call $start:rc/logical-or-mismatch ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index cdd37612a9..302613c842 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -892,69 +892,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1030,9 +968,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1080,9 +1019,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1132,7 +1127,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $rc/optimize/getRef (; 18 ;) (result i32) + (func $rc/optimize/getRef (; 17 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 3 @@ -1141,7 +1136,7 @@ i32.add call $~lib/rt/pure/__retain ) - (func $rc/optimize/eliminated_rr (; 19 ;) (param $0 i32) (result i32) + (func $rc/optimize/eliminated_rr (; 18 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 3 @@ -1150,7 +1145,7 @@ i32.add call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1162,7 +1157,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 21 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 20 ;) (param $0 i32) (param $1 i32) local.get $1 if local.get $0 @@ -1179,7 +1174,7 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 21 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1199,7 +1194,7 @@ end i32.const 0 ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation (; 23 ;) + (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation (; 22 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 1 @@ -1218,12 +1213,12 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 24 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 23 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 25 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 24 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1234,7 +1229,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 952e92f983..f77c215f6e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,7 +1,7 @@ (module - (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 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -805,69 +805,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -943,9 +881,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -993,9 +932,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1043,7 +1038,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1051,7 +1046,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1100,7 +1095,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1111,7 +1106,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -1133,10 +1128,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 13 ;) + (func $~lib/rt/pure/__collect (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 12265c6657..1dcae470fb 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 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))) (type $none_=>_i32 (func (result i32))) @@ -729,70 +729,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -817,11 +757,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -834,16 +774,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -852,7 +792,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -899,14 +839,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -957,7 +951,7 @@ end local.get $0 ) - (func $rc/ternary-mismatch/test1 (; 13 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test1 (; 12 ;) (param $0 i32) (result i32) local.get $0 if (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -970,7 +964,7 @@ call $~lib/rt/pure/__retain end ) - (func $rc/ternary-mismatch/test2 (; 14 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test2 (; 13 ;) (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef @@ -983,7 +977,7 @@ call $~lib/rt/pure/__retain end ) - (func $start:rc/ternary-mismatch (; 15 ;) + (func $start:rc/ternary-mismatch (; 14 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -1052,10 +1046,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) call $start:rc/ternary-mismatch ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 94b9e5f084..fa780a3b49 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,12 +1,12 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (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 $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\08\00\00\00\01\00\00\00\00\00\00\00\08\00\00\00\01") @@ -347,60 +347,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/decimalCount64 (; 5 ;) (param $0 i64) (result i32) - i32.const 10 - i32.const 11 - i32.const 12 - local.get $0 - i64.const 100000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 - local.get $0 - i64.const 100000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - i32.const 16 - i32.const 17 - local.get $0 - i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 - local.get $0 - i64.const -8446744073709551616 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000000 - i64.lt_u - select - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa64 (; 6 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 5 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -429,8 +376,57 @@ local.get $1 call $~lib/util/number/utoa_simple else + i32.const 10 + i32.const 11 + i32.const 12 + local.get $0 + i64.const 100000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000 + i64.lt_u + select + i32.const 13 + i32.const 14 + i32.const 15 + local.get $0 + i64.const 100000000000000 + i64.lt_u + select local.get $0 - call $~lib/util/number/decimalCount64 + i64.const 10000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + i32.const 16 + i32.const 17 + local.get $0 + i64.const 10000000000000000 + i64.lt_u + select + i32.const 18 + i32.const 19 + i32.const 20 + local.get $0 + i64.const -8446744073709551616 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000000 + i64.lt_u + select + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select local.tee $1 i32.const 1 i32.shl @@ -465,7 +461,7 @@ end local.get $3 ) - (func $resolve-access/arrayAccess (; 7 ;) (result i32) + (func $resolve-access/arrayAccess (; 6 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -506,7 +502,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/fieldAccess (; 8 ;) (result i32) + (func $resolve-access/fieldAccess (; 7 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -521,7 +517,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/propertyAccess (; 9 ;) (result i32) + (func $resolve-access/propertyAccess (; 8 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -556,7 +552,7 @@ end local.get $0 ) - (func $~start (; 10 ;) + (func $~start (; 9 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index aaa21de00a..ed3f068dee 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.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_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -283,7 +283,7 @@ end i32.const 0 ) - (func $start:resolve-function-expression (; 5 ;) + (func $~start (; 5 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -342,7 +342,4 @@ unreachable end ) - (func $~start (; 6 ;) - call $start:resolve-function-expression - ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index e217064f83..86408cc663 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -7,7 +7,7 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (func $resolve-new/Foo#constructor (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -78,9 +78,9 @@ global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor global.set $resolve-new/foo - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor drop ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 5d9ac3ec23..92fcdd2df6 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -3,9 +3,9 @@ (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 $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 $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) @@ -826,69 +826,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -964,9 +902,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1014,9 +953,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1064,7 +1059,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1072,7 +1067,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1121,7 +1116,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1132,7 +1127,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 11 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1180,7 +1175,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1204,7 +1199,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/string/compareImpl (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1280,7 +1275,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1322,7 +1317,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 16 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 15 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1713,7 +1708,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1886,7 +1881,7 @@ end end ) - (func $~lib/util/number/prettify (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2131,7 +2126,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 19 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 18 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2269,7 +2264,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2350,7 +2345,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/dtoa (; 21 ;) (result i32) + (func $~lib/util/number/dtoa (; 20 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2422,11 +2417,11 @@ local.get $0 call $~lib/rt/tlsf/insertBlock ) - (func $~setArgumentsLength (; 22 ;) (param $0 i32) + (func $~setArgumentsLength (; 21 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-ternary (; 23 ;) + (func $start:resolve-ternary (; 22 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -2497,13 +2492,13 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 24 ;) + (func $~start (; 23 ;) call $start:resolve-ternary ) - (func $~lib/rt/pure/__collect (; 25 ;) + (func $~lib/rt/pure/__collect (; 24 ;) nop ) - (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index b27a25c7be..c765419766 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -7,7 +7,7 @@ (global $retain-i32/ri (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:retain-i32 (; 0 ;) + (func $~start (; 0 ;) (local $0 i32) i32.const -128 local.set $0 @@ -66,7 +66,4 @@ i32.load8_s drop ) - (func $~start (; 1 ;) - call $start:retain-i32 - ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 5d777f71b0..6721d62c61 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -842,69 +842,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -980,9 +918,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1011,9 +950,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1063,7 +1058,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1274,7 +1269,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1325,7 +1320,7 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1404,7 +1399,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 17 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1446,7 +1441,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1619,20 +1614,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 20 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1688,10 +1670,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1729,13 +1711,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/array/ensureSize (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 20 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1794,7 +1784,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 23 ;) (param $0 i32) + (func $~lib/array/Array#push (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1817,7 +1807,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1909,7 +1899,7 @@ end local.get $2 ) - (func $start:retain-release-sanity (; 25 ;) + (func $start:retain-release-sanity (; 23 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2275,10 +2265,10 @@ end call $~lib/rt/pure/__collect ) - (func $~start (; 26 ;) + (func $~start (; 24 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 25 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2302,20 +2292,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 28 ;) (param $0 i32) - local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members - ) - (func $~lib/rt/pure/scan (; 29 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 26 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2332,7 +2309,16 @@ i32.gt_u if local.get $0 - call $~lib/rt/pure/scanBlack + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members else local.get $0 local.get $1 @@ -2349,7 +2335,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 30 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 27 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2377,12 +2363,20 @@ i32.add i32.const 5 call $~lib/rt/__visit_members + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree end ) - (func $~lib/rt/pure/__collect (; 31 ;) + (func $~lib/rt/pure/__collect (; 28 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2391,26 +2385,26 @@ (local $5 i32) global.get $~lib/rt/pure/ROOTS local.tee $5 - local.tee $2 - local.set $3 + local.tee $3 + local.set $4 global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $3 + local.get $4 local.get $0 i32.lt_u if - local.get $3 + local.get $4 i32.load - local.tee $4 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $2 i32.const 1879048192 i32.and i32.const 805306368 i32.eq if (result i32) - local.get $1 + local.get $2 i32.const 268435455 i32.and i32.const 0 @@ -2419,51 +2413,59 @@ i32.const 0 end if - local.get $4 + local.get $1 call $~lib/rt/pure/markGray - local.get $2 - local.get $4 + local.get $3 + local.get $1 i32.store - local.get $2 + local.get $3 i32.const 4 i32.add - local.set $2 + local.set $3 else i32.const 0 - local.get $1 + local.get $2 i32.const 268435455 i32.and i32.eqz - local.get $1 + local.get $2 i32.const 1879048192 i32.and select if + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT - local.get $4 - call $~lib/rt/tlsf/freeBlock + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree else - local.get $4 local.get $1 + local.get $2 i32.const 2147483647 i32.and i32.store offset=4 end end - local.get $3 + local.get $4 i32.const 4 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 + local.get $3 global.set $~lib/rt/pure/CUR local.get $5 local.set $0 loop $for-loop|1 local.get $0 - local.get $2 + local.get $3 i32.lt_u if local.get $0 @@ -2480,18 +2482,18 @@ local.set $0 loop $for-loop|2 local.get $0 - local.get $2 + local.get $3 i32.lt_u if local.get $0 i32.load - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 i32.load offset=4 i32.const 2147483647 i32.and i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/collectWhite local.get $0 i32.const 4 @@ -2503,11 +2505,75 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/decrement (; 32 ;) (param $0 i32) + (func $~lib/rt/pure/growRoots (; 29 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 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.set $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onfree + local.get $1 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onalloc + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree + 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 $3 + i32.add + global.set $~lib/rt/pure/END + ) + (func $~lib/rt/pure/decrement (; 30 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2545,9 +2611,17 @@ i32.const -2147483648 i32.store offset=4 else + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree end else local.get $1 @@ -2611,55 +2685,7 @@ global.get $~lib/rt/pure/END i32.ge_u if - 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.set $4 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onfree - local.get $2 - local.get $1 - local.get $3 - call $~lib/memory/memory.copy - local.get $1 - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onalloc - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - 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 $4 - i32.add - global.set $~lib/rt/pure/END + call $~lib/rt/pure/growRoots global.get $~lib/rt/pure/CUR local.set $1 end @@ -2674,7 +2700,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 31 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2761,7 +2787,16 @@ i32.and if local.get $0 - call $~lib/rt/pure/scanBlack + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members end br $break|0 end @@ -2777,7 +2812,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 32 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2810,7 +2845,7 @@ end end ) - (func $~lib/rt/__visit_members (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 33 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 48beda5e07..2e1faeeae4 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,8 +1,8 @@ (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_=>_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))) @@ -726,70 +726,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -814,11 +754,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -831,16 +771,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -849,7 +789,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -896,12 +836,66 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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/__retain (; 8 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -950,11 +944,11 @@ end local.get $0 ) - (func $~setArgumentsLength (; 9 ;) (param $0 i32) + (func $~setArgumentsLength (; 8 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:retain-return (; 10 ;) + (func $start:retain-return (; 9 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -1267,7 +1261,7 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start (; 11 ;) + (func $~start (; 10 ;) global.get $~started if return @@ -1277,7 +1271,7 @@ end call $start:retain-return ) - (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 11 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index d9e1741d3f..5a73786eb5 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -804,69 +804,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -942,9 +880,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -992,9 +931,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1042,7 +1037,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1050,7 +1045,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1099,7 +1094,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1110,10 +1105,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 12 ;) + (func $~lib/rt/pure/__collect (; 11 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 7933c7242e..f56c3222a5 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result 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 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -856,69 +856,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -994,9 +932,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1044,9 +983,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1096,7 +1091,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1147,7 +1142,7 @@ end local.get $0 ) - (func $~lib/rt/__allocArray (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 16 @@ -1179,7 +1174,7 @@ i32.store offset=12 local.get $2 ) - (func $start:std/array-literal (; 17 ;) + (func $start:std/array-literal (; 16 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1603,10 +1598,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 18 ;) + (func $~start (; 17 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1717,7 +1712,7 @@ i32.store offset=4 end ) - (func $~lib/array/Array#__visit_impl (; 20 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 19 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index d26784f560..f6489609cc 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1,24 +1,23 @@ (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 $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 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_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_=>_i32 (func (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) - (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) @@ -1041,69 +1040,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1179,9 +1116,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1209,9 +1147,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1261,7 +1255,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1486,7 +1480,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1537,7 +1531,7 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1618,7 +1612,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 16 @@ -1638,21 +1632,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Ref#constructor (; 20 ;) (param $0 i32) (result i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1825,7 +1805,7 @@ end end ) - (func $~lib/rt/__allocArray (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1869,7 +1849,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1936,7 +1916,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 22 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1955,7 +1935,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2000,7 +1980,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2075,7 +2055,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2096,7 +2076,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2144,7 +2124,7 @@ end i32.const 1 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 27 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2186,20 +2166,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2255,10 +2222,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2296,13 +2263,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 29 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2362,7 +2337,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 30 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2385,7 +2360,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 34 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2415,7 +2390,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#concat (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 32 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2468,7 +2443,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2572,7 +2547,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 34 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2601,7 +2576,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#indexOf (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2661,7 +2636,7 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2751,7 +2726,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 37 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2842,7 +2817,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 38 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2884,7 +2859,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 42 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 39 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2962,7 +2937,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 40 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2984,7 +2959,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3021,15 +2996,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 46 ;) (param $0 i32) + (func $~setArgumentsLength (; 43 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3074,17 +3049,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3092,7 +3067,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3100,12 +3075,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 50 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3151,12 +3126,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3164,12 +3139,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3177,12 +3152,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 56 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3227,12 +3202,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3240,12 +3215,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3253,13 +3228,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 65 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3299,7 +3274,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3308,7 +3283,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3317,7 +3292,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3410,11 +3385,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#__get (; 70 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 67 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3435,7 +3410,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3445,7 +3420,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 72 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 69 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3504,14 +3479,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3521,12 +3496,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 76 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 73 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3582,7 +3557,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3594,7 +3569,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -3603,7 +3578,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3615,12 +3590,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3663,7 +3638,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -3671,7 +3646,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -3679,7 +3654,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3687,7 +3662,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3695,7 +3670,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3731,7 +3706,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 87 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 84 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -3752,7 +3727,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 88 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 85 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3784,91 +3759,108 @@ i32.shr_u i32.xor ) - (func $~lib/util/sort/insertionSort (; 89 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/insertionSort (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 f32) - (local $6 i32) + (local $6 f32) + (local $7 i32) loop $for-loop|0 - local.get $3 + local.get $4 local.get $1 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.set $4 - local.get $3 + local.set $5 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $5 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $4 local.get $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $6 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $2 - local.tee $6 + local.get $3 + local.tee $7 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 f32.store br $while-continue|1 end end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end ) - (func $~lib/util/sort/weakHeapSort (; 90 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/rt/tlsf/__free (; 87 ;) (param $0 i32) + (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/util/sort/weakHeapSort (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 f32) - (local $7 i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 @@ -3877,39 +3869,39 @@ i32.shr_s i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $5 + local.tee $6 i32.const 0 - local.get $2 + local.get $3 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|0 - local.get $3 + local.get $4 i32.const 0 i32.gt_s if - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 1 i32.and - local.get $5 - local.get $2 + local.get $6 + local.get $3 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $2 + local.get $3 i32.const 1 i32.shr_s i32.const 31 @@ -3919,92 +3911,93 @@ i32.and i32.eq if - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.set $2 + local.set $3 br $while-continue|1 end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.tee $2 + local.tee $3 i32.const 2 i32.shl i32.add f32.load - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 - local.get $3 - i32.const 5 + local.get $6 + local.get $4 + i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $7 - local.get $7 + local.tee $8 + local.get $8 i32.load i32.const 1 - local.get $3 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store local.get $0 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add - local.get $6 + local.get $7 f32.store end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|2 - local.get $3 + local.get $4 i32.const 2 i32.ge_s if local.get $0 f32.load - local.set $4 + local.set $5 local.get $0 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add @@ -4012,12 +4005,12 @@ f32.load f32.store local.get $1 - local.get $4 + local.get $5 f32.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s @@ -4035,11 +4028,11 @@ i32.const 1 i32.shl i32.add - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.set $1 br $while-continue|3 end @@ -4051,31 +4044,32 @@ if local.get $0 f32.load - local.set $4 + local.set $5 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 i32.load i32.const 1 local.get $1 @@ -4089,10 +4083,10 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store local.get $0 - local.get $6 + local.get $7 f32.store end local.get $1 @@ -4102,91 +4096,27 @@ br $while-continue|4 end end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|2 end end - call $~lib/rt/tlsf/maybeInitialize - local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + local.get $6 + call $~lib/rt/tlsf/__free local.get $0 f32.load offset=4 - local.set $4 + local.set $5 local.get $0 local.get $0 f32.load f32.store offset=4 local.get $0 - local.get $4 + local.get $5 f32.store ) - (func $~lib/array/Array#sort (; 91 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 f32) - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $0 - i32.load offset=4 - local.set $1 - local.get $2 - i32.const 2 - i32.eq - if - local.get $1 - f32.load offset=4 - local.set $3 - local.get $1 - f32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $4 - f32.store offset=4 - local.get $1 - local.get $3 - f32.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $2 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 92 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4215,156 +4145,171 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 93 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 90 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 f32) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return + (local $3 i32) + (local $4 f32) + (local $5 f32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 44 + local.set $3 end - local.get $0 - local.get $1 - i32.eq - if + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $0 + i32.load offset=12 + local.tee $2 i32.const 1 - return - end - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + i32.le_s if local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f32.load offset=4 + local.set $4 + local.get $1 + f32.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 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 + call_indirect (type $f32_f32_=>_i32) + i32.const 0 + i32.lt_s 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 - if - i32.const 0 - return - end + local.get $5 + f32.store offset=4 + local.get $1 + local.get $4 + f32.store end + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/weakHeapSort end + local.get $0 + call $~lib/rt/pure/__retain end - i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 94 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/insertionSort (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 f64) - (local $6 i32) + (local $6 f64) + (local $7 i32) loop $for-loop|0 - local.get $3 + local.get $4 local.get $1 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $4 - local.get $3 + local.set $5 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $5 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $4 local.get $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $6 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $2 - local.tee $6 + local.get $3 + local.tee $7 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 f64.store br $while-continue|1 end end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end ) - (func $~lib/util/sort/weakHeapSort (; 95 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/weakHeapSort (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) + (local $4 i32) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 @@ -4373,39 +4318,39 @@ i32.shr_s i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $5 + local.tee $6 i32.const 0 - local.get $2 + local.get $3 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|0 - local.get $3 + local.get $4 i32.const 0 i32.gt_s if - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 1 i32.and - local.get $5 - local.get $2 + local.get $6 + local.get $3 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $2 + local.get $3 i32.const 1 i32.shr_s i32.const 31 @@ -4415,92 +4360,93 @@ i32.and i32.eq if - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.set $2 + local.set $3 br $while-continue|1 end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.tee $2 + local.tee $3 i32.const 3 i32.shl i32.add f64.load - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $7 - local.get $7 + local.tee $8 + local.get $8 i32.load i32.const 1 - local.get $3 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store local.get $0 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add - local.get $6 + local.get $7 f64.store end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|2 - local.get $3 + local.get $4 i32.const 2 i32.ge_s if local.get $0 f64.load - local.set $4 + local.set $5 local.get $0 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -4508,12 +4454,12 @@ f64.load f64.store local.get $1 - local.get $4 + local.get $5 f64.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s @@ -4531,11 +4477,11 @@ i32.const 1 i32.shl i32.add - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.set $1 br $while-continue|3 end @@ -4547,31 +4493,32 @@ if local.get $0 f64.load - local.set $4 + local.set $5 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 i32.load i32.const 1 local.get $1 @@ -4585,104 +4532,40 @@ i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store local.get $0 - local.get $6 + local.get $7 f64.store end local.get $1 i32.const 1 i32.shr_s local.set $1 - br $while-continue|4 - end - end - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $for-loop|2 - end - end - call $~lib/rt/tlsf/maybeInitialize - local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - local.get $0 - f64.load offset=8 - local.set $4 - local.get $0 - local.get $0 - f64.load - f64.store offset=8 - local.get $0 - local.get $4 - f64.store - ) - (func $~lib/array/Array#sort (; 96 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $0 - i32.load offset=4 - local.set $1 - local.get $2 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.set $3 - local.get $1 - f64.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $4 - f64.store offset=8 - local.get $1 - local.get $3 - f64.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $2 - call $~lib/util/sort/weakHeapSort + br $while-continue|4 + end + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + br $for-loop|2 + end end + local.get $6 + call $~lib/rt/tlsf/__free local.get $0 - call $~lib/rt/pure/__retain + f64.load offset=8 + local.set $5 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $5 + f64.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 97 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4711,7 +4594,86 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#sort|trampoline (; 94 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 45 + local.set $3 + end + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f64.load offset=8 + local.set $4 + local.get $1 + f64.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 + local.get $3 + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $5 + f64.store offset=8 + local.get $1 + local.get $4 + f64.store + end + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + end + ) + (func $~lib/array/Array#__get (; 95 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -4732,72 +4694,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 99 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - 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 - if - i32.const 0 - return - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (; 100 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4876,7 +4773,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 101 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5125,10 +5022,8 @@ br $for-loop|2 end end - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/__free local.get $0 i32.load offset=4 local.set $1 @@ -5140,7 +5035,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 102 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 98 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5204,12 +5099,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 103 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 100 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5218,7 +5113,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 105 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5246,7 +5141,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 106 ;) (result f64) + (func $~lib/math/NativeMath.random (; 102 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5290,7 +5185,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 107 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5318,7 +5213,7 @@ end local.get $2 ) - (func $std/array/assertSorted (; 108 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 104 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5383,12 +5278,12 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/array~anonymous|44 (; 109 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 105 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 106 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5443,7 +5338,7 @@ end end ) - (func $start:std/array~anonymous|47 (; 111 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 107 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5452,7 +5347,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 112 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 108 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5506,7 +5401,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 113 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 109 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5586,7 +5481,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 114 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 110 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5612,73 +5507,14 @@ call $~lib/rt/pure/decrement end ) - (func $std/array/createReverseOrderedElementsArray (; 115 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 512 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 512 - i32.store offset=12 - loop $for-loop|0 - local.get $0 - i32.const 512 - i32.lt_s - if - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 511 - local.get $0 - i32.sub - i32.store - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $start:std/array~anonymous|48 (; 116 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 111 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 117 ;) (param $0 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5757,7 +5593,7 @@ end i32.const 1 ) - (func $~lib/util/string/compareImpl (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 113 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5833,7 +5669,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5894,7 +5730,7 @@ select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 120 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 115 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5936,7 +5772,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 121 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 116 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6022,7 +5858,7 @@ end i32.const 1 ) - (func $~lib/string/String#concat (; 122 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 117 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6114,7 +5950,7 @@ end local.get $2 ) - (func $std/array/createRandomString (; 123 ;) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 118 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6215,7 +6051,7 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 124 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 119 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6296,7 +6132,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 125 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 120 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6450,7 +6286,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount32 (; 126 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 121 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6498,7 +6334,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6522,7 +6358,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 128 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 123 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6569,7 +6405,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6611,7 +6447,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6734,7 +6570,7 @@ end local.get $3 ) - (func $~lib/util/number/utoa32 (; 131 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 126 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6762,7 +6598,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6786,7 +6622,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6909,7 +6745,7 @@ end local.get $3 ) - (func $~lib/util/number/genDigits (; 134 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 129 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7299,7 +7135,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 135 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7544,7 +7380,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 136 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 131 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7853,64 +7689,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 137 ;) (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 5824 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - i32.const 5856 - return - end - i32.const 5888 - i32.const 5936 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/number/dtoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -7981,42 +7760,101 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 133 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $3 + local.tee $4 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $3 + local.get $4 i32.eqz if + block $__inlined_func$~lib/util/number/dtoa + local.get $0 + f64.load + local.tee $3 + f64.const 0 + f64.eq + if + i32.const 5824 + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $3 + local.get $3 + f64.sub + f64.const 0 + f64.ne + if + local.get $3 + local.get $3 + f64.ne + if + i32.const 5856 + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + i32.const 5888 + i32.const 5936 + local.get $3 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + local.tee $1 + local.get $3 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + local.get $1 + call $~lib/rt/tlsf/__free + end local.get $0 - f64.load - call $~lib/util/number/dtoa return end - local.get $3 + local.get $4 i32.const 5788 i32.load i32.const 1 i32.shr_u - local.tee $4 + local.tee $5 i32.const 28 i32.add i32.mul i32.const 28 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl local.set $1 @@ -8031,14 +7869,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -8047,7 +7885,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -8055,27 +7893,27 @@ i32.shl i32.add i32.const 5792 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -8102,7 +7940,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 134 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8373,7 +8211,7 @@ end local.get $1 ) - (func $~lib/util/string/joinReferenceArray (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 135 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8610,7 +8448,7 @@ end local.get $1 ) - (func $~lib/util/number/itoa_stream (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8665,7 +8503,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 137 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8782,7 +8620,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8812,7 +8650,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8933,7 +8771,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 146 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 140 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -8986,7 +8824,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 147 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 141 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -9013,7 +8851,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -9053,7 +8891,7 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 149 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -9223,7 +9061,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa64 (; 150 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 144 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9297,7 +9135,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9358,7 +9196,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 152 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 146 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9479,7 +9317,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 147 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9752,7 +9590,7 @@ end local.get $1 ) - (func $~lib/util/number/itoa_stream (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9782,7 +9620,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 149 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9899,7 +9737,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 156 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 150 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10169,7 +10007,7 @@ end local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 157 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 151 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10442,7 +10280,7 @@ end local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 158 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10712,7 +10550,7 @@ end local.get $1 ) - (func $start:std/array (; 159 ;) + (func $start:std/array (; 153 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10737,15 +10575,15 @@ (local $21 i32) (local $22 i32) (local $23 i32) - (local $24 i32) + (local $24 f32) (local $25 i32) (local $26 i32) - (local $27 i32) + (local $27 f64) (local $28 i32) (local $29 i32) - (local $30 f32) + (local $30 i32) (local $31 i32) - (local $32 f64) + (local $32 i32) (local $33 i32) (local $34 i32) (local $35 i32) @@ -10775,9 +10613,16 @@ i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - call $std/array/Ref#constructor - local.set $0 + i32.store call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 @@ -10892,11 +10737,11 @@ i32.const 0 i32.const -3 call $~lib/array/Array#fill - local.tee $5 + local.tee $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -10908,7 +10753,7 @@ i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -10924,11 +10769,11 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $2 + local.tee $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -10940,7 +10785,7 @@ i32.const 624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -11010,20 +10855,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11114,11 +10959,11 @@ i32.const 0 i32.const -3 call $~lib/array/Array#fill - local.tee $5 + local.tee $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11130,7 +10975,7 @@ i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11147,11 +10992,11 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $2 + local.tee $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11163,7 +11008,7 @@ i32.const 880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11235,20 +11080,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11553,13 +11398,32 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=4 - local.tee $0 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 i32.const 0 - call $std/array/Ref#constructor i32.store local.get $0 + local.get $3 + i32.store + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $3 i32.const 0 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $3 i32.store offset=4 local.get $1 i32.load offset=12 @@ -11578,11 +11442,11 @@ loop $do-continue|0 local.get $0 i32.load - local.tee $5 + local.tee $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11677,7 +11541,7 @@ i32.const 1024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 call $~lib/array/Array#concat local.tee $0 i32.const 8292 @@ -11903,7 +11767,7 @@ local.get $3 global.get $std/array/arr call $~lib/array/Array#concat - local.set $5 + local.set $2 local.get $0 i32.const 8292 i32.gt_u @@ -11913,7 +11777,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $2 i32.load offset=12 i32.const 3 i32.ne @@ -11944,20 +11808,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11989,7 +11853,7 @@ i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12022,7 +11886,7 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 @@ -12069,7 +11933,7 @@ i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12108,7 +11972,7 @@ i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12140,14 +12004,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $9 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12179,14 +12043,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $12 + local.tee $14 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12218,14 +12082,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $16 i32.const 5 i32.const 2 i32.const 3 i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12257,14 +12121,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $18 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12296,14 +12160,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $10 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12451,20 +12315,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $2 i32.const 8292 i32.gt_u if - local.get $5 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -12487,11 +12351,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $8 + local.get $11 i32.const 8292 i32.gt_u if - local.get $8 + local.get $11 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -12505,101 +12369,101 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $8 i32.const 8292 i32.gt_u if - local.get $9 + local.get $8 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $10 + local.get $9 i32.const 8292 i32.gt_u if - local.get $10 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $11 + local.get $13 i32.const 8292 i32.gt_u if - local.get $11 + local.get $13 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $12 + local.get $14 i32.const 8292 i32.gt_u if - local.get $12 + local.get $14 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $13 + local.get $15 i32.const 8292 i32.gt_u if - local.get $13 + local.get $15 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $14 + local.get $16 i32.const 8292 i32.gt_u if - local.get $14 + local.get $16 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $25 + local.get $17 i32.const 8292 i32.gt_u if - local.get $25 + local.get $17 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $15 + local.get $18 i32.const 8292 i32.gt_u if - local.get $15 + local.get $18 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $17 + local.get $26 i32.const 8292 i32.gt_u if - local.get $17 + local.get $26 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $18 + local.get $10 i32.const 8292 i32.gt_u if - local.get $18 + local.get $10 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $16 + local.get $12 i32.const 8292 i32.gt_u if - local.get $16 + local.get $12 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -12867,10 +12731,10 @@ local.tee $3 i32.const 2 i32.shl - local.tee $2 + local.tee $5 call $~lib/memory/memory.copy local.get $0 - local.get $2 + local.get $5 i32.add i32.const 0 i32.store @@ -13055,43 +12919,43 @@ global.get $std/array/arr local.tee $3 i32.load offset=12 - local.tee $1 + local.tee $0 if local.get $3 i32.load offset=4 - local.set $0 + local.set $1 local.get $3 i32.load offset=4 - local.get $1 + local.get $0 i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.set $1 + local.set $0 loop $while-continue|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if - local.get $0 - i32.load - local.set $5 - local.get $0 local.get $1 i32.load - i32.store + local.set $2 local.get $1 - local.get $5 + local.get $0 + i32.load i32.store local.get $0 + local.get $2 + i32.store + local.get $1 i32.const 4 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 4 i32.sub - local.set $1 + local.set $0 br $while-continue|0 end end @@ -13347,12 +13211,12 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - local.set $2 + local.tee $0 + local.set $5 i32.const 0 - local.set $0 + local.set $1 block $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.load offset=12 local.tee $3 if (result i32) @@ -13364,19 +13228,19 @@ end if i32.const -1 - local.set $0 + local.set $1 br $__inlined_func$~lib/array/Array#indexOf end - local.get $2 + local.get $5 i32.load offset=4 - local.set $5 + local.set $2 loop $while-continue|090 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $5 - local.get $0 + local.get $2 + local.get $1 i32.const 2 i32.shl i32.add @@ -13384,17 +13248,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|090 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13414,33 +13278,33 @@ local.tee $3 local.set $4 i32.const 0 - local.set $0 + local.set $1 block $__inlined_func$~lib/array/Array#indexOf local.get $3 i32.load offset=12 - local.tee $5 + local.tee $2 if (result i32) i32.const 0 - local.get $5 + local.get $2 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $0 + local.set $1 br $__inlined_func$~lib/array/Array#indexOf end local.get $4 i32.load offset=4 - local.set $2 + local.set $5 loop $while-continue|091 - local.get $0 - local.get $5 + local.get $1 + local.get $2 i32.lt_s if - local.get $2 - local.get $0 + local.get $5 + local.get $1 i32.const 3 i32.shl i32.add @@ -13448,17 +13312,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|091 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -13469,11 +13333,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 8292 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -13645,7 +13509,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $1 + local.set $0 i32.const 0 i32.const 1 i32.const 2 @@ -13653,49 +13517,49 @@ i32.const 2272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.load offset=12 - local.tee $5 + local.tee $2 if (result i32) i32.const 0 - local.get $5 + local.get $2 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $1 i32.load offset=4 local.set $4 loop $while-continue|0103 - local.get $1 - local.get $5 + local.get $0 + local.get $2 i32.lt_s if i32.const 1 local.get $4 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $30 + local.tee $24 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $30 - local.get $30 + local.get $24 + local.get $24 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|0103 end end @@ -13720,24 +13584,24 @@ i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.load offset=12 - local.tee $2 + local.tee $5 if (result i32) i32.const 0 - local.get $2 + local.get $5 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $3 i32.load offset=4 local.set $6 loop $while-continue|0104 local.get $0 - local.get $2 + local.get $5 i32.lt_s if i32.const 1 @@ -13747,14 +13611,14 @@ i32.shl i32.add f64.load - local.tee $32 + local.tee $27 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $32 - local.get $32 + local.get $27 + local.get $27 f64.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -13845,20 +13709,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 8292 i32.gt_u if - local.get $3 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $3 i32.const 8292 i32.gt_u if - local.get $1 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -13873,14 +13737,14 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $6 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13931,14 +13795,14 @@ i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $9 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13957,7 +13821,7 @@ i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13989,14 +13853,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $12 + local.tee $14 i32.const 3 i32.const 2 i32.const 3 i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14015,7 +13879,7 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14047,14 +13911,14 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $15 + local.tee $17 i32.const 2 i32.const 2 i32.const 3 i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14073,7 +13937,7 @@ i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14104,7 +13968,7 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $16 + local.tee $12 i32.const 1 i32.const 2 i32.const 3 @@ -14218,14 +14082,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $26 + local.tee $28 i32.const 2 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $29 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14244,7 +14108,7 @@ i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $30 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14275,14 +14139,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $29 + local.tee $31 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14301,7 +14165,7 @@ i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $32 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14605,7 +14469,7 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $2 local.get $1 i32.const 8292 i32.gt_u @@ -14615,7 +14479,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $0 + local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice @@ -14638,7 +14502,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 2 i32.const 3 @@ -14663,10 +14527,10 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $2 + local.tee $5 i32.load offset=12 if i32.const 0 @@ -14676,7 +14540,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.load offset=12 if i32.const 0 @@ -14692,51 +14556,97 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 local.tee $3 + i32.load offset=4 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $11 i32.const 1 - call $std/array/Ref#constructor i32.store - local.get $3 + local.get $0 + local.get $11 + i32.store + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $11 i32.const 2 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $11 i32.store offset=4 - local.get $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $11 i32.const 3 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $11 i32.store offset=8 - local.get $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $11 i32.const 4 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $11 i32.store offset=12 - local.get $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $11 i32.const 5 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $11 i32.store offset=16 - local.get $5 + local.get $1 i32.const 8292 i32.gt_u if - local.get $5 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#splice - local.set $5 - local.get $2 + local.set $11 + local.get $5 i32.const 8292 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $11 i32.load offset=12 i32.const 2 i32.ne @@ -14748,7 +14658,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $11 i32.const 0 call $~lib/array/Array#__get local.tee $51 @@ -14763,7 +14673,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $11 i32.const 1 call $~lib/array/Array#__get local.tee $52 @@ -14778,7 +14688,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -14790,7 +14700,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get local.tee $53 @@ -14805,7 +14715,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get local.tee $54 @@ -14820,7 +14730,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get local.tee $55 @@ -14841,22 +14751,41 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.load offset=4 - local.tee $2 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 i32.const 1 - call $std/array/Ref#constructor i32.store - local.get $2 + local.get $0 + local.get $1 + i32.store + local.get $0 i32.const 0 i32.store offset=4 - local.get $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $1 i32.const 2 - call $std/array/Ref#constructor + i32.store + local.get $0 + local.get $1 i32.store offset=8 - local.get $3 + local.get $5 call $~lib/array/Array#splice - local.tee $25 + local.tee $26 i32.load offset=12 i32.const 1 i32.ne @@ -14868,11 +14797,11 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $26 i32.const 0 call $~lib/array/Array#__get - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -14893,7 +14822,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.load offset=12 i32.const 2 i32.ne @@ -14905,7 +14834,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 0 call $~lib/array/Array#__get local.tee $56 @@ -14917,11 +14846,11 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1 call $~lib/array/Array#__get - local.tee $4 - local.get $4 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -14942,29 +14871,29 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 8292 i32.gt_u if - local.get $0 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 i32.const 8292 i32.gt_u if - local.get $6 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $8 + local.get $6 i32.const 8292 i32.gt_u if - local.get $8 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -14978,92 +14907,92 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $8 i32.const 8292 i32.gt_u if - local.get $9 + local.get $8 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $10 + local.get $9 i32.const 8292 i32.gt_u if - local.get $10 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $11 + local.get $13 i32.const 8292 i32.gt_u if - local.get $11 + local.get $13 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $12 + local.get $14 i32.const 8292 i32.gt_u if - local.get $12 + local.get $14 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $13 + local.get $15 i32.const 8292 i32.gt_u if - local.get $13 + local.get $15 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $14 + local.get $16 i32.const 8292 i32.gt_u if - local.get $14 + local.get $16 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $15 + local.get $17 i32.const 8292 i32.gt_u if - local.get $15 + local.get $17 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $17 + local.get $18 i32.const 8292 i32.gt_u if - local.get $17 + local.get $18 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $18 + local.get $10 i32.const 8292 i32.gt_u if - local.get $18 + local.get $10 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $16 + local.get $12 i32.const 8292 i32.gt_u if - local.get $16 + local.get $12 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -15113,56 +15042,56 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $26 + local.get $28 i32.const 8292 i32.gt_u if - local.get $26 + local.get $28 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $27 + local.get $29 i32.const 8292 i32.gt_u if - local.get $27 + local.get $29 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $28 + local.get $30 i32.const 8292 i32.gt_u if - local.get $28 + local.get $30 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $29 + local.get $31 i32.const 8292 i32.gt_u if - local.get $29 + local.get $31 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $24 + local.get $25 i32.const 8292 i32.gt_u if - local.get $24 + local.get $25 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $31 + local.get $32 i32.const 8292 i32.gt_u if - local.get $31 + local.get $32 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -15374,11 +15303,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $0 i32.const 8292 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -15392,11 +15321,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $1 i32.const 8292 i32.gt_u if - local.get $4 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -15873,19 +15802,19 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -15902,26 +15831,26 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $2 + local.set $0 global.get $std/array/arr - local.tee $4 + local.tee $2 i32.load offset=12 - local.tee $6 + local.tee $4 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.load offset=4 - local.set $8 - loop $for-loop|00 - local.get $2 - local.get $6 + local.set $6 + loop $for-loop|0191 + local.get $0 local.get $4 + local.get $2 i32.load offset=12 local.tee $7 - local.get $6 + local.get $4 local.get $7 i32.lt_s select @@ -15929,29 +15858,29 @@ if i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $0 i32.const 2 i32.shl local.tee $7 - local.get $4 + local.get $2 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $30 + local.set $24 + local.get $6 local.get $7 - local.get $8 i32.add - local.get $30 + local.get $24 f32.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 - br $for-loop|00 + local.set $0 + br $for-loop|0191 end end - local.get $0 + local.get $1 i32.load offset=12 i32.const 4 i32.ne @@ -15963,7 +15892,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -15984,11 +15913,11 @@ global.get $std/array/arr i32.const 23 call $~lib/array/Array#map - local.tee $2 + local.tee $0 i32.const 8292 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16021,11 +15950,11 @@ global.get $std/array/arr i32.const 24 call $~lib/array/Array#map - local.tee $2 + local.tee $0 i32.const 8292 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16058,11 +15987,11 @@ global.get $std/array/arr i32.const 25 call $~lib/array/Array#map - local.tee $2 + local.tee $0 i32.const 8292 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16096,11 +16025,11 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $1 i32.const 8292 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16125,11 +16054,11 @@ global.get $std/array/arr i32.const 27 call $~lib/array/Array#filter - local.tee $2 + local.tee $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16162,11 +16091,11 @@ global.get $std/array/arr i32.const 28 call $~lib/array/Array#filter - local.tee $2 + local.tee $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16199,11 +16128,11 @@ global.get $std/array/arr i32.const 29 call $~lib/array/Array#filter - local.tee $2 + local.tee $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16601,31 +16530,88 @@ i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 0 global.set $~argumentsLength - local.get $2 - call $~lib/array/Array#sort + local.get $1 + call $~lib/array/Array#sort|trampoline local.tee $0 - local.set $4 - local.get $0 i32.const 8292 i32.gt_u if - local.get $4 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 4320 - call $~lib/rt/__allocArray - 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 4320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $4 + i32.const 0 + local.set $0 + i32.const 0 + local.get $1 + i32.load offset=12 + local.tee $6 + local.get $4 + i32.load offset=12 + i32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + i32.const 1 + local.get $1 + local.get $4 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|023 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $1 + local.get $0 + call $~lib/array/Array#__get + local.tee $24 + local.get $24 + f32.ne + if (result i32) + local.get $4 + local.get $0 + call $~lib/array/Array#__get + local.tee $24 + local.get $24 + f32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + local.get $4 + local.get $0 + call $~lib/array/Array#__get + f32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|023 + end + end + i32.const 1 + end i32.eqz if i32.const 0 @@ -16641,31 +16627,88 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $2 i32.const 0 global.set $~argumentsLength - local.get $4 - call $~lib/array/Array#sort + local.get $2 + call $~lib/array/Array#sort|trampoline local.tee $0 - local.set $6 - local.get $0 i32.const 8292 i32.gt_u if - local.get $6 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 4448 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $16 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 4448 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + i32.const 0 + local.set $0 + i32.const 0 + local.get $2 + i32.load offset=12 + local.tee $8 + local.get $6 + i32.load offset=12 + i32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + i32.const 1 + local.get $2 + local.get $6 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|024 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + if (result i32) + local.get $6 + local.get $0 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + local.get $2 + local.get $0 + call $~lib/array/Array#__get + local.get $6 + local.get $0 + call $~lib/array/Array#__get + f64.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|024 + end + end + i32.const 1 + end i32.eqz if i32.const 0 @@ -16681,10 +16724,10 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $7 i32.const 0 global.set $~argumentsLength - local.get $6 + local.get $7 i32.const 46 call $~lib/array/Array#sort local.tee $0 @@ -16698,7 +16741,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $7 i32.const 5 i32.const 2 i32.const 3 @@ -16730,12 +16773,12 @@ i32.const 47 call $~lib/array/Array#sort local.tee $0 - local.set $7 + local.set $9 local.get $0 i32.const 8292 i32.gt_u if - local.get $7 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -16765,28 +16808,28 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $15 + local.set $10 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $9 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 + local.set $13 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $10 + local.set $14 i32.const 4 i32.const 2 i32.const 3 @@ -16796,26 +16839,26 @@ local.set $0 i32.const 64 call $std/array/createReverseOrderedArray - local.set $11 + local.set $15 i32.const 128 call $std/array/createReverseOrderedArray - local.set $12 + local.set $16 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $13 + local.set $17 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $14 + local.set $18 i32.const 512 call $std/array/createRandomOrderedArray - local.set $17 - local.get $15 + local.set $12 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $7 + local.get $9 i32.const 48 call $std/array/assertSorted - local.get $7 + local.get $9 i32.const 1 i32.const 2 i32.const 3 @@ -16834,10 +16877,10 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $13 i32.const 2 i32.const 2 i32.const 3 @@ -16856,10 +16899,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $10 + local.get $14 local.get $0 i32.const 0 call $std/array/isArraysEqual @@ -16872,10 +16915,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $15 i32.const 48 call $std/array/assertSorted - local.get $11 + local.get $15 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -16888,10 +16931,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $12 + local.get $16 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -16904,10 +16947,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $17 i32.const 48 call $std/array/assertSorted - local.get $13 + local.get $17 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -16920,10 +16963,10 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $18 i32.const 48 call $std/array/assertSorted - local.get $14 + local.get $18 local.get $0 i32.const 4 call $std/array/isArraysEqual @@ -16936,50 +16979,50 @@ call $~lib/builtins/abort unreachable end - local.get $17 + local.get $12 i32.const 48 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $18 + local.get $4 i32.const 8292 i32.gt_u if - local.get $18 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $2 i32.const 8292 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $16 + local.get $6 i32.const 8292 i32.gt_u if - local.get $16 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $7 i32.const 8292 i32.gt_u if - local.get $6 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17011,38 +17054,38 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $15 + local.get $10 i32.const 8292 i32.gt_u if - local.get $15 + local.get $10 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $9 i32.const 8292 i32.gt_u if - local.get $7 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $13 i32.const 8292 i32.gt_u if - local.get $9 + local.get $13 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $10 + local.get $14 i32.const 8292 i32.gt_u if - local.get $10 + local.get $14 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17056,47 +17099,47 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $11 + local.get $15 i32.const 8292 i32.gt_u if - local.get $11 + local.get $15 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $12 + local.get $16 i32.const 8292 i32.gt_u if - local.get $12 + local.get $16 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $13 + local.get $17 i32.const 8292 i32.gt_u if - local.get $13 + local.get $17 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $14 + local.get $18 i32.const 8292 i32.gt_u if - local.get $14 + local.get $18 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $17 + local.get $12 i32.const 8292 i32.gt_u if - local.get $17 + local.get $12 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17124,17 +17167,17 @@ local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $2 + local.set $1 local.get $0 i32.const 49 call $std/array/assertSorted local.get $0 i32.const 50 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 51 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 52 call $std/array/assertSorted local.get $0 @@ -17146,11 +17189,74 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 2 + i32.store offset=12 + loop $for-loop|00 + local.get $0 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + local.get $0 + i32.sub + call $~lib/array/Array#__set + local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + i32.const 8292 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 53 + call $std/array/assertSorted<~lib/array/Array> + local.get $1 + i32.const 8292 + i32.gt_u + if + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17159,42 +17265,46 @@ local.set $0 call $~lib/rt/tlsf/maybeInitialize i32.const 16 - i32.const 12 + i32.const 14 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - i32.const 2 + i32.const 512 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 - i32.const 2 + local.get $1 + i32.const 512 i32.store offset=12 - loop $for-loop|001 + loop $for-loop|01 local.get $0 - i32.const 2 + i32.const 512 i32.lt_s if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $4 - i32.const 0 - i32.const 1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 511 local.get $0 i32.sub - call $~lib/array/Array#__set - local.get $2 + i32.store + local.get $1 local.get $0 - local.get $4 + local.get $2 call $~lib/array/Array<~lib/array/Array>#__set - local.get $4 + local.get $2 i32.const 8292 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17203,30 +17313,17 @@ i32.const 1 i32.add local.set $0 - br $for-loop|001 + br $for-loop|01 end end - local.get $2 - i32.const 53 - call $std/array/assertSorted<~lib/array/Array> - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/array/createReverseOrderedElementsArray - local.tee $0 + local.get $1 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 i32.const 8292 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17237,17 +17334,17 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $2 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $4 i32.const 1 global.set $~argumentsLength - local.get $4 + local.get $2 i32.const 55 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 @@ -17270,8 +17367,8 @@ i32.sub call $~lib/rt/pure/decrement end + local.get $2 local.get $4 - local.get $6 call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if @@ -17294,31 +17391,31 @@ i32.const 400 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $1 i32.const 400 i32.store offset=12 - loop $for-loop|01 + loop $for-loop|02 local.get $0 i32.const 400 i32.lt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s call $std/array/createRandomString - local.tee $8 + local.tee $6 call $~lib/array/Array<~lib/array/Array>#__set - local.get $8 + local.get $6 i32.const 8292 i32.gt_u if - local.get $8 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17327,37 +17424,37 @@ i32.const 1 i32.add local.set $0 - br $for-loop|01 + br $for-loop|02 end end i32.const 1 global.set $~argumentsLength - local.get $2 + local.get $1 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $4 + local.get $2 i32.const 8292 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 i32.const 8292 i32.gt_u if - local.get $6 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17368,12 +17465,12 @@ i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.load offset=4 - local.get $4 + local.get $2 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $11 + local.tee $13 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -17391,13 +17488,13 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $4 i32.load offset=4 - local.get $6 + local.get $4 i32.load offset=12 i32.const 5120 call $~lib/util/string/joinIntegerArray - local.tee $12 + local.tee $14 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -17415,13 +17512,13 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load offset=12 i32.const 5568 call $~lib/util/string/joinIntegerArray - local.tee $13 + local.tee $15 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -17445,7 +17542,7 @@ i32.load offset=12 i32.const 5632 call $~lib/util/string/joinIntegerArray - local.tee $14 + local.tee $16 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -17463,12 +17560,12 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.load offset=4 - local.get $9 + local.get $8 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $15 + local.tee $17 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -17486,13 +17583,13 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.load offset=4 - local.get $10 + local.get $9 i32.load offset=12 i32.const 5120 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $17 + local.tee $18 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -17512,23 +17609,42 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $2 + local.set $1 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $10 i32.const 0 - call $std/array/Ref#constructor i32.store - local.get $2 + local.get $1 + local.get $10 + i32.store + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $10 i32.const 0 - call $std/array/Ref#constructor + i32.store + local.get $1 + local.get $10 i32.store offset=8 local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray - local.tee $18 + local.tee $10 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -17546,22 +17662,41 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=4 - local.tee $16 + local.set $12 + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $19 i32.const 0 - call $std/array/Ref#constructor i32.store - local.get $16 + local.get $12 + local.get $19 + i32.store + call $~lib/rt/tlsf/maybeInitialize + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $19 i32.const 0 - call $std/array/Ref#constructor + i32.store + local.get $12 + local.get $19 i32.store offset=4 - local.get $2 + local.get $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=12 call $~lib/util/string/joinReferenceArray - local.tee $16 + local.tee $12 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -17573,56 +17708,56 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 8292 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $11 + local.get $13 i32.const 8292 i32.gt_u if - local.get $11 + local.get $13 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 i32.const 8292 i32.gt_u if - local.get $6 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $12 + local.get $14 i32.const 8292 i32.gt_u if - local.get $12 + local.get $14 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $8 + local.get $6 i32.const 8292 i32.gt_u if - local.get $8 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $13 + local.get $15 i32.const 8292 i32.gt_u if - local.get $13 + local.get $15 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17636,47 +17771,47 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $14 + local.get $16 i32.const 8292 i32.gt_u if - local.get $14 + local.get $16 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $8 i32.const 8292 i32.gt_u if - local.get $9 + local.get $8 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $15 + local.get $17 i32.const 8292 i32.gt_u if - local.get $15 + local.get $17 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $10 + local.get $9 i32.const 8292 i32.gt_u if - local.get $10 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $17 + local.get $18 i32.const 8292 i32.gt_u if - local.get $17 + local.get $18 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17690,29 +17825,29 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $18 + local.get $10 i32.const 8292 i32.gt_u if - local.get $18 + local.get $10 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $16 + local.get $12 i32.const 8292 i32.gt_u if - local.get $16 + local.get $12 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -17730,28 +17865,28 @@ i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $2 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $4 local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinIntegerArray - local.tee $17 + local.tee $18 i32.const 5120 call $~lib/string/String.__eq i32.eqz @@ -17763,13 +17898,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinIntegerArray - local.tee $18 + local.tee $10 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -17781,13 +17916,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.load offset=4 - local.get $4 + local.get $2 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinIntegerArray - local.tee $16 + local.tee $12 i32.const 7424 call $~lib/string/String.__eq i32.eqz @@ -17799,9 +17934,9 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 i32.load offset=4 - local.get $6 + local.get $4 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinIntegerArray @@ -17823,9 +17958,9 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.load offset=4 - local.get $10 + local.get $9 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $20 @@ -17846,9 +17981,9 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $13 i32.load offset=4 - local.get $11 + local.get $13 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $21 @@ -17869,9 +18004,9 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 i32.load offset=4 - local.get $12 + local.get $14 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $22 @@ -17892,9 +18027,9 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $15 i32.load offset=4 - local.get $13 + local.get $15 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $23 @@ -17915,13 +18050,13 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $16 i32.load offset=4 - local.get $14 + local.get $16 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $26 + local.tee $28 i32.const 7952 call $~lib/string/String.__eq i32.eqz @@ -17939,13 +18074,13 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $17 i32.load offset=4 - local.get $15 + local.get $17 i32.load offset=12 i32.const 5360 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $27 + local.tee $29 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -17963,7 +18098,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $6 i32.load offset=4 local.tee $7 i32.const 2 @@ -17981,12 +18116,12 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $8 + local.get $6 i32.load offset=4 - local.get $8 + local.get $6 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $28 + local.tee $30 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -18006,7 +18141,7 @@ call $~lib/rt/pure/__retain local.tee $7 i32.load offset=4 - local.tee $9 + local.tee $8 i32.const 2 i32.const 0 i32.const 6 @@ -18014,7 +18149,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $9 + local.get $8 i32.const 2 i32.const 0 i32.const 6 @@ -18027,7 +18162,7 @@ local.get $7 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $29 + local.tee $31 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -18045,7 +18180,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.load offset=4 i32.const 1 i32.const 2 @@ -18053,7 +18188,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $32 i32.load offset=4 i32.const 1 i32.const 2 @@ -18062,14 +18197,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $31 + local.get $32 i32.store - local.get $9 + local.get $8 i32.load offset=4 - local.get $9 + local.get $8 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $24 + local.tee $25 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -18090,56 +18225,56 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $1 i32.const 8292 i32.gt_u if - local.get $2 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $2 i32.const 8292 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 i32.const 8292 i32.gt_u if - local.get $6 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $17 + local.get $18 i32.const 8292 i32.gt_u if - local.get $17 + local.get $18 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $18 + local.get $10 i32.const 8292 i32.gt_u if - local.get $18 + local.get $10 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $16 + local.get $12 i32.const 8292 i32.gt_u if - local.get $16 + local.get $12 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18153,11 +18288,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $10 + local.get $9 i32.const 8292 i32.gt_u if - local.get $10 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18171,11 +18306,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $11 + local.get $13 i32.const 8292 i32.gt_u if - local.get $11 + local.get $13 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18189,11 +18324,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $12 + local.get $14 i32.const 8292 i32.gt_u if - local.get $12 + local.get $14 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18207,11 +18342,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $13 + local.get $15 i32.const 8292 i32.gt_u if - local.get $13 + local.get $15 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18225,65 +18360,65 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $14 + local.get $16 i32.const 8292 i32.gt_u if - local.get $14 + local.get $16 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $26 + local.get $28 i32.const 8292 i32.gt_u if - local.get $26 + local.get $28 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $15 + local.get $17 i32.const 8292 i32.gt_u if - local.get $15 + local.get $17 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $27 + local.get $29 i32.const 8292 i32.gt_u if - local.get $27 + local.get $29 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $28 + local.get $30 i32.const 8292 i32.gt_u if - local.get $28 + local.get $30 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $29 + local.get $31 i32.const 8292 i32.gt_u if - local.get $29 + local.get $31 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $24 + local.get $25 i32.const 8292 i32.gt_u if - local.get $24 + local.get $25 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18298,47 +18433,47 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $3 i32.const 8292 i32.gt_u if - local.get $1 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $11 i32.const 8292 i32.gt_u if - local.get $5 + local.get $11 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $3 + local.get $5 i32.const 8292 i32.gt_u if - local.get $3 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $25 + local.get $26 i32.const 8292 i32.gt_u if - local.get $25 + local.get $26 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $8 + local.get $6 i32.const 8292 i32.gt_u if - local.get $8 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -18352,17 +18487,17 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $8 i32.const 8292 i32.gt_u if - local.get $9 + local.get $8 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~start (; 160 ;) + (func $~start (; 154 ;) global.get $~started if return @@ -18372,7 +18507,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 161 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 155 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -18399,10 +18534,80 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + block $switch$1$case$29 + block $switch$1$case$28 + block $switch$1$case$27 + block $switch$1$case$18 + block $switch$1$case$17 + block $switch$1$case$16 + block $switch$1$case$14 + block $switch$1$case$13 + block $switch$1$case$10 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $__inlined_func$~lib/rt/__visit_members $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 8292 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + end local.get $2 i32.const -2147483648 i32.and @@ -18414,9 +18619,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 @@ -18440,7 +18653,7 @@ i32.store offset=4 end ) - (func $~lib/array/Array#__visit_impl (; 162 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 156 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -18479,80 +18692,4 @@ end end ) - (func $~lib/rt/__visit_members (; 163 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - block $switch$1$case$29 - block $switch$1$case$28 - block $switch$1$case$27 - block $switch$1$case$18 - block $switch$1$case$17 - block $switch$1$case$16 - block $switch$1$case$14 - block $switch$1$case$13 - block $switch$1$case$10 - 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 $block$4$break $block$4$break $switch$1$case$2 $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $switch$1$case$2 $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default - end - return - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - i32.const 8292 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - end - ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 49c5ef31c2..34794de573 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -809,69 +809,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -947,9 +885,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -997,9 +936,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1049,7 +1044,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1260,7 +1255,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1311,7 +1306,7 @@ end local.get $0 ) - (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1484,7 +1479,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1557,7 +1552,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1639,7 +1634,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1709,11 +1704,11 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 19 ;) (param $0 i32) + (func $~setArgumentsLength (; 18 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 20 ;) + (func $start:std/arraybuffer (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2096,10 +2091,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 21 ;) + (func $~start (; 20 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 8f654e1e0a..0f10d3edc2 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -2,11 +2,11 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i32_=>_none (func (param i32 f32 i32))) @@ -817,69 +817,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -955,9 +893,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1005,9 +944,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1057,7 +1052,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1108,7 +1103,7 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1212,7 +1207,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1232,7 +1227,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1306,20 +1301,7 @@ i32.store offset=8 local.get $3 ) - (func $~lib/polyfills/bswap (; 17 ;) (param $0 i32) (result i32) - local.get $0 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl - local.get $0 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or - ) - (func $~lib/dataview/DataView#getFloat32 (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1351,11 +1333,21 @@ i32.load offset=4 i32.add i32.load - call $~lib/polyfills/bswap + local.tee $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 19 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 17 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1381,7 +1373,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 20 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 18 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1407,7 +1399,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1426,20 +1418,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 22 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 24 - i32.shr_s - i32.const 255 - i32.and - local.get $0 - i32.const 8 - i32.shl - i32.or - ) - (func $~lib/dataview/DataView#getInt16 (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1463,17 +1442,22 @@ i32.load offset=4 i32.add i32.load16_s - local.set $0 - local.get $2 - i32.eqz - if - local.get $0 - call $~lib/polyfills/bswap - local.set $0 - end + local.tee $0 + local.get $0 + i32.const 16 + i32.shl + i32.const 24 + i32.shr_s + i32.const 255 + i32.and local.get $0 + i32.const 8 + i32.shl + i32.or + local.get $2 + select ) - (func $~lib/dataview/DataView#getInt32 (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1497,17 +1481,22 @@ i32.load offset=4 i32.add i32.load - local.set $0 - local.get $2 - i32.eqz - if - local.get $0 - call $~lib/polyfills/bswap - local.set $0 - end + local.tee $0 + local.get $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.get $2 + select ) - (func $~lib/dataview/DataView#getInt64 (; 25 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 22 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1533,7 +1522,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1552,7 +1541,7 @@ i32.add i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1589,7 +1578,7 @@ local.get $2 select ) - (func $~lib/dataview/DataView#getUint32 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1613,17 +1602,22 @@ i32.load offset=4 i32.add i32.load - local.set $0 - local.get $2 - i32.eqz - if - local.get $0 - call $~lib/polyfills/bswap - local.set $0 - end + local.tee $0 + local.get $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.get $2 + select ) - (func $~lib/dataview/DataView#getUint64 (; 29 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 26 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1649,7 +1643,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 30 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 27 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1673,11 +1667,21 @@ i32.load offset=4 local.get $1 i32.reinterpret_f32 - call $~lib/polyfills/bswap + local.tee $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 31 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 28 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1705,7 +1709,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1721,15 +1725,25 @@ local.get $0 i32.load offset=4 local.get $2 - if (result i32) + i32.eqz + if local.get $1 - else + i32.const 16 + i32.shl + i32.const 24 + i32.shr_s + i32.const 255 + i32.and local.get $1 - call $~lib/polyfills/bswap + i32.const 8 + i32.shl + i32.or + local.set $1 end + local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1745,15 +1759,25 @@ local.get $0 i32.load offset=4 local.get $2 - if (result i32) + i32.eqz + if local.get $1 - else + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl local.get $1 - call $~lib/polyfills/bswap + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.set $1 end + local.get $1 i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 34 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 31 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1777,7 +1801,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1809,7 +1833,7 @@ local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1825,15 +1849,25 @@ local.get $0 i32.load offset=4 local.get $2 - if (result i32) + i32.eqz + if local.get $1 - else + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl local.get $1 - call $~lib/polyfills/bswap + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.set $1 end + local.get $1 i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 37 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 34 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1857,11 +1891,11 @@ end i64.store ) - (func $~setArgumentsLength (; 38 ;) (param $0 i32) + (func $~setArgumentsLength (; 35 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 39 ;) + (func $start:std/dataview (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3482,10 +3516,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 40 ;) + (func $~start (; 37 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 41 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index d892c94c7c..b155c1c690 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,28 +15,28 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) - (local $0 i32) + (func $~lib/date/Date#constructor (; 3 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) global.get $~lib/rt/stub/offset i32.const 16 i32.add local.tee $2 i32.const 16 i32.add - local.tee $0 + local.tee $1 memory.size - local.tee $3 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if - local.get $3 - local.get $0 + local.get $4 local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -44,16 +44,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $3 + local.get $4 local.get $3 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -62,28 +62,32 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset local.get $2 i32.const 16 i32.sub - local.tee $0 + local.tee $1 i32.const 16 i32.store - local.get $0 + local.get $1 i32.const 1 i32.store offset=4 - local.get $0 + local.get $1 i32.const 3 i32.store offset=8 - local.get $0 + local.get $1 i32.const 8 i32.store offset=12 local.get $2 + i64.const 0 + i64.store + local.get $2 + local.get $0 + i64.store + local.get $2 ) (func $start:std/date (; 4 ;) - (local $0 i32) - (local $1 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -160,15 +164,7 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - local.set $1 - call $~lib/rt/stub/__alloc - local.tee $0 - i64.const 0 - i64.store - local.get $0 - local.get $1 - i64.store - local.get $0 + call $~lib/date/Date#constructor global.set $std/date/date global.get $std/date/creationTime global.get $std/date/date diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 23c930d75f..453e69eaf3 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1,6 +1,6 @@ (module - (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i64_=>_i32 (func (param i64) (result i32))) @@ -2709,92 +2709,89 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 26 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 26 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - f64.reinterpret_i64 - local.set $0 - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 1072049730 - i32.lt_u - if + block $__inlined_func$~lib/math/NativeMath.cosh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + f64.reinterpret_i64 + local.set $0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1072049730 + i32.lt_u + if + f64.const 1 + local.get $1 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.cosh + drop + f64.const 1 + local.get $0 + call $~lib/math/NativeMath.expm1 + local.tee $0 + local.get $0 + f64.mul + f64.const 2 + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.div + f64.add + br $__inlined_func$~lib/math/NativeMath.cosh + end local.get $1 - i32.const 1045430272 + i32.const 1082535490 i32.lt_u if + f64.const 0.5 + local.get $0 + call $~lib/math/NativeMath.exp + local.tee $0 f64.const 1 - return + local.get $0 + f64.div + f64.add + f64.mul + br $__inlined_func$~lib/math/NativeMath.cosh end - f64.const 1 - local.get $0 - call $~lib/math/NativeMath.expm1 - local.tee $0 - local.get $0 - f64.mul - f64.const 2 - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.div - f64.add - return - end - local.get $1 - i32.const 1082535490 - i32.lt_u - if - f64.const 0.5 local.get $0 + f64.const 1416.0996898839683 + f64.sub call $~lib/math/NativeMath.exp - local.tee $0 - f64.const 1 - local.get $0 - f64.div - f64.add + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 f64.mul - return end - local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $../../lib/libm/assembly/libm/cosh (; 27 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.cosh ) - (func $../../lib/libm/assembly/libm/exp (; 28 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 27 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $../../lib/libm/assembly/libm/expm1 (; 29 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 28 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $../../lib/libm/assembly/libm/floor (; 30 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 29 ;) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $../../lib/libm/assembly/libm/fround (; 31 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/fround (; 30 ;) (param $0 f64) (result f64) local.get $0 f32.demote_f64 f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 32 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 31 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -2963,12 +2960,12 @@ f64.sqrt f64.mul ) - (func $../../lib/libm/assembly/libm/hypot (; 33 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 32 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $../../lib/libm/assembly/libm/imul (; 34 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 33 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) block $__inlined_func$~lib/math/NativeMath.imul (result f64) f64.const 0 @@ -3006,11 +3003,11 @@ f64.convert_i32_s end ) - (func $../../lib/libm/assembly/libm/log (; 35 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 34 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 36 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 35 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3212,15 +3209,15 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log10 (; 37 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $../../lib/libm/assembly/libm/log1p (; 38 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 37 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 39 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 38 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3415,21 +3412,21 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log2 (; 40 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $../../lib/libm/assembly/libm/max (; 41 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 40 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $../../lib/libm/assembly/libm/min (; 42 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 41 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 43 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 42 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -4385,12 +4382,12 @@ f64.const 1e-300 f64.mul ) - (func $../../lib/libm/assembly/libm/pow (; 44 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 43 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $../../lib/libm/assembly/libm/round (; 45 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 44 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -4398,7 +4395,7 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/sign (; 46 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 45 ;) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -4411,7 +4408,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 47 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 46 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -4731,11 +4728,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/sin (; 48 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 47 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 49 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 48 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -4812,15 +4809,15 @@ f64.mul f64.mul ) - (func $../../lib/libm/assembly/libm/sinh (; 50 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 49 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $../../lib/libm/assembly/libm/sqrt (; 51 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 50 ;) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/tan_kern (; 52 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 51 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -5002,7 +4999,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 53 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 52 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -5179,11 +5176,11 @@ i32.sub call $~lib/math/tan_kern ) - (func $../../lib/libm/assembly/libm/tan (; 54 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 53 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 55 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 54 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5262,19 +5259,19 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/tanh (; 56 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 55 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $../../lib/libm/assembly/libm/trunc (; 57 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 56 ;) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $../../lib/libm/assembly/libmf/abs (; 58 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/abs (; 57 ;) (param $0 f32) (result f32) local.get $0 f32.abs ) - (func $~lib/math/Rf (; 59 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 58 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -5293,7 +5290,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 60 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 59 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5409,11 +5406,11 @@ f32.add f32.mul ) - (func $../../lib/libm/assembly/libmf/acos (; 61 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acos (; 60 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.acos ) - (func $~lib/math/NativeMathf.log1p (; 62 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 61 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5583,7 +5580,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 63 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 62 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5717,7 +5714,7 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/acosh (; 64 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acosh (; 63 ;) (param $0 f32) (result f32) (local $1 i32) block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 @@ -5769,7 +5766,7 @@ f32.add end ) - (func $~lib/math/NativeMathf.asin (; 65 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 64 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -5849,59 +5846,62 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asin (; 66 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asin (; 65 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asin ) - (func $~lib/math/NativeMathf.asinh (; 67 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $../../lib/libm/assembly/libmf/asinh (; 66 ;) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) local.get $0 + local.tee $2 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $1 f32.reinterpret_i32 - local.set $1 - local.get $2 + local.set $0 + local.get $1 i32.const 1166016512 i32.ge_u - if (result f32) - local.get $1 + if + local.get $0 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add + local.set $0 else - local.get $2 + local.get $1 i32.const 1073741824 i32.ge_u - if (result f32) + if f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f32.mul f32.const 1 f32.add f32.sqrt - local.get $1 + local.get $0 f32.add f32.div f32.add call $~lib/math/NativeMathf.log + local.set $0 else - local.get $2 + local.get $1 i32.const 964689920 i32.ge_u - if (result f32) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.const 1 f32.add f32.sqrt @@ -5910,19 +5910,15 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $2 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asinh (; 68 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.asinh - ) - (func $~lib/math/NativeMathf.atan (; 69 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 67 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6118,11 +6114,11 @@ local.get $4 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atan (; 70 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan (; 68 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.atan ) - (func $../../lib/libm/assembly/libmf/atanh (; 71 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atanh (; 69 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -6172,7 +6168,7 @@ local.get $1 f32.copysign ) - (func $~lib/math/NativeMathf.atan2 (; 72 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6365,12 +6361,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libmf/atan2 (; 73 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan2 (; 71 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 ) - (func $~lib/math/NativeMathf.cbrt (; 74 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 72 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -6469,15 +6465,15 @@ f64.div f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/cbrt (; 75 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cbrt (; 73 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cbrt ) - (func $../../lib/libm/assembly/libmf/ceil (; 76 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/ceil (; 74 ;) (param $0 f32) (result f32) local.get $0 f32.ceil ) - (func $../../lib/libm/assembly/libmf/clz32 (; 77 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/clz32 (; 75 ;) (param $0 f32) (result f32) (local $1 f64) local.get $0 local.get $0 @@ -6503,7 +6499,7 @@ f32.convert_i32_s end ) - (func $~lib/math/NativeMathf.cos (; 78 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -6772,11 +6768,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cos (; 79 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cos (; 77 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cos ) - (func $~lib/math/NativeMathf.expm1 (; 80 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 78 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7026,7 +7022,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.scalbn (; 81 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 79 ;) (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 i32.gt_s @@ -7102,7 +7098,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 82 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 80 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -7236,85 +7232,82 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 83 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cosh (; 81 ;) (param $0 f32) (result f32) (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - f32.reinterpret_i32 - local.set $0 - local.get $1 - i32.const 1060205079 - i32.lt_u - if + block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 local.get $1 - i32.const 964689920 + i32.const 1060205079 i32.lt_u if f32.const 1 - return + local.get $1 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.cosh + drop + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh end - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - return - end - local.get $1 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 local.get $0 + f32.const 162.88958740234375 + f32.sub call $~lib/math/NativeMathf.exp - local.tee $0 + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - return end - local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - ) - (func $../../lib/libm/assembly/libmf/cosh (; 84 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.cosh ) - (func $../../lib/libm/assembly/libmf/exp (; 85 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/exp (; 82 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.exp ) - (func $../../lib/libm/assembly/libmf/expm1 (; 86 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/expm1 (; 83 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.expm1 ) - (func $../../lib/libm/assembly/libmf/floor (; 87 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/floor (; 84 ;) (param $0 f32) (result f32) local.get $0 f32.floor ) - (func $../../lib/libm/assembly/libmf/fround (; 88 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/fround (; 85 ;) (param $0 f32) (result f32) local.get $0 ) - (func $~lib/math/NativeMathf.hypot (; 89 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -7419,12 +7412,12 @@ f32.sqrt f32.mul ) - (func $../../lib/libm/assembly/libmf/hypot (; 90 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/hypot (; 87 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot ) - (func $../../lib/libm/assembly/libmf/imul (; 91 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/imul (; 88 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 f64) (local $3 f32) block $~lib/math/NativeMathf.imul|inlined.0 (result f32) @@ -7467,11 +7460,11 @@ f32.convert_i32_s end ) - (func $../../lib/libm/assembly/libmf/log (; 92 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log (; 89 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log ) - (func $~lib/math/NativeMathf.log10 (; 93 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7629,15 +7622,15 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/log10 (; 94 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log10 (; 91 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log10 ) - (func $../../lib/libm/assembly/libmf/log1p (; 95 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log1p (; 92 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log1p ) - (func $~lib/math/NativeMathf.log2 (; 96 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7787,21 +7780,21 @@ f32.convert_i32_s f32.add ) - (func $../../lib/libm/assembly/libmf/log2 (; 97 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log2 (; 94 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log2 ) - (func $../../lib/libm/assembly/libmf/max (; 98 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/max (; 95 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.max ) - (func $../../lib/libm/assembly/libmf/min (; 99 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/min (; 96 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.min ) - (func $~lib/math/NativeMathf.pow (; 100 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 97 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8259,12 +8252,12 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/pow (; 101 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/pow (; 98 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow ) - (func $../../lib/libm/assembly/libmf/round (; 102 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/round (; 99 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.5 f32.add @@ -8272,7 +8265,7 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/sign (; 103 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sign (; 100 ;) (param $0 f32) (result f32) local.get $0 f32.abs f32.const 0 @@ -8285,7 +8278,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 104 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 101 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8555,11 +8548,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/sin (; 105 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sin (; 102 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sin ) - (func $~lib/math/NativeMathf.sinh (; 106 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 103 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -8631,15 +8624,15 @@ f32.mul f32.mul ) - (func $../../lib/libm/assembly/libmf/sinh (; 107 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sinh (; 104 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sinh ) - (func $../../lib/libm/assembly/libmf/sqrt (; 108 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sqrt (; 105 ;) (param $0 f32) (result f32) local.get $0 f32.sqrt ) - (func $~lib/math/NativeMathf.tan (; 109 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 106 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8893,11 +8886,11 @@ local.get $1 f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/tan (; 110 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tan (; 107 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tan ) - (func $~lib/math/NativeMathf.tanh (; 111 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 108 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -8971,11 +8964,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/tanh (; 112 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tanh (; 109 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tanh ) - (func $../../lib/libm/assembly/libmf/trunc (; 113 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/trunc (; 110 ;) (param $0 f32) (result f32) local.get $0 f32.trunc ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 158f953c37..10f4de8ec7 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) @@ -849,69 +849,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -987,9 +925,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1017,9 +956,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1069,7 +1064,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1120,7 +1115,7 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1331,7 +1326,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 16 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1356,7 +1351,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#clear (; 18 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -1406,7 +1401,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#find (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1449,7 +1444,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1465,7 +1460,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 21 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 20 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1627,7 +1622,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1726,7 +1721,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 22 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1752,7 +1747,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1832,7 +1827,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2005,20 +2000,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 26 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2074,10 +2056,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2115,13 +2097,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/array/ensureSize (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2224,7 +2214,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2260,19 +2250,84 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#set:length (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 28 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 i32.load offset=12 drop - local.get $0 local.get $1 + local.get $0 i32.const 0 call $~lib/array/ensureSize - local.get $0 local.get $1 + local.get $0 i32.store offset=12 + local.get $1 ) - (func $~lib/array/Array#constructor (; 31 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 29 ;) (param $0 i32) (result i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 16 @@ -2292,7 +2347,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2330,19 +2385,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#set:length (; 33 ;) (param $0 i32) (param $1 i32) - local.get $0 - i32.load offset=12 - drop - local.get $0 - local.get $1 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/map/Map#values (; 34 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2394,11 +2437,18 @@ end end local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 local.get $0 - call $~lib/array/Array#set:length + i32.store offset=12 local.get $1 ) - (func $~lib/map/Map#clear (; 35 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 32 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -2448,7 +2498,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 36 ;) (result i32) + (func $~lib/map/Map#constructor (; 33 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -2479,7 +2529,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2500,7 +2550,7 @@ i32.add i32.load ) - (func $~lib/map/Map#rehash (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2662,7 +2712,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2797,7 +2847,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 40 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 37 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2828,7 +2878,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2869,7 +2919,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 42 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 39 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3028,7 +3078,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3118,7 +3168,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 41 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3184,7 +3234,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 45 ;) + (func $std/map/testNumeric (; 42 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3421,106 +3471,48 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 + call $~lib/map/Map#keys + local.set $2 local.get $1 - i32.load offset=16 - local.set $3 + call $~lib/map/Map#values + local.set $6 call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 4 + i32.const 24 + i32.const 6 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - local.get $3 + local.tee $0 i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + 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 $2 - local.get $3 - i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + local.set $4 + call $~lib/map/Map#constructor + local.set $5 i32.const 0 local.set $0 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $5 - local.get $7 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - call $~lib/map/Map#values - local.set $6 - call $~lib/rt/tlsf/maybeInitialize - i32.const 24 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $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 $0 - i32.const 0 - i32.store offset=16 - local.get $0 - i32.const 0 - i32.store offset=20 - local.get $0 - call $~lib/map/Map#clear - local.get $0 - local.set $5 - call $~lib/map/Map#constructor - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|4 - local.get $0 - local.get $2 - i32.load offset=12 + loop $for-loop|4 + local.get $0 + local.get $2 + i32.load offset=12 i32.lt_s if local.get $0 @@ -3572,7 +3564,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $0 local.get $0 call $~lib/map/Map#set @@ -3585,7 +3577,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub @@ -3608,7 +3600,7 @@ br $for-loop|4 end end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3620,7 +3612,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -3823,20 +3815,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $4 i32.const 556 i32.gt_u if - local.get $5 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -3851,21 +3843,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#has (; 46 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 43 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4027,7 +4005,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4124,7 +4102,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4148,7 +4126,84 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#rehash (; 50 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 46 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 0 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4310,7 +4365,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4443,7 +4498,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 49 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4507,7 +4562,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 53 ;) + (func $std/map/testNumeric (; 50 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4516,6 +4571,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 8 @@ -4552,7 +4608,14 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -4580,7 +4643,14 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4637,7 +4707,14 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4683,7 +4760,14 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4730,66 +4814,8 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $5 - local.get $7 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.get $0 - call $~lib/array/Array#set:length + call $~lib/map/Map#keys + local.set $2 local.get $1 call $~lib/map/Map#values local.set $6 @@ -4821,9 +4847,9 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - local.set $5 - call $~lib/map/Map#constructor local.set $4 + call $~lib/map/Map#constructor + local.set $5 i32.const 0 local.set $0 loop $for-loop|4 @@ -4857,7 +4883,14 @@ local.set $7 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4871,7 +4904,15 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4881,7 +4922,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $0 local.get $0 call $~lib/map/Map#set @@ -4894,7 +4935,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub @@ -4917,7 +4958,7 @@ br $for-loop|4 end end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4929,7 +4970,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -4952,7 +4993,14 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -4984,7 +5032,14 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -5023,7 +5078,14 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -5051,7 +5113,14 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -5066,7 +5135,14 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -5124,20 +5200,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $4 i32.const 556 i32.gt_u if - local.get $5 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -5152,7 +5228,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/hash/hash16 (; 54 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 51 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -5167,7 +5243,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5210,20 +5286,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 56 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#rehash (; 57 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5382,7 +5445,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5476,7 +5539,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5499,7 +5562,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5537,19 +5600,84 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 61 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 57 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 i32.load offset=12 drop - local.get $0 local.get $1 + local.get $0 i32.const 1 call $~lib/array/ensureSize - local.get $0 local.get $1 + local.get $0 i32.store offset=12 + local.get $1 ) - (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 58 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5708,7 +5836,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5841,7 +5969,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5904,7 +6032,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 65 ;) + (func $std/map/testNumeric (; 61 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5913,6 +6041,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 @@ -5951,7 +6080,13 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -5981,7 +6116,13 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6042,7 +6183,13 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6092,7 +6239,13 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6141,66 +6294,8 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $5 - local.get $7 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.get $0 - call $~lib/array/Array#set:length + call $~lib/map/Map#keys + local.set $2 local.get $1 call $~lib/map/Map#values local.set $6 @@ -6232,9 +6327,9 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - local.set $5 - call $~lib/map/Map#constructor local.set $4 + call $~lib/map/Map#constructor + local.set $5 i32.const 0 local.set $0 loop $for-loop|4 @@ -6270,7 +6365,13 @@ local.set $7 local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6284,7 +6385,14 @@ local.get $7 i32.const 20 i32.sub - call $~lib/map/Map#has + local.tee $8 + local.get $8 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6294,7 +6402,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $0 local.get $0 call $~lib/map/Map#set @@ -6307,7 +6415,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub @@ -6330,7 +6438,7 @@ br $for-loop|4 end end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6342,7 +6450,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -6367,7 +6475,13 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6401,7 +6515,13 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -6442,7 +6562,13 @@ if local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -6472,7 +6598,13 @@ end local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find i32.eqz if i32.const 0 @@ -6487,7 +6619,13 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - call $~lib/map/Map#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find if i32.const 0 i32.const 304 @@ -6545,20 +6683,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $4 i32.const 556 i32.gt_u if - local.get $5 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -6573,7 +6711,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#rehash (; 66 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6732,7 +6870,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6824,7 +6962,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6845,7 +6983,84 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#rehash (; 69 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 65 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 15 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 1 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/map/Map#rehash (; 66 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7004,7 +7219,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7135,7 +7350,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 68 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7196,7 +7411,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 72 ;) + (func $std/map/testNumeric (; 69 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7436,66 +7651,8 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 15 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $4 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $5 - local.get $7 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $2 - local.get $0 - call $~lib/array/Array#set:length + call $~lib/map/Map#keys + local.set $2 local.get $1 call $~lib/map/Map#values local.set $6 @@ -7527,9 +7684,9 @@ local.get $0 call $~lib/map/Map#clear local.get $0 - local.set $5 - call $~lib/map/Map#constructor local.set $4 + call $~lib/map/Map#constructor + local.set $5 i32.const 0 local.set $0 loop $for-loop|4 @@ -7598,7 +7755,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $0 local.get $0 call $~lib/map/Map#set @@ -7611,7 +7768,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub @@ -7634,7 +7791,7 @@ br $for-loop|4 end end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7646,7 +7803,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7861,20 +8018,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $4 i32.const 556 i32.gt_u if - local.get $5 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -7889,7 +8046,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#get (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 70 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7908,7 +8065,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#delete (; 74 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7967,7 +8124,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 75 ;) + (func $std/map/testNumeric (; 72 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8161,21 +8318,21 @@ end local.get $1 i32.load offset=8 - local.set $0 + local.set $2 local.get $1 i32.load offset=16 - local.tee $2 + local.tee $6 call $~lib/array/Array#constructor - local.set $4 - i32.const 0 local.set $3 - loop $for-loop|05 - local.get $5 - local.get $2 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $4 + local.get $6 i32.lt_s if - local.get $0 - local.get $5 + local.get $2 + local.get $4 i32.const 12 i32.mul i32.add @@ -8185,36 +8342,41 @@ i32.and i32.eqz if - local.get $3 - local.tee $6 + local.get $0 + local.tee $5 i32.const 1 i32.add - local.set $3 - local.get $4 - local.get $6 + local.set $0 + local.get $3 + local.get $5 local.get $7 i32.load call $~lib/array/Array#__set end - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 - br $for-loop|05 + local.set $4 + br $for-loop|00 end end - local.get $4 local.get $3 - call $~lib/array/Array#set:length - local.get $4 - local.set $3 + i32.load offset=12 + drop + local.get $3 + local.get $0 + i32.const 2 + call $~lib/array/ensureSize + local.get $3 + local.get $0 + i32.store offset=12 local.get $1 call $~lib/map/Map#values + local.set $6 + call $~lib/map/Map#constructor local.set $5 call $~lib/map/Map#constructor local.set $4 - call $~lib/map/Map#constructor - local.set $6 i32.const 0 local.set $0 loop $for-loop|2 @@ -8227,7 +8389,7 @@ local.get $0 call $~lib/array/Array#__get local.set $2 - local.get $5 + local.get $6 local.get $0 call $~lib/array/Array#__get local.set $7 @@ -8262,7 +8424,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 local.get $2 local.get $2 call $~lib/map/Map#set @@ -8275,7 +8437,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 local.get $7 i32.const 20 i32.sub @@ -8298,7 +8460,7 @@ br $for-loop|2 end end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -8310,7 +8472,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -8498,29 +8660,29 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $6 i32.const 556 i32.gt_u if - local.get $5 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $4 i32.const 556 i32.gt_u if - local.get $6 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -8535,7 +8697,84 @@ call $~lib/rt/pure/decrement end ) - (func $std/map/testNumeric (; 76 ;) + (func $~lib/map/Map#keys (; 73 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $std/map/testNumeric (; 74 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8753,66 +8992,8 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 + call $~lib/map/Map#keys local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $4 - i32.store offset=12 - loop $for-loop|05 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $6 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $5 - local.tee $0 - i32.const 1 - i32.add - local.set $5 - local.get $2 - local.get $0 - local.get $7 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|05 - end - end - local.get $2 - local.get $5 - call $~lib/array/Array#set:length - local.get $2 - local.set $5 local.get $1 call $~lib/map/Map#values local.set $6 @@ -8844,16 +9025,16 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $5 i32.const 0 local.set $0 loop $for-loop|2 local.get $0 - local.get $5 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $5 + local.get $4 local.get $0 call $~lib/array/Array#__get local.set $3 @@ -8905,7 +9086,7 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub @@ -8940,7 +9121,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -9119,11 +9300,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.const 556 i32.gt_u if - local.get $5 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -9146,11 +9327,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $5 i32.const 556 i32.gt_u if - local.get $4 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -9165,7 +9346,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#clear (; 77 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 75 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -9215,7 +9396,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 78 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 76 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -9281,7 +9462,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 79 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 77 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -9322,7 +9503,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 80 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 78 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9481,7 +9662,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 81 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 79 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9571,7 +9752,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 82 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 80 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -9590,7 +9771,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -9628,19 +9809,84 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 84 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 82 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 21 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 i32.load offset=12 drop - local.get $0 local.get $1 + local.get $0 i32.const 3 call $~lib/array/ensureSize - local.get $0 local.get $1 + local.get $0 i32.store offset=12 + local.get $1 ) - (func $~lib/map/Map#values (; 85 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 83 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9692,11 +9938,18 @@ end end local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 local.get $0 - call $~lib/array/Array#set:length + i32.store offset=12 local.get $1 ) - (func $~lib/map/Map#clear (; 86 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 84 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -9746,7 +9999,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 87 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -9767,7 +10020,7 @@ i32.add i64.load ) - (func $~lib/map/Map#rehash (; 88 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 86 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9926,7 +10179,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 89 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 87 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10052,7 +10305,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 90 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 88 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -10112,7 +10365,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 91 ;) + (func $std/map/testNumeric (; 89 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10121,9 +10374,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i32) - (local $10 i64) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 20 @@ -10337,69 +10589,11 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 21 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $4 - i32.store offset=12 - loop $for-loop|05 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $8 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $9 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $5 - local.tee $6 - i32.const 1 - i32.add - local.set $5 - local.get $2 - local.get $6 - local.get $9 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|05 - end - end - local.get $2 - local.get $5 - call $~lib/array/Array#set:length - local.get $2 + call $~lib/map/Map#keys local.set $5 local.get $1 call $~lib/map/Map#values - local.set $4 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 22 @@ -10430,19 +10624,19 @@ call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $7 + local.get $3 local.get $5 i32.load offset=12 i32.lt_s if local.get $5 - local.get $7 + local.get $3 call $~lib/array/Array#__get local.set $0 - local.get $4 local.get $7 + local.get $3 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $1 local.get $0 local.get $0 @@ -10458,12 +10652,12 @@ unreachable end local.get $1 - local.get $3 + local.get $4 i32.const 20 i32.sub i64.extend_i32_s - local.tee $10 - local.get $10 + local.tee $8 + local.get $8 call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.eqz @@ -10479,35 +10673,35 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $8 + local.tee $9 i32.const 556 i32.gt_u if - local.get $8 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end local.get $6 - local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set - local.tee $3 + local.tee $4 i32.const 556 i32.gt_u if - local.get $3 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $3 i32.const 1 i32.add - local.set $7 + local.set $3 br $for-loop|2 end end @@ -10634,11 +10828,11 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $7 + local.tee $3 i32.const 556 i32.gt_u if - local.get $7 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -10713,11 +10907,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $7 i32.const 556 i32.gt_u if - local.get $4 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -10750,7 +10944,84 @@ call $~lib/rt/pure/decrement end ) - (func $std/map/testNumeric (; 92 ;) + (func $~lib/map/Map#keys (; 90 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 24 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $2 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $2 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $std/map/testNumeric (; 91 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10759,9 +11030,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i32) - (local $10 i64) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 23 @@ -10975,69 +11245,11 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 24 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $4 - i32.store offset=12 - loop $for-loop|05 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $8 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $9 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $5 - local.tee $6 - i32.const 1 - i32.add - local.set $5 - local.get $2 - local.get $6 - local.get $9 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|05 - end - end - local.get $2 - local.get $5 - call $~lib/array/Array#set:length - local.get $2 + call $~lib/map/Map#keys local.set $5 local.get $1 call $~lib/map/Map#values - local.set $4 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 25 @@ -11068,19 +11280,19 @@ call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $7 + local.get $3 local.get $5 i32.load offset=12 i32.lt_s if local.get $5 - local.get $7 + local.get $3 call $~lib/array/Array#__get local.set $0 - local.get $4 local.get $7 + local.get $3 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $1 local.get $0 local.get $0 @@ -11096,12 +11308,12 @@ unreachable end local.get $1 - local.get $3 + local.get $4 i32.const 20 i32.sub i64.extend_i32_s - local.tee $10 - local.get $10 + local.tee $8 + local.get $8 call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.eqz @@ -11117,35 +11329,35 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $8 + local.tee $9 i32.const 556 i32.gt_u if - local.get $8 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end local.get $6 - local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set - local.tee $3 + local.tee $4 i32.const 556 i32.gt_u if - local.get $3 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $3 i32.const 1 i32.add - local.set $7 + local.set $3 br $for-loop|2 end end @@ -11272,11 +11484,11 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $7 + local.tee $3 i32.const 556 i32.gt_u if - local.get $7 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11351,11 +11563,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $4 + local.get $7 i32.const 556 i32.gt_u if - local.get $4 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -11388,7 +11600,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#find (; 93 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 92 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11429,7 +11641,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 94 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11589,7 +11801,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 95 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11680,7 +11892,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 96 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 95 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -11700,6 +11912,117 @@ local.get $0 i32.load offset=4 ) + (func $~lib/map/Map#keys (; 96 ;) (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 f32) + local.get $0 + i32.load offset=8 + local.set $6 + local.get $0 + i32.load offset=16 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 27 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $5 + f32.load + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) (func $~lib/map/Map#rehash (; 97 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -12021,9 +12344,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 f32) (local $9 i32) - (local $10 f32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 26 @@ -12241,100 +12563,11 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 + call $~lib/map/Map#keys local.set $5 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 27 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $5 - i32.store offset=12 - loop $for-loop|05 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $8 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $9 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $6 - local.tee $3 - i32.const 1 - i32.add - local.set $6 - local.get $9 - f32.load - local.set $0 - local.get $3 - local.get $2 - i32.load offset=12 - i32.ge_u - if - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.add - local.tee $9 - i32.const 2 - call $~lib/array/ensureSize - local.get $2 - local.get $9 - i32.store offset=12 - end - local.get $2 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - f32.store - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|05 - end - end - local.get $2 - local.get $6 - call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $5 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 28 @@ -12342,36 +12575,36 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 0 i32.store - local.get $3 + local.get $2 i32.const 0 i32.store offset=4 - local.get $3 + local.get $2 i32.const 0 i32.store offset=8 - local.get $3 + local.get $2 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 i32.const 0 i32.store offset=16 - local.get $3 + local.get $2 i32.const 0 i32.store offset=20 - local.get $3 + local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $7 - local.get $2 + local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $2 + local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -12382,16 +12615,16 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.load offset=4 - local.get $7 + local.get $3 i32.const 2 i32.shl i32.add f32.load local.set $0 - local.get $5 local.get $7 + local.get $3 call $~lib/array/Array#__get local.set $4 local.get $1 @@ -12414,8 +12647,8 @@ i32.const 20 i32.sub f32.convert_i32_s - local.tee $10 - local.get $10 + local.tee $8 + local.get $8 i32.reinterpret_f32 call $~lib/util/hash/hash32 call $~lib/map/Map#find @@ -12428,15 +12661,15 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $8 + local.tee $9 i32.const 556 i32.gt_u if - local.get $8 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -12457,14 +12690,14 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $3 i32.const 1 i32.add - local.set $7 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -12590,11 +12823,11 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $7 + local.tee $3 i32.const 556 i32.gt_u if - local.get $7 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -12662,29 +12895,29 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 556 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $7 i32.const 556 i32.gt_u if - local.get $5 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $3 + local.get $2 i32.const 556 i32.gt_u if - local.get $3 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -13020,7 +13253,118 @@ local.get $0 i32.load offset=8 ) - (func $~lib/map/Map#rehash (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#keys (; 105 ;) (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.get $0 + i32.load offset=8 + local.set $6 + local.get $0 + i32.load offset=16 + local.set $3 + call $~lib/rt/tlsf/maybeInitialize + i32.const 16 + i32.const 30 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.get $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $4 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $4 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $5 + f64.load + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|0 + end + end + local.get $1 + i32.load offset=12 + drop + local.get $1 + local.get $0 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/map/Map#rehash (; 106 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13180,7 +13524,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#set (; 106 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 107 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13307,7 +13651,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 107 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 108 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -13368,7 +13712,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 108 ;) + (func $std/map/testNumeric (; 109 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -13377,9 +13721,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 f64) (local $9 i32) - (local $10 f64) call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 29 @@ -13597,100 +13940,11 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 + call $~lib/map/Map#keys local.set $5 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 30 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $5 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $5 - i32.store offset=12 - loop $for-loop|05 - local.get $4 - local.get $5 - i32.lt_s - if - local.get $8 - local.get $4 - i32.const 4 - i32.shl - i32.add - local.tee $9 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $6 - local.tee $3 - i32.const 1 - i32.add - local.set $6 - local.get $9 - f64.load - local.set $0 - local.get $3 - local.get $2 - i32.load offset=12 - i32.ge_u - if - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.add - local.tee $9 - i32.const 3 - call $~lib/array/ensureSize - local.get $2 - local.get $9 - i32.store offset=12 - end - local.get $2 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $0 - f64.store - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|05 - end - end - local.get $2 - local.get $6 - call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $5 + local.set $7 call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 31 @@ -13698,36 +13952,36 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 0 i32.store - local.get $3 + local.get $2 i32.const 0 i32.store offset=4 - local.get $3 + local.get $2 i32.const 0 i32.store offset=8 - local.get $3 + local.get $2 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 i32.const 0 i32.store offset=16 - local.get $3 + local.get $2 i32.const 0 i32.store offset=20 - local.get $3 + local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $7 - local.get $2 + local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $2 + local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -13738,16 +13992,16 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.load offset=4 - local.get $7 + local.get $3 i32.const 3 i32.shl i32.add f64.load local.set $0 - local.get $5 local.get $7 + local.get $3 call $~lib/array/Array#__get local.set $4 local.get $1 @@ -13770,8 +14024,8 @@ i32.const 20 i32.sub f64.convert_i32_s - local.tee $10 - local.get $10 + local.tee $8 + local.get $8 i64.reinterpret_f64 call $~lib/util/hash/hash64 call $~lib/map/Map#find @@ -13784,15 +14038,15 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $8 + local.tee $9 i32.const 556 i32.gt_u if - local.get $8 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -13813,14 +14067,14 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $3 i32.const 1 i32.add - local.set $7 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -13946,11 +14200,11 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $7 + local.tee $3 i32.const 556 i32.gt_u if - local.get $7 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -14018,29 +14272,29 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 556 i32.gt_u if - local.get $2 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $7 i32.const 556 i32.gt_u if - local.get $5 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $3 + local.get $2 i32.const 556 i32.gt_u if - local.get $3 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -14064,7 +14318,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 109 ;) + (func $~start (; 110 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -14076,7 +14330,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 110 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 111 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14169,9 +14423,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index e3ee877089..8f2da46949 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1,11 +1,10 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) - (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) + (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $none_=>_none (func)) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) @@ -16,7 +15,7 @@ (type $f64_=>_none (func (param f64))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) @@ -475,23 +474,7 @@ end i32.const 1 ) - (func $std/math/test_abs (; 38 ;) (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.abs - local.get $1 - f64.const 0 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/abs - local.get $1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/R (; 39 ;) (param $0 f64) (result f64) + (func $~lib/math/R (; 38 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 local.get $0 @@ -534,7 +517,7 @@ f64.add f64.div ) - (func $~lib/math/NativeMath.acos (; 40 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 39 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -658,23 +641,7 @@ f64.add f64.mul ) - (func $std/math/test_acos (; 41 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.acos - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/acos - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/Rf (; 42 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 40 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -693,7 +660,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 43 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 41 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -809,7 +776,7 @@ f32.add f32.mul ) - (func $~lib/math/NativeMath.log1p (; 44 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log1p (; 42 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1007,7 +974,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 45 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 43 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 f64) @@ -1175,7 +1142,7 @@ f64.mul f64.add ) - (func $std/math/test_acosh (; 46 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_acosh (; 44 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i64) block $__inlined_func$~lib/math/NativeMath.acosh (result f64) @@ -1244,7 +1211,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (; 47 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 45 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -1414,7 +1381,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 48 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 46 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -1548,7 +1515,7 @@ f32.mul f32.add ) - (func $std/math/test_acoshf (; 49 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_acoshf (; 47 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 @@ -1603,7 +1570,7 @@ local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.asin (; 50 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 48 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1741,23 +1708,7 @@ end local.get $0 ) - (func $std/math/test_asin (; 51 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.asin - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/asin - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.asin (; 52 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 49 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -1837,7 +1788,7 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.asinh (; 53 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 50 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -1907,71 +1858,58 @@ local.get $0 f64.copysign ) - (func $std/math/test_asinh (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.asinh - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/asinh - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.asinh (; 55 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_asinhf (; 51 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 f32) local.get $0 + local.tee $4 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 f32.reinterpret_i32 - local.set $1 - local.get $2 + local.set $0 + local.get $3 i32.const 1166016512 i32.ge_u - if (result f32) - local.get $1 + if + local.get $0 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add + local.set $0 else - local.get $2 + local.get $3 i32.const 1073741824 i32.ge_u - if (result f32) + if f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f32.mul f32.const 1 f32.add f32.sqrt - local.get $1 + local.get $0 f32.add f32.div f32.add call $~lib/math/NativeMathf.log + local.set $0 else - local.get $2 + local.get $3 i32.const 964689920 i32.ge_u - if (result f32) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.const 1 f32.add f32.sqrt @@ -1980,15 +1918,18 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $4 f32.copysign + local.get $1 + local.get $2 + call $std/math/check ) - (func $~lib/math/NativeMath.atan (; 56 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 52 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2211,23 +2152,7 @@ local.get $3 f64.copysign ) - (func $std/math/test_atan (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.atan - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/atan - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.atan (; 58 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 53 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2423,7 +2348,7 @@ local.get $4 f32.copysign ) - (func $std/math/test_atanh (; 59 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atanh (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i64) (local $5 f64) @@ -2491,7 +2416,7 @@ i32.const 0 end ) - (func $std/math/test_atanhf (; 60 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_atanhf (; 55 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 f32) (local $4 i32) local.get $0 @@ -2544,7 +2469,7 @@ local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (; 61 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 56 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2754,7 +2679,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 62 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2772,7 +2697,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 63 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 58 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2965,7 +2890,7 @@ i32.and select ) - (func $~lib/math/NativeMath.cbrt (; 64 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 59 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3087,23 +3012,7 @@ f64.mul f64.add ) - (func $std/math/test_cbrt (; 65 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.cbrt - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/cbrt - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.cbrt (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 60 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3202,23 +3111,7 @@ f64.div f32.demote_f64 ) - (func $std/math/test_ceil (; 67 ;) (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.ceil - local.get $1 - f64.const 0 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/ceil - local.get $1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/pio2_large_quot (; 68 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 61 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3504,7 +3397,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 69 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 62 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3842,23 +3735,7 @@ end local.get $0 ) - (func $std/math/test_cos (; 70 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.cos - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/cos - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.cos (; 71 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 63 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4127,7 +4004,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.expm1 (; 72 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 64 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4398,7 +4275,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 73 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 65 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4550,73 +4427,71 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 74 ;) (param $0 f64) (result f64) - (local $1 i32) - (local $2 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - f64.reinterpret_i64 - local.set $0 - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 1072049730 - i32.lt_u - if - local.get $1 - i32.const 1045430272 + (func $std/math/test_cosh (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) + block $__inlined_func$~lib/math/NativeMath.cosh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $5 + f64.reinterpret_i64 + local.set $3 + local.get $5 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $4 + i32.const 1072049730 i32.lt_u if f64.const 1 - return + local.get $4 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.cosh + drop + f64.const 1 + local.get $3 + call $~lib/math/NativeMath.expm1 + local.tee $3 + local.get $3 + f64.mul + f64.const 2 + f64.const 2 + local.get $3 + f64.mul + f64.add + f64.div + f64.add + br $__inlined_func$~lib/math/NativeMath.cosh end - f64.const 1 - local.get $0 - call $~lib/math/NativeMath.expm1 - local.tee $0 - local.get $0 - f64.mul - f64.const 2 - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.div - f64.add - return - end - local.get $1 - i32.const 1082535490 - i32.lt_u - if - f64.const 0.5 - local.get $0 + local.get $4 + i32.const 1082535490 + i32.lt_u + if + f64.const 0.5 + local.get $3 + call $~lib/math/NativeMath.exp + local.tee $3 + f64.const 1 + local.get $3 + f64.div + f64.add + f64.mul + br $__inlined_func$~lib/math/NativeMath.cosh + end + local.get $3 + f64.const 1416.0996898839683 + f64.sub call $~lib/math/NativeMath.exp - local.tee $0 - f64.const 1 - local.get $0 - f64.div - f64.add + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 f64.mul - return end - local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $std/math/test_cosh (; 75 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.cosh local.get $1 local.get $2 call $std/math/check @@ -4630,7 +4505,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 76 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 67 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4880,7 +4755,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 77 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 68 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5014,98 +4889,70 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 78 ;) (param $0 f32) (result f32) - (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - f32.reinterpret_i32 - local.set $0 - local.get $1 - i32.const 1060205079 - i32.lt_u - if - local.get $1 - i32.const 964689920 + (func $std/math/test_coshf (; 69 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + f32.reinterpret_i32 + local.set $0 + local.get $3 + i32.const 1060205079 i32.lt_u if f32.const 1 - return + local.get $3 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.cosh + drop + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh + end + local.get $3 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh end - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - return - end - local.get $1 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 local.get $0 + f32.const 162.88958740234375 + f32.sub call $~lib/math/NativeMathf.exp - local.tee $0 + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - return - end - local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - ) - (func $std/math/test_exp (; 79 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.exp - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/exp - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 end - ) - (func $std/math/test_expm1 (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.expm1 local.get $1 local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/expm1 - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end + call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (; 81 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp2 (; 70 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5311,7 +5158,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 82 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 71 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5328,7 +5175,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 83 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 72 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5423,23 +5270,7 @@ f32.demote_f64 end ) - (func $std/math/test_floor (; 84 ;) (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.floor - local.get $1 - f64.const 0 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/floor - local.get $1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMath.hypot (; 85 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 73 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5608,7 +5439,7 @@ f64.sqrt f64.mul ) - (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 74 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5713,23 +5544,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_log (; 87 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.log - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/log - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMath.log10 (; 88 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 75 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5931,23 +5746,7 @@ local.get $1 f64.add ) - (func $std/math/test_log10 (; 89 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.log10 - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/log10 - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 76 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6105,23 +5904,7 @@ f32.mul f32.add ) - (func $std/math/test_log1p (; 91 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.log1p - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/log1p - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMath.log2 (; 92 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 77 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6316,23 +6099,7 @@ local.get $1 f64.add ) - (func $std/math/test_log2 (; 93 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.log2 - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/log2 - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.log2 (; 94 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 78 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6482,7 +6249,7 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_max (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_max (; 79 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6500,7 +6267,7 @@ i32.const 0 end ) - (func $std/math/test_min (; 96 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_min (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6518,7 +6285,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.mod (; 97 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 81 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6721,7 +6488,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 98 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 82 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6739,7 +6506,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 99 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 83 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6931,7 +6698,7 @@ local.get $0 f32.mul ) - (func $~lib/math/NativeMath.pow (; 100 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 84 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -7887,7 +7654,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 101 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 85 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -7905,7 +7672,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 102 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 86 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8363,7 +8130,7 @@ end local.get $0 ) - (func $~lib/math/murmurHash3 (; 103 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 87 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8384,7 +8151,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 104 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 88 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8416,7 +8183,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 105 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 89 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8460,7 +8227,7 @@ unreachable end ) - (func $std/math/test_sign (; 106 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_sign (; 90 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8483,21 +8250,7 @@ i32.const 0 end ) - (func $std/math/test_signf (; 107 ;) (param $0 f32) (param $1 f32) (result i32) - f32.const 1 - local.get $0 - f32.copysign - local.get $0 - local.get $0 - f32.abs - f32.const 0 - f32.gt - select - local.get $1 - f32.const 0 - call $std/math/check - ) - (func $~lib/math/NativeMath.rem (; 108 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 91 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -8746,7 +8499,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.rem (; 109 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 92 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8987,7 +8740,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 110 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 93 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9307,23 +9060,7 @@ end local.get $0 ) - (func $std/math/test_sin (; 111 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.sin - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/sin - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.sin (; 112 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 94 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9593,7 +9330,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sinh (; 113 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 95 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -9670,23 +9407,7 @@ f64.mul f64.mul ) - (func $std/math/test_sinh (; 114 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.sinh - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/sinh - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.sinh (; 115 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 96 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -9758,23 +9479,7 @@ f32.mul f32.mul ) - (func $std/math/test_sqrt (; 116 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - f64.sqrt - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/sqrt - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/tan_kern (; 117 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 97 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -9956,7 +9661,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 118 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 98 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10133,23 +9838,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (; 119 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.tan - local.get $1 - local.get $2 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/tan - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.tan (; 120 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 99 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10403,7 +10092,7 @@ local.get $1 f32.demote_f64 ) - (func $~lib/math/NativeMath.tanh (; 121 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 100 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10482,23 +10171,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 122 ;) (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 - if (result i32) - local.get $0 - call $~lib/bindings/Math/tanh - local.get $1 - local.get $2 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.tanh (; 123 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 101 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -10572,23 +10245,7 @@ local.get $0 f32.copysign ) - (func $std/math/test_trunc (; 124 ;) (param $0 f64) (param $1 f64) (result i32) - local.get $0 - f64.trunc - local.get $1 - f64.const 0 - call $std/math/check - if (result i32) - local.get $0 - call $~lib/bindings/Math/trunc - local.get $1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMath.sincos (; 125 ;) (param $0 f64) + (func $~lib/math/NativeMath.sincos (; 102 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -10983,7 +10640,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 126 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 103 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -11009,7 +10666,7 @@ drop end ) - (func $~lib/math/NativeMath.imul (; 127 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 104 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -11046,7 +10703,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 128 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 105 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -11069,7 +10726,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 129 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 106 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -11100,7 +10757,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 130 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 107 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -11146,7 +10803,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 131 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 108 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -11192,7 +10849,7 @@ end local.get $2 ) - (func $start:std/math (; 132 ;) + (func $start:std/math (; 109 ;) (local $0 f64) (local $1 f32) (local $2 i32) @@ -12259,9 +11916,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.06684839057968 f64.const 8.06684839057968 - call $std/math/test_abs + f64.const 8.06684839057968 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/abs + f64.const 8.06684839057968 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12273,7 +11940,17 @@ end f64.const 4.345239849338305 f64.const 4.345239849338305 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/abs + f64.const 4.345239849338305 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12283,9 +11960,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const 8.38143342755525 - call $std/math/test_abs + f64.const 8.38143342755525 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/abs + f64.const 8.38143342755525 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12295,9 +11982,19 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const 6.531673581913484 - call $std/math/test_abs + f64.const 6.531673581913484 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/abs + f64.const 6.531673581913484 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12309,7 +12006,17 @@ end f64.const 9.267056966972586 f64.const 9.267056966972586 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/abs + f64.const 9.267056966972586 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12321,7 +12028,17 @@ end f64.const 0.6619858980995045 f64.const 0.6619858980995045 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/abs + f64.const 0.6619858980995045 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12331,9 +12048,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const 0.4066039223853553 - call $std/math/test_abs + f64.const 0.4066039223853553 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/abs + f64.const 0.4066039223853553 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12345,7 +12072,17 @@ end f64.const 0.5617597462207241 f64.const 0.5617597462207241 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/abs + f64.const 0.5617597462207241 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12357,7 +12094,17 @@ end f64.const 0.7741522965913037 f64.const 0.7741522965913037 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/abs + f64.const 0.7741522965913037 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12367,9 +12114,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const 0.6787637026394024 - call $std/math/test_abs + f64.const 0.6787637026394024 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/abs + f64.const 0.6787637026394024 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12381,7 +12138,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/abs + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12391,9 +12158,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0 f64.const 0 - call $std/math/test_abs + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/abs + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12405,7 +12182,17 @@ end f64.const 1 f64.const 1 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/abs + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12415,9 +12202,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1 f64.const 1 - call $std/math/test_abs + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/abs + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12429,7 +12226,17 @@ end f64.const inf f64.const inf - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/abs + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12439,9 +12246,19 @@ call $~lib/builtins/abort unreachable end - f64.const -inf f64.const inf - call $std/math/test_abs + f64.const inf + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/abs + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12453,7 +12270,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_abs + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/abs + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12685,9 +12512,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12698,9 +12535,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12711,9 +12558,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12724,9 +12581,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12737,9 +12604,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12750,9 +12627,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.acos f64.const 0.8473310828433507 f64.const -0.41553276777267456 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/acos + f64.const 0.8473310828433507 + f64.const -0.41553276777267456 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12763,9 +12650,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.acos f64.const 1.989530071088669 f64.const 0.4973946213722229 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/acos + f64.const 1.989530071088669 + f64.const 0.4973946213722229 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12776,9 +12673,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.acos f64.const 0.9742849645674904 f64.const -0.4428897500038147 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/acos + f64.const 0.9742849645674904 + f64.const -0.4428897500038147 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12789,9 +12696,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.acos f64.const 0.6854215158636222 f64.const -0.12589527666568756 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/acos + f64.const 0.6854215158636222 + f64.const -0.12589527666568756 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12802,9 +12719,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.acos f64.const 2.316874138205964 f64.const -0.17284949123859406 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/acos + f64.const 2.316874138205964 + f64.const -0.17284949123859406 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12815,9 +12742,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.acos f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/acos + f64.const 1.5707963267948966 + f64.const -0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12828,9 +12765,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.acos f64.const 3.141592653589793 f64.const -0.27576595544815063 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/acos + f64.const 3.141592653589793 + f64.const -0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12841,9 +12788,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.acos f64.const 0 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/acos + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12854,9 +12811,19 @@ unreachable end f64.const 1.0000000000000002 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 1.0000000000000002 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12867,9 +12834,19 @@ unreachable end f64.const -1.0000000000000002 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -1.0000000000000002 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12880,9 +12857,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12893,9 +12880,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12906,9 +12903,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/acos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12919,9 +12926,19 @@ unreachable end f64.const -0.5309227209592985 + call $~lib/math/NativeMath.acos f64.const 2.1304853799705463 f64.const 0.1391008496284485 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const -0.5309227209592985 + call $~lib/bindings/Math/acos + f64.const 2.1304853799705463 + f64.const 0.1391008496284485 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -12932,9 +12949,19 @@ unreachable end f64.const 0.4939556746399746 + call $~lib/math/NativeMath.acos f64.const 1.0541629875851946 f64.const 0.22054767608642578 - call $std/math/test_acos + call $std/math/check + if (result i32) + f64.const 0.4939556746399746 + call $~lib/bindings/Math/acos + f64.const 1.0541629875851946 + f64.const 0.22054767608642578 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13733,9 +13760,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13746,9 +13783,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13759,9 +13806,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13772,9 +13829,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13785,9 +13852,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13798,9 +13875,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.asin f64.const 0.7234652439515459 f64.const -0.13599912822246552 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/asin + f64.const 0.7234652439515459 + f64.const -0.13599912822246552 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13811,9 +13898,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.asin f64.const -0.41873374429377225 f64.const -0.09264230728149414 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/asin + f64.const -0.41873374429377225 + f64.const -0.09264230728149414 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13824,9 +13921,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.asin f64.const 0.5965113622274062 f64.const -0.10864213854074478 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/asin + f64.const 0.5965113622274062 + f64.const -0.10864213854074478 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13837,9 +13944,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.asin f64.const 0.8853748109312743 f64.const -0.4256366193294525 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/asin + f64.const 0.8853748109312743 + f64.const -0.4256366193294525 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13850,9 +13967,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.asin f64.const -0.7460778114110673 f64.const 0.13986606895923615 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/asin + f64.const -0.7460778114110673 + f64.const 0.13986606895923615 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13863,9 +13990,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.asin f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/asin + f64.const 1.5707963267948966 + f64.const -0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13876,9 +14013,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.asin f64.const -1.5707963267948966 f64.const 0.27576595544815063 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/asin + f64.const -1.5707963267948966 + f64.const 0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13889,9 +14036,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.asin f64.const 0 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/asin + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13902,9 +14059,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.asin f64.const -0 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/asin + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13915,9 +14082,19 @@ unreachable end f64.const 1.0000000000000002 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 1.0000000000000002 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13928,9 +14105,19 @@ unreachable end f64.const -1.0000000000000002 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -1.0000000000000002 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13941,9 +14128,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13954,9 +14151,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13967,9 +14174,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/asin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -13980,9 +14197,19 @@ unreachable end f64.const 0.5073043929119148 + call $~lib/math/NativeMath.asin f64.const 0.5320538997772349 f64.const -0.16157317161560059 - call $std/math/test_asin + call $std/math/check + if (result i32) + f64.const 0.5073043929119148 + call $~lib/bindings/Math/asin + f64.const 0.5320538997772349 + f64.const -0.16157317161560059 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14273,9 +14500,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.asinh f64.const -2.784729878387861 f64.const -0.4762189984321594 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/asinh + f64.const -2.784729878387861 + f64.const -0.4762189984321594 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14286,9 +14523,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.asinh f64.const 2.175213389013164 f64.const -0.02728751301765442 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/asinh + f64.const 2.175213389013164 + f64.const -0.02728751301765442 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14299,9 +14546,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.asinh f64.const -2.822706083697696 f64.const 0.20985257625579834 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/asinh + f64.const -2.822706083697696 + f64.const 0.20985257625579834 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14312,9 +14569,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.asinh f64.const -2.575619446591922 f64.const 0.3113134205341339 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/asinh + f64.const -2.575619446591922 + f64.const 0.3113134205341339 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14325,9 +14592,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.asinh f64.const 2.9225114951048674 f64.const 0.4991756081581116 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/asinh + f64.const 2.9225114951048674 + f64.const 0.4991756081581116 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14338,9 +14615,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.asinh f64.const 0.6212462762707166 f64.const -0.4697347581386566 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/asinh + f64.const 0.6212462762707166 + f64.const -0.4697347581386566 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14351,9 +14638,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.asinh f64.const -0.39615990393192035 f64.const -0.40814438462257385 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/asinh + f64.const -0.39615990393192035 + f64.const -0.40814438462257385 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14364,9 +14661,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.asinh f64.const 0.5357588870255474 f64.const 0.3520713150501251 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/asinh + f64.const 0.5357588870255474 + f64.const 0.3520713150501251 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14377,9 +14684,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.asinh f64.const 0.7123571263197349 f64.const 0.13371451199054718 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/asinh + f64.const 0.7123571263197349 + f64.const 0.13371451199054718 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14390,9 +14707,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.asinh f64.const -0.635182348903198 f64.const 0.04749670997262001 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/asinh + f64.const -0.635182348903198 + f64.const 0.04749670997262001 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14403,9 +14730,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.asinh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/asinh + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14416,9 +14753,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.asinh f64.const inf f64.const 0 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/asinh + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14429,9 +14776,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.asinh f64.const -inf f64.const 0 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/asinh + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14442,9 +14799,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.asinh f64.const 0 f64.const 0 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/asinh + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14455,9 +14822,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.asinh f64.const -0 f64.const 0 - call $std/math/test_asinh + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/asinh + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14468,10 +14845,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.asinh f32.const -2.7847299575805664 f32.const -0.14418013393878937 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14482,10 +14858,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.asinh f32.const 2.17521333694458 f32.const -0.020796965807676315 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14496,10 +14871,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.asinh f32.const -2.8227059841156006 f32.const 0.44718533754348755 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14510,10 +14884,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.asinh f32.const -2.5756194591522217 f32.const -0.14822272956371307 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14524,10 +14897,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.asinh f32.const 2.922511577606201 f32.const 0.14270681142807007 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14538,10 +14910,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.asinh f32.const 0.6212462782859802 f32.const 0.3684912919998169 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14552,10 +14923,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.asinh f32.const -0.39615991711616516 f32.const -0.13170306384563446 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14566,10 +14936,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.asinh f32.const 0.535758912563324 f32.const 0.08184859901666641 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14580,10 +14949,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.asinh f32.const 0.7123571038246155 f32.const -0.14270737767219543 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14594,10 +14962,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.asinh f32.const -0.6351823210716248 f32.const 0.2583143711090088 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14608,10 +14975,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.asinh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14622,10 +14988,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.asinh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14636,10 +15001,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.asinh f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14650,10 +15014,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.asinh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14664,10 +15027,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.asinh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14678,9 +15040,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.atan f64.const -1.4474613762633468 f64.const 0.14857111871242523 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/atan + f64.const -1.4474613762633468 + f64.const 0.14857111871242523 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14691,9 +15063,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.atan f64.const 1.344597927114538 f64.const -0.08170335739850998 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/atan + f64.const 1.344597927114538 + f64.const -0.08170335739850998 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14704,9 +15086,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.atan f64.const -1.4520463463295539 f64.const -0.07505480200052261 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/atan + f64.const -1.4520463463295539 + f64.const -0.07505480200052261 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14717,9 +15109,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.atan f64.const -1.4188758658752532 f64.const -0.057633496820926666 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/atan + f64.const -1.4188758658752532 + f64.const -0.057633496820926666 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14730,9 +15132,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.atan f64.const 1.463303145448706 f64.const 0.1606956422328949 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/atan + f64.const 1.463303145448706 + f64.const 0.1606956422328949 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14743,9 +15155,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.atan f64.const 0.5847550670238325 f64.const 0.4582556486129761 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/atan + f64.const 0.5847550670238325 + f64.const 0.4582556486129761 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14756,9 +15178,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.atan f64.const -0.3861864177552131 f64.const -0.2574281692504883 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/atan + f64.const -0.3861864177552131 + f64.const -0.2574281692504883 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14769,9 +15201,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.atan f64.const 0.5118269531628881 f64.const -0.11444277316331863 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/atan + f64.const 0.5118269531628881 + f64.const -0.11444277316331863 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14782,9 +15224,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.atan f64.const 0.6587802431653822 f64.const -0.11286488175392151 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/atan + f64.const 0.6587802431653822 + f64.const -0.11286488175392151 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14795,9 +15247,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.atan f64.const -0.5963307826973472 f64.const -0.2182842344045639 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/atan + f64.const -0.5963307826973472 + f64.const -0.2182842344045639 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14808,9 +15270,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.atan f64.const 0 f64.const 0 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/atan + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14821,9 +15293,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.atan f64.const -0 f64.const 0 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/atan + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14834,9 +15316,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.atan f64.const 0.7853981633974483 f64.const -0.27576595544815063 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/atan + f64.const 0.7853981633974483 + f64.const -0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14847,9 +15339,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.atan f64.const -0.7853981633974483 f64.const 0.27576595544815063 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/atan + f64.const -0.7853981633974483 + f64.const 0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14860,9 +15362,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.atan f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/atan + f64.const 1.5707963267948966 + f64.const -0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14873,9 +15385,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.atan f64.const -1.5707963267948966 f64.const 0.27576595544815063 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/atan + f64.const -1.5707963267948966 + f64.const 0.27576595544815063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14886,9 +15408,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.atan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/atan + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -14899,9 +15431,19 @@ unreachable end f64.const 0.6929821535674624 + call $~lib/math/NativeMath.atan f64.const 0.6060004555152562 f64.const -0.17075790464878082 - call $std/math/test_atan + call $std/math/check + if (result i32) + f64.const 0.6929821535674624 + call $~lib/bindings/Math/atan + f64.const 0.6060004555152562 + f64.const -0.17075790464878082 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16904,9 +17446,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.cbrt f64.const -2.0055552545020245 f64.const 0.46667951345443726 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/cbrt + f64.const -2.0055552545020245 + f64.const 0.46667951345443726 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16917,9 +17469,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.cbrt f64.const 1.6318162410515635 f64.const -0.08160271495580673 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/cbrt + f64.const 1.6318162410515635 + f64.const -0.08160271495580673 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16930,9 +17492,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.cbrt f64.const -2.031293910673361 f64.const -0.048101816326379776 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/cbrt + f64.const -2.031293910673361 + f64.const -0.048101816326379776 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16943,9 +17515,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.cbrt f64.const -1.8692820012204925 f64.const 0.08624018728733063 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/cbrt + f64.const -1.8692820012204925 + f64.const 0.08624018728733063 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16956,9 +17538,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.cbrt f64.const 2.100457720859702 f64.const -0.2722989022731781 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/cbrt + f64.const 2.100457720859702 + f64.const -0.2722989022731781 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16969,9 +17561,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.cbrt f64.const 0.8715311470455973 f64.const 0.4414918124675751 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/cbrt + f64.const 0.8715311470455973 + f64.const 0.4414918124675751 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16982,9 +17584,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.cbrt f64.const -0.740839030300223 f64.const 0.016453813761472702 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/cbrt + f64.const -0.740839030300223 + f64.const 0.016453813761472702 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -16995,9 +17607,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.cbrt f64.const 0.8251195400559286 f64.const 0.30680638551712036 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/cbrt + f64.const 0.8251195400559286 + f64.const 0.30680638551712036 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17008,9 +17630,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.cbrt f64.const 0.9182102478959914 f64.const 0.06543998420238495 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/cbrt + f64.const 0.9182102478959914 + f64.const 0.06543998420238495 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17021,9 +17653,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.cbrt f64.const -0.8788326906580094 f64.const -0.2016713172197342 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/cbrt + f64.const -0.8788326906580094 + f64.const -0.2016713172197342 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17034,9 +17676,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.cbrt f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/cbrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17047,9 +17699,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.cbrt f64.const inf f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/cbrt + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17060,9 +17722,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.cbrt f64.const -inf f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/cbrt + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17073,9 +17745,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.cbrt f64.const 0 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/cbrt + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17086,9 +17768,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.cbrt f64.const -0 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/cbrt + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17099,9 +17791,19 @@ unreachable end f64.const 9.313225746154785e-10 + call $~lib/math/NativeMath.cbrt f64.const 0.0009765625 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 9.313225746154785e-10 + call $~lib/bindings/Math/cbrt + f64.const 0.0009765625 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17112,9 +17814,19 @@ unreachable end f64.const -9.313225746154785e-10 + call $~lib/math/NativeMath.cbrt f64.const -0.0009765625 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -9.313225746154785e-10 + call $~lib/bindings/Math/cbrt + f64.const -0.0009765625 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17125,9 +17837,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.cbrt f64.const 1 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/cbrt + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17138,9 +17860,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.cbrt f64.const -1 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/cbrt + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17151,9 +17883,19 @@ unreachable end f64.const 8 + call $~lib/math/NativeMath.cbrt f64.const 2 f64.const 0 - call $std/math/test_cbrt + call $std/math/check + if (result i32) + f64.const 8 + call $~lib/bindings/Math/cbrt + f64.const 2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17443,9 +18185,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.06684839057968 f64.const -8 - call $std/math/test_ceil + f64.const -8 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/ceil + f64.const -8 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17455,9 +18207,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 f64.const 5 - call $std/math/test_ceil + f64.const 5 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/ceil + f64.const 5 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17467,9 +18229,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const -8 - call $std/math/test_ceil + f64.const -8 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/ceil + f64.const -8 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17479,9 +18251,19 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const -6 - call $std/math/test_ceil + f64.const -6 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/ceil + f64.const -6 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17491,9 +18273,19 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 f64.const 10 - call $std/math/test_ceil + f64.const 10 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/ceil + f64.const 10 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17503,9 +18295,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17515,9 +18317,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17527,9 +18339,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17539,9 +18361,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17551,9 +18383,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17565,7 +18407,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/ceil + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17577,7 +18429,17 @@ end f64.const inf f64.const inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/ceil + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17589,7 +18451,17 @@ end f64.const -inf f64.const -inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/ceil + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17601,7 +18473,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/ceil + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17613,7 +18495,17 @@ end f64.const -0 f64.const -0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17625,7 +18517,17 @@ end f64.const 1 f64.const 1 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17637,7 +18539,17 @@ end f64.const -1 f64.const -1 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17647,9 +18559,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17659,9 +18581,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.5 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17671,9 +18603,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 2 - call $std/math/test_ceil + f64.const 2 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const 2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17683,9 +18625,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_ceil + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17695,9 +18647,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17707,9 +18669,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17719,9 +18691,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17731,9 +18713,19 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17745,7 +18737,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/ceil + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17757,7 +18759,17 @@ end f64.const inf f64.const inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/ceil + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17769,7 +18781,17 @@ end f64.const -inf f64.const -inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/ceil + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17781,7 +18803,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/ceil + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17793,7 +18825,17 @@ end f64.const -0 f64.const -0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17805,19 +18847,39 @@ end f64.const 1 f64.const 1 - call $std/math/test_ceil - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 876 - i32.const 0 - call $~lib/builtins/abort - unreachable + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 876 + i32.const 0 + call $~lib/builtins/abort + unreachable end f64.const -1 f64.const -1 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17827,9 +18889,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17839,9 +18911,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.5 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17851,9 +18933,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 2 - call $std/math/test_ceil + f64.const 2 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const 2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17863,9 +18955,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_ceil + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17875,9 +18977,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17887,9 +18999,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17899,9 +19021,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17911,9 +19043,19 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17925,7 +19067,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/ceil + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17937,7 +19089,17 @@ end f64.const inf f64.const inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/ceil + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17949,7 +19111,17 @@ end f64.const -inf f64.const -inf - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/ceil + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17961,7 +19133,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/ceil + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17973,7 +19155,17 @@ end f64.const -0 f64.const -0 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17985,7 +19177,17 @@ end f64.const 1 f64.const 1 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -17997,7 +19199,17 @@ end f64.const -1 f64.const -1 - call $std/math/test_ceil + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18007,9 +19219,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18019,9 +19241,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.5 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18031,9 +19263,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 2 - call $std/math/test_ceil + f64.const 2 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const 2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18043,9 +19285,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_ceil + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1.0000152587890625 + call $~lib/bindings/Math/ceil + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18055,9 +19307,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18067,9 +19329,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.9999923706054688 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18079,9 +19351,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 1 - call $std/math/test_ceil + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18091,9 +19373,19 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_ceil + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/ceil + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18819,9 +20111,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.cos f64.const -0.21126281599887137 f64.const -0.10962469130754471 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/cos + f64.const -0.21126281599887137 + f64.const -0.10962469130754471 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18832,9 +20134,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.cos f64.const -0.35895602297578955 f64.const -0.10759828239679337 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/cos + f64.const -0.35895602297578955 + f64.const -0.10759828239679337 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18845,9 +20157,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.cos f64.const -0.503333091765516 f64.const -0.021430473774671555 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/cos + f64.const -0.503333091765516 + f64.const -0.021430473774671555 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18858,9 +20180,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.cos f64.const 0.9692853212503283 f64.const -0.4787876307964325 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/cos + f64.const 0.9692853212503283 + f64.const -0.4787876307964325 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18871,9 +20203,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.cos f64.const -0.9875878064788627 f64.const 0.4880668818950653 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/cos + f64.const -0.9875878064788627 + f64.const 0.4880668818950653 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18884,9 +20226,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.cos f64.const 0.7887730869248576 f64.const 0.12708666920661926 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/cos + f64.const 0.7887730869248576 + f64.const 0.12708666920661926 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18897,9 +20249,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.cos f64.const 0.9184692397007294 f64.const -0.26120713353157043 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/cos + f64.const 0.9184692397007294 + f64.const -0.26120713353157043 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18910,9 +20272,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.cos f64.const 0.8463190467415896 f64.const -0.302586168050766 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/cos + f64.const 0.8463190467415896 + f64.const -0.302586168050766 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18923,9 +20295,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.cos f64.const 0.7150139289952383 f64.const -0.08537746220827103 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/cos + f64.const 0.7150139289952383 + f64.const -0.08537746220827103 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18936,9 +20318,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.cos f64.const 0.7783494994757447 f64.const 0.30890750885009766 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/cos + f64.const 0.7783494994757447 + f64.const 0.30890750885009766 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18949,9 +20341,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18962,9 +20364,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18975,9 +20387,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.cos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/cos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -18988,9 +20410,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.cos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/cos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19001,9 +20433,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.cos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/cos + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19014,9 +20456,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.cos f64.const 0.5403023058681398 f64.const 0.4288286566734314 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/cos + f64.const 0.5403023058681398 + f64.const 0.4288286566734314 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19027,9 +20479,19 @@ unreachable end f64.const 2 + call $~lib/math/NativeMath.cos f64.const -0.4161468365471424 f64.const -0.35859397053718567 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2 + call $~lib/bindings/Math/cos + f64.const -0.4161468365471424 + f64.const -0.35859397053718567 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19040,9 +20502,19 @@ unreachable end f64.const 3 + call $~lib/math/NativeMath.cos f64.const -0.9899924966004454 f64.const 0.3788451552391052 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3 + call $~lib/bindings/Math/cos + f64.const -0.9899924966004454 + f64.const 0.3788451552391052 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19053,9 +20525,19 @@ unreachable end f64.const 4 + call $~lib/math/NativeMath.cos f64.const -0.6536436208636119 f64.const -0.23280560970306396 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4 + call $~lib/bindings/Math/cos + f64.const -0.6536436208636119 + f64.const -0.23280560970306396 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19066,9 +20548,19 @@ unreachable end f64.const 5 + call $~lib/math/NativeMath.cos f64.const 0.28366218546322625 f64.const -0.3277357816696167 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 5 + call $~lib/bindings/Math/cos + f64.const 0.28366218546322625 + f64.const -0.3277357816696167 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19079,9 +20571,19 @@ unreachable end f64.const 0.1 + call $~lib/math/NativeMath.cos f64.const 0.9950041652780258 f64.const 0.49558526277542114 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.1 + call $~lib/bindings/Math/cos + f64.const 0.9950041652780258 + f64.const 0.49558526277542114 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19092,9 +20594,19 @@ unreachable end f64.const 0.2 + call $~lib/math/NativeMath.cos f64.const 0.9800665778412416 f64.const -0.02407640963792801 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.2 + call $~lib/bindings/Math/cos + f64.const 0.9800665778412416 + f64.const -0.02407640963792801 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19105,9 +20617,19 @@ unreachable end f64.const 0.3 + call $~lib/math/NativeMath.cos f64.const 0.955336489125606 f64.const -0.37772229313850403 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.3 + call $~lib/bindings/Math/cos + f64.const 0.955336489125606 + f64.const -0.37772229313850403 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19118,9 +20640,19 @@ unreachable end f64.const 0.4 + call $~lib/math/NativeMath.cos f64.const 0.9210609940028851 f64.const 0.25818485021591187 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.4 + call $~lib/bindings/Math/cos + f64.const 0.9210609940028851 + f64.const 0.25818485021591187 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19131,9 +20663,19 @@ unreachable end f64.const 0.5 + call $~lib/math/NativeMath.cos f64.const 0.8775825618903728 f64.const 0.3839152157306671 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/cos + f64.const 0.8775825618903728 + f64.const 0.3839152157306671 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19144,9 +20686,19 @@ unreachable end f64.const 2.3641409746639015e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.3641409746639015e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19157,9 +20709,19 @@ unreachable end f64.const 1.1820704873319507e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.1820704873319507e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19170,9 +20732,19 @@ unreachable end f64.const 5e-324 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19183,9 +20755,19 @@ unreachable end f64.const -5e-324 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19196,9 +20778,19 @@ unreachable end f64.const -3.14 + call $~lib/math/NativeMath.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -3.14 + call $~lib/bindings/Math/cos + f64.const -0.9999987317275395 + f64.const 0.3855516016483307 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19209,9 +20801,19 @@ unreachable end f64.const 8988465674311579538646525e283 + call $~lib/math/NativeMath.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 8988465674311579538646525e283 + call $~lib/bindings/Math/cos + f64.const -0.826369834614148 + f64.const -0.3695965111255646 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19222,9 +20824,19 @@ unreachable end f64.const 1797693134862315708145274e284 + call $~lib/math/NativeMath.cos f64.const -0.9999876894265599 f64.const 0.23448343575000763 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1797693134862315708145274e284 + call $~lib/bindings/Math/cos + f64.const -0.9999876894265599 + f64.const 0.23448343575000763 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19235,9 +20847,19 @@ unreachable end f64.const -8988465674311579538646525e283 + call $~lib/math/NativeMath.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -8988465674311579538646525e283 + call $~lib/bindings/Math/cos + f64.const -0.826369834614148 + f64.const -0.3695965111255646 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19248,9 +20870,19 @@ unreachable end f64.const 3.14 + call $~lib/math/NativeMath.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.14 + call $~lib/bindings/Math/cos + f64.const -0.9999987317275395 + f64.const 0.3855516016483307 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19261,9 +20893,19 @@ unreachable end f64.const 3.1415 + call $~lib/math/NativeMath.cos f64.const -0.9999999957076562 f64.const -0.30608975887298584 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.1415 + call $~lib/bindings/Math/cos + f64.const -0.9999999957076562 + f64.const -0.30608975887298584 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19274,9 +20916,19 @@ unreachable end f64.const 3.141592 + call $~lib/math/NativeMath.cos f64.const -0.9999999999997864 f64.const 0.15403328835964203 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.141592 + call $~lib/bindings/Math/cos + f64.const -0.9999999999997864 + f64.const 0.15403328835964203 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19287,9 +20939,19 @@ unreachable end f64.const 3.14159265 + call $~lib/math/NativeMath.cos f64.const -1 f64.const -0.02901807427406311 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.14159265 + call $~lib/bindings/Math/cos + f64.const -1 + f64.const -0.02901807427406311 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19300,9 +20962,19 @@ unreachable end f64.const 3.1415926535 + call $~lib/math/NativeMath.cos f64.const -1 f64.const -1.8155848010792397e-05 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.1415926535 + call $~lib/bindings/Math/cos + f64.const -1 + f64.const -1.8155848010792397e-05 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19313,9 +20985,19 @@ unreachable end f64.const 3.141592653589 + call $~lib/math/NativeMath.cos f64.const -1 f64.const -1.4169914130945926e-09 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.141592653589 + call $~lib/bindings/Math/cos + f64.const -1 + f64.const -1.4169914130945926e-09 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19326,9 +21008,19 @@ unreachable end f64.const 3.14159265358979 + call $~lib/math/NativeMath.cos f64.const -1 f64.const -2.350864897985184e-14 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.14159265358979 + call $~lib/bindings/Math/cos + f64.const -1 + f64.const -2.350864897985184e-14 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19339,9 +21031,19 @@ unreachable end f64.const 3.141592653589793 + call $~lib/math/NativeMath.cos f64.const -1 f64.const -3.377158741883318e-17 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 3.141592653589793 + call $~lib/bindings/Math/cos + f64.const -1 + f64.const -3.377158741883318e-17 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19352,9 +21054,19 @@ unreachable end f64.const 1.57 + call $~lib/math/NativeMath.cos f64.const 7.963267107332633e-04 f64.const 0.2968159317970276 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.57 + call $~lib/bindings/Math/cos + f64.const 7.963267107332633e-04 + f64.const 0.2968159317970276 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19365,9 +21077,19 @@ unreachable end f64.const 1.570796 + call $~lib/math/NativeMath.cos f64.const 3.2679489653813835e-07 f64.const -0.32570895552635193 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.570796 + call $~lib/bindings/Math/cos + f64.const 3.2679489653813835e-07 + f64.const -0.32570895552635193 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19378,9 +21100,19 @@ unreachable end f64.const 1.5707963267 + call $~lib/math/NativeMath.cos f64.const 9.489659630678013e-11 f64.const -0.27245646715164185 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.5707963267 + call $~lib/bindings/Math/cos + f64.const 9.489659630678013e-11 + f64.const -0.27245646715164185 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19391,9 +21123,19 @@ unreachable end f64.const 1.57079632679489 + call $~lib/math/NativeMath.cos f64.const 6.722570487708307e-15 f64.const -0.10747683793306351 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.57079632679489 + call $~lib/bindings/Math/cos + f64.const 6.722570487708307e-15 + f64.const -0.10747683793306351 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19404,9 +21146,19 @@ unreachable end f64.const 1.5707963267948966 + call $~lib/math/NativeMath.cos f64.const 6.123233995736766e-17 f64.const 0.12148229777812958 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.5707963267948966 + call $~lib/bindings/Math/cos + f64.const 6.123233995736766e-17 + f64.const 0.12148229777812958 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19417,9 +21169,19 @@ unreachable end f64.const 0.6700635199486106 + call $~lib/math/NativeMath.cos f64.const 0.7837822193016158 f64.const -0.07278502732515335 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.6700635199486106 + call $~lib/bindings/Math/cos + f64.const 0.7837822193016158 + f64.const -0.07278502732515335 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19430,9 +21192,19 @@ unreachable end f64.const 0.5343890189437553 + call $~lib/math/NativeMath.cos f64.const 0.8605799719039517 f64.const -0.48434028029441833 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.5343890189437553 + call $~lib/bindings/Math/cos + f64.const 0.8605799719039517 + f64.const -0.48434028029441833 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19443,9 +21215,19 @@ unreachable end f64.const 0.43999702754890085 + call $~lib/math/NativeMath.cos f64.const 0.9047529293001976 f64.const 0.029777472838759422 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.43999702754890085 + call $~lib/bindings/Math/cos + f64.const 0.9047529293001976 + f64.const 0.029777472838759422 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19456,9 +21238,19 @@ unreachable end f64.const 0.9902840844687313 + call $~lib/math/NativeMath.cos f64.const 0.5484523364480768 f64.const 0.19765280187129974 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.9902840844687313 + call $~lib/bindings/Math/cos + f64.const 0.5484523364480768 + f64.const 0.19765280187129974 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19469,9 +21261,19 @@ unreachable end f64.const 0.45381447534338915 + call $~lib/math/NativeMath.cos f64.const 0.8987813902263783 f64.const -0.017724866047501564 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.45381447534338915 + call $~lib/bindings/Math/cos + f64.const 0.8987813902263783 + f64.const -0.017724866047501564 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19482,9 +21284,19 @@ unreachable end f64.const 0.4609888813583589 + call $~lib/math/NativeMath.cos f64.const 0.8956130474713057 f64.const 0.36449819803237915 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.4609888813583589 + call $~lib/bindings/Math/cos + f64.const 0.8956130474713057 + f64.const 0.36449819803237915 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19495,9 +21307,19 @@ unreachable end f64.const 0.9285434097956422 + call $~lib/math/NativeMath.cos f64.const 0.5990009794292984 f64.const -0.2899416387081146 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.9285434097956422 + call $~lib/bindings/Math/cos + f64.const 0.5990009794292984 + f64.const -0.2899416387081146 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19508,9 +21330,19 @@ unreachable end f64.const 0.9109092124488352 + call $~lib/math/NativeMath.cos f64.const 0.6130276692774378 f64.const -0.49353134632110596 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.9109092124488352 + call $~lib/bindings/Math/cos + f64.const 0.6130276692774378 + f64.const -0.49353134632110596 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19521,9 +21353,19 @@ unreachable end f64.const 0.8328600650359556 + call $~lib/math/NativeMath.cos f64.const 0.6727624710046357 f64.const -0.36606088280677795 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.8328600650359556 + call $~lib/bindings/Math/cos + f64.const 0.6727624710046357 + f64.const -0.36606088280677795 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19534,9 +21376,19 @@ unreachable end f64.const 0.9536201252203433 + call $~lib/math/NativeMath.cos f64.const 0.5787346183487084 f64.const -0.17089833319187164 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.9536201252203433 + call $~lib/bindings/Math/cos + f64.const 0.5787346183487084 + f64.const -0.17089833319187164 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19547,9 +21399,19 @@ unreachable end f64.const 0.8726590065457699 + call $~lib/math/NativeMath.cos f64.const 0.6427919144259047 f64.const -0.2744986116886139 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.8726590065457699 + call $~lib/bindings/Math/cos + f64.const 0.6427919144259047 + f64.const -0.2744986116886139 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19560,9 +21422,19 @@ unreachable end f64.const 0.18100447535968447 + call $~lib/math/NativeMath.cos f64.const 0.9836633656884893 f64.const 3.0195272993296385e-03 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0.18100447535968447 + call $~lib/bindings/Math/cos + f64.const 0.9836633656884893 + f64.const 3.0195272993296385e-03 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19573,9 +21445,19 @@ unreachable end f64.const 2.356194490349839 + call $~lib/math/NativeMath.cos f64.const -0.7071067812979126 f64.const -0.48278746008872986 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.356194490349839 + call $~lib/bindings/Math/cos + f64.const -0.7071067812979126 + f64.const -0.48278746008872986 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19586,9 +21468,19 @@ unreachable end f64.const 2.356194490372272 + call $~lib/math/NativeMath.cos f64.const -0.7071067813137752 f64.const -0.4866050183773041 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.356194490372272 + call $~lib/bindings/Math/cos + f64.const -0.7071067813137752 + f64.const -0.4866050183773041 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19599,11 +21491,21 @@ unreachable end f64.const 2.3561944902251115 + call $~lib/math/NativeMath.cos f64.const -0.707106781209717 f64.const -0.3533952236175537 - call $std/math/test_cos - i32.eqz - if + call $std/math/check + if (result i32) + f64.const 2.3561944902251115 + call $~lib/bindings/Math/cos + f64.const -0.707106781209717 + f64.const -0.3533952236175537 + call $std/math/check + else + i32.const 0 + end + i32.eqz + if i32.const 0 i32.const 32 i32.const 1038 @@ -19612,9 +21514,19 @@ unreachable end f64.const 2.3561944903149996 + call $~lib/math/NativeMath.cos f64.const -0.7071067812732775 f64.const -0.41911986470222473 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.3561944903149996 + call $~lib/bindings/Math/cos + f64.const -0.7071067812732775 + f64.const -0.41911986470222473 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19625,9 +21537,19 @@ unreachable end f64.const 2.3561944903603527 + call $~lib/math/NativeMath.cos f64.const -0.707106781305347 f64.const -0.4706200063228607 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.3561944903603527 + call $~lib/bindings/Math/cos + f64.const -0.707106781305347 + f64.const -0.4706200063228607 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19638,9 +21560,19 @@ unreachable end f64.const 2.3561944903826197 + call $~lib/math/NativeMath.cos f64.const -0.7071067813210922 f64.const -0.30618351697921753 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.3561944903826197 + call $~lib/bindings/Math/cos + f64.const -0.7071067813210922 + f64.const -0.30618351697921753 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19651,9 +21583,19 @@ unreachable end f64.const 2.356194490371803 + call $~lib/math/NativeMath.cos f64.const -0.7071067813134436 f64.const -0.30564820766448975 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.356194490371803 + call $~lib/bindings/Math/cos + f64.const -0.7071067813134436 + f64.const -0.30564820766448975 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19664,9 +21606,19 @@ unreachable end f64.const 2.356194490399931 + call $~lib/math/NativeMath.cos f64.const -0.7071067813333329 f64.const -0.38845571875572205 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.356194490399931 + call $~lib/bindings/Math/cos + f64.const -0.7071067813333329 + f64.const -0.38845571875572205 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19677,9 +21629,19 @@ unreachable end f64.const 2.356194490260191 + call $~lib/math/NativeMath.cos f64.const -0.707106781234522 f64.const -0.23796851933002472 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.356194490260191 + call $~lib/bindings/Math/cos + f64.const -0.707106781234522 + f64.const -0.23796851933002472 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19690,9 +21652,19 @@ unreachable end f64.const 2.3561944904043153 + call $~lib/math/NativeMath.cos f64.const -0.7071067813364332 f64.const -0.3274589478969574 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.3561944904043153 + call $~lib/bindings/Math/cos + f64.const -0.7071067813364332 + f64.const -0.3274589478969574 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19703,9 +21675,19 @@ unreachable end f64.const 2.0943951024759446 + call $~lib/math/NativeMath.cos f64.const -0.5000000000716629 f64.const -0.41711342334747314 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951024759446 + call $~lib/bindings/Math/cos + f64.const -0.5000000000716629 + f64.const -0.41711342334747314 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19716,9 +21698,19 @@ unreachable end f64.const 2.09439510243324 + call $~lib/math/NativeMath.cos f64.const -0.5000000000346797 f64.const -0.3566164970397949 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.09439510243324 + call $~lib/bindings/Math/cos + f64.const -0.5000000000346797 + f64.const -0.3566164970397949 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19729,9 +21721,19 @@ unreachable end f64.const 2.0943951025133885 + call $~lib/math/NativeMath.cos f64.const -0.5000000001040902 f64.const -0.2253485918045044 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951025133885 + call $~lib/bindings/Math/cos + f64.const -0.5000000001040902 + f64.const -0.2253485918045044 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19742,9 +21744,19 @@ unreachable end f64.const 2.0943951025466707 + call $~lib/math/NativeMath.cos f64.const -0.5000000001329135 f64.const -0.12982259690761566 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951025466707 + call $~lib/bindings/Math/cos + f64.const -0.5000000001329135 + f64.const -0.12982259690761566 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19755,9 +21767,19 @@ unreachable end f64.const 2.094395102413896 + call $~lib/math/NativeMath.cos f64.const -0.5000000000179272 f64.const -0.15886764228343964 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.094395102413896 + call $~lib/bindings/Math/cos + f64.const -0.5000000000179272 + f64.const -0.15886764228343964 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19768,9 +21790,19 @@ unreachable end f64.const 2.0943951024223404 + call $~lib/math/NativeMath.cos f64.const -0.5000000000252403 f64.const -0.266656756401062 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951024223404 + call $~lib/bindings/Math/cos + f64.const -0.5000000000252403 + f64.const -0.266656756401062 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19781,9 +21813,19 @@ unreachable end f64.const 2.0943951024960477 + call $~lib/math/NativeMath.cos f64.const -0.5000000000890726 f64.const -0.4652077853679657 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951024960477 + call $~lib/bindings/Math/cos + f64.const -0.5000000000890726 + f64.const -0.4652077853679657 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19794,9 +21836,19 @@ unreachable end f64.const 2.0943951025173315 + call $~lib/math/NativeMath.cos f64.const -0.500000000107505 f64.const -0.46710994839668274 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.0943951025173315 + call $~lib/bindings/Math/cos + f64.const -0.500000000107505 + f64.const -0.46710994839668274 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19807,9 +21859,19 @@ unreachable end f64.const 2.094395102405924 + call $~lib/math/NativeMath.cos f64.const -0.5000000000110234 f64.const -0.2469603717327118 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.094395102405924 + call $~lib/bindings/Math/cos + f64.const -0.5000000000110234 + f64.const -0.2469603717327118 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19820,9 +21882,19 @@ unreachable end f64.const 2.094395102428558 + call $~lib/math/NativeMath.cos f64.const -0.500000000030625 f64.const -0.3799441158771515 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.094395102428558 + call $~lib/bindings/Math/cos + f64.const -0.500000000030625 + f64.const -0.3799441158771515 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19833,9 +21905,19 @@ unreachable end f64.const 8.513210770864056 + call $~lib/math/NativeMath.cos f64.const -0.6125076939987759 f64.const 0.4989966154098511 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 8.513210770864056 + call $~lib/bindings/Math/cos + f64.const -0.6125076939987759 + f64.const 0.4989966154098511 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19846,9 +21928,19 @@ unreachable end f64.const 6.802886129801017 + call $~lib/math/NativeMath.cos f64.const 0.8679677961345452 f64.const 0.4972165524959564 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 6.802886129801017 + call $~lib/bindings/Math/cos + f64.const 0.8679677961345452 + f64.const 0.4972165524959564 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19859,9 +21951,19 @@ unreachable end f64.const 9.171925393086408 + call $~lib/math/NativeMath.cos f64.const -0.9682027440424544 f64.const -0.49827584624290466 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 9.171925393086408 + call $~lib/bindings/Math/cos + f64.const -0.9682027440424544 + f64.const -0.49827584624290466 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19872,9 +21974,19 @@ unreachable end f64.const 8.854690112888573 + call $~lib/math/NativeMath.cos f64.const -0.8418535663818527 f64.const 0.4974979758262634 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 8.854690112888573 + call $~lib/bindings/Math/cos + f64.const -0.8418535663818527 + f64.const 0.4974979758262634 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19885,9 +21997,19 @@ unreachable end f64.const 9.213510813859608 + call $~lib/math/NativeMath.cos f64.const -0.9777659802838506 f64.const -0.4995604455471039 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 9.213510813859608 + call $~lib/bindings/Math/cos + f64.const -0.9777659802838506 + f64.const -0.4995604455471039 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19898,9 +22020,19 @@ unreachable end f64.const 7.782449081542151 + call $~lib/math/NativeMath.cos f64.const 0.07147156381293339 f64.const 0.49858126044273376 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 7.782449081542151 + call $~lib/bindings/Math/cos + f64.const 0.07147156381293339 + f64.const 0.49858126044273376 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19911,9 +22043,19 @@ unreachable end f64.const 7.500261332273616 + call $~lib/math/NativeMath.cos f64.const 0.34639017633458113 f64.const -0.4996210038661957 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 7.500261332273616 + call $~lib/bindings/Math/cos + f64.const 0.34639017633458113 + f64.const -0.4996210038661957 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19924,9 +22066,19 @@ unreachable end f64.const 9.121739418731588 + call $~lib/math/NativeMath.cos f64.const -0.9544341297541811 f64.const 0.4982815086841583 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 9.121739418731588 + call $~lib/bindings/Math/cos + f64.const -0.9544341297541811 + f64.const 0.4982815086841583 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19937,9 +22089,19 @@ unreachable end f64.const 6.784954020476316 + call $~lib/math/NativeMath.cos f64.const 0.8767332233166646 f64.const -0.4988083839416504 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 6.784954020476316 + call $~lib/bindings/Math/cos + f64.const 0.8767332233166646 + f64.const -0.4988083839416504 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19950,9 +22112,19 @@ unreachable end f64.const 8.770846542666664 + call $~lib/math/NativeMath.cos f64.const -0.7936984117400705 f64.const 0.4999682903289795 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 8.770846542666664 + call $~lib/bindings/Math/cos + f64.const -0.7936984117400705 + f64.const 0.4999682903289795 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19963,9 +22135,19 @@ unreachable end f64.const 9.313225746154785e-10 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.001953125 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 9.313225746154785e-10 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0.001953125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19976,9 +22158,19 @@ unreachable end f64.const -9.313225746154785e-10 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.001953125 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -9.313225746154785e-10 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0.001953125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -19989,9 +22181,19 @@ unreachable end f64.const 2.2250738585072014e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.2250738585072014e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20002,9 +22204,19 @@ unreachable end f64.const -2.2250738585072014e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -2.2250738585072014e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20015,9 +22227,19 @@ unreachable end f64.const 5e-324 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20028,9 +22250,19 @@ unreachable end f64.const -5e-324 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20041,9 +22273,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20054,9 +22296,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20067,9 +22319,19 @@ unreachable end f64.const 1e-323 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1e-323 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20080,9 +22342,19 @@ unreachable end f64.const 4.4e-323 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.4e-323 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20093,9 +22365,19 @@ unreachable end f64.const 5.562684646268003e-309 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 5.562684646268003e-309 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20106,9 +22388,19 @@ unreachable end f64.const 1.1125369292536007e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.1125369292536007e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20119,9 +22411,19 @@ unreachable end f64.const 2.2250738585072004e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.2250738585072004e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20132,9 +22434,19 @@ unreachable end f64.const 2.225073858507201e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.225073858507201e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20145,9 +22457,19 @@ unreachable end f64.const 2.225073858507202e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.225073858507202e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20158,9 +22480,19 @@ unreachable end f64.const 2.2250738585072024e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 2.2250738585072024e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20171,9 +22503,19 @@ unreachable end f64.const 4.4501477170144003e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.4501477170144003e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20184,9 +22526,19 @@ unreachable end f64.const 4.450147717014403e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.450147717014403e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20197,9 +22549,19 @@ unreachable end f64.const 4.450147717014406e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.450147717014406e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20210,9 +22572,19 @@ unreachable end f64.const 8.900295434028806e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 8.900295434028806e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20223,9 +22595,19 @@ unreachable end f64.const 7.450580596923828e-09 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.125 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 7.450580596923828e-09 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0.125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20236,9 +22618,19 @@ unreachable end f64.const 1.4901161193847656e-08 + call $~lib/math/NativeMath.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 1.4901161193847656e-08 + call $~lib/bindings/Math/cos + f64.const 0.9999999999999999 + f64.const -1.850372590034581e-17 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20249,9 +22641,19 @@ unreachable end f64.const 4.470348358154297e-08 + call $~lib/math/NativeMath.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const 4.470348358154297e-08 + call $~lib/bindings/Math/cos + f64.const 0.999999999999999 + f64.const -1.4988010832439613e-15 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20262,9 +22664,19 @@ unreachable end f64.const -1e-323 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -1e-323 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20275,9 +22687,19 @@ unreachable end f64.const -4.4e-323 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -4.4e-323 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20288,9 +22710,19 @@ unreachable end f64.const -5.562684646268003e-309 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -5.562684646268003e-309 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20301,9 +22733,19 @@ unreachable end f64.const -1.1125369292536007e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -1.1125369292536007e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20314,9 +22756,19 @@ unreachable end f64.const -2.2250738585072004e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -2.2250738585072004e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20327,9 +22779,19 @@ unreachable end f64.const -2.225073858507201e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -2.225073858507201e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20340,9 +22802,19 @@ unreachable end f64.const -2.225073858507202e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -2.225073858507202e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20353,9 +22825,19 @@ unreachable end f64.const -2.2250738585072024e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -2.2250738585072024e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20366,9 +22848,19 @@ unreachable end f64.const -4.4501477170144003e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -4.4501477170144003e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20379,9 +22871,19 @@ unreachable end f64.const -4.450147717014403e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -4.450147717014403e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20392,9 +22894,19 @@ unreachable end f64.const -4.450147717014406e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -4.450147717014406e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20405,9 +22917,19 @@ unreachable end f64.const -8.900295434028806e-308 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -8.900295434028806e-308 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20418,9 +22940,19 @@ unreachable end f64.const -7.450580596923828e-09 + call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.125 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -7.450580596923828e-09 + call $~lib/bindings/Math/cos + f64.const 1 + f64.const 0.125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20431,9 +22963,19 @@ unreachable end f64.const -1.4901161193847656e-08 + call $~lib/math/NativeMath.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -1.4901161193847656e-08 + call $~lib/bindings/Math/cos + f64.const 0.9999999999999999 + f64.const -1.850372590034581e-17 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -20444,9 +22986,19 @@ unreachable end f64.const -4.470348358154297e-08 + call $~lib/math/NativeMath.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 - call $std/math/test_cos + call $std/math/check + if (result i32) + f64.const -4.470348358154297e-08 + call $~lib/bindings/Math/cos + f64.const 0.999999999999999 + f64.const -1.4988010832439613e-15 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -21845,10 +24397,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.cosh f32.const 1593.5216064453125 f32.const 0.26242581009864807 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21859,10 +24410,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.cosh f32.const 38.56174087524414 f32.const -0.08168885856866837 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21873,10 +24423,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.cosh f32.const 2182.631103515625 f32.const -0.02331414446234703 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21887,10 +24436,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.cosh f32.const 343.2738037109375 f32.const 0.20081493258476257 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21901,10 +24449,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.cosh f32.const 5291.78173828125 f32.const 0.36286723613739014 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21915,10 +24462,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.cosh f32.const 1.2272322177886963 f32.const 0.32777416706085205 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21929,10 +24475,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.cosh f32.const 1.0838085412979126 f32.const -0.039848703891038895 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21943,10 +24488,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.cosh f32.const 1.161980390548706 f32.const 0.15274477005004883 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21957,10 +24501,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.cosh f32.const 1.314923644065857 f32.const -0.2387111485004425 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21971,10 +24514,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.cosh f32.const 1.2393412590026855 f32.const -0.45791932940483093 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21985,10 +24527,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21999,10 +24540,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22013,10 +24553,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22027,10 +24566,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22041,10 +24579,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.cosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22055,9 +24592,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.exp f64.const 3.137706068161745e-04 f64.const -0.2599197328090668 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/exp + f64.const 3.137706068161745e-04 + f64.const -0.2599197328090668 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22068,9 +24615,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.exp f64.const 77.11053017112141 f64.const -0.02792675793170929 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/exp + f64.const 77.11053017112141 + f64.const -0.02792675793170929 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22081,9 +24638,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.exp f64.const 2.290813384916323e-04 f64.const -0.24974334239959717 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/exp + f64.const 2.290813384916323e-04 + f64.const -0.24974334239959717 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22094,9 +24661,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.exp f64.const 1.4565661260931588e-03 f64.const -0.4816822409629822 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/exp + f64.const 1.4565661260931588e-03 + f64.const -0.4816822409629822 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22107,9 +24684,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.exp f64.const 10583.558245524993 f64.const 0.17696762084960938 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/exp + f64.const 10583.558245524993 + f64.const 0.17696762084960938 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22120,9 +24707,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.exp f64.const 1.9386384525571998 f64.const -0.4964246451854706 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/exp + f64.const 1.9386384525571998 + f64.const -0.4964246451854706 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22133,9 +24730,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.exp f64.const 0.6659078892838025 f64.const -0.10608318448066711 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/exp + f64.const 0.6659078892838025 + f64.const -0.10608318448066711 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22146,9 +24753,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.exp f64.const 1.7537559518626311 f64.const -0.39162111282348633 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/exp + f64.const 1.7537559518626311 + f64.const -0.39162111282348633 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22159,9 +24776,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.exp f64.const 2.1687528885129246 f64.const -0.2996125817298889 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/exp + f64.const 2.1687528885129246 + f64.const -0.2996125817298889 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22172,9 +24799,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.exp f64.const 0.5072437089402843 f64.const 0.47261738777160645 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/exp + f64.const 0.5072437089402843 + f64.const 0.47261738777160645 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22185,9 +24822,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/exp + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22198,9 +24845,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/exp + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22211,9 +24868,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.exp f64.const 2.718281828459045 f64.const -0.3255307376384735 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/exp + f64.const 2.718281828459045 + f64.const -0.3255307376384735 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22224,9 +24891,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.exp f64.const 0.36787944117144233 f64.const 0.22389651834964752 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/exp + f64.const 0.36787944117144233 + f64.const 0.22389651834964752 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22237,9 +24914,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.exp f64.const inf f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/exp + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22250,9 +24937,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.exp f64.const 0 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/exp + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22263,9 +24960,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.exp f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/exp + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22276,9 +24983,19 @@ unreachable end f64.const 1.0397214889526365 + call $~lib/math/NativeMath.exp f64.const 2.828429155876411 f64.const 0.18803080916404724 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1.0397214889526365 + call $~lib/bindings/Math/exp + f64.const 2.828429155876411 + f64.const 0.18803080916404724 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22289,9 +25006,19 @@ unreachable end f64.const -1.0397214889526365 + call $~lib/math/NativeMath.exp f64.const 0.35355313670217847 f64.const 0.2527272403240204 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -1.0397214889526365 + call $~lib/bindings/Math/exp + f64.const 0.35355313670217847 + f64.const 0.2527272403240204 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22302,9 +25029,19 @@ unreachable end f64.const 1.0397210121154785 + call $~lib/math/NativeMath.exp f64.const 2.8284278071766122 f64.const -0.4184139370918274 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1.0397210121154785 + call $~lib/bindings/Math/exp + f64.const 2.8284278071766122 + f64.const -0.4184139370918274 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22315,9 +25052,19 @@ unreachable end f64.const 1.0397214889526367 + call $~lib/math/NativeMath.exp f64.const 2.8284291558764116 f64.const -0.22618377208709717 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1.0397214889526367 + call $~lib/bindings/Math/exp + f64.const 2.8284291558764116 + f64.const -0.22618377208709717 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22328,9 +25075,19 @@ unreachable end f64.const 5e-324 + call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/exp + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22341,9 +25098,19 @@ unreachable end f64.const -5e-324 + call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/exp + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22354,9 +25121,19 @@ unreachable end f64.const 709.782712893384 + call $~lib/math/NativeMath.exp f64.const 1797693134862273196746681e284 f64.const -0.10568465292453766 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 709.782712893384 + call $~lib/bindings/Math/exp + f64.const 1797693134862273196746681e284 + f64.const -0.10568465292453766 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22367,9 +25144,19 @@ unreachable end f64.const 709.7827128933841 + call $~lib/math/NativeMath.exp f64.const inf f64.const 0 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 709.7827128933841 + call $~lib/bindings/Math/exp + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22380,9 +25167,19 @@ unreachable end f64.const -745.1332191019411 + call $~lib/math/NativeMath.exp f64.const 5e-324 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -745.1332191019411 + call $~lib/bindings/Math/exp + f64.const 5e-324 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22393,9 +25190,19 @@ unreachable end f64.const -745.1332191019412 + call $~lib/math/NativeMath.exp f64.const 0 f64.const -0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -745.1332191019412 + call $~lib/bindings/Math/exp + f64.const 0 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22406,9 +25213,19 @@ unreachable end f64.const -708.3964185322641 + call $~lib/math/NativeMath.exp f64.const 2.2250738585072626e-308 f64.const 0.26172348856925964 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -708.3964185322641 + call $~lib/bindings/Math/exp + f64.const 2.2250738585072626e-308 + f64.const 0.26172348856925964 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22419,9 +25236,19 @@ unreachable end f64.const -708.3964185322642 + call $~lib/math/NativeMath.exp f64.const 2.2250738585070097e-308 f64.const 2.2250738585070097e-308 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -708.3964185322642 + call $~lib/bindings/Math/exp + f64.const 2.2250738585070097e-308 + f64.const 2.2250738585070097e-308 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22432,9 +25259,19 @@ unreachable end f64.const 0.5006933289508785 + call $~lib/math/NativeMath.exp f64.const 1.6498647732549399 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.5006933289508785 + call $~lib/bindings/Math/exp + f64.const 1.6498647732549399 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22445,9 +25282,19 @@ unreachable end f64.const 0.628493326460252 + call $~lib/math/NativeMath.exp f64.const 1.8747837631658781 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.628493326460252 + call $~lib/bindings/Math/exp + f64.const 1.8747837631658781 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22458,9 +25305,19 @@ unreachable end f64.const 0.837522455340574 + call $~lib/math/NativeMath.exp f64.const 2.3106351774748006 f64.const -0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.837522455340574 + call $~lib/bindings/Math/exp + f64.const 2.3106351774748006 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22471,9 +25328,19 @@ unreachable end f64.const 0.8504909932810999 + call $~lib/math/NativeMath.exp f64.const 2.3407958848710777 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 0.8504909932810999 + call $~lib/bindings/Math/exp + f64.const 2.3407958848710777 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22484,9 +25351,19 @@ unreachable end f64.const 1.6270060846924657 + call $~lib/math/NativeMath.exp f64.const 5.088617001442459 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1.6270060846924657 + call $~lib/bindings/Math/exp + f64.const 5.088617001442459 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22497,9 +25374,19 @@ unreachable end f64.const 1.6744336219614115 + call $~lib/math/NativeMath.exp f64.const 5.335772228886831 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 1.6744336219614115 + call $~lib/bindings/Math/exp + f64.const 5.335772228886831 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22510,9 +25397,19 @@ unreachable end f64.const 6.657914718791208 + call $~lib/math/NativeMath.exp f64.const 778.924964819056 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 6.657914718791208 + call $~lib/bindings/Math/exp + f64.const 778.924964819056 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22523,9 +25420,19 @@ unreachable end f64.const 11.022872793631722 + call $~lib/math/NativeMath.exp f64.const 61259.41271820104 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 11.022872793631722 + call $~lib/bindings/Math/exp + f64.const 61259.41271820104 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22536,9 +25443,19 @@ unreachable end f64.const 11.411195701885317 + call $~lib/math/NativeMath.exp f64.const 90327.36165653409 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 11.411195701885317 + call $~lib/bindings/Math/exp + f64.const 90327.36165653409 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22549,9 +25466,19 @@ unreachable end f64.const 11.794490387560606 + call $~lib/math/NativeMath.exp f64.const 132520.20290772576 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 11.794490387560606 + call $~lib/bindings/Math/exp + f64.const 132520.20290772576 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22562,9 +25489,19 @@ unreachable end f64.const 412.83872756953286 + call $~lib/math/NativeMath.exp f64.const 1965989977109266413433084e155 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 412.83872756953286 + call $~lib/bindings/Math/exp + f64.const 1965989977109266413433084e155 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22575,9 +25512,19 @@ unreachable end f64.const 510.87569028483415 + call $~lib/math/NativeMath.exp f64.const 7421526272656495968225491e197 f64.const -0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const 510.87569028483415 + call $~lib/bindings/Math/exp + f64.const 7421526272656495968225491e197 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22588,9 +25535,19 @@ unreachable end f64.const -2.6589841439772853e-14 + call $~lib/math/NativeMath.exp f64.const 0.9999999999999735 f64.const 0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -2.6589841439772853e-14 + call $~lib/bindings/Math/exp + f64.const 0.9999999999999735 + f64.const 0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22601,9 +25558,19 @@ unreachable end f64.const -2.7144952952085447e-14 + call $~lib/math/NativeMath.exp f64.const 0.9999999999999728 f64.const -0.5 - call $std/math/test_exp + call $std/math/check + if (result i32) + f64.const -2.7144952952085447e-14 + call $~lib/bindings/Math/exp + f64.const 0.9999999999999728 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22950,9 +25917,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.expm1 f64.const -0.9996862293931839 f64.const -0.2760058343410492 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/expm1 + f64.const -0.9996862293931839 + f64.const -0.2760058343410492 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22963,9 +25940,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.expm1 f64.const 76.11053017112141 f64.const -0.02792675793170929 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/expm1 + f64.const 76.11053017112141 + f64.const -0.02792675793170929 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22976,9 +25963,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.expm1 f64.const -0.9997709186615084 f64.const 0.10052496194839478 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/expm1 + f64.const -0.9997709186615084 + f64.const 0.10052496194839478 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -22989,9 +25986,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.expm1 f64.const -0.9985434338739069 f64.const -0.27437829971313477 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/expm1 + f64.const -0.9985434338739069 + f64.const -0.27437829971313477 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23002,9 +26009,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.expm1 f64.const 10582.558245524993 f64.const 0.17696762084960938 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/expm1 + f64.const 10582.558245524993 + f64.const 0.17696762084960938 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23015,9 +26032,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.expm1 f64.const 0.9386384525571999 f64.const 0.007150684483349323 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/expm1 + f64.const 0.9386384525571999 + f64.const 0.007150684483349323 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23028,9 +26055,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.expm1 f64.const -0.3340921107161975 f64.const -0.21216636896133423 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/expm1 + f64.const -0.3340921107161975 + f64.const -0.21216636896133423 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23041,9 +26078,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.expm1 f64.const 0.7537559518626312 f64.const 0.21675777435302734 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/expm1 + f64.const 0.7537559518626312 + f64.const 0.21675777435302734 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23054,9 +26101,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.expm1 f64.const 1.1687528885129248 f64.const 0.4007748067378998 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/expm1 + f64.const 1.1687528885129248 + f64.const 0.4007748067378998 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23067,9 +26124,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.expm1 f64.const -0.4927562910597158 f64.const -0.05476519837975502 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/expm1 + f64.const -0.4927562910597158 + f64.const -0.05476519837975502 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23080,9 +26147,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.expm1 f64.const 0 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/expm1 + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23093,9 +26170,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.expm1 f64.const -0 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/expm1 + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23106,9 +26193,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.expm1 f64.const 1.7182818284590453 f64.const 0.348938524723053 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/expm1 + f64.const 1.7182818284590453 + f64.const 0.348938524723053 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23119,9 +26216,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.expm1 f64.const -0.6321205588285577 f64.const 0.11194825917482376 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/expm1 + f64.const -0.6321205588285577 + f64.const 0.11194825917482376 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23132,9 +26239,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.expm1 f64.const inf f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/expm1 + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23145,9 +26262,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.expm1 f64.const -1 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/expm1 + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23158,9 +26285,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.expm1 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/expm1 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23171,9 +26308,19 @@ unreachable end f64.const 2.225073858507201e-308 + call $~lib/math/NativeMath.expm1 f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const 2.225073858507201e-308 + call $~lib/bindings/Math/expm1 + f64.const 2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -23184,9 +26331,19 @@ unreachable end f64.const -2.225073858507201e-308 + call $~lib/math/NativeMath.expm1 f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/test_expm1 + call $std/math/check + if (result i32) + f64.const -2.225073858507201e-308 + call $~lib/bindings/Math/expm1 + f64.const -2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24029,9 +27186,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.06684839057968 f64.const -9 - call $std/math/test_floor + f64.const -9 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/floor + f64.const -9 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24041,9 +27208,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 f64.const 4 - call $std/math/test_floor + f64.const 4 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/floor + f64.const 4 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24053,9 +27230,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const -9 - call $std/math/test_floor + f64.const -9 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/floor + f64.const -9 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24065,9 +27252,19 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const -7 - call $std/math/test_floor + f64.const -7 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/floor + f64.const -7 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24077,9 +27274,19 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 f64.const 9 - call $std/math/test_floor + f64.const 9 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/floor + f64.const 9 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24089,9 +27296,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24101,9 +27318,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const -1 - call $std/math/test_floor + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24113,9 +27340,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24125,9 +27362,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24137,9 +27384,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const -1 - call $std/math/test_floor + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24151,7 +27408,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/floor + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24163,7 +27430,17 @@ end f64.const inf f64.const inf - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/floor + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24175,7 +27452,17 @@ end f64.const -inf f64.const -inf - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/floor + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24187,7 +27474,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24199,7 +27496,17 @@ end f64.const -0 f64.const -0 - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/floor + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24211,7 +27518,17 @@ end f64.const 1 f64.const 1 - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/floor + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24223,7 +27540,17 @@ end f64.const -1 f64.const -1 - call $std/math/test_floor + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24233,9 +27560,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24245,9 +27582,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -1 - call $std/math/test_floor + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.5 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24257,9 +27604,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 1 - call $std/math/test_floor + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1.0000152587890625 + call $~lib/bindings/Math/floor + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24269,9 +27626,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -2 - call $std/math/test_floor + f64.const -2 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1.0000152587890625 + call $~lib/bindings/Math/floor + f64.const -2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24281,9 +27648,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.9999923706054688 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24293,9 +27670,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -1 - call $std/math/test_floor + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.9999923706054688 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24305,9 +27692,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 0 - call $std/math/test_floor + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 7.888609052210118e-31 + call $~lib/bindings/Math/floor + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -24317,9 +27714,19 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -1 - call $std/math/test_floor + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/floor + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25555,9 +28962,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25568,9 +28985,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.log f64.const 1.4690809584224322 f64.const -0.3412533402442932 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/log + f64.const 1.4690809584224322 + f64.const -0.3412533402442932 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25581,9 +29008,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25594,9 +29031,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25607,9 +29054,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.log f64.const 2.2264658498795615 f64.const 0.3638114035129547 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/log + f64.const 2.2264658498795615 + f64.const 0.3638114035129547 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25620,9 +29077,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.log f64.const -0.4125110252365137 f64.const -0.29108747839927673 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/log + f64.const -0.4125110252365137 + f64.const -0.29108747839927673 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25633,9 +29100,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25646,9 +29123,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.log f64.const -0.5766810183195862 f64.const -0.10983199626207352 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/log + f64.const -0.5766810183195862 + f64.const -0.10983199626207352 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25659,9 +29146,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.log f64.const -0.2559866591263865 f64.const -0.057990044355392456 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/log + f64.const -0.2559866591263865 + f64.const -0.057990044355392456 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25672,9 +29169,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25685,9 +29192,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.log f64.const -inf f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/log + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25698,9 +29215,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.log f64.const -inf f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/log + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25711,9 +29238,19 @@ unreachable end f64.const -7.888609052210118e-31 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25724,9 +29261,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.log f64.const 0 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/log + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25737,9 +29284,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25750,9 +29307,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.log f64.const inf f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/log + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25763,9 +29330,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -25776,9 +29353,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/log + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26013,9 +29600,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26026,9 +29623,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.log10 f64.const 0.6380137537120029 f64.const -0.2088824063539505 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/log10 + f64.const 0.6380137537120029 + f64.const -0.2088824063539505 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26039,9 +29646,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26052,9 +29669,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26065,9 +29692,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.log10 f64.const 0.9669418327487274 f64.const -0.06120431795716286 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/log10 + f64.const 0.9669418327487274 + f64.const -0.06120431795716286 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26078,9 +29715,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.log10 f64.const -0.17915126198447093 f64.const 0.39090874791145325 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/log10 + f64.const -0.17915126198447093 + f64.const 0.39090874791145325 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26091,9 +29738,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26104,9 +29761,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.log10 f64.const -0.25044938407454437 f64.const -0.3046841621398926 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/log10 + f64.const -0.25044938407454437 + f64.const -0.3046841621398926 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26117,9 +29784,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.log10 f64.const -0.11117359349943837 f64.const -0.31503361463546753 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/log10 + f64.const -0.11117359349943837 + f64.const -0.31503361463546753 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26130,9 +29807,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26143,9 +29830,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.log10 f64.const -inf f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/log10 + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26156,9 +29853,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.log10 f64.const -inf f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/log10 + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26169,9 +29876,19 @@ unreachable end f64.const -7.888609052210118e-31 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26182,9 +29899,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.log10 f64.const 0 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/log10 + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26195,9 +29922,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26208,9 +29945,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.log10 f64.const inf f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/log10 + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26221,9 +29968,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26234,9 +29991,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log10 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/log10 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26499,9 +30266,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/log1p + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26512,9 +30289,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.log1p f64.const 1.6762064170601734 f64.const 0.46188199520111084 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/log1p + f64.const 1.6762064170601734 + f64.const 0.46188199520111084 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26525,9 +30312,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/log1p + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26538,9 +30335,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/log1p + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26551,9 +30358,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.log1p f64.const 2.3289404168523826 f64.const -0.411114901304245 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/log1p + f64.const 2.3289404168523826 + f64.const -0.411114901304245 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26564,9 +30381,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.log1p f64.const 0.5080132114992477 f64.const -0.29306045174598694 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/log1p + f64.const 0.5080132114992477 + f64.const -0.29306045174598694 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26577,9 +30404,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.log1p f64.const -0.5218931811663979 f64.const -0.25825726985931396 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/log1p + f64.const -0.5218931811663979 + f64.const -0.25825726985931396 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26590,9 +30427,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.log1p f64.const 0.4458132279488102 f64.const -0.13274887204170227 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/log1p + f64.const 0.4458132279488102 + f64.const -0.13274887204170227 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26603,9 +30450,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.log1p f64.const 0.5733227294648414 f64.const 0.02716583013534546 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/log1p + f64.const 0.5733227294648414 + f64.const 0.02716583013534546 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26616,9 +30473,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.log1p f64.const -1.1355782978128564 f64.const 0.2713092863559723 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/log1p + f64.const -1.1355782978128564 + f64.const 0.2713092863559723 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26629,9 +30496,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.log1p f64.const 0 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/log1p + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26642,9 +30519,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.log1p f64.const -0 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/log1p + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26655,9 +30542,19 @@ unreachable end f64.const -7.888609052210118e-31 + call $~lib/math/NativeMath.log1p f64.const -7.888609052210118e-31 f64.const 1.7763568394002505e-15 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/log1p + f64.const -7.888609052210118e-31 + f64.const 1.7763568394002505e-15 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26668,9 +30565,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.log1p f64.const 0.6931471805599453 f64.const -0.2088811695575714 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/log1p + f64.const 0.6931471805599453 + f64.const -0.2088811695575714 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26681,9 +30588,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.log1p f64.const -inf f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/log1p + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26694,9 +30611,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.log1p f64.const inf f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/log1p + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26707,9 +30634,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/log1p + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26720,9 +30657,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log1p + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/log1p + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -26999,9 +30946,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27012,9 +30969,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.log2 f64.const 2.1194358133804485 f64.const -0.10164877772331238 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/log2 + f64.const 2.1194358133804485 + f64.const -0.10164877772331238 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27025,9 +30992,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27038,9 +31015,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27051,9 +31038,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.log2 f64.const 3.2121112403298744 f64.const -0.15739446878433228 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/log2 + f64.const 3.2121112403298744 + f64.const -0.15739446878433228 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27064,9 +31061,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.log2 f64.const -0.5951276104207402 f64.const 0.3321485221385956 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/log2 + f64.const -0.5951276104207402 + f64.const 0.3321485221385956 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27077,9 +31084,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27090,9 +31107,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.log2 f64.const -0.8319748453044644 f64.const 0.057555437088012695 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/log2 + f64.const -0.8319748453044644 + f64.const 0.057555437088012695 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27103,9 +31130,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.log2 f64.const -0.36931068365537134 f64.const -0.19838279485702515 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/log2 + f64.const -0.36931068365537134 + f64.const -0.19838279485702515 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27116,9 +31153,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27129,9 +31176,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.log2 f64.const -inf f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/log2 + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27142,9 +31199,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.log2 f64.const -inf f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/log2 + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27155,9 +31222,19 @@ unreachable end f64.const -7.888609052210118e-31 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27168,9 +31245,19 @@ unreachable end f64.const 1 + call $~lib/math/NativeMath.log2 f64.const 0 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/log2 + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27181,9 +31268,19 @@ unreachable end f64.const -1 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27194,9 +31291,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.log2 f64.const inf f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/log2 + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27207,9 +31314,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -27220,9 +31337,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_log2 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/log2 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -38373,7 +42500,8 @@ end f32.const 0 f32.const 0 - call $std/math/test_signf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38385,7 +42513,8 @@ end f32.const -0 f32.const -0 - call $std/math/test_signf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38397,7 +42526,8 @@ end f32.const 1 f32.const 1 - call $std/math/test_signf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38407,9 +42537,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2 f32.const 1 - call $std/math/test_signf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38421,7 +42552,8 @@ end f32.const -1 f32.const -1 - call $std/math/test_signf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38431,9 +42563,10 @@ call $~lib/builtins/abort unreachable end - f32.const -2 f32.const -1 - call $std/math/test_signf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38443,9 +42576,10 @@ call $~lib/builtins/abort unreachable end - f32.const inf f32.const 1 - call $std/math/test_signf + f32.const 1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38455,9 +42589,10 @@ call $~lib/builtins/abort unreachable end - f32.const -inf f32.const -1 - call $std/math/test_signf + f32.const -1 + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -38469,7 +42604,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $std/math/test_signf + f32.const 0 + call $std/math/check i32.eqz if i32.const 0 @@ -40790,9 +44926,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.sin f64.const -0.9774292928781227 f64.const -0.14564912021160126 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/sin + f64.const -0.9774292928781227 + f64.const -0.14564912021160126 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40803,9 +44949,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.sin f64.const -0.9333544736965718 f64.const -0.08813747018575668 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/sin + f64.const -0.9333544736965718 + f64.const -0.08813747018575668 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40816,9 +44972,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.sin f64.const -0.8640924711706304 f64.const -0.11743883043527603 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/sin + f64.const -0.8640924711706304 + f64.const -0.11743883043527603 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40829,9 +44995,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.sin f64.const -0.24593894772615374 f64.const -0.12697851657867432 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/sin + f64.const -0.24593894772615374 + f64.const -0.12697851657867432 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40842,9 +45018,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.sin f64.const 0.15706789772028007 f64.const -0.029550159350037575 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/sin + f64.const 0.15706789772028007 + f64.const -0.029550159350037575 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40855,9 +45041,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.sin f64.const 0.6146844860113447 f64.const -0.09976737946271896 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/sin + f64.const 0.6146844860113447 + f64.const -0.09976737946271896 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40868,9 +45064,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.sin f64.const -0.39549242182823696 f64.const -0.3668774962425232 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/sin + f64.const -0.39549242182823696 + f64.const -0.3668774962425232 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40881,9 +45087,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.sin f64.const 0.5326763286672376 f64.const -0.3550407588481903 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/sin + f64.const 0.5326763286672376 + f64.const -0.3550407588481903 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40894,9 +45110,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.sin f64.const 0.6991102068649779 f64.const -0.427672415971756 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/sin + f64.const 0.6991102068649779 + f64.const -0.427672415971756 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40907,9 +45133,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.sin f64.const -0.6278312326301215 f64.const -0.3828115463256836 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/sin + f64.const -0.6278312326301215 + f64.const -0.3828115463256836 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40920,9 +45156,19 @@ unreachable end f64.const 9.313225746154785e-10 + call $~lib/math/NativeMath.sin f64.const 9.313225746154785e-10 f64.const 6.510416860692203e-04 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 9.313225746154785e-10 + call $~lib/bindings/Math/sin + f64.const 9.313225746154785e-10 + f64.const 6.510416860692203e-04 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40933,9 +45179,19 @@ unreachable end f64.const -9.313225746154785e-10 + call $~lib/math/NativeMath.sin f64.const -9.313225746154785e-10 f64.const -6.510416860692203e-04 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -9.313225746154785e-10 + call $~lib/bindings/Math/sin + f64.const -9.313225746154785e-10 + f64.const -6.510416860692203e-04 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40946,9 +45202,19 @@ unreachable end f64.const 2.2250738585072014e-308 + call $~lib/math/NativeMath.sin f64.const 2.2250738585072014e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 2.2250738585072014e-308 + call $~lib/bindings/Math/sin + f64.const 2.2250738585072014e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40959,9 +45225,19 @@ unreachable end f64.const -2.2250738585072014e-308 + call $~lib/math/NativeMath.sin f64.const -2.2250738585072014e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -2.2250738585072014e-308 + call $~lib/bindings/Math/sin + f64.const -2.2250738585072014e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40972,9 +45248,19 @@ unreachable end f64.const 5e-324 + call $~lib/math/NativeMath.sin f64.const 5e-324 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/sin + f64.const 5e-324 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40985,9 +45271,19 @@ unreachable end f64.const -5e-324 + call $~lib/math/NativeMath.sin f64.const -5e-324 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/sin + f64.const -5e-324 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -40998,9 +45294,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.sin f64.const 0 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/sin + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41011,9 +45317,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.sin f64.const -0 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/sin + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41024,9 +45340,19 @@ unreachable end f64.const 2.225073858507202e-308 + call $~lib/math/NativeMath.sin f64.const 2.225073858507202e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 2.225073858507202e-308 + call $~lib/bindings/Math/sin + f64.const 2.225073858507202e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41037,9 +45363,19 @@ unreachable end f64.const 2.2250738585072024e-308 + call $~lib/math/NativeMath.sin f64.const 2.2250738585072024e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 2.2250738585072024e-308 + call $~lib/bindings/Math/sin + f64.const 2.2250738585072024e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41050,9 +45386,19 @@ unreachable end f64.const 4.4501477170144003e-308 + call $~lib/math/NativeMath.sin f64.const 4.4501477170144003e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 4.4501477170144003e-308 + call $~lib/bindings/Math/sin + f64.const 4.4501477170144003e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41063,9 +45409,19 @@ unreachable end f64.const 4.450147717014403e-308 + call $~lib/math/NativeMath.sin f64.const 4.450147717014403e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 4.450147717014403e-308 + call $~lib/bindings/Math/sin + f64.const 4.450147717014403e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41076,9 +45432,19 @@ unreachable end f64.const 4.450147717014406e-308 + call $~lib/math/NativeMath.sin f64.const 4.450147717014406e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 4.450147717014406e-308 + call $~lib/bindings/Math/sin + f64.const 4.450147717014406e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41089,9 +45455,19 @@ unreachable end f64.const 8.900295434028806e-308 + call $~lib/math/NativeMath.sin f64.const 8.900295434028806e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 8.900295434028806e-308 + call $~lib/bindings/Math/sin + f64.const 8.900295434028806e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41102,9 +45478,19 @@ unreachable end f64.const 1.1175870895385742e-08 + call $~lib/math/NativeMath.sin f64.const 1.1175870895385742e-08 f64.const 0.140625 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 1.1175870895385742e-08 + call $~lib/bindings/Math/sin + f64.const 1.1175870895385742e-08 + f64.const 0.140625 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41115,9 +45501,19 @@ unreachable end f64.const 1.4901161193847656e-08 + call $~lib/math/NativeMath.sin f64.const 1.4901161193847656e-08 f64.const 0.1666666716337204 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 1.4901161193847656e-08 + call $~lib/bindings/Math/sin + f64.const 1.4901161193847656e-08 + f64.const 0.1666666716337204 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41128,9 +45524,19 @@ unreachable end f64.const -2.225073858507202e-308 + call $~lib/math/NativeMath.sin f64.const -2.225073858507202e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -2.225073858507202e-308 + call $~lib/bindings/Math/sin + f64.const -2.225073858507202e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41141,9 +45547,19 @@ unreachable end f64.const -2.2250738585072024e-308 + call $~lib/math/NativeMath.sin f64.const -2.2250738585072024e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -2.2250738585072024e-308 + call $~lib/bindings/Math/sin + f64.const -2.2250738585072024e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41154,9 +45570,19 @@ unreachable end f64.const -4.4501477170144003e-308 + call $~lib/math/NativeMath.sin f64.const -4.4501477170144003e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -4.4501477170144003e-308 + call $~lib/bindings/Math/sin + f64.const -4.4501477170144003e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41167,9 +45593,19 @@ unreachable end f64.const -4.450147717014403e-308 + call $~lib/math/NativeMath.sin f64.const -4.450147717014403e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -4.450147717014403e-308 + call $~lib/bindings/Math/sin + f64.const -4.450147717014403e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41180,9 +45616,19 @@ unreachable end f64.const -4.450147717014406e-308 + call $~lib/math/NativeMath.sin f64.const -4.450147717014406e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -4.450147717014406e-308 + call $~lib/bindings/Math/sin + f64.const -4.450147717014406e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41193,9 +45639,19 @@ unreachable end f64.const -8.900295434028806e-308 + call $~lib/math/NativeMath.sin f64.const -8.900295434028806e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -8.900295434028806e-308 + call $~lib/bindings/Math/sin + f64.const -8.900295434028806e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41206,9 +45662,19 @@ unreachable end f64.const -1.1175870895385742e-08 + call $~lib/math/NativeMath.sin f64.const -1.1175870895385742e-08 f64.const -0.140625 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -1.1175870895385742e-08 + call $~lib/bindings/Math/sin + f64.const -1.1175870895385742e-08 + f64.const -0.140625 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41219,9 +45685,19 @@ unreachable end f64.const -1.4901161193847656e-08 + call $~lib/math/NativeMath.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -1.4901161193847656e-08 + call $~lib/bindings/Math/sin + f64.const -1.4901161193847656e-08 + f64.const -0.1666666716337204 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41232,9 +45708,19 @@ unreachable end f64.const -1.4901161193847656e-08 + call $~lib/math/NativeMath.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -1.4901161193847656e-08 + call $~lib/bindings/Math/sin + f64.const -1.4901161193847656e-08 + f64.const -0.1666666716337204 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41245,9 +45731,19 @@ unreachable end f64.const 1e-323 + call $~lib/math/NativeMath.sin f64.const 1e-323 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 1e-323 + call $~lib/bindings/Math/sin + f64.const 1e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41258,9 +45754,19 @@ unreachable end f64.const 4.4e-323 + call $~lib/math/NativeMath.sin f64.const 4.4e-323 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 4.4e-323 + call $~lib/bindings/Math/sin + f64.const 4.4e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41271,9 +45777,19 @@ unreachable end f64.const 5.562684646268003e-309 + call $~lib/math/NativeMath.sin f64.const 5.562684646268003e-309 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 5.562684646268003e-309 + call $~lib/bindings/Math/sin + f64.const 5.562684646268003e-309 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41284,9 +45800,19 @@ unreachable end f64.const 1.1125369292536007e-308 + call $~lib/math/NativeMath.sin f64.const 1.1125369292536007e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 1.1125369292536007e-308 + call $~lib/bindings/Math/sin + f64.const 1.1125369292536007e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41297,9 +45823,19 @@ unreachable end f64.const 2.2250738585072004e-308 + call $~lib/math/NativeMath.sin f64.const 2.2250738585072004e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 2.2250738585072004e-308 + call $~lib/bindings/Math/sin + f64.const 2.2250738585072004e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41310,9 +45846,19 @@ unreachable end f64.const 2.225073858507201e-308 + call $~lib/math/NativeMath.sin f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 2.225073858507201e-308 + call $~lib/bindings/Math/sin + f64.const 2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41323,9 +45869,19 @@ unreachable end f64.const -1e-323 + call $~lib/math/NativeMath.sin f64.const -1e-323 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -1e-323 + call $~lib/bindings/Math/sin + f64.const -1e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41336,9 +45892,19 @@ unreachable end f64.const -4.4e-323 + call $~lib/math/NativeMath.sin f64.const -4.4e-323 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -4.4e-323 + call $~lib/bindings/Math/sin + f64.const -4.4e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41349,9 +45915,19 @@ unreachable end f64.const -5.562684646268003e-309 + call $~lib/math/NativeMath.sin f64.const -5.562684646268003e-309 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -5.562684646268003e-309 + call $~lib/bindings/Math/sin + f64.const -5.562684646268003e-309 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41362,9 +45938,19 @@ unreachable end f64.const -1.1125369292536007e-308 + call $~lib/math/NativeMath.sin f64.const -1.1125369292536007e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -1.1125369292536007e-308 + call $~lib/bindings/Math/sin + f64.const -1.1125369292536007e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41375,9 +45961,19 @@ unreachable end f64.const -2.2250738585072004e-308 + call $~lib/math/NativeMath.sin f64.const -2.2250738585072004e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -2.2250738585072004e-308 + call $~lib/bindings/Math/sin + f64.const -2.2250738585072004e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41388,9 +45984,19 @@ unreachable end f64.const -2.225073858507201e-308 + call $~lib/math/NativeMath.sin f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -2.225073858507201e-308 + call $~lib/bindings/Math/sin + f64.const -2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41401,9 +46007,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.sin f64.const 0 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/sin + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41414,9 +46030,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.sin f64.const -0 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/sin + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41427,9 +46053,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/sin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41440,9 +46076,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/sin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41453,9 +46099,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sin + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/sin + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42634,9 +47290,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.sinh f64.const -1593.5206801156262 f64.const -0.2138727605342865 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/sinh + f64.const -1593.5206801156262 + f64.const -0.2138727605342865 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42647,9 +47313,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.sinh f64.const 38.54878088685412 f64.const 0.21537430584430695 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/sinh + f64.const 38.54878088685412 + f64.const 0.21537430584430695 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42660,9 +47336,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.sinh f64.const -2182.6307505145546 f64.const 0.16213826835155487 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/sinh + f64.const -2182.6307505145546 + f64.const 0.16213826835155487 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42673,9 +47359,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.sinh f64.const -343.2723926847529 f64.const 0.20479513704776764 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/sinh + f64.const -343.2723926847529 + f64.const 0.20479513704776764 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42686,9 +47382,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.sinh f64.const 5291.7790755194055 f64.const -0.48676517605781555 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/sinh + f64.const 5291.7790755194055 + f64.const -0.48676517605781555 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42699,9 +47405,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.sinh f64.const 0.7114062568229157 f64.const -0.4584641456604004 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/sinh + f64.const 0.7114062568229157 + f64.const -0.4584641456604004 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42712,9 +47428,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.sinh f64.const -0.41790065258739445 f64.const 0.37220045924186707 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/sinh + f64.const -0.41790065258739445 + f64.const 0.37220045924186707 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42725,9 +47451,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.sinh f64.const 0.5917755935451237 f64.const 0.46178996562957764 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/sinh + f64.const 0.5917755935451237 + f64.const 0.46178996562957764 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42738,9 +47474,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.sinh f64.const 0.8538292008852542 f64.const -0.07019051909446716 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/sinh + f64.const 0.8538292008852542 + f64.const -0.07019051909446716 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42751,9 +47497,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.sinh f64.const -0.732097615653169 f64.const 0.26858529448509216 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/sinh + f64.const -0.732097615653169 + f64.const 0.26858529448509216 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42764,9 +47520,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.sinh f64.const 0 f64.const 0 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/sinh + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42777,9 +47543,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.sinh f64.const -0 f64.const 0 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/sinh + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42790,9 +47566,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.sinh f64.const inf f64.const 0 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/sinh + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42803,9 +47589,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.sinh f64.const -inf f64.const 0 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/sinh + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -42816,9 +47612,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.sinh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sinh + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/sinh + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43038,10 +47844,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.06684839057968 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43051,10 +47866,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 + f64.const 2.0845238903256313 f64.const 2.0845238903256313 f64.const -0.07180261611938477 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/sqrt + f64.const 2.0845238903256313 + f64.const -0.07180261611938477 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43064,10 +47888,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43077,10 +47910,19 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43090,10 +47932,19 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 + f64.const 3.0441841217266385 f64.const 3.0441841217266385 f64.const -0.01546262577176094 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/sqrt + f64.const 3.0441841217266385 + f64.const -0.01546262577176094 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43103,10 +47954,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 + f64.const 0.8136251582267503 f64.const 0.8136251582267503 f64.const -0.08618157356977463 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/sqrt + f64.const 0.8136251582267503 + f64.const -0.08618157356977463 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43116,10 +47976,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43129,10 +47998,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 + f64.const 0.7495063350104014 f64.const 0.7495063350104014 f64.const -0.0981396734714508 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/sqrt + f64.const 0.7495063350104014 + f64.const -0.0981396734714508 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43142,10 +48020,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 + f64.const 0.879859248170583 f64.const 0.879859248170583 f64.const -0.37124353647232056 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/sqrt + f64.const 0.879859248170583 + f64.const -0.37124353647232056 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43155,10 +48042,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43171,7 +48067,16 @@ f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43184,7 +48089,16 @@ f64.const inf f64.const inf f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/sqrt + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43194,10 +48108,19 @@ call $~lib/builtins/abort unreachable end - f64.const -inf + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43210,7 +48133,16 @@ f64.const 0 f64.const 0 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/sqrt + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43223,7 +48155,16 @@ f64.const -0 f64.const -0 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/sqrt + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43236,7 +48177,16 @@ f64.const 1 f64.const 1 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/sqrt + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43246,10 +48196,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43259,10 +48218,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4 + f64.const 2 f64.const 2 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 4 + call $~lib/bindings/Math/sqrt + f64.const 2 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43272,10 +48240,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1e-323 + f64.const 3.1434555694052576e-162 f64.const 3.1434555694052576e-162 f64.const 0.43537619709968567 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1e-323 + call $~lib/bindings/Math/sqrt + f64.const 3.1434555694052576e-162 + f64.const 0.43537619709968567 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43285,10 +48262,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5e-323 + f64.const 3.849931087076416e-162 f64.const 3.849931087076416e-162 f64.const -0.45194002985954285 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.5e-323 + call $~lib/bindings/Math/sqrt + f64.const 3.849931087076416e-162 + f64.const -0.45194002985954285 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43298,10 +48284,19 @@ call $~lib/builtins/abort unreachable end - f64.const 5e-324 + f64.const 2.2227587494850775e-162 f64.const 2.2227587494850775e-162 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/sqrt + f64.const 2.2227587494850775e-162 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43311,10 +48306,19 @@ call $~lib/builtins/abort unreachable end - f64.const -5e-324 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43327,7 +48331,16 @@ f64.const 0.9999999999999999 f64.const 0.9999999999999999 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0.9999999999999999 + call $~lib/bindings/Math/sqrt + f64.const 0.9999999999999999 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43337,10 +48350,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.9999999999999998 + f64.const 1.414213562373095 f64.const 1.414213562373095 f64.const -0.21107041835784912 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.9999999999999998 + call $~lib/bindings/Math/sqrt + f64.const 1.414213562373095 + f64.const -0.21107041835784912 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43350,10 +48372,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000000000000002 + f64.const 1 f64.const 1 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.0000000000000002 + call $~lib/bindings/Math/sqrt + f64.const 1 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43363,10 +48394,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.0000000000000004 + f64.const 1.4142135623730951 f64.const 1.4142135623730951 f64.const -0.27173060178756714 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.0000000000000004 + call $~lib/bindings/Math/sqrt + f64.const 1.4142135623730951 + f64.const -0.27173060178756714 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43376,10 +48416,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000000000000002 + f64.const 1 f64.const 1 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.0000000000000002 + call $~lib/bindings/Math/sqrt + f64.const 1 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43392,7 +48441,16 @@ f64.const 0.9999999999999999 f64.const 0.9999999999999999 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 0.9999999999999999 + call $~lib/bindings/Math/sqrt + f64.const 0.9999999999999999 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43402,10 +48460,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1797693134862315708145274e284 + f64.const -nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const -1797693134862315708145274e284 + call $~lib/bindings/Math/sqrt + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43415,10 +48482,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862315708145274e284 + f64.const 1340780792994259561100831e130 f64.const 1340780792994259561100831e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862315708145274e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994259561100831e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43428,10 +48504,19 @@ call $~lib/builtins/abort unreachable end - f64.const 179769313486231490980915e285 + f64.const 134078079299425926338769e131 f64.const 134078079299425926338769e131 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 179769313486231490980915e285 + call $~lib/bindings/Math/sqrt + f64.const 134078079299425926338769e131 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43441,10 +48526,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862314111473026e284 + f64.const 1340780792994258965674548e130 f64.const 1340780792994258965674548e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862314111473026e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994258965674548e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43454,10 +48548,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862313313136902e284 + f64.const 1340780792994258667961407e130 f64.const 1340780792994258667961407e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862313313136902e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994258667961407e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43467,10 +48570,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862312514800778e284 + f64.const 1340780792994258370248265e130 f64.const 1340780792994258370248265e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862312514800778e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994258370248265e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43480,10 +48592,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862311716464655e284 + f64.const 1340780792994258072535124e130 f64.const 1340780792994258072535124e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862311716464655e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994258072535124e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43493,10 +48614,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862310918128531e284 + f64.const 1340780792994257774821982e130 f64.const 1340780792994257774821982e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862310918128531e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994257774821982e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43506,10 +48636,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862310119792407e284 + f64.const 1340780792994257477108841e130 f64.const 1340780792994257477108841e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862310119792407e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994257477108841e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43519,10 +48658,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862309321456283e284 + f64.const 1340780792994257179395699e130 f64.const 1340780792994257179395699e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862309321456283e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994257179395699e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43532,10 +48680,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862308523120159e284 + f64.const 1340780792994256881682558e130 f64.const 1340780792994256881682558e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862308523120159e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994256881682558e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43545,10 +48702,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1797693134862307724784036e284 + f64.const 1340780792994256583969417e130 f64.const 1340780792994256583969417e130 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1797693134862307724784036e284 + call $~lib/bindings/Math/sqrt + f64.const 1340780792994256583969417e130 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43558,10 +48724,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.225073858507203e-308 + f64.const 1.4916681462400417e-154 f64.const 1.4916681462400417e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.225073858507203e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400417e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43571,10 +48746,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.225073858507205e-308 + f64.const 1.4916681462400423e-154 f64.const 1.4916681462400423e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.225073858507205e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400423e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43584,10 +48768,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.225073858507207e-308 + f64.const 1.491668146240043e-154 f64.const 1.491668146240043e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.225073858507207e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.491668146240043e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43597,10 +48790,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.225073858507209e-308 + f64.const 1.4916681462400437e-154 f64.const 1.4916681462400437e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.225073858507209e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400437e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43610,10 +48812,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.225073858507211e-308 + f64.const 1.4916681462400443e-154 f64.const 1.4916681462400443e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.225073858507211e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400443e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43623,10 +48834,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072127e-308 + f64.const 1.491668146240045e-154 f64.const 1.491668146240045e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072127e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.491668146240045e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43636,10 +48856,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072147e-308 + f64.const 1.4916681462400457e-154 f64.const 1.4916681462400457e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072147e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400457e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43649,10 +48878,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072167e-308 + f64.const 1.4916681462400463e-154 f64.const 1.4916681462400463e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072167e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400463e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43662,10 +48900,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072187e-308 + f64.const 1.491668146240047e-154 f64.const 1.491668146240047e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072187e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.491668146240047e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43675,10 +48922,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072207e-308 + f64.const 1.4916681462400476e-154 f64.const 1.4916681462400476e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072207e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400476e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43688,10 +48944,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072226e-308 + f64.const 1.4916681462400483e-154 f64.const 1.4916681462400483e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072226e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400483e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43701,10 +48966,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072246e-308 + f64.const 1.491668146240049e-154 f64.const 1.491668146240049e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072246e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.491668146240049e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43714,10 +48988,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072266e-308 + f64.const 1.4916681462400496e-154 f64.const 1.4916681462400496e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072266e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400496e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43727,10 +49010,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2250738585072286e-308 + f64.const 1.4916681462400503e-154 f64.const 1.4916681462400503e-154 f64.const -0.5 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.2250738585072286e-308 + call $~lib/bindings/Math/sqrt + f64.const 1.4916681462400503e-154 + f64.const -0.5 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43740,10 +49032,19 @@ call $~lib/builtins/abort unreachable end - f64.const 92.35130391890645 + f64.const 9.609958580499006 f64.const 9.609958580499006 f64.const 0.4998137056827545 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 92.35130391890645 + call $~lib/bindings/Math/sqrt + f64.const 9.609958580499006 + f64.const 0.4998137056827545 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43753,10 +49054,19 @@ call $~lib/builtins/abort unreachable end - f64.const 93.3599596388916 + f64.const 9.662295774757238 f64.const 9.662295774757238 f64.const -0.49979978799819946 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 93.3599596388916 + call $~lib/bindings/Math/sqrt + f64.const 9.662295774757238 + f64.const -0.49979978799819946 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43766,10 +49076,19 @@ call $~lib/builtins/abort unreachable end - f64.const 95.42049628886124 + f64.const 9.76834153215689 f64.const 9.76834153215689 f64.const -0.49997270107269287 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 95.42049628886124 + call $~lib/bindings/Math/sqrt + f64.const 9.76834153215689 + f64.const -0.49997270107269287 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43779,10 +49098,19 @@ call $~lib/builtins/abort unreachable end - f64.const 95.87916941885449 + f64.const 9.791790919890728 f64.const 9.791790919890728 f64.const 0.4998766779899597 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 95.87916941885449 + call $~lib/bindings/Math/sqrt + f64.const 9.791790919890728 + f64.const 0.4998766779899597 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43792,10 +49120,19 @@ call $~lib/builtins/abort unreachable end - f64.const 96.84804174884022 + f64.const 9.841140266698785 f64.const 9.841140266698785 f64.const 0.499801903963089 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 96.84804174884022 + call $~lib/bindings/Math/sqrt + f64.const 9.841140266698785 + f64.const 0.499801903963089 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43805,10 +49142,19 @@ call $~lib/builtins/abort unreachable end - f64.const 97.43639050883155 + f64.const 9.87098731175517 f64.const 9.87098731175517 f64.const 0.4997696280479431 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 97.43639050883155 + call $~lib/bindings/Math/sqrt + f64.const 9.87098731175517 + f64.const 0.4997696280479431 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43818,10 +49164,19 @@ call $~lib/builtins/abort unreachable end - f64.const 97.50957979883047 + f64.const 9.874693909120955 f64.const 9.874693909120955 f64.const 0.49999818205833435 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 97.50957979883047 + call $~lib/bindings/Math/sqrt + f64.const 9.874693909120955 + f64.const 0.49999818205833435 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43831,10 +49186,19 @@ call $~lib/builtins/abort unreachable end - f64.const 97.80496893882612 + f64.const 9.88963947466368 f64.const 9.88963947466368 f64.const -0.4999580681324005 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 97.80496893882612 + call $~lib/bindings/Math/sqrt + f64.const 9.88963947466368 + f64.const -0.4999580681324005 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43844,10 +49208,19 @@ call $~lib/builtins/abort unreachable end - f64.const 98.2751822888192 + f64.const 9.913383997849534 f64.const 9.913383997849534 f64.const 0.49979931116104126 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 98.2751822888192 + call $~lib/bindings/Math/sqrt + f64.const 9.913383997849534 + f64.const 0.49979931116104126 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43857,10 +49230,19 @@ call $~lib/builtins/abort unreachable end - f64.const 99.47293564880155 + f64.const 9.973611966023219 f64.const 9.973611966023219 f64.const -0.4999540448188782 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 99.47293564880155 + call $~lib/bindings/Math/sqrt + f64.const 9.973611966023219 + f64.const -0.4999540448188782 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43870,10 +49252,19 @@ call $~lib/builtins/abort unreachable end - f64.const 100.57047130878539 + f64.const 10.028483001370914 f64.const 10.028483001370914 f64.const -0.49996453523635864 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 100.57047130878539 + call $~lib/bindings/Math/sqrt + f64.const 10.028483001370914 + f64.const -0.49996453523635864 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43883,10 +49274,19 @@ call $~lib/builtins/abort unreachable end - f64.const 100.60954608878481 + f64.const 10.030431002144665 f64.const 10.030431002144665 f64.const 0.49975672364234924 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 100.60954608878481 + call $~lib/bindings/Math/sqrt + f64.const 10.030431002144665 + f64.const 0.49975672364234924 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43896,10 +49296,19 @@ call $~lib/builtins/abort unreachable end - f64.const 100.67909109878379 + f64.const 10.033897104255344 f64.const 10.033897104255344 f64.const -0.4997771382331848 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 100.67909109878379 + call $~lib/bindings/Math/sqrt + f64.const 10.033897104255344 + f64.const -0.4997771382331848 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43909,10 +49318,19 @@ call $~lib/builtins/abort unreachable end - f64.const 101.12268095877725 + f64.const 10.055977374615422 f64.const 10.055977374615422 f64.const 0.49988678097724915 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 101.12268095877725 + call $~lib/bindings/Math/sqrt + f64.const 10.055977374615422 + f64.const 0.49988678097724915 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43922,10 +49340,19 @@ call $~lib/builtins/abort unreachable end - f64.const 101.3027691287746 + f64.const 10.064927676281366 f64.const 10.064927676281366 f64.const 0.4999105632305145 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 101.3027691287746 + call $~lib/bindings/Math/sqrt + f64.const 10.064927676281366 + f64.const 0.4999105632305145 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43935,10 +49362,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.45932313565507e-307 + f64.const 4.9591563149945874e-154 f64.const 4.9591563149945874e-154 f64.const -0.4998999834060669 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.45932313565507e-307 + call $~lib/bindings/Math/sqrt + f64.const 4.9591563149945874e-154 + f64.const -0.4998999834060669 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43948,10 +49384,19 @@ call $~lib/builtins/abort unreachable end - f64.const 5.610957305180409e-307 + f64.const 7.490632353266584e-154 f64.const 7.490632353266584e-154 f64.const -0.4999343752861023 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 5.610957305180409e-307 + call $~lib/bindings/Math/sqrt + f64.const 7.490632353266584e-154 + f64.const -0.4999343752861023 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43961,10 +49406,19 @@ call $~lib/builtins/abort unreachable end - f64.const 5.8073887977408524e-307 + f64.const 7.62062254526548e-154 f64.const 7.62062254526548e-154 f64.const -0.49989569187164307 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 5.8073887977408524e-307 + call $~lib/bindings/Math/sqrt + f64.const 7.62062254526548e-154 + f64.const -0.49989569187164307 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43974,10 +49428,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.026137080471427e-307 + f64.const 8.382205605013174e-154 f64.const 8.382205605013174e-154 f64.const 0.49980640411376953 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 7.026137080471427e-307 + call $~lib/bindings/Math/sqrt + f64.const 8.382205605013174e-154 + f64.const 0.49980640411376953 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -43987,10 +49450,19 @@ call $~lib/builtins/abort unreachable end - f64.const 8.438697769194972e-307 + f64.const 9.186238495268328e-154 f64.const 9.186238495268328e-154 f64.const -0.4999065697193146 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 8.438697769194972e-307 + call $~lib/bindings/Math/sqrt + f64.const 9.186238495268328e-154 + f64.const -0.4999065697193146 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44000,10 +49472,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.1607792515836795e-306 + f64.const 1.0773946591586944e-153 f64.const 1.0773946591586944e-153 f64.const -0.49997684359550476 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.1607792515836795e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.0773946591586944e-153 + f64.const -0.49997684359550476 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44013,10 +49494,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.2827413827423193e-306 + f64.const 1.1325817333606962e-153 f64.const 1.1325817333606962e-153 f64.const -0.4999513030052185 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.2827413827423193e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.1325817333606962e-153 + f64.const -0.4999513030052185 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44026,10 +49516,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.7116604596087457e-306 + f64.const 1.3083044216117078e-153 f64.const 1.3083044216117078e-153 f64.const -0.49986395239830017 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 1.7116604596087457e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.3083044216117078e-153 + f64.const -0.49986395239830017 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44039,10 +49538,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.038173251686994e-306 + f64.const 1.4276460526639628e-153 f64.const 1.4276460526639628e-153 f64.const 0.4998403787612915 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.038173251686994e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.4276460526639628e-153 + f64.const 0.4998403787612915 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44052,10 +49560,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.171572060856931e-306 + f64.const 1.4736254818836879e-153 f64.const 1.4736254818836879e-153 f64.const 0.4999290406703949 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.171572060856931e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.4736254818836879e-153 + f64.const 0.4999290406703949 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44065,10 +49582,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.4681399631804094e-306 + f64.const 1.5710314965589996e-153 f64.const 1.5710314965589996e-153 f64.const 0.49989044666290283 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.4681399631804094e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.5710314965589996e-153 + f64.const 0.49989044666290283 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44078,10 +49604,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.5175533964200588e-306 + f64.const 1.5866799918131124e-153 f64.const 1.5866799918131124e-153 f64.const -0.4997701048851013 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.5175533964200588e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.5866799918131124e-153 + f64.const -0.4997701048851013 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44091,10 +49626,19 @@ call $~lib/builtins/abort unreachable end - f64.const 2.6461505468829625e-306 + f64.const 1.6266992797941982e-153 f64.const 1.6266992797941982e-153 f64.const 0.4998672902584076 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 2.6461505468829625e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.6266992797941982e-153 + f64.const 0.4998672902584076 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44104,10 +49648,19 @@ call $~lib/builtins/abort unreachable end - f64.const 3.8167076367720413e-306 + f64.const 1.9536395872248397e-153 f64.const 1.9536395872248397e-153 f64.const 0.49983471632003784 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 3.8167076367720413e-306 + call $~lib/bindings/Math/sqrt + f64.const 1.9536395872248397e-153 + f64.const 0.49983471632003784 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44117,10 +49670,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4.5743220778562766e-306 + f64.const 2.1387664851161936e-153 f64.const 2.1387664851161936e-153 f64.const 0.49985939264297485 - call $std/math/test_sqrt + call $std/math/check + if (result i32) + f64.const 4.5743220778562766e-306 + call $~lib/bindings/Math/sqrt + f64.const 2.1387664851161936e-153 + f64.const 0.49985939264297485 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44547,9 +50109,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.tan f64.const 4.626603542401633 f64.const -0.2727603316307068 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/tan + f64.const 4.626603542401633 + f64.const -0.2727603316307068 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44560,9 +50132,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.tan f64.const 2.600191705822202 f64.const 0.2651003301143646 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/tan + f64.const 2.600191705822202 + f64.const 0.2651003301143646 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44573,9 +50155,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.tan f64.const 1.7167408328741052 f64.const -0.24687519669532776 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/tan + f64.const 1.7167408328741052 + f64.const -0.24687519669532776 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44586,9 +50178,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.tan f64.const -0.2537322523453725 f64.const -0.4679703712463379 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/tan + f64.const -0.2537322523453725 + f64.const -0.4679703712463379 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44599,9 +50201,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.tan f64.const -0.15904195727191958 f64.const -0.06704077869653702 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/tan + f64.const -0.15904195727191958 + f64.const -0.06704077869653702 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44612,9 +50224,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.tan f64.const 0.7792919106910434 f64.const -0.038056135177612305 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/tan + f64.const 0.7792919106910434 + f64.const -0.038056135177612305 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44625,9 +50247,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.tan f64.const -0.43059952879543656 f64.const -0.09242714196443558 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/tan + f64.const -0.43059952879543656 + f64.const -0.09242714196443558 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44638,9 +50270,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.tan f64.const 0.62940368731874 f64.const -0.321913480758667 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/tan + f64.const 0.62940368731874 + f64.const -0.321913480758667 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44651,9 +50293,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.tan f64.const 0.9777574652949645 f64.const -0.1966651827096939 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/tan + f64.const 0.9777574652949645 + f64.const -0.1966651827096939 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44664,9 +50316,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.tan f64.const -0.8066186630209123 f64.const -0.067665696144104 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/tan + f64.const -0.8066186630209123 + f64.const -0.067665696144104 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44677,9 +50339,19 @@ unreachable end f64.const 9.313225746154785e-10 + call $~lib/math/NativeMath.tan f64.const 9.313225746154785e-10 f64.const -1.3020833721384406e-03 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 9.313225746154785e-10 + call $~lib/bindings/Math/tan + f64.const 9.313225746154785e-10 + f64.const -1.3020833721384406e-03 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44690,9 +50362,19 @@ unreachable end f64.const -9.313225746154785e-10 + call $~lib/math/NativeMath.tan f64.const -9.313225746154785e-10 f64.const 1.3020833721384406e-03 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -9.313225746154785e-10 + call $~lib/bindings/Math/tan + f64.const -9.313225746154785e-10 + f64.const 1.3020833721384406e-03 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44703,9 +50385,19 @@ unreachable end f64.const 2.2250738585072014e-308 + call $~lib/math/NativeMath.tan f64.const 2.2250738585072014e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 2.2250738585072014e-308 + call $~lib/bindings/Math/tan + f64.const 2.2250738585072014e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44716,9 +50408,19 @@ unreachable end f64.const -2.2250738585072014e-308 + call $~lib/math/NativeMath.tan f64.const -2.2250738585072014e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -2.2250738585072014e-308 + call $~lib/bindings/Math/tan + f64.const -2.2250738585072014e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44729,9 +50431,19 @@ unreachable end f64.const 5e-324 + call $~lib/math/NativeMath.tan f64.const 5e-324 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 5e-324 + call $~lib/bindings/Math/tan + f64.const 5e-324 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44742,9 +50454,19 @@ unreachable end f64.const -5e-324 + call $~lib/math/NativeMath.tan f64.const -5e-324 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -5e-324 + call $~lib/bindings/Math/tan + f64.const -5e-324 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44755,9 +50477,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.tan f64.const 0 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/tan + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44768,9 +50500,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.tan f64.const -0 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/tan + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44781,9 +50523,19 @@ unreachable end f64.const 0.7853981633974483 + call $~lib/math/NativeMath.tan f64.const 0.9999999999999999 f64.const -0.4484681189060211 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0.7853981633974483 + call $~lib/bindings/Math/tan + f64.const 0.9999999999999999 + f64.const -0.4484681189060211 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44794,9 +50546,19 @@ unreachable end f64.const -0.7853981633974483 + call $~lib/math/NativeMath.tan f64.const -0.9999999999999999 f64.const 0.4484681189060211 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -0.7853981633974483 + call $~lib/bindings/Math/tan + f64.const -0.9999999999999999 + f64.const 0.4484681189060211 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44807,9 +50569,19 @@ unreachable end f64.const 2.225073858507202e-308 + call $~lib/math/NativeMath.tan f64.const 2.225073858507202e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 2.225073858507202e-308 + call $~lib/bindings/Math/tan + f64.const 2.225073858507202e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44820,9 +50592,19 @@ unreachable end f64.const 2.2250738585072024e-308 + call $~lib/math/NativeMath.tan f64.const 2.2250738585072024e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 2.2250738585072024e-308 + call $~lib/bindings/Math/tan + f64.const 2.2250738585072024e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44833,9 +50615,19 @@ unreachable end f64.const 4.4501477170144003e-308 + call $~lib/math/NativeMath.tan f64.const 4.4501477170144003e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 4.4501477170144003e-308 + call $~lib/bindings/Math/tan + f64.const 4.4501477170144003e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44846,9 +50638,19 @@ unreachable end f64.const 4.450147717014403e-308 + call $~lib/math/NativeMath.tan f64.const 4.450147717014403e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 4.450147717014403e-308 + call $~lib/bindings/Math/tan + f64.const 4.450147717014403e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44859,9 +50661,19 @@ unreachable end f64.const 4.450147717014406e-308 + call $~lib/math/NativeMath.tan f64.const 4.450147717014406e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 4.450147717014406e-308 + call $~lib/bindings/Math/tan + f64.const 4.450147717014406e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44872,9 +50684,19 @@ unreachable end f64.const 8.900295434028806e-308 + call $~lib/math/NativeMath.tan f64.const 8.900295434028806e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 8.900295434028806e-308 + call $~lib/bindings/Math/tan + f64.const 8.900295434028806e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44885,9 +50707,19 @@ unreachable end f64.const 1.1175870895385742e-08 + call $~lib/math/NativeMath.tan f64.const 1.1175870895385742e-08 f64.const -0.28125 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 1.1175870895385742e-08 + call $~lib/bindings/Math/tan + f64.const 1.1175870895385742e-08 + f64.const -0.28125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44898,9 +50730,19 @@ unreachable end f64.const 1.4901161193847656e-08 + call $~lib/math/NativeMath.tan f64.const 1.4901161193847656e-08 f64.const -0.3333333432674408 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 1.4901161193847656e-08 + call $~lib/bindings/Math/tan + f64.const 1.4901161193847656e-08 + f64.const -0.3333333432674408 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44911,9 +50753,19 @@ unreachable end f64.const -2.225073858507202e-308 + call $~lib/math/NativeMath.tan f64.const -2.225073858507202e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -2.225073858507202e-308 + call $~lib/bindings/Math/tan + f64.const -2.225073858507202e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44924,9 +50776,19 @@ unreachable end f64.const -2.2250738585072024e-308 + call $~lib/math/NativeMath.tan f64.const -2.2250738585072024e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -2.2250738585072024e-308 + call $~lib/bindings/Math/tan + f64.const -2.2250738585072024e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44937,9 +50799,19 @@ unreachable end f64.const -4.4501477170144003e-308 + call $~lib/math/NativeMath.tan f64.const -4.4501477170144003e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -4.4501477170144003e-308 + call $~lib/bindings/Math/tan + f64.const -4.4501477170144003e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44950,9 +50822,19 @@ unreachable end f64.const -4.450147717014403e-308 + call $~lib/math/NativeMath.tan f64.const -4.450147717014403e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -4.450147717014403e-308 + call $~lib/bindings/Math/tan + f64.const -4.450147717014403e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44963,9 +50845,19 @@ unreachable end f64.const -4.450147717014406e-308 + call $~lib/math/NativeMath.tan f64.const -4.450147717014406e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -4.450147717014406e-308 + call $~lib/bindings/Math/tan + f64.const -4.450147717014406e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44976,9 +50868,19 @@ unreachable end f64.const -8.900295434028806e-308 + call $~lib/math/NativeMath.tan f64.const -8.900295434028806e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -8.900295434028806e-308 + call $~lib/bindings/Math/tan + f64.const -8.900295434028806e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -44989,9 +50891,19 @@ unreachable end f64.const -1.1175870895385742e-08 + call $~lib/math/NativeMath.tan f64.const -1.1175870895385742e-08 f64.const 0.28125 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -1.1175870895385742e-08 + call $~lib/bindings/Math/tan + f64.const -1.1175870895385742e-08 + f64.const 0.28125 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45002,9 +50914,19 @@ unreachable end f64.const -1.4901161193847656e-08 + call $~lib/math/NativeMath.tan f64.const -1.4901161193847656e-08 f64.const 0.3333333432674408 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -1.4901161193847656e-08 + call $~lib/bindings/Math/tan + f64.const -1.4901161193847656e-08 + f64.const 0.3333333432674408 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45015,9 +50937,19 @@ unreachable end f64.const 1e-323 + call $~lib/math/NativeMath.tan f64.const 1e-323 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 1e-323 + call $~lib/bindings/Math/tan + f64.const 1e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45028,9 +50960,19 @@ unreachable end f64.const 4.4e-323 + call $~lib/math/NativeMath.tan f64.const 4.4e-323 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 4.4e-323 + call $~lib/bindings/Math/tan + f64.const 4.4e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45041,9 +50983,19 @@ unreachable end f64.const 5.562684646268003e-309 + call $~lib/math/NativeMath.tan f64.const 5.562684646268003e-309 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 5.562684646268003e-309 + call $~lib/bindings/Math/tan + f64.const 5.562684646268003e-309 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45054,9 +51006,19 @@ unreachable end f64.const 1.1125369292536007e-308 + call $~lib/math/NativeMath.tan f64.const 1.1125369292536007e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 1.1125369292536007e-308 + call $~lib/bindings/Math/tan + f64.const 1.1125369292536007e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45067,9 +51029,19 @@ unreachable end f64.const 2.2250738585072004e-308 + call $~lib/math/NativeMath.tan f64.const 2.2250738585072004e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 2.2250738585072004e-308 + call $~lib/bindings/Math/tan + f64.const 2.2250738585072004e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45080,9 +51052,19 @@ unreachable end f64.const 2.225073858507201e-308 + call $~lib/math/NativeMath.tan f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 2.225073858507201e-308 + call $~lib/bindings/Math/tan + f64.const 2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45093,9 +51075,19 @@ unreachable end f64.const -1e-323 + call $~lib/math/NativeMath.tan f64.const -1e-323 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -1e-323 + call $~lib/bindings/Math/tan + f64.const -1e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45106,9 +51098,19 @@ unreachable end f64.const -4.4e-323 + call $~lib/math/NativeMath.tan f64.const -4.4e-323 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -4.4e-323 + call $~lib/bindings/Math/tan + f64.const -4.4e-323 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45119,9 +51121,19 @@ unreachable end f64.const -5.562684646268003e-309 + call $~lib/math/NativeMath.tan f64.const -5.562684646268003e-309 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -5.562684646268003e-309 + call $~lib/bindings/Math/tan + f64.const -5.562684646268003e-309 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45132,9 +51144,19 @@ unreachable end f64.const -1.1125369292536007e-308 + call $~lib/math/NativeMath.tan f64.const -1.1125369292536007e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -1.1125369292536007e-308 + call $~lib/bindings/Math/tan + f64.const -1.1125369292536007e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45145,9 +51167,19 @@ unreachable end f64.const -2.2250738585072004e-308 + call $~lib/math/NativeMath.tan f64.const -2.2250738585072004e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -2.2250738585072004e-308 + call $~lib/bindings/Math/tan + f64.const -2.2250738585072004e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45158,9 +51190,19 @@ unreachable end f64.const -2.225073858507201e-308 + call $~lib/math/NativeMath.tan f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -2.225073858507201e-308 + call $~lib/bindings/Math/tan + f64.const -2.225073858507201e-308 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45379,9 +51421,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.tan f64.const 0 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/tan + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45392,9 +51444,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.tan f64.const -0 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/tan + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45405,9 +51467,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/tan + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45418,9 +51490,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/tan + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -45431,9 +51513,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_tan + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/tan + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46158,9 +52250,19 @@ unreachable end f64.const -8.06684839057968 + call $~lib/math/NativeMath.tanh f64.const -0.999999803096032 f64.const 0.012793331407010555 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/tanh + f64.const -0.999999803096032 + f64.const 0.012793331407010555 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46171,9 +52273,19 @@ unreachable end f64.const 4.345239849338305 + call $~lib/math/NativeMath.tanh f64.const 0.9996636978961307 f64.const 0.1573508232831955 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/tanh + f64.const 0.9996636978961307 + f64.const 0.1573508232831955 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46184,9 +52296,19 @@ unreachable end f64.const -8.38143342755525 + call $~lib/math/NativeMath.tanh f64.const -0.9999998950434862 f64.const 0.27985066175460815 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/tanh + f64.const -0.9999998950434862 + f64.const 0.27985066175460815 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46197,9 +52319,19 @@ unreachable end f64.const -6.531673581913484 + call $~lib/math/NativeMath.tanh f64.const -0.9999957568392429 f64.const -0.44285574555397034 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/tanh + f64.const -0.9999957568392429 + f64.const -0.44285574555397034 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46210,9 +52342,19 @@ unreachable end f64.const 9.267056966972586 + call $~lib/math/NativeMath.tanh f64.const 0.9999999821447234 f64.const 0.4462755024433136 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/tanh + f64.const 0.9999999821447234 + f64.const 0.4462755024433136 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46223,9 +52365,19 @@ unreachable end f64.const 0.6619858980995045 + call $~lib/math/NativeMath.tanh f64.const 0.5796835018635275 f64.const 0.4892043173313141 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/tanh + f64.const 0.5796835018635275 + f64.const 0.4892043173313141 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46236,9 +52388,19 @@ unreachable end f64.const -0.4066039223853553 + call $~lib/math/NativeMath.tanh f64.const -0.3855853099901652 f64.const 0.35993871092796326 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/tanh + f64.const -0.3855853099901652 + f64.const 0.35993871092796326 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46249,9 +52411,19 @@ unreachable end f64.const 0.5617597462207241 + call $~lib/math/NativeMath.tanh f64.const 0.5092819248700439 f64.const -0.39436522126197815 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/tanh + f64.const 0.5092819248700439 + f64.const -0.39436522126197815 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46262,9 +52434,19 @@ unreachable end f64.const 0.7741522965913037 + call $~lib/math/NativeMath.tanh f64.const 0.6493374550318555 f64.const -0.4899396002292633 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/tanh + f64.const 0.6493374550318555 + f64.const -0.4899396002292633 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46275,9 +52457,19 @@ unreachable end f64.const -0.6787637026394024 + call $~lib/math/NativeMath.tanh f64.const -0.590715084799841 f64.const -0.0145387789234519 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/tanh + f64.const -0.590715084799841 + f64.const -0.0145387789234519 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46288,9 +52480,19 @@ unreachable end f64.const 0 + call $~lib/math/NativeMath.tanh f64.const 0 f64.const 0 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/tanh + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46301,9 +52503,19 @@ unreachable end f64.const -0 + call $~lib/math/NativeMath.tanh f64.const -0 f64.const 0 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/tanh + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46314,9 +52526,19 @@ unreachable end f64.const inf + call $~lib/math/NativeMath.tanh f64.const 1 f64.const 0 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/tanh + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46327,9 +52549,19 @@ unreachable end f64.const -inf + call $~lib/math/NativeMath.tanh f64.const -1 f64.const 0 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/tanh + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46340,9 +52572,19 @@ unreachable end f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.tanh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/test_tanh + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/tanh + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46562,9 +52804,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.06684839057968 f64.const -8 - call $std/math/test_trunc + f64.const -8 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.06684839057968 + call $~lib/bindings/Math/trunc + f64.const -8 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46574,9 +52826,19 @@ call $~lib/builtins/abort unreachable end - f64.const 4.345239849338305 f64.const 4 - call $std/math/test_trunc + f64.const 4 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 4.345239849338305 + call $~lib/bindings/Math/trunc + f64.const 4 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46586,9 +52848,19 @@ call $~lib/builtins/abort unreachable end - f64.const -8.38143342755525 f64.const -8 - call $std/math/test_trunc + f64.const -8 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -8.38143342755525 + call $~lib/bindings/Math/trunc + f64.const -8 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46598,9 +52870,19 @@ call $~lib/builtins/abort unreachable end - f64.const -6.531673581913484 f64.const -6 - call $std/math/test_trunc + f64.const -6 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -6.531673581913484 + call $~lib/bindings/Math/trunc + f64.const -6 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46610,9 +52892,19 @@ call $~lib/builtins/abort unreachable end - f64.const 9.267056966972586 f64.const 9 - call $std/math/test_trunc + f64.const 9 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 9.267056966972586 + call $~lib/bindings/Math/trunc + f64.const 9 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46622,9 +52914,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.6619858980995045 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.6619858980995045 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46634,9 +52936,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.4066039223853553 f64.const -0 - call $std/math/test_trunc + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.4066039223853553 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46646,9 +52958,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5617597462207241 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5617597462207241 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46658,9 +52980,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7741522965913037 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.7741522965913037 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46670,9 +53002,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.6787637026394024 f64.const -0 - call $std/math/test_trunc + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.6787637026394024 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46684,7 +53026,17 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const nan:0x8000000000000 + call $~lib/bindings/Math/trunc + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46696,7 +53048,17 @@ end f64.const inf f64.const inf - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const inf + call $~lib/bindings/Math/trunc + f64.const inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46708,7 +53070,17 @@ end f64.const -inf f64.const -inf - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const -inf + call $~lib/bindings/Math/trunc + f64.const -inf + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46720,7 +53092,17 @@ end f64.const 0 f64.const 0 - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46732,7 +53114,17 @@ end f64.const -0 f64.const -0 - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46744,7 +53136,17 @@ end f64.const 1 f64.const 1 - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1 + call $~lib/bindings/Math/trunc + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46756,7 +53158,17 @@ end f64.const -1 f64.const -1 - call $std/math/test_trunc + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1 + call $~lib/bindings/Math/trunc + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46766,9 +53178,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.5 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.5 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46778,9 +53200,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.5 f64.const -0 - call $std/math/test_trunc + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.5 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46790,9 +53222,19 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0000152587890625 f64.const 1 - call $std/math/test_trunc + f64.const 1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 1.0000152587890625 + call $~lib/bindings/Math/trunc + f64.const 1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46802,9 +53244,19 @@ call $~lib/builtins/abort unreachable end - f64.const -1.0000152587890625 f64.const -1 - call $std/math/test_trunc + f64.const -1 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -1.0000152587890625 + call $~lib/bindings/Math/trunc + f64.const -1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46814,9 +53266,19 @@ call $~lib/builtins/abort unreachable end - f64.const 0.9999923706054688 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 0.9999923706054688 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46826,9 +53288,19 @@ call $~lib/builtins/abort unreachable end - f64.const -0.9999923706054688 f64.const -0 - call $std/math/test_trunc + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -0.9999923706054688 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46838,9 +53310,19 @@ call $~lib/builtins/abort unreachable end - f64.const 7.888609052210118e-31 f64.const 0 - call $std/math/test_trunc + f64.const 0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const 7.888609052210118e-31 + call $~lib/bindings/Math/trunc + f64.const 0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -46850,9 +53332,19 @@ call $~lib/builtins/abort unreachable end - f64.const -7.888609052210118e-31 f64.const -0 - call $std/math/test_trunc + f64.const -0 + f64.const 0 + call $std/math/check + if (result i32) + f64.const -7.888609052210118e-31 + call $~lib/bindings/Math/trunc + f64.const -0 + f64.const 0 + call $std/math/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -48386,7 +54878,7 @@ unreachable end ) - (func $~start (; 133 ;) + (func $~start (; 110 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index e599ba26f6..01e1bbba31 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -4,7 +4,6 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (import "mod" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -243,23 +242,7 @@ local.get $1 f64.eq ) - (func $std/mod/test_fmod (; 4 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - local.get $1 - call $~lib/math/NativeMath.mod - local.get $2 - call $std/mod/check - if (result i32) - local.get $0 - local.get $1 - call $std/mod/mod - local.get $2 - call $std/mod/check - else - i32.const 0 - end - ) - (func $~lib/math/NativeMathf.mod (; 5 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 4 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -451,7 +434,7 @@ local.get $0 f32.mul ) - (func $std/mod/test_fmodf (; 6 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/mod/test_fmodf (; 5 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) block $__inlined_func$std/mod/check (result i32) local.get $0 local.get $1 @@ -481,11 +464,21 @@ f32.eq end ) - (func $start:std/mod (; 7 ;) + (func $start:std/mod (; 6 ;) f64.const 3 f64.const 2 + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3 + f64.const 2 + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -497,8 +490,18 @@ end f64.const 3 f64.const -2 + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3 + f64.const -2 + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -510,8 +513,18 @@ end f64.const -3 f64.const 2 + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3 + f64.const 2 + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -523,8 +536,18 @@ end f64.const -3 f64.const -2 + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3 + f64.const -2 + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -536,8 +559,18 @@ end f64.const 3.5 f64.const 2 + call $~lib/math/NativeMath.mod f64.const 1.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3.5 + f64.const 2 + call $std/mod/mod + f64.const 1.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -549,8 +582,18 @@ end f64.const 3.5 f64.const -2 + call $~lib/math/NativeMath.mod f64.const 1.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3.5 + f64.const -2 + call $std/mod/mod + f64.const 1.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -562,8 +605,18 @@ end f64.const -3.5 f64.const 2 + call $~lib/math/NativeMath.mod f64.const -1.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3.5 + f64.const 2 + call $std/mod/mod + f64.const -1.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -575,8 +628,18 @@ end f64.const -3.5 f64.const -2 + call $~lib/math/NativeMath.mod f64.const -1.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3.5 + f64.const -2 + call $std/mod/mod + f64.const -1.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -588,8 +651,18 @@ end f64.const 3 f64.const 2.5 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3 + f64.const 2.5 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -601,8 +674,18 @@ end f64.const 3 f64.const -2.5 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 3 + f64.const -2.5 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -614,8 +697,18 @@ end f64.const -3 f64.const 2.5 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3 + f64.const 2.5 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -627,8 +720,18 @@ end f64.const -3 f64.const -2.5 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -3 + f64.const -2.5 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -640,8 +743,18 @@ end f64.const 0.5 f64.const 1 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0.5 + f64.const 1 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -653,8 +766,18 @@ end f64.const 0.5 f64.const -1 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0.5 + f64.const -1 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -666,8 +789,18 @@ end f64.const -0.5 f64.const 1 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0.5 + f64.const 1 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -679,8 +812,18 @@ end f64.const -0.5 f64.const -1 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0.5 + f64.const -1 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -692,8 +835,18 @@ end f64.const 1.5 f64.const 1 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1.5 + f64.const 1 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -705,8 +858,18 @@ end f64.const 1.5 f64.const -1 + call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1.5 + f64.const -1 + call $std/mod/mod + f64.const 0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -718,8 +881,18 @@ end f64.const -1.5 f64.const 1 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1.5 + f64.const 1 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -731,8 +904,18 @@ end f64.const -1.5 f64.const -1 + call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1.5 + f64.const -1 + call $std/mod/mod + f64.const -0.5 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -744,8 +927,18 @@ end f64.const 1.25 f64.const 1 + call $~lib/math/NativeMath.mod f64.const 0.25 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1.25 + f64.const 1 + call $std/mod/mod + f64.const 0.25 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -757,8 +950,18 @@ end f64.const 1.25 f64.const -1 + call $~lib/math/NativeMath.mod f64.const 0.25 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1.25 + f64.const -1 + call $std/mod/mod + f64.const 0.25 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -770,8 +973,18 @@ end f64.const -1.25 f64.const 1 + call $~lib/math/NativeMath.mod f64.const -0.25 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1.25 + f64.const 1 + call $std/mod/mod + f64.const -0.25 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -783,8 +996,18 @@ end f64.const -1.25 f64.const -1 + call $~lib/math/NativeMath.mod f64.const -0.25 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1.25 + f64.const -1 + call $std/mod/mod + f64.const -0.25 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -796,8 +1019,18 @@ end f64.const 1 f64.const 1.25 + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const 1.25 + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -809,8 +1042,18 @@ end f64.const 1 f64.const -1.25 + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const -1.25 + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -822,8 +1065,18 @@ end f64.const -1 f64.const 1.25 + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const 1.25 + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -835,8 +1088,18 @@ end f64.const -1 f64.const -1.25 + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const -1.25 + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -848,12 +1111,22 @@ end f64.const -13 f64.const 64 + call $~lib/math/NativeMath.mod f64.const -13 - call $std/mod/test_fmod - i32.eqz - if - i32.const 0 - i32.const 32 + call $std/mod/check + if (result i32) + f64.const -13 + f64.const 64 + call $std/mod/mod + f64.const -13 + call $std/mod/check + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 i32.const 47 i32.const 0 call $~lib/builtins/abort @@ -861,8 +1134,18 @@ end f64.const 0 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -874,8 +1157,18 @@ end f64.const -0 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -887,8 +1180,18 @@ end f64.const 0 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -900,8 +1203,18 @@ end f64.const -0 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -913,8 +1226,18 @@ end f64.const 0 f64.const 1 + call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const 1 + call $std/mod/mod + f64.const 0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -926,8 +1249,18 @@ end f64.const -0 f64.const 1 + call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const 1 + call $std/mod/mod + f64.const -0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -939,8 +1272,18 @@ end f64.const 0 f64.const -1 + call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const -1 + call $std/mod/mod + f64.const 0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -952,8 +1295,18 @@ end f64.const -0 f64.const -1 + call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const -1 + call $std/mod/mod + f64.const -0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -965,8 +1318,18 @@ end f64.const 1 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -978,8 +1341,18 @@ end f64.const -1 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -991,8 +1364,18 @@ end f64.const 1 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1004,8 +1387,18 @@ end f64.const -1 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1017,8 +1410,18 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1030,8 +1433,18 @@ end f64.const nan:0x8000000000000 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1043,8 +1456,18 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const 1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1056,8 +1479,18 @@ end f64.const nan:0x8000000000000 f64.const -1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const -1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1069,8 +1502,18 @@ end f64.const nan:0x8000000000000 f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1082,8 +1525,18 @@ end f64.const nan:0x8000000000000 f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1095,8 +1548,18 @@ end f64.const nan:0x8000000000000 f64.const 1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const 1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1108,8 +1571,18 @@ end f64.const nan:0x8000000000000 f64.const -1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const -1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1121,8 +1594,18 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const nan:0x8000000000000 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1134,8 +1617,18 @@ end f64.const 0 f64.const inf + call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const inf + call $std/mod/mod + f64.const 0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1147,8 +1640,18 @@ end f64.const -0 f64.const inf + call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const inf + call $std/mod/mod + f64.const -0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1160,8 +1663,18 @@ end f64.const 0 f64.const -inf + call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 0 + f64.const -inf + call $std/mod/mod + f64.const 0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1173,8 +1686,18 @@ end f64.const -0 f64.const -inf + call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -0 + f64.const -inf + call $std/mod/mod + f64.const -0 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1186,8 +1709,18 @@ end f64.const 1 f64.const inf + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const inf + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1199,8 +1732,18 @@ end f64.const -1 f64.const inf + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const inf + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1212,8 +1755,18 @@ end f64.const 1 f64.const -inf + call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const 1 + f64.const -inf + call $std/mod/mod + f64.const 1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1225,8 +1778,18 @@ end f64.const -1 f64.const -inf + call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -1 + f64.const -inf + call $std/mod/mod + f64.const -1 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1238,8 +1801,18 @@ end f64.const inf f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1251,8 +1824,18 @@ end f64.const inf f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1264,8 +1847,18 @@ end f64.const -inf f64.const 0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const 0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1277,8 +1870,18 @@ end f64.const -inf f64.const -0 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const -0 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1290,8 +1893,18 @@ end f64.const inf f64.const 1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const 1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1303,8 +1916,18 @@ end f64.const inf f64.const -1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const -1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1316,8 +1939,18 @@ end f64.const -inf f64.const 1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const 1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1329,8 +1962,18 @@ end f64.const -inf f64.const -1 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const -1 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1342,8 +1985,18 @@ end f64.const inf f64.const inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1355,8 +2008,18 @@ end f64.const -inf f64.const inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1368,8 +2031,18 @@ end f64.const inf f64.const -inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const -inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1381,8 +2054,18 @@ end f64.const -inf f64.const -inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const -inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1394,8 +2077,18 @@ end f64.const inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const inf + f64.const nan:0x8000000000000 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1407,8 +2100,18 @@ end f64.const -inf f64.const nan:0x8000000000000 + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const -inf + f64.const nan:0x8000000000000 + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1420,8 +2123,18 @@ end f64.const nan:0x8000000000000 f64.const inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -1433,8 +2146,18 @@ end f64.const nan:0x8000000000000 f64.const -inf + call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/test_fmod + call $std/mod/check + if (result i32) + f64.const nan:0x8000000000000 + f64.const -inf + call $std/mod/mod + f64.const nan:0x8000000000000 + call $std/mod/check + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -2238,7 +2961,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 7 ;) call $start:std/mod ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ad93153023..e54a929ddb 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -7,7 +7,7 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (func $std/new/AClass#constructor (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15,20 +15,20 @@ global.get $~lib/rt/stub/offset i32.const 16 i32.add - local.tee $2 + local.tee $1 i32.const 16 i32.add - local.tee $0 + local.tee $2 memory.size local.tee $3 i32.const 16 i32.shl - local.tee $1 + local.tee $0 i32.gt_u if local.get $3 + local.get $2 local.get $0 - local.get $1 i32.sub i32.const 65535 i32.add @@ -36,16 +36,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $0 local.get $3 - local.get $1 + local.get $0 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $0 memory.grow i32.const 0 i32.lt_s @@ -54,9 +54,9 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset local.get $2 + global.set $~lib/rt/stub/offset + local.get $1 i32.const 16 i32.sub local.tee $0 @@ -71,31 +71,29 @@ local.get $0 i32.const 8 i32.store offset=12 - local.get $2 - ) - (func $~start (; 1 ;) - (local $0 i32) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc - local.tee $0 + local.get $1 i32.const 1 i32.store - local.get $0 + local.get $1 f32.const 2 f32.store offset=4 i32.const 0 - local.get $0 + local.get $1 i32.load i32.const 1 i32.add i32.store - local.get $0 + local.get $1 f32.const 3 f32.store offset=4 - local.get $0 + local.get $1 + ) + (func $~start (; 1 ;) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset + call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 987e6b37a6..af4871f594 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param 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))) (memory $0 1) @@ -170,8 +169,22 @@ end i32.const 0 ) - (func $std/object-literal/bar (; 3 ;) (param $0 i32) + (func $start:std/object-literal (; 3 ;) + (local $0 i32) (local $1 i32) + i32.const 128 + global.set $~lib/rt/stub/startOffset + i32.const 128 + global.set $~lib/rt/stub/offset + i32.const 8 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const 32 + i32.store offset=4 local.get $0 i32.load i32.const 1 @@ -188,7 +201,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 32 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -196,24 +209,24 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $0 + local.get $1 select br_if $folding-inner0 - local.get $0 + local.get $1 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u - local.tee $1 + local.tee $0 i32.const 28 i32.load i32.const 1 i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 local.get $1 + local.get $0 call $~lib/util/string/compareImpl i32.eqz br $__inlined_func$~lib/string/String.__eq @@ -229,24 +242,6 @@ call $~lib/builtins/abort unreachable end - ) - (func $start:std/object-literal (; 4 ;) - (local $0 i32) - i32.const 128 - global.set $~lib/rt/stub/startOffset - i32.const 128 - global.set $~lib/rt/stub/offset - i32.const 8 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - i32.const 1 - i32.store - local.get $0 - i32.const 32 - i32.store offset=4 - local.get $0 - call $std/object-literal/bar i32.const 4 i32.const 4 call $~lib/rt/stub/__alloc @@ -284,7 +279,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 6ed93ff3a3..9b7cf51477 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,6 +1,5 @@ (module (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 (func (param i32) (result i32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -1177,39 +1176,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.equals (; 4 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load - local.get $1 - i32.load - i32.eq - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.eq - else - i32.const 0 - end - ) - (func $std/operator-overloading/Tester.notEquals (; 5 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load - local.get $1 - i32.load - i32.ne - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.ne - else - i32.const 0 - end - ) - (func $start:std/operator-overloading (; 6 ;) + (func $start:std/operator-overloading (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1827,8 +1794,21 @@ local.get $0 global.set $std/operator-overloading/eq2 global.get $std/operator-overloading/eq1 + local.tee $0 + i32.load global.get $std/operator-overloading/eq2 - call $std/operator-overloading/Tester.equals + local.tee $1 + i32.load + i32.eq + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.eq + else + i32.const 0 + end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq i32.const 1 @@ -1862,8 +1842,21 @@ local.get $0 global.set $std/operator-overloading/eq4 global.get $std/operator-overloading/eq3 + local.tee $0 + i32.load global.get $std/operator-overloading/eq4 - call $std/operator-overloading/Tester.equals + local.tee $1 + i32.load + i32.eq + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.eq + else + i32.const 0 + end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf if @@ -1875,8 +1868,21 @@ unreachable end global.get $std/operator-overloading/eq1 + local.tee $0 + i32.load global.get $std/operator-overloading/eq2 - call $std/operator-overloading/Tester.notEquals + local.tee $1 + i32.load + i32.ne + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.ne + else + i32.const 0 + end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq if @@ -1888,8 +1894,21 @@ unreachable end global.get $std/operator-overloading/eq3 + local.tee $0 + i32.load global.get $std/operator-overloading/eq4 - call $std/operator-overloading/Tester.notEquals + local.tee $1 + i32.load + i32.ne + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.ne + else + i32.const 0 + end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf i32.const 1 @@ -2856,7 +2875,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 5 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index f340d9ea57..e6bca37e40 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -846,69 +846,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -984,9 +922,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1014,9 +953,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1066,7 +1061,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1117,7 +1112,7 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1328,7 +1323,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 16 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1353,7 +1348,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#clear (; 18 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -1403,7 +1398,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 19 ;) (result i32) + (func $~lib/set/Set#constructor (; 18 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -1434,7 +1429,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1477,7 +1472,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1493,7 +1488,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 21 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1651,7 +1646,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1743,7 +1738,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1823,7 +1818,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1996,20 +1991,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 26 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2065,10 +2047,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2106,13 +2088,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/array/ensureSize (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2215,7 +2205,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2251,7 +2241,7 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 28 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2270,7 +2260,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 29 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2336,7 +2326,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 32 ;) + (func $std/set/testNumeric (; 30 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2767,7 +2757,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 33 ;) (result i32) + (func $~lib/set/Set#constructor (; 31 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -2798,21 +2788,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 34 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 32 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2970,7 +2946,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 33 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3060,7 +3036,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3079,7 +3055,7 @@ i32.add i32.load8_u ) - (func $~lib/set/Set#delete (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3143,7 +3119,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 39 ;) + (func $std/set/testNumeric (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3163,7 +3139,14 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -3186,7 +3169,14 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3226,7 +3216,14 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3250,7 +3247,14 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3351,7 +3355,15 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $3 + local.get $3 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3406,7 +3418,14 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3421,7 +3440,14 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -3460,7 +3486,14 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -3483,7 +3516,14 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -3498,7 +3538,14 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -3566,7 +3613,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 40 ;) (result i32) + (func $~lib/set/Set#constructor (; 37 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -3597,7 +3644,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 41 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 38 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3612,7 +3659,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3655,20 +3702,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 43 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find - i32.const 0 - i32.ne - ) - (func $~lib/set/Set#rehash (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3823,7 +3857,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 41 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3910,7 +3944,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3948,7 +3982,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#__get (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3969,7 +4003,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 48 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4032,7 +4066,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 49 ;) + (func $std/set/testNumeric (; 45 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4054,7 +4088,13 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4077,7 +4117,13 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4119,7 +4165,13 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4143,7 +4195,13 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4244,7 +4302,14 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - call $~lib/set/Set#has + local.tee $3 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4301,7 +4366,13 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4316,7 +4387,13 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4357,7 +4434,13 @@ if local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4380,7 +4463,13 @@ end local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find i32.eqz if i32.const 0 @@ -4395,7 +4484,13 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - call $~lib/set/Set#has + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find if i32.const 0 i32.const 304 @@ -4463,7 +4558,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 50 ;) (result i32) + (func $~lib/set/Set#constructor (; 46 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -4494,7 +4589,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#rehash (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 47 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4649,7 +4744,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 48 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4734,7 +4829,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4755,7 +4850,7 @@ i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 54 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 50 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4816,7 +4911,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 55 ;) + (func $std/set/testNumeric (; 51 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5280,7 +5375,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 56 ;) (result i32) + (func $~lib/set/Set#constructor (; 52 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -5311,7 +5406,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 57 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 53 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -5342,7 +5437,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5383,7 +5478,7 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 59 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 55 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5538,7 +5633,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 56 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5621,7 +5716,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5659,7 +5754,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__get (; 62 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5680,7 +5775,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 63 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5739,7 +5834,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 64 ;) + (func $std/set/testNumeric (; 60 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6175,7 +6270,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 65 ;) (result i32) + (func $~lib/set/Set#constructor (; 61 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -6206,7 +6301,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 66 ;) + (func $std/set/testNumeric (; 62 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6642,7 +6737,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#clear (; 67 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 63 ;) (param $0 i32) (local $1 i32) (local $2 i32) i32.const 16 @@ -6692,7 +6787,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 68 ;) (result i32) + (func $~lib/set/Set#constructor (; 64 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -6723,7 +6818,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 69 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 65 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6789,7 +6884,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6830,7 +6925,7 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 71 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 67 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6985,7 +7080,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 72 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 68 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7068,7 +7163,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -7106,7 +7201,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 70 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -7127,7 +7222,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 75 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 71 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -7187,7 +7282,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 76 ;) + (func $std/set/testNumeric (; 72 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -7621,7 +7716,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 77 ;) (result i32) + (func $~lib/set/Set#constructor (; 73 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -7652,7 +7747,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 78 ;) + (func $std/set/testNumeric (; 74 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -8086,7 +8181,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 79 ;) (result i32) + (func $~lib/set/Set#constructor (; 75 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -8117,7 +8212,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 80 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 76 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8158,7 +8253,7 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 81 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 77 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8314,7 +8409,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 82 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#add (; 78 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8398,7 +8493,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -8419,7 +8514,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 84 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 80 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -8480,7 +8575,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 85 ;) + (func $std/set/testNumeric (; 81 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -8957,7 +9052,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#constructor (; 86 ;) (result i32) + (func $~lib/set/Set#constructor (; 82 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 24 @@ -8988,7 +9083,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 87 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 83 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -9029,7 +9124,7 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 88 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 84 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9185,7 +9280,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#add (; 89 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 85 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9269,7 +9364,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -9290,7 +9385,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 91 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 87 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -9351,7 +9446,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 92 ;) + (func $std/set/testNumeric (; 88 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -9828,7 +9923,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 93 ;) + (func $~start (; 89 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -9840,7 +9935,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 94 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 90 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9933,9 +10028,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 91ecdb9591..f84e286d0e 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -858,69 +858,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -996,9 +934,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1046,9 +985,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1098,7 +1093,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1271,7 +1266,7 @@ end end ) - (func $~lib/rt/__allocBuffer (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocBuffer (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1288,7 +1283,7 @@ end local.get $1 ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1339,7 +1334,7 @@ end local.get $0 ) - (func $start:std/staticarray (; 18 ;) + (func $start:std/staticarray (; 17 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1592,7 +1587,7 @@ i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 19 ;) + (func $~start (; 18 ;) global.get $~started if return @@ -1602,7 +1597,7 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 85c12bc7b6..66b2b13920 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1153,69 +1153,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1291,9 +1229,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1321,9 +1260,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1373,7 +1368,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/util/casemap/casemap (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1524,7 +1519,7 @@ i32.and i32.add ) - (func $~lib/memory/memory.copy (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1697,20 +1692,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 21 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1766,10 +1748,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1807,13 +1789,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) call $~lib/rt/tlsf/maybeInitialize @@ -1861,7 +1851,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 22 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2176,7 +2166,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2252,7 +2242,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 24 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2294,7 +2284,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2319,7 +2309,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 28 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2798,7 +2788,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 29 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 27 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2852,7 +2842,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2917,7 +2907,7 @@ i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 31 ;) + (func $start:std/string-casemapping (; 29 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -5173,7 +5163,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 32 ;) + (func $~start (; 30 ;) global.get $~started if return @@ -5183,7 +5173,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 31 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5251,9 +5241,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 7462990e87..abf0466322 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,9 +1,9 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 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_=>_none (func (param i32 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))) @@ -891,69 +891,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1029,9 +967,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1059,9 +998,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1111,7 +1106,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1284,7 +1279,7 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 17 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 16 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1305,7 +1300,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 18 ;) + (func $std/string-encoding/testUTF16Encode (; 17 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1475,7 +1470,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) call $~lib/rt/tlsf/maybeInitialize local.get $1 @@ -1493,7 +1488,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1569,7 +1564,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1611,7 +1606,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 22 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 21 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1622,14 +1617,15 @@ (local $7 i32) i32.const 32 call $~lib/string/String.UTF16.encode - local.set $0 + local.set $2 i32.const 28 i32.load local.set $1 - local.get $0 + local.get $2 + local.tee $0 i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $2 + local.tee $3 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1659,7 +1655,7 @@ local.get $0 i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $3 + local.tee $4 i32.const 304 call $~lib/string/String.__eq i32.eqz @@ -1676,7 +1672,7 @@ i32.add i32.const 2 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $4 + local.tee $5 i32.const 336 call $~lib/string/String.__eq i32.eqz @@ -1693,7 +1689,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $5 + local.tee $6 i32.const 368 call $~lib/string/String.__eq i32.eqz @@ -1710,7 +1706,7 @@ i32.add i32.const 4 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $6 + local.tee $7 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -1727,7 +1723,7 @@ i32.add i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $7 + local.tee $0 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1739,11 +1735,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 21052 i32.gt_u if - local.get $2 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -1757,15 +1753,6 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $3 - i32.const 21052 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 i32.const 21052 i32.gt_u @@ -1811,8 +1798,17 @@ i32.sub call $~lib/rt/pure/decrement end + local.get $2 + i32.const 21052 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end ) - (func $~lib/string/String.UTF8.byteLength (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1903,7 +1899,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2115,7 +2111,7 @@ local.get $6 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 25 ;) + (func $std/string-encoding/testUTF8Encode (; 24 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2266,7 +2262,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 26 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 25 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2427,20 +2423,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/tlsf/freeBlock (; 27 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2496,10 +2479,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -2537,13 +2520,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2779,7 +2770,7 @@ i32.add call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 30 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 28 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2947,7 +2938,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 31 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 29 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3213,7 +3204,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/string-encoding/testLarge (; 32 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 30 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3297,7 +3288,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/string-encoding (; 33 ;) + (func $start:std/string-encoding (; 31 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3427,10 +3418,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 34 ;) + (func $~start (; 32 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 35 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 33 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3498,9 +3489,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index b0ff57a67e..ad9807f0d6 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (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 $none_=>_i32 (func (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) @@ -1365,69 +1365,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1503,9 +1441,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1533,9 +1472,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1585,7 +1580,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/string/String.fromCharCode (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) call $~lib/rt/tlsf/maybeInitialize @@ -1611,7 +1606,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 19 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 18 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1630,11 +1625,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 20 ;) (param $0 i32) + (func $~setArgumentsLength (; 19 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 21 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 20 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1688,7 +1683,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 22 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 21 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1756,7 +1751,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#indexOf (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1824,7 +1819,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1997,7 +1992,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2022,7 +2017,7 @@ end end ) - (func $~lib/string/String#padStart (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2111,7 +2106,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2201,7 +2196,7 @@ local.get $5 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2276,7 +2271,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2322,7 +2317,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 30 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 29 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2386,7 +2381,7 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 31 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 30 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2451,7 +2446,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 32 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2512,7 +2507,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 33 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 32 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2608,7 +2603,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 34 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 33 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2830,7 +2825,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 35 ;) (result i32) + (func $~lib/util/string/strtol (; 34 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3051,7 +3046,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 36 ;) (result i64) + (func $~lib/util/string/strtol (; 35 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3274,7 +3269,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 37 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3308,7 +3303,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 38 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 37 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3385,7 +3380,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 39 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 38 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -4134,7 +4129,7 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 39 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4226,7 +4221,7 @@ end local.get $2 ) - (func $~lib/string/String.__gt (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 40 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4281,7 +4276,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 42 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 41 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4336,7 +4331,7 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 42 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4402,7 +4397,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4514,7 +4509,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 45 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 44 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4556,20 +4551,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 46 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/rt/tlsf/reallocateBlock (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4625,10 +4607,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -4666,13 +4648,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/string/String#replaceAll (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4996,7 +4986,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -5077,7 +5067,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -5141,7 +5131,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5227,7 +5217,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 52 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 50 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5261,7 +5251,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 53 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 51 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5472,19 +5462,29 @@ end end ) - (func $~lib/array/ensureSize (; 54 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 52 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=12 + local.tee $7 + i32.const 1 + i32.add + local.tee $3 + local.set $2 + local.get $3 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 i32.const 2 i32.shr_u i32.gt_u if - local.get $1 + local.get $2 i32.const 268435452 i32.gt_u if @@ -5497,54 +5497,42 @@ end local.get $0 i32.load - local.set $3 - local.get $2 + local.set $5 + local.get $4 call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock - local.get $1 + local.get $2 i32.const 2 i32.shl - local.tee $4 + local.tee $6 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $1 + local.tee $2 i32.add + local.get $6 local.get $4 - local.get $2 i32.sub call $~lib/memory/memory.fill - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.ne if local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 end local.get $0 - local.get $4 + local.get $6 i32.store offset=8 end - ) - (func $~lib/array/Array<~lib/string/String>#push (; 55 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.add - local.tee $3 - call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $2 + local.get $7 i32.const 2 i32.shl i32.add @@ -5555,7 +5543,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5786,7 +5774,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5828,7 +5816,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 58 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 55 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5876,7 +5864,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5900,7 +5888,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 60 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 57 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5947,7 +5935,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 61 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 58 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5975,7 +5963,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 62 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 59 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -6028,7 +6016,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 63 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 60 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -6055,7 +6043,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 64 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 61 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6108,7 +6096,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 65 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 62 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6182,7 +6170,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 63 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6572,7 +6560,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6817,7 +6805,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 68 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 65 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7126,9 +7114,10 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 69 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 66 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -7182,9 +7171,18 @@ call $~lib/rt/tlsf/maybeInitialize local.get $1 call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + local.tee $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree ) - (func $start:std/string (; 70 ;) + (func $start:std/string (; 67 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16626,11 +16624,11 @@ call $~lib/rt/pure/decrement end ) - (func $std/string/getString (; 71 ;) (result i32) + (func $std/string/getString (; 68 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 72 ;) + (func $~start (; 69 ;) global.get $~started if return @@ -16640,7 +16638,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 73 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 70 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16748,9 +16746,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1be9a7736d..5df6ad2b1a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -3,11 +3,11 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result 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_=>_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 16) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -52,21 +52,7 @@ (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/symbol/Symbol (; 1 ;) (result i32) - (local $0 i32) - global.get $~lib/symbol/nextId - local.tee $0 - i32.const 1 - i32.add - global.set $~lib/symbol/nextId - local.get $0 - i32.eqz - if - unreachable - end - local.get $0 - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -150,7 +136,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 2 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -361,7 +347,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 3 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -382,7 +368,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 4 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -415,7 +401,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hashStr (; 6 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -459,7 +445,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -535,7 +521,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -575,7 +561,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 8 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -616,7 +602,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -729,7 +715,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -816,7 +802,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -847,7 +833,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -888,7 +874,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1001,7 +987,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1095,7 +1081,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 16 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 15 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1192,7 +1178,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#get (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 16 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1211,7 +1197,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 17 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString @@ -1230,7 +1216,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1403,7 +1389,7 @@ end end ) - (func $~lib/string/String.__concat (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1458,7 +1444,7 @@ end local.get $0 ) - (func $~lib/symbol/_Symbol#toString (; 21 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 20 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1536,11 +1522,31 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 22 ;) + (func $start:std/symbol (; 21 ;) (local $0 i32) - call $~lib/symbol/Symbol + global.get $~lib/symbol/nextId + local.tee $0 + i32.const 1 + i32.add + global.set $~lib/symbol/nextId + local.get $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/sym1 - call $~lib/symbol/Symbol + global.get $~lib/symbol/nextId + local.tee $0 + i32.const 1 + i32.add + global.set $~lib/symbol/nextId + local.get $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/sym2 global.get $std/symbol/sym1 global.get $std/symbol/sym2 @@ -1648,7 +1654,17 @@ call $~lib/builtins/abort unreachable end - call $~lib/symbol/Symbol + global.get $~lib/symbol/nextId + local.tee $0 + i32.const 1 + i32.add + global.set $~lib/symbol/nextId + local.get $0 + i32.eqz + if + unreachable + end + local.get $0 call $~lib/symbol/_Symbol#toString i32.const 896 call $~lib/string/String.__eq @@ -1705,7 +1721,7 @@ unreachable end ) - (func $~start (; 23 ;) + (func $~start (; 22 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index e74ef5a64e..131132a7da 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -2,9 +2,9 @@ (type $none_=>_none (func)) (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_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) @@ -1012,69 +1012,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1150,9 +1088,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1180,9 +1119,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1232,7 +1227,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1457,7 +1452,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1508,7 +1503,7 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1589,7 +1584,7 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testInstantiate (; 19 ;) (param $0 i32) + (func $std/typedarray/testInstantiate (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2250,7 +2245,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#__set (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2274,7 +2269,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2297,7 +2292,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2384,7 +2379,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 23 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 22 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2408,7 +2403,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2495,11 +2490,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~setArgumentsLength (; 24 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2577,7 +2572,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 27 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 26 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2619,20 +2614,23 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 28 ;) (param $0 i32) (param $1 i32) - local.get $1 - local.get $1 + (func $~lib/rt/tlsf/__free (; 27 ;) (param $0 i32) + (local $1 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.tee $0 + local.get $0 i32.load i32.const 1 i32.or i32.store local.get $0 - local.get $1 call $~lib/rt/tlsf/insertBlock - local.get $1 + local.get $0 call $~lib/rt/rtrace/onfree ) - (func $~lib/util/sort/weakHeapSort (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 28 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2879,10 +2877,8 @@ br $for-loop|2 end end - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/__free local.get $0 f64.load offset=8 local.set $4 @@ -2894,68 +2890,7 @@ local.get $4 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 30 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $1 - i32.const 1 - i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $1 - i32.const 2 - i32.eq - if - local.get $0 - f64.load offset=8 - local.set $3 - local.get $0 - f64.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.get $4 - f64.store offset=8 - local.get $0 - local.get $3 - f64.store - end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $1 - i32.const 256 - i32.lt_s - if - local.get $0 - local.get $1 - call $~lib/util/sort/insertionSort - else - local.get $0 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - end - local.get $2 - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 31 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 29 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2984,7 +2919,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 32 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -3007,7 +2942,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3039,7 +2974,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 32 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3058,7 +2993,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3078,7 +3013,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3147,7 +3082,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3320,7 +3255,7 @@ end end ) - (func $~lib/rt/__allocArray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3364,7 +3299,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3383,7 +3318,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3438,7 +3373,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3519,7 +3454,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3600,7 +3535,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3621,7 +3556,7 @@ i32.add i32.load ) - (func $std/typedarray/isInt32ArrayEqual (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3665,7 +3600,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3759,7 +3694,7 @@ end local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3867,12 +3802,12 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 48 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 46 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3951,7 +3886,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3971,7 +3906,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 48 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4008,7 +3943,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4032,7 +3967,7 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 52 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 50 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4115,7 +4050,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint16Array#__set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4139,7 +4074,7 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 54 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 52 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4222,7 +4157,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#reduce (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 53 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4263,7 +4198,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint32Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4287,7 +4222,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int64Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4311,12 +4246,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 58 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 56 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 59 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 57 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4357,7 +4292,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint64Array#__set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4381,7 +4316,7 @@ local.get $2 i64.store ) - (func $~lib/typedarray/Float32Array#__set (; 61 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4405,12 +4340,12 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 62 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 60 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 63 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 61 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4491,12 +4426,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 64 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 62 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 65 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 63 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4577,7 +4512,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 66 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 64 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4657,7 +4592,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 65 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4695,7 +4630,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 68 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 66 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4779,7 +4714,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 69 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 67 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4863,7 +4798,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 70 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 68 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4905,7 +4840,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (; 71 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 69 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4947,7 +4882,7 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 72 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 70 ;) (local $0 i32) (local $1 i32) (local $2 f32) @@ -5029,7 +4964,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 73 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 71 ;) (local $0 i32) (local $1 i32) (local $2 f64) @@ -5111,23 +5046,47 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 75 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 73 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 @@ -5136,79 +5095,51 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_s - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_s + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 76 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor 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 @@ -5220,7 +5151,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -5233,7 +5164,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 9 @@ -5246,37 +5177,80 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 7388 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $0 i32.const 7388 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8Array#map (; 77 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 368 + i32.const 432 + i32.const 152 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 75 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 @@ -5285,98 +5259,51 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_u - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array#__get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 152 - i32.const 44 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_u - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 79 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor 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 @@ -5388,7 +5315,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -5401,7 +5328,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 9 @@ -5414,37 +5341,61 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 7388 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $0 i32.const 7388 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 80 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 @@ -5453,79 +5404,51 @@ i32.add local.set $0 call $~lib/rt/tlsf/maybeInitialize - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_u - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 81 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor 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 @@ -5537,7 +5460,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -5550,7 +5473,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 @@ -5563,26 +5486,26 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 7388 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $0 i32.const 7388 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int16Array#map (; 82 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 77 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5658,7 +5581,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5681,7 +5604,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 84 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 79 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -5766,7 +5689,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint16Array#map (; 85 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 80 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5842,7 +5765,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 81 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5865,7 +5788,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 87 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 82 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -5950,7 +5873,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#map (; 88 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 83 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6026,7 +5949,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 89 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 84 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -6111,7 +6034,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint32Array#map (; 90 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 85 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6187,7 +6110,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 91 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6210,7 +6133,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 92 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 87 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -6295,12 +6218,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 93 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 88 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 94 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 89 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6376,7 +6299,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 95 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6399,7 +6322,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 96 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 91 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -6484,7 +6407,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint64Array#map (; 97 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 92 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6560,7 +6483,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6583,7 +6506,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 99 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 94 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -6668,12 +6591,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 100 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 95 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 101 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 96 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -6749,7 +6672,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6772,7 +6695,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 103 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 98 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -6857,12 +6780,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 104 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 99 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 105 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -6938,7 +6861,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 106 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 101 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -7023,7 +6946,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 107 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7032,7 +6955,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 108 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 103 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7088,10 +7011,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -7129,13 +7052,21 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree end local.get $3 ) - (func $~lib/typedarray/Int8Array#filter (; 109 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#filter (; 104 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7217,7 +7148,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 110 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 105 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -7335,14 +7266,14 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 106 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 112 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 107 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7424,7 +7355,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 113 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 108 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -7542,7 +7473,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 114 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7624,7 +7555,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 115 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 110 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -7742,7 +7673,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 116 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7751,7 +7682,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 117 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7844,7 +7775,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 118 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 113 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -7964,14 +7895,14 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 120 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8064,7 +7995,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 121 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 116 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -8184,12 +8115,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 117 ;) (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 (; 123 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 118 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8282,7 +8213,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 124 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 119 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -8402,12 +8333,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 126 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 121 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8500,7 +8431,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 127 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 122 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -8620,12 +8551,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 128 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 123 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 129 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 124 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8718,7 +8649,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 130 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 125 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -8838,12 +8769,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 126 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 132 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 127 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8936,7 +8867,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 133 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 128 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -9056,12 +8987,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 134 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 129 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 135 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 130 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9154,7 +9085,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 136 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 131 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -9274,12 +9205,12 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 132 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 138 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 133 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9372,7 +9303,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 139 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 134 ;) (local $0 i32) (local $1 i32) call $~lib/rt/tlsf/maybeInitialize @@ -9492,14 +9423,14 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 135 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 136 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9538,72 +9469,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 137 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 143 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 47 - call $~lib/typedarray/Int8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint8Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9642,132 +9514,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 145 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 146 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 140 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9810,72 +9564,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 150 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 53 - call $~lib/typedarray/Int16Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint16Array#some (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 142 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9918,71 +9613,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 152 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 154 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10025,134 +9661,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 156 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 57 - call $~lib/typedarray/Int32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 157 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 59 - call $~lib/typedarray/Int32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 158 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 159 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 147 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10195,134 +9713,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 160 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 148 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 161 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 61 - call $~lib/typedarray/Int64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 162 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 63 - call $~lib/typedarray/Int64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 163 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 149 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 164 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 150 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10365,76 +9765,17 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 165 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 151 ;) (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/Float32Array,f32> (; 166 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 65 - call $~lib/typedarray/Float32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 167 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 152 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 168 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 153 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10477,71 +9818,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 169 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 154 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 170 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 67 - call $~lib/typedarray/Float64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Int8Array#findIndex (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10580,76 +9862,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 173 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint8Array#findIndex (; 174 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 157 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10688,131 +9908,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 175 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 176 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Int16Array#findIndex (; 177 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10855,84 +9951,22 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 159 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 179 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 + (func $~lib/typedarray/Uint16Array#findIndex (; 160 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set + i32.load offset=4 + local.set $3 local.get $0 - i32.const 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint16Array#findIndex (; 180 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 + i32.load offset=8 i32.const 1 i32.shr_u local.set $4 @@ -10967,69 +10001,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 181 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Int32Array#findIndex (; 182 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11072,136 +10044,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 183 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 184 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 185 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Int64Array#findIndex (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 163 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11244,136 +10092,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 187 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 164 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 188 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 189 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Float32Array#findIndex (; 190 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 165 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11416,74 +10140,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 191 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 166 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 192 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Float64Array#findIndex (; 193 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 167 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11526,74 +10188,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 194 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 168 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 195 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 196 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 169 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -11603,7 +10203,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 197 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 170 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11643,72 +10243,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 198 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 91 - call $~lib/typedarray/Int8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 199 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 171 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 200 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 172 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11748,135 +10289,17 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 201 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 173 ;) (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.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 202 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 203 ;) (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.rem_s + i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 204 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 174 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11920,66 +10343,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 205 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 97 - call $~lib/typedarray/Int16Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint16Array#every (; 206 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 175 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12023,72 +10387,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 207 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 208 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 176 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 209 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 177 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12132,131 +10437,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 210 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 101 - call $~lib/typedarray/Int32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 211 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 103 - call $~lib/typedarray/Int32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 212 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 178 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 213 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 179 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12300,131 +10487,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 214 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 105 - call $~lib/typedarray/Int64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 215 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 180 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 216 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 107 - call $~lib/typedarray/Int64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/math/NativeMathf.mod (; 217 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 181 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12571,13 +10640,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 218 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 182 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 219 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 183 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12621,66 +10690,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 220 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 109 - call $~lib/typedarray/Float32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/math/NativeMath.mod (; 221 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 184 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -12834,13 +10844,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 222 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 185 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 223 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12884,66 +10894,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 224 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 111 - call $~lib/typedarray/Float64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 225 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -12988,7 +10939,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 226 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 188 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13087,7 +11038,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8Array#forEach (; 227 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 189 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13120,7 +11071,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 228 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 190 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -13186,7 +11137,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 229 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 191 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -13252,7 +11203,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 230 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 192 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -13297,7 +11248,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 231 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 193 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13400,7 +11351,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 232 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 194 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13497,7 +11448,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 233 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 195 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -13538,7 +11489,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 234 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 196 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13575,127 +11526,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 235 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 117 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 236 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 118 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 237 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 197 ;) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -13737,7 +11568,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 238 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 198 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13774,133 +11605,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 239 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 240 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 241 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 199 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -13942,7 +11647,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 242 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 200 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14036,7 +11741,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 243 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -14078,7 +11783,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 244 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 202 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14172,7 +11877,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int8Array#reverse (; 245 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 203 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14224,7 +11929,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 246 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 204 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14433,7 +12138,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8Array#reverse (; 247 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 205 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14485,7 +12190,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 248 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 206 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14549,7 +12254,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 249 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 207 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14751,7 +12456,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 250 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 208 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14815,7 +12520,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 251 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15017,7 +12722,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int16Array#reverse (; 252 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 210 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15075,7 +12780,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 253 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 211 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -15145,7 +12850,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 254 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 212 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15353,7 +13058,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint16Array#reverse (; 255 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 213 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15411,7 +13116,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 256 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 214 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -15481,7 +13186,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 257 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 215 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15683,7 +13388,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#reverse (; 258 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 216 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15741,7 +13446,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 259 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 217 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15938,7 +13643,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint32Array#subarray (; 260 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 218 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -16008,7 +13713,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 261 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 219 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16204,7 +13909,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int64Array#reverse (; 262 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 220 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16262,7 +13967,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 263 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 221 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -16332,7 +14037,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 264 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 222 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16531,7 +14236,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Uint64Array#subarray (; 265 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 223 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -16601,7 +14306,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 266 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 224 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16800,7 +14505,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Float32Array#reverse (; 267 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 225 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16858,7 +14563,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 268 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 226 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -16928,7 +14633,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 269 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 227 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17127,7 +14832,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Float64Array#reverse (; 270 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 228 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17185,7 +14890,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 271 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 229 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17385,7 +15090,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int8Array#indexOf (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 230 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -17447,7 +15152,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 273 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -17504,7 +15209,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 274 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 232 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -17525,7 +15230,7 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 275 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 233 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17966,7 +15671,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 276 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 234 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18404,7 +16109,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 277 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 235 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18842,7 +16547,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int16Array#indexOf (; 278 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 236 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -18908,7 +16613,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -18969,7 +16674,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 280 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 238 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -18992,7 +16697,7 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 281 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 239 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19432,7 +17137,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 282 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 240 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19870,7 +17575,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#indexOf (; 283 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -19934,7 +17639,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 284 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 242 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -19993,7 +17698,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 285 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 243 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20016,7 +17721,7 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 286 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 244 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20453,7 +18158,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 287 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 245 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20889,7 +18594,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int64Array#indexOf (; 288 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 246 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -20953,7 +18658,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 289 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 247 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -21012,7 +18717,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 290 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 248 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -21035,7 +18740,7 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 291 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 249 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21472,7 +19177,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 292 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 250 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21909,7 +19614,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Float32Array#indexOf (; 293 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 251 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -21973,7 +19678,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 294 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 252 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -22032,7 +19737,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 295 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 253 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -22055,7 +19760,7 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 296 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 254 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22492,7 +20197,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Float64Array#indexOf (; 297 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 255 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -22556,7 +20261,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 298 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 256 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -22615,7 +20320,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 299 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 257 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -22638,7 +20343,7 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 300 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 258 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23076,7 +20781,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 301 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 259 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -23124,7 +20829,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 302 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -23148,7 +20853,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 303 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 261 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23195,7 +20900,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 262 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -23250,7 +20955,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 305 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 263 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23331,7 +21036,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 306 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23448,7 +21153,7 @@ end local.get $2 ) - (func $~lib/util/string/compareImpl (; 307 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -23524,7 +21229,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 308 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 266 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -23566,7 +21271,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 309 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 267 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23664,7 +21369,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/utoa32 (; 310 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 268 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -23692,7 +21397,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 311 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 269 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -23722,7 +21427,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 312 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 270 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23839,7 +21544,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 313 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 271 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23937,7 +21642,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 314 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 272 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24035,7 +21740,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/itoa_stream (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 273 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -24090,7 +21795,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 316 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 274 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24211,7 +21916,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 317 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 275 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24313,7 +22018,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/itoa_stream (; 318 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 276 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -24343,7 +22048,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 319 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 277 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24464,7 +22169,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 320 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 278 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24566,7 +22271,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/itoa_stream (; 321 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -24608,7 +22313,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 322 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 280 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24729,7 +22434,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 323 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 281 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24831,7 +22536,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/itoa_stream (; 324 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 282 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -24855,7 +22560,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 325 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 283 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24976,7 +22681,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 326 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 284 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25078,7 +22783,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount64 (; 327 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 285 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -25131,7 +22836,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 328 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 286 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -25158,7 +22863,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa64 (; 329 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 287 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -25232,7 +22937,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 330 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 288 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -25293,7 +22998,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 331 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 289 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -25414,7 +23119,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 332 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 290 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25516,7 +23221,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/itoa_stream (; 333 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -25556,7 +23261,7 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 334 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 292 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -25726,7 +23431,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 335 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25828,7 +23533,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/genDigits (; 336 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 294 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -26218,7 +23923,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 337 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 295 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -26463,7 +24168,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 338 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 296 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -26772,7 +24477,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 339 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 297 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -26824,12 +24529,10 @@ local.get $1 local.get $2 call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/__free ) - (func $~lib/util/number/dtoa_stream (; 340 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 298 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -26900,7 +24603,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 341 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 299 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27024,7 +24727,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 342 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27126,7 +24829,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/string/joinFloatArray (; 343 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 301 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27247,7 +24950,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 344 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 302 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27349,7 +25052,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 345 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 303 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -27375,7 +25078,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 local.get $0 @@ -27448,7 +25151,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 347 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 305 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -27472,7 +25175,7 @@ local.get $2 call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 348 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 306 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -27545,7 +25248,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 349 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 307 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27698,7 +25401,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 350 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 308 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27818,7 +25521,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 351 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 309 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27969,7 +25672,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 352 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 310 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28133,7 +25836,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 353 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 311 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28295,7 +25998,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 354 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 312 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28455,7 +26158,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 355 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 313 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28615,7 +26318,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 356 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 314 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28776,7 +26479,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 357 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 315 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28937,7 +26640,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 358 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 316 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29098,7 +26801,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 359 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 317 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29259,7 +26962,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 360 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 318 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29310,7 +27013,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 361 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 319 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -29376,74 +27079,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 363 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 320 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29501,74 +27137,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 365 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 321 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -29590,7 +27159,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 366 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 322 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29648,7 +27217,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 367 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 323 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -29674,7 +27243,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 368 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 324 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29683,6 +27252,11 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 @@ -29693,15 +27267,15 @@ i32.const 3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set @@ -29715,19 +27289,19 @@ i32.const 4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -29741,15 +27315,15 @@ i32.const 3 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -29763,151 +27337,262 @@ i32.const 10 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - 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 14 - i32.const 3600 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 14 - i32.const 3680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 14 - i32.const 3712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 14 - i32.const 3744 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - 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 14 - i32.const 3776 + i32.const 3600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if + block $folding-inner0 + i32.const 3436 + i32.load + 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 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $0 + local.get $7 + 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 $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3680 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3712 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + i32.const 3516 + i32.load + 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 $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $0 + local.get $12 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $11 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3744 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + local.get $2 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $4 + 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 14 + i32.const 3776 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 369 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 325 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -29973,216 +27658,87 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 370 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 326 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3436 - i32.load + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 372 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -30196,216 +27752,262 @@ i32.const 10 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - 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 21 - i32.const 3808 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 21 - i32.const 3888 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 21 - i32.const 3920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 21 - i32.const 3952 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - 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 21 - i32.const 3984 + i32.const 3808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if + block $folding-inner0 + i32.const 3436 + i32.load + 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 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $0 + local.get $7 + 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 $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3888 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 373 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - i32.const 3364 - i32.load - local.set $3 - i32.const 3372 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 3516 + i32.load + 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 $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $0 + loop $for-loop|01 + local.get $0 + local.get $12 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $11 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3952 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + local.get $2 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 local.get $4 - i32.lt_s + 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 21 + i32.const 3984 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + i32.const 7388 + i32.gt_u if local.get $0 - local.get $2 - i32.add + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if local.get $1 + i32.const 16 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 + call $~lib/rt/pure/decrement + end + local.get $8 + i32.const 7388 + i32.gt_u + if + local.get $8 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 374 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 327 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -30471,7 +28073,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 375 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 328 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30542,7 +28144,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 376 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 329 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -30628,7 +28230,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 377 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 330 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30699,7 +28301,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 331 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -30781,7 +28383,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 379 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 332 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30848,7 +28450,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 380 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 333 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30857,6 +28459,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 @@ -30867,15 +28470,15 @@ i32.const 3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $4 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $4 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $4 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set @@ -30889,19 +28492,19 @@ i32.const 4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -30915,15 +28518,15 @@ i32.const 3 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $5 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $5 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -30938,7 +28541,64 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + i32.load offset=4 + local.set $7 + i32.const 3364 + i32.load + local.set $2 + i32.const 3372 + i32.load + local.set $8 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $1 + local.get $8 + i32.lt_s + if + local.get $1 + local.get $7 + i32.add + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $6 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $6 + i32.const 255 + local.get $6 + 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 $0 i32.const 10 i32.const 0 @@ -30946,7 +28606,7 @@ i32.const 4016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $1 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> @@ -30960,7 +28620,7 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 - local.get $2 + local.get $4 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> local.get $0 @@ -30981,22 +28641,22 @@ i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $4 + local.get $2 i32.const 7388 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end local.get $0 - local.get $1 + local.get $3 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $0 - local.get $3 + local.get $5 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> local.get $0 @@ -31008,40 +28668,40 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $4 + local.get $2 i32.const 7388 i32.gt_u if - local.get $4 + local.get $2 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $2 + local.get $4 i32.const 7388 i32.gt_u if - local.get $2 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $3 i32.const 7388 i32.gt_u if - local.get $1 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $3 + local.get $5 i32.const 7388 i32.gt_u if - local.get $3 + local.get $5 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -31055,11 +28715,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $5 + local.get $1 i32.const 7388 i32.gt_u if - local.get $5 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -31083,7 +28743,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 381 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 334 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31138,7 +28798,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 382 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 335 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31208,7 +28868,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 383 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 336 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -31279,7 +28939,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 384 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 337 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31341,7 +29001,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 385 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 338 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -31412,7 +29072,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 386 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 339 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31464,7 +29124,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 387 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 340 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -31494,7 +29154,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 341 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31551,7 +29211,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 389 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31784,7 +29444,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 390 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 343 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31854,7 +29514,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 391 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 344 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -31925,7 +29585,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 345 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -31996,7 +29656,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 393 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 346 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32229,7 +29889,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 347 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -32270,7 +29930,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 395 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 348 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -32340,7 +30000,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 396 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 349 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -32411,7 +30071,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 397 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 350 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -32473,7 +30133,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 398 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 351 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -32544,7 +30204,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 399 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 352 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -32596,7 +30256,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 400 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 353 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -32658,7 +30318,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 401 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 354 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -32715,7 +30375,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 402 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 355 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32950,7 +30610,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 403 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 356 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -33020,7 +30680,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 404 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 357 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -33091,7 +30751,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 405 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 358 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -33162,7 +30822,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 406 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 359 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -33397,7 +31057,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 407 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 360 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -33452,7 +31112,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 408 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 361 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i64) (local $4 i32) @@ -33522,7 +31182,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 409 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -33593,7 +31253,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 410 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 363 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -33623,7 +31283,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 411 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -33694,7 +31354,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 412 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 365 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -33746,7 +31406,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 413 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 366 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -33808,7 +31468,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 367 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -33865,7 +31525,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 415 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 368 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -34098,7 +31758,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 416 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 369 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i64) (local $4 i32) @@ -34168,7 +31828,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 417 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 370 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -34239,7 +31899,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 418 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -34310,7 +31970,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 419 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 372 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -34543,7 +32203,7 @@ call $~lib/rt/pure/decrement end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 420 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 373 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -34613,191 +32273,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 421 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - 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|0 - end - end - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 422 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - 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|0 - end - end - ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 28 - i32.add - local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $2 - i32.add - i32.load8_s - f32.convert_i32_s - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 424 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 374 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -34841,19 +32317,19 @@ i32.const 4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -34889,143 +32365,289 @@ i32.const 10 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.set $2 + local.tee $1 + local.set $0 block $folding-inner0 i32.const 3372 i32.load - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $0 i32.load offset=4 - local.set $6 + local.set $9 i32.const 3364 i32.load - local.set $8 + local.set $10 i32.const 3372 i32.load - local.set $9 + local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 - local.get $3 - local.get $9 + local.get $0 + local.get $7 i32.lt_s if - local.get $6 - local.get $3 + local.get $9 + local.get $0 i32.const 2 i32.shl local.tee $2 i32.add local.get $2 - local.get $8 + local.get $10 i32.add i32.load f32.convert_i32_s f32.store - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|0 end end - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 19 i32.const 6608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 + local.get $1 i32.const 3424 i32.const 3 call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 19 i32.const 6720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 local.get $4 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> - local.get $0 + 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 $7 + local.get $4 + i32.load offset=4 + local.set $2 + local.get $4 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $2 + 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 $1 i32.const 10 i32.const 2 i32.const 19 i32.const 6784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $1 + local.get $3 i32.load offset=8 - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $3 i32.load offset=4 + local.set $6 + local.get $3 + i32.load offset=8 local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|01 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $6 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $5 + 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 - local.set $9 + i32.const 16 + i32.add + local.set $2 + local.get $5 + i32.load offset=4 + local.set $6 + local.get $5 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|02 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + 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 + i32.const 3580 + i32.load + i32.const 7 + 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 28 + i32.add local.set $2 - loop $for-loop|00 - local.get $7 - local.get $2 + i32.const 3572 + i32.load + local.set $6 + i32.const 3580 + i32.load + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|03 + local.get $0 + local.get $8 i32.lt_s if - local.get $8 - local.get $7 + local.get $2 + local.get $0 i32.const 2 i32.shl i32.add - local.get $7 - local.get $9 + local.get $0 + local.get $6 i32.add - i32.load8_u - f32.convert_i32_u + i32.load8_s + f32.convert_i32_s f32.store - local.get $7 + local.get $0 i32.const 1 i32.add - local.set $7 - br $for-loop|00 + local.set $0 + br $for-loop|03 end end - local.get $0 - local.get $5 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Float32Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 19 i32.const 6848 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $2 + local.get $0 i32.const 7388 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -35039,11 +32661,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.get $3 i32.const 7388 i32.gt_u if - local.get $1 + local.get $3 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -35057,108 +32679,52 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 + local.get $1 i32.const 7388 i32.gt_u if - local.get $10 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $3 + local.get $9 i32.const 7388 i32.gt_u if - local.get $3 + local.get $9 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $10 i32.const 7388 i32.gt_u if - local.get $6 + local.get $10 i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - return - end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 426 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 375 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -35226,251 +32792,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $1 - i32.const 3428 - i32.load - local.set $2 - i32.const 3436 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 428 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $4 - i32.add - local.get $3 - local.get $4 - i32.add - i64.load - f64.convert_i64_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 429 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 - 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|0 - end - end - ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 430 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 56 - i32.add - local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $2 - i32.add - i32.load8_s - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 431 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 376 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -35492,15 +32814,15 @@ i32.const 3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#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 @@ -35514,19 +32836,19 @@ i32.const 4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -35540,15 +32862,15 @@ i32.const 3 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#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 @@ -35562,175 +32884,410 @@ i32.const 10 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 6912 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7056 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7152 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $9 - local.get $1 - i32.load offset=4 - local.set $10 - local.get $1 - i32.load offset=8 - local.set $4 - loop $for-loop|0 + local.tee $1 + local.set $0 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.set $10 + i32.const 3364 + i32.load + local.set $9 + i32.const 3372 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 6912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 3436 + i32.load + i32.const 3 + 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 24 + i32.add + local.set $9 + i32.const 3428 + i32.load + local.set $4 + i32.const 3436 + i32.load + local.set $2 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $0 + local.get $2 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7056 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $5 + 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 $4 + local.get $5 + i32.load offset=4 + local.set $2 + local.get $5 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $7 + i32.const 0 + local.set $0 + loop $for-loop|01 + local.get $0 + local.get $7 + i32.lt_s + if + local.get $4 + local.get $0 + i32.const 3 + i32.shl + local.tee $8 + i32.add + local.get $2 + 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 $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7152 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $3 + i32.load offset=8 + 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 + local.set $2 + local.get $3 + i32.load offset=4 + local.set $7 + local.get $3 + i32.load offset=8 + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|02 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $7 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $6 + 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 $2 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $6 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|03 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + 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 + i32.const 3580 + i32.load + i32.const 7 + 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 56 + i32.add + local.set $2 + i32.const 3572 + i32.load + local.set $7 + i32.const 3580 + i32.load + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|04 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $7 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|04 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $5 - local.get $4 - i32.lt_s + i32.const 7388 + i32.gt_u if - local.get $9 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $10 - i32.add - i32.load8_u - f64.convert_i32_u - f64.store local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - end - local.get $0 - local.get $3 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7248 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $10 + i32.const 7388 + i32.gt_u + if + local.get $10 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $9 + i32.const 7388 + i32.gt_u + if + local.get $9 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 432 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 377 ;) (param $0 i32) (param $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -35804,7 +33361,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 433 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 378 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -35876,68 +33433,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 434 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - i32.const 255 - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $4 - i32.const 255 - local.get $4 - i32.lt_u - select - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $start:std/typedarray (; 435 ;) + (func $start:std/typedarray (; 379 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -35947,11 +33443,11 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) + (local $9 f64) (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 i32) + (local $13 f64) (local $14 i32) (local $15 i32) (local $16 i32) @@ -35964,8 +33460,9 @@ (local $23 i32) (local $24 i32) (local $25 i32) - (local $26 f64) - (local $27 f32) + (local $26 i32) + (local $27 i32) + (local $28 f32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -36246,15 +33743,67 @@ end i32.const 0 global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Float64Array#sort - local.tee $1 - local.set $2 - local.get $1 + i32.const 1 + local.set $1 + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.const 1 + i32.le_s + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $4 + i32.load offset=4 + local.set $2 + local.get $3 + i32.const 2 + i32.eq + if + local.get $2 + f64.load offset=8 + local.set $9 + local.get $2 + f64.load + local.set $13 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $13 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $13 + f64.store offset=8 + local.get $2 + local.get $9 + f64.store + end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $3 + i32.const 256 + i32.lt_s + if + local.get $2 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $2 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + end + local.get $4 i32.const 7388 i32.gt_u if - local.get $2 + local.get $4 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -36556,7 +34105,7 @@ i32.const 672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -36576,11 +34125,11 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - local.tee $6 + local.tee $7 i32.const 7388 i32.gt_u if - local.get $6 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -36631,7 +34180,7 @@ i32.const 704 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -36705,11 +34254,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $6 i32.const 7388 i32.gt_u if - local.get $7 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -36723,11 +34272,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $7 i32.const 7388 i32.gt_u if - local.get $6 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -36920,7 +34469,7 @@ i32.const 960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -36940,11 +34489,11 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - local.tee $6 + local.tee $7 i32.const 7388 i32.gt_u if - local.get $6 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -36997,7 +34546,7 @@ i32.const 1008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37071,11 +34620,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $7 + local.get $6 i32.const 7388 i32.gt_u if - local.get $7 + local.get $6 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -37089,11 +34638,11 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $6 + local.get $7 i32.const 7388 i32.gt_u if - local.get $6 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -37355,32 +34904,32 @@ i32.const 5 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice local.set $2 - local.get $1 + local.get $0 i32.const 0 i32.const 3 i32.const 2147483647 @@ -37407,17 +34956,17 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 7388 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $0 + local.get $1 i32.const 1 i32.const 3 i32.const 2147483647 @@ -37429,7 +34978,7 @@ i32.const 1136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37444,21 +34993,22 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 + local.set $0 + local.get $1 i32.const 7388 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.tee $0 + local.get $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $6 + local.tee $7 i32.const 5 i32.const 2 i32.const 15 @@ -37494,14 +35044,14 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $9 + local.tee $10 i32.const 5 i32.const 2 i32.const 15 i32.const 1232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $11 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37530,14 +35080,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $11 + local.tee $12 i32.const 5 i32.const 2 i32.const 15 i32.const 1280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37566,14 +35116,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $13 + local.tee $15 i32.const 5 i32.const 2 i32.const 15 i32.const 1328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $16 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37602,14 +35152,14 @@ i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 + local.tee $17 i32.const 5 i32.const 2 i32.const 15 i32.const 1376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $18 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37638,14 +35188,14 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $19 i32.const 5 i32.const 2 i32.const 15 i32.const 1424 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37674,14 +35224,14 @@ i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $21 i32.const 5 i32.const 2 i32.const 15 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $22 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37710,14 +35260,14 @@ i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 1520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37746,14 +35296,14 @@ i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $25 i32.const 5 i32.const 2 i32.const 15 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37768,7 +35318,6 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 local.get $0 i32.const 7388 i32.gt_u @@ -37778,19 +35327,19 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $1 + local.tee $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $0 + local.tee $1 i32.const 5 i32.const 2 i32.const 15 i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -37801,11 +35350,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 7388 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -37846,15 +35395,6 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $6 i32.const 7388 i32.gt_u @@ -37864,20 +35404,20 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $8 + local.get $7 i32.const 7388 i32.gt_u if - local.get $8 + local.get $7 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $9 + local.get $8 i32.const 7388 i32.gt_u if - local.get $9 + local.get $8 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -37909,15 +35449,6 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $13 - i32.const 7388 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $14 i32.const 7388 i32.gt_u @@ -38017,20 +35548,38 @@ i32.sub call $~lib/rt/pure/decrement end - local.get $0 + local.get $25 i32.const 7388 i32.gt_u if - local.get $0 + local.get $25 i32.const 16 i32.sub call $~lib/rt/pure/decrement end - local.get $25 + local.get $26 i32.const 7388 i32.gt_u if - local.get $25 + local.get $26 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $27 + i32.const 7388 + i32.gt_u + if + local.get $27 i32.const 16 i32.sub call $~lib/rt/pure/decrement @@ -38264,1203 +35813,2826 @@ i32.const 304 i32.const 301 i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=4 - local.get $4 - i32.load - i32.sub - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 302 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 303 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 - block $folding-inner1 - block $folding-inner0 - local.get $0 - i32.const 3 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - 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> - call $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> - 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> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 607 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - i32.const 0 - local.get $3 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $5 - loop $while-continue|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 1 - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $26 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $26 - local.get $26 - f64.ne + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=4 + local.get $4 + i32.load + i32.sub + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 302 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 303 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 + 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 $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + 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> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner2 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 52 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner2 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 54 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner2 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 56 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner2 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 58 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner2 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 60 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner2 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 62 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner2 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 64 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner2 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 66 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner2 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner3 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 74 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 76 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 78 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 80 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 82 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 84 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 86 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 88 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner6 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner6 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner6 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 96 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner6 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 98 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner6 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 100 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner6 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 102 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner6 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 104 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner6 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 106 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner6 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 108 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner6 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + local.get $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 110 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner6 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner7 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> + i32.const 0 + global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 117 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 118 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 119 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 0 + global.set $std/typedarray/forEachCallCount + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 120 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> + 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> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $0 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $9 + local.get $9 + f64.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 608 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $2 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + if (result i32) + i32.const 0 + local.get $4 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $1 + i32.load offset=4 + local.set $6 + loop $while-continue|05 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $28 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $28 + local.get $28 + f32.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|05 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + 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|trampoline + local.tee $2 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 691 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $0 + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + 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> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 10 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#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 + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $6 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $6 + 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 $2 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + local.get $0 + local.get $6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 7344 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 3 + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + call $~lib/rt/tlsf/maybeInitialize + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + i32.const 4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#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 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $8 + local.get $1 + i32.load offset=4 + local.set $10 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $11 + i32.const 0 + local.set $5 + loop $for-loop|0 + local.get $5 + local.get $11 + i32.lt_s + if + local.get $5 + local.get $8 + i32.add + i32.const 255 + local.get $10 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $12 + i32.const 255 + local.get $12 + i32.lt_u + select + i32.store8 + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end + 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 21 + i32.const 7376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $4 + i32.const 7388 + i32.gt_u + if + local.get $4 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $2 + i32.const 7388 + i32.gt_u + if + local.get $2 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $6 + i32.const 7388 + i32.gt_u + if + local.get $6 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $7 + i32.const 7388 + i32.gt_u + if + local.get $7 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $1 + i32.const 7388 + i32.gt_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $3 + i32.const 7388 + i32.gt_u + if + local.get $3 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + local.get $5 + i32.const 7388 + i32.gt_u + if + local.get $5 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + return + end + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 608 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 613 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 - if (result i32) - i32.const 0 - local.get $4 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 - i32.load offset=4 - local.set $7 - loop $while-continue|05 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 1 - local.get $7 - local.get $2 + i32.const 0 + i32.const 304 + i32.const 417 i32.const 2 - i32.shl - i32.add - f32.load - local.tee $27 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $27 - local.get $27 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|05 + call $~lib/builtins/abort + unreachable end + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable end i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> - 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|trampoline - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $0 - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.load offset=8 - if - i32.const 0 i32.const 304 - i32.const 695 + i32.const 440 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - 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> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 10 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#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 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#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 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#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 21 - i32.const 7344 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#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 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#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 304 + i32.const 461 i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $3 - 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 21 - i32.const 7376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - return + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 304 - i32.const 323 + i32.const 463 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 344 + i32.const 495 i32.const 2 call $~lib/builtins/abort unreachable ) - (func $~start (; 436 ;) + (func $~start (; 380 ;) global.get $~started if return @@ -39470,7 +38642,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 437 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 381 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -39537,9 +38709,17 @@ call $~lib/builtins/abort unreachable end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/freeBlock + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree else local.get $1 i32.const 0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index e769cfa3ae..836fea1ede 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,6 @@ (module (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))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -136,73 +135,9 @@ end i32.const 0 ) - (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (func $start:typeof (; 3 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 - memory.size - local.tee $3 - i32.const 16 - i32.shl - local.tee $1 - i32.gt_u - if - local.get $3 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $3 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 3 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $2 - ) - (func $start:typeof (; 4 ;) i32.const 64 i32.const 64 call $~lib/string/String.__eq @@ -423,7 +358,55 @@ global.set $~lib/rt/stub/startOffset i32.const 304 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + i32.const 336 + memory.size + local.tee $1 + i32.const 16 + i32.shl + local.tee $0 + i32.gt_u + if + local.get $1 + i32.const 65871 + local.get $0 + i32.sub + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $0 + local.get $1 + local.get $0 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $0 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + i32.const 336 + global.set $~lib/rt/stub/offset + i32.const 304 + i32.const 16 + i32.store + i32.const 308 + i32.const 1 + i32.store + i32.const 312 + i32.const 3 + i32.store + i32.const 316 + i32.const 0 + i32.store + i32.const 320 global.set $typeof/c i32.const 64 i32.const 64 @@ -486,7 +469,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) global.get $~started if return diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 2b13930dcb..30ce483ffd 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,8 +1,8 @@ (module (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_=>_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))) @@ -817,70 +817,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -905,11 +845,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -922,16 +862,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -940,7 +880,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -987,14 +927,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1045,7 +1039,7 @@ end local.get $0 ) - (func $while/testRef (; 14 ;) + (func $while/testRef (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1133,7 +1127,7 @@ call $~lib/rt/pure/decrement end ) - (func $while/testRefAutorelease (; 15 ;) + (func $while/testRefAutorelease (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1225,7 +1219,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:while (; 16 ;) + (func $start:while (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1463,7 +1457,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1473,7 +1467,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From 931a07dab904b583af6241c6df7672abe2a02840 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 14:24:21 +0200 Subject: [PATCH 03/51] use extended params only for shrinkLevel = 0 --- cli/asc.js | 2 +- tests/compiler/builtins.optimized.wat | 32 +- tests/compiler/call-super.optimized.wat | 151 +- tests/compiler/class.optimized.wat | 109 +- tests/compiler/constructor.optimized.wat | 86 +- tests/compiler/do.optimized.wat | 571 +- tests/compiler/exports.optimized.wat | 59 +- .../extends-baseaggregate.optimized.wat | 538 +- tests/compiler/for.optimized.wat | 391 +- .../function-expression.optimized.wat | 84 +- tests/compiler/function-types.optimized.wat | 64 +- tests/compiler/getter-call.optimized.wat | 36 +- tests/compiler/if.optimized.wat | 26 + .../implicit-getter-setter.optimized.wat | 246 +- tests/compiler/infer-array.optimized.wat | 92 +- tests/compiler/infer-generic.optimized.wat | 35 +- .../inlining-blocklocals.optimized.wat | 5 +- tests/compiler/inlining.optimized.wat | 87 +- tests/compiler/instanceof-class.optimized.wat | 51 +- tests/compiler/issues/1095.optimized.wat | 361 +- tests/compiler/logical.optimized.wat | 5 +- tests/compiler/loop-flow.optimized.wat | 65 +- tests/compiler/managed-cast.optimized.wat | 387 +- tests/compiler/new.optimized.wat | 46 +- tests/compiler/number.optimized.wat | 781 +- .../optional-typeparameters.optimized.wat | 46 +- tests/compiler/rc/local-init.optimized.wat | 291 +- .../rc/logical-and-mismatch.optimized.wat | 364 +- .../rc/logical-or-mismatch.optimized.wat | 364 +- tests/compiler/rc/optimize.optimized.wat | 314 +- tests/compiler/rc/rereturn.optimized.wat | 232 +- .../rc/ternary-mismatch.optimized.wat | 386 +- tests/compiler/resolve-access.optimized.wat | 219 +- tests/compiler/resolve-binary.optimized.wat | 289 +- .../resolve-elementaccess.optimized.wat | 256 +- .../resolve-function-expression.optimized.wat | 204 +- tests/compiler/resolve-new.optimized.wat | 36 +- .../resolve-propertyaccess.optimized.wat | 210 +- tests/compiler/resolve-ternary.optimized.wat | 382 +- tests/compiler/resolve-unary.optimized.wat | 210 +- tests/compiler/retain-i32.optimized.wat | 5 +- .../retain-release-sanity.optimized.wat | 721 +- tests/compiler/retain-release.optimized.wat | 111 +- tests/compiler/retain-return.optimized.wat | 548 +- tests/compiler/rt/instanceof.optimized.wat | 76 +- tests/compiler/rt/stub-realloc.optimized.wat | 90 +- tests/compiler/runtime-full.optimized.wat | 211 +- tests/compiler/runtime-stub.optimized.wat | 93 +- tests/compiler/std/array-access.optimized.wat | 44 +- .../compiler/std/array-literal.optimized.wat | 370 +- tests/compiler/std/array.optimized.wat | 10143 ++++----- tests/compiler/std/arraybuffer.optimized.wat | 494 +- tests/compiler/std/dataview.optimized.wat | 613 +- tests/compiler/std/date.optimized.wat | 80 +- tests/compiler/std/libm.optimized.wat | 801 +- tests/compiler/std/map.optimized.wat | 4203 ++-- tests/compiler/std/math.optimized.wat | 12750 +++-------- tests/compiler/std/mod.optimized.wat | 913 +- tests/compiler/std/new.optimized.wat | 62 +- .../compiler/std/object-literal.optimized.wat | 153 +- tests/compiler/std/object.optimized.wat | 77 +- .../std/operator-overloading.optimized.wat | 779 +- tests/compiler/std/pointer.optimized.wat | 92 +- tests/compiler/std/set.optimized.wat | 3804 ++-- tests/compiler/std/static-array.optimized.wat | 144 +- tests/compiler/std/staticarray.optimized.wat | 381 +- .../std/string-casemapping.optimized.wat | 1473 +- .../std/string-encoding.optimized.wat | 910 +- tests/compiler/std/string.optimized.wat | 4630 ++-- tests/compiler/std/symbol.optimized.wat | 309 +- tests/compiler/std/typedarray.optimized.wat | 18191 ++++++---------- tests/compiler/switch.optimized.wat | 170 +- tests/compiler/typeof.optimized.wat | 108 +- tests/compiler/while.optimized.wat | 659 +- 74 files changed, 25738 insertions(+), 46583 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 584db5351e..adfef97751 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -644,7 +644,7 @@ exports.main = function main(argv, options, callback) { function add(pass) { passes.push(pass); } // enchance options for inline passes - if (optimizeLevel >= 2 && shrinkLevel < 2) { + if (optimizeLevel >= 2 && shrinkLevel === 0) { module.setAlwaysInlineMaxSize(12); module.setFlexibleInlineMaxSize(60); module.setOneCallerInlineMaxSize(60); diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index bc9e6b8da1..a3ac08a301 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) + (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))) - (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -57,7 +57,15 @@ select select ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -133,7 +141,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -150,18 +158,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -173,10 +173,10 @@ end i32.const 0 ) - (func $start:builtins~anonymous|0 (; 5 ;) + (func $start:builtins~anonymous|0 (; 6 ;) nop ) - (func $start:builtins (; 6 ;) + (func $start:builtins (; 7 ;) i32.const 31 global.set $builtins/i i32.const 0 @@ -849,7 +849,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 8 ;) call $start:builtins ) ) diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 2eacf03083..2e63e07bdb 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,5 +1,7 @@ (module + (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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))) @@ -9,46 +11,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -56,16 +32,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -74,13 +50,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -91,14 +96,10 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~start (; 2 ;) + (func $call-super/B#constructor (; 3 ;) (result i32) (local $0 i32) - i32.const 64 - global.set $~lib/rt/stub/startOffset - i32.const 64 - global.set $~lib/rt/stub/offset i32.const 8 i32.const 3 call $~lib/rt/stub/__alloc @@ -153,29 +154,9 @@ unreachable end local.get $0 - i32.load - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 22 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 23 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + ) + (func $call-super/D#constructor (; 4 ;) (result i32) + (local $0 i32) i32.const 8 i32.const 5 call $~lib/rt/stub/__alloc @@ -218,6 +199,40 @@ unreachable end local.get $0 + ) + (func $~start (; 5 ;) + (local $0 i32) + i32.const 64 + global.set $~lib/rt/stub/startOffset + i32.const 64 + global.set $~lib/rt/stub/offset + call $call-super/B#constructor + local.tee $0 + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 22 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 23 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + call $call-super/D#constructor + local.tee $0 i32.load i32.const 1 i32.ne diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 4dc2c18dc0..8ac03e2fb9 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,6 +1,7 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) (data (i32.const 16) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") @@ -32,46 +33,20 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -79,16 +54,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -97,13 +72,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -114,19 +118,10 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $class/testGenericInitializer (; 2 ;) - (local $0 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 3 ;) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - i32.const 4 - i32.const 4 - call $~lib/rt/stub/__alloc - i32.const 16 - i32.const 5 - call $~lib/rt/stub/__alloc - local.set $0 i32.const 0 i32.const 0 call $~lib/rt/stub/__alloc @@ -161,6 +156,18 @@ i32.const 0 i32.store offset=8 local.get $0 + ) + (func $class/testGenericInitializer (; 4 ;) + (local $0 i32) + (local $1 i32) + i32.const 4 + i32.const 4 + call $~lib/rt/stub/__alloc + i32.const 16 + i32.const 5 + call $~lib/rt/stub/__alloc + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 i32.const 0 i32.store offset=12 local.get $0 @@ -169,7 +176,7 @@ local.get $0 i32.store ) - (func $~start (; 3 ;) + (func $~start (; 5 ;) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index def857c975..dfda5b0343 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -16,46 +17,20 @@ (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -63,16 +38,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -81,13 +56,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -98,9 +102,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) (local $0 i32) i32.const 16 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 705882b67d..c03b72c01a 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,8 +1,8 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (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))) @@ -22,7 +22,46 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $do/testNested (; 5 ;) + (func $do/testSimple (; 5 ;) + (local $0 i32) + (local $1 i32) + i32.const 10 + local.set $0 + loop $do-continue|0 + 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|0 + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + ) + (func $do/testNested (; 6 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -105,7 +144,55 @@ i32.const 1 global.set $do/ran ) - (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) + (func $do/testNestedContinue (; 7 ;) + (local $0 i32) + (local $1 i32) + loop $do-continue|0 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + if + loop $do-continue|1 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.rem_s + br_if $do-continue|1 + end + br $do-continue|0 + end + end + local.get $0 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 125 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 90 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + ) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -271,7 +358,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -554,7 +641,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -668,7 +755,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -755,7 +842,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -812,10 +899,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 15 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -839,49 +1032,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -922,70 +1074,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 176 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 208 i32.gt_u @@ -993,48 +1130,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $do/testRef (; 13 ;) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + local.get $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $do/testRef (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1057,14 +1168,7 @@ local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end else call $~lib/rt/tlsf/maybeInitialize @@ -1074,14 +1178,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 local.tee $0 @@ -1110,20 +1207,12 @@ i32.const 1 global.set $do/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $do/testRefAutorelease (; 14 ;) + (func $do/testRefAutorelease (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1132,26 +1221,19 @@ local.set $0 loop $do-continue|0 block $do-break|0 - local.get $2 + local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $1 i32.const 10 i32.eq if i32.const 0 - local.set $1 + local.set $2 local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 0 local.set $0 @@ -1162,22 +1244,13 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $1 - local.set $3 - local.get $1 - i32.const 208 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 + local.tee $2 + call $~lib/rt/pure/__release + local.get $2 br_if $do-continue|0 end end - local.get $2 + local.get $1 i32.const 10 i32.ne if @@ -1200,67 +1273,36 @@ i32.const 1 global.set $do/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $start:do (; 15 ;) + (func $start:do (; 21 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $do/ran - i32.const 10 - local.set $0 - loop $do-continue|0 - 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|0 - end - local.get $0 + call $do/testSimple + global.get $do/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if + i32.const 16 i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $do/ran i32.const 0 global.set $do/ran i32.const 10 local.set $1 - loop $do-continue|00 + loop $do-continue|0 local.get $1 local.tee $0 i32.const 1 i32.sub local.set $1 local.get $0 - br_if $do-continue|00 + br_if $do-continue|0 end local.get $1 i32.const -1 @@ -1292,14 +1334,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|00 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|00 end local.get $0 i32.const 10 @@ -1330,14 +1372,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|02 + loop $do-continue|01 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-continue|01 end local.get $0 i32.const 10 @@ -1354,54 +1396,17 @@ global.set $do/ran i32.const 0 global.set $do/ran - i32.const 0 - local.set $1 - i32.const 0 - local.set $0 - loop $do-continue|03 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.ne - if - loop $do-continue|1 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.rem_s - br_if $do-continue|1 - end - br $do-continue|03 - end - end - local.get $1 - i32.const 10 - i32.ne + call $do/testNestedContinue + global.get $do/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 125 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 90 - i32.ne - if + i32.const 131 i32.const 0 - i32.const 32 - i32.const 126 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $do/ran i32.const 0 global.set $do/ran call $do/testRef @@ -1429,7 +1434,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 22 ;) global.get $~started if return @@ -1439,7 +1444,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a783640e03..af3824c4d2 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -60,28 +60,20 @@ (func $exports/Car.getNumTires (; 2 ;) (result i32) i32.const 4 ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -89,16 +81,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -107,9 +99,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -124,27 +127,27 @@ local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $exports/Car#get:doors (; 4 ;) (param $0 i32) (result i32) + (func $exports/Car#get:doors (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:doors (; 5 ;) (param $0 i32) (param $1 i32) + (func $exports/Car#set:doors (; 6 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 6 ;) (param $0 i32) + (func $exports/Car#openDoors (; 7 ;) (param $0 i32) nop ) - (func $~start (; 7 ;) + (func $~start (; 8 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset ) - (func $exports/subOpt|trampoline (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 9 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -162,11 +165,11 @@ local.get $1 i32.sub ) - (func $~setArgumentsLength (; 9 ;) (param $0 i32) + (func $~setArgumentsLength (; 10 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $exports/Car#constructor|trampoline (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -193,7 +196,7 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 12 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index c74a879ce7..0eb6c15c13 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -4,10 +4,10 @@ (type $none_=>_none (func)) (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_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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 20) "\01") @@ -835,7 +835,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -911,10 +973,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -943,65 +1004,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1049,9 +1054,54 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 556 i32.gt_u @@ -1059,46 +1109,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 13 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1140,7 +1155,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1313,7 +1328,18 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/reallocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1369,10 +1395,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -1407,19 +1433,13 @@ i32.const 556 i32.ge_u if - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/memory/memory.fill (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1630,58 +1650,19 @@ end end ) - (func $start:extends-baseaggregate (; 14 ;) - (local $0 i32) + (func $~lib/array/ensureSize (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 20 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - call $~lib/rt/tlsf/maybeInitialize - i32.const 20 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - 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 - i32.const 108 - i32.load - local.tee $6 - i32.const 1 - i32.add - local.tee $3 - local.set $1 - local.get $3 i32.const 104 i32.load - local.tee $4 + local.tee $1 i32.const 2 i32.shr_u i32.gt_u if - local.get $1 + local.get $0 i32.const 268435452 i32.gt_u if @@ -1694,42 +1675,76 @@ end i32.const 96 i32.load - local.set $5 - local.get $4 + local.set $2 + local.get $1 call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $2 call $~lib/rt/tlsf/checkUsedBlock - local.get $1 + local.get $0 i32.const 2 i32.shl - local.tee $1 + local.tee $3 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $2 + local.tee $0 i32.add + local.get $3 local.get $1 - local.get $4 i32.sub call $~lib/memory/memory.fill + local.get $0 local.get $2 - local.get $5 i32.ne if i32.const 96 - local.get $2 + local.get $0 i32.store i32.const 100 - local.get $2 + local.get $0 i32.store end i32.const 104 - local.get $1 + local.get $3 i32.store end + ) + (func $start:extends-baseaggregate (; 19 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 20 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + i32.const 20 + i32.const 4 + call $~lib/rt/tlsf/__alloc + 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 + i32.const 108 + i32.load + local.tee $1 + i32.const 1 + i32.add + local.tee $2 + call $~lib/array/ensureSize i32.const 100 i32.load - local.get $6 + local.get $1 i32.const 2 i32.shl i32.add @@ -1737,7 +1752,7 @@ call $~lib/rt/pure/__retain i32.store i32.const 108 - local.get $3 + local.get $2 i32.store local.get $0 i32.const 556 @@ -1749,10 +1764,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 15 ;) + (func $~start (; 20 ;) call $start:extends-baseaggregate ) - (func $~lib/rt/pure/markGray (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 21 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1776,7 +1791,20 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scan (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 22 ;) (param $0 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members + ) + (func $~lib/rt/pure/scan (; 23 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1793,16 +1821,7 @@ i32.gt_u if local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members + call $~lib/rt/pure/scanBlack else local.get $0 local.get $1 @@ -1819,7 +1838,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 24 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1847,18 +1866,12 @@ i32.add i32.const 5 call $~lib/rt/__visit_members - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock + call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 19 ;) + (func $~lib/rt/pure/__collect (; 25 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1868,17 +1881,17 @@ global.get $~lib/rt/pure/ROOTS local.tee $5 local.tee $2 - local.set $4 + local.set $3 global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 + local.get $3 local.get $0 i32.lt_u if - local.get $4 + local.get $3 i32.load - local.tee $3 + local.tee $4 i32.load offset=4 local.tee $1 i32.const 1879048192 @@ -1895,10 +1908,10 @@ i32.const 0 end if - local.get $3 + local.get $4 call $~lib/rt/pure/markGray local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 i32.const 4 @@ -1915,27 +1928,21 @@ i32.and select if - local.get $3 - local.get $3 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT - local.get $3 - call $~lib/rt/tlsf/insertBlock + local.get $4 + call $~lib/rt/tlsf/freeBlock else - local.get $3 + local.get $4 local.get $1 i32.const 2147483647 i32.and i32.store offset=4 end end - local.get $4 + local.get $3 i32.const 4 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -1985,12 +1992,53 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/growRoots (; 26 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/rt/pure/CUR + global.get $~lib/rt/pure/ROOTS + local.tee $1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + local.tee $0 + i32.const 256 + local.get $0 + i32.const 256 + i32.gt_u + select + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + if + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + end + local.get $0 + global.set $~lib/rt/pure/ROOTS + local.get $0 + local.get $2 + i32.add + global.set $~lib/rt/pure/CUR + local.get $0 + local.get $3 + i32.add + global.set $~lib/rt/pure/END + ) + (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2026,15 +2074,9 @@ i32.const -2147483648 i32.store offset=4 else - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock + call $~lib/rt/tlsf/freeBlock end else local.get $1 @@ -2098,54 +2140,7 @@ global.get $~lib/rt/pure/END i32.ge_u if - 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.set $4 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $1 - local.get $3 - call $~lib/memory/memory.copy - local.get $1 - if - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - local.tee $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $1 - call $~lib/rt/tlsf/insertBlock - 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 $4 - i32.add - global.set $~lib/rt/pure/END + call $~lib/rt/pure/growRoots global.get $~lib/rt/pure/CUR local.set $1 end @@ -2160,7 +2155,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 21 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 28 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2247,16 +2242,7 @@ i32.and if local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members + call $~lib/rt/pure/scanBlack end br $break|0 end @@ -2272,7 +2258,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 29 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2305,7 +2291,7 @@ end end ) - (func $~lib/rt/__visit_members (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 30 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index e27b2a7902..f54dd883c5 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,8 +1,8 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (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))) @@ -809,10 +809,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 11 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 13 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -836,49 +942,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -919,70 +984,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 176 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 208 i32.gt_u @@ -990,48 +1040,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $for/testRef (; 13 ;) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + local.get $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $for/testRef (; 17 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1056,14 +1080,7 @@ local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end else call $~lib/rt/tlsf/maybeInitialize @@ -1073,14 +1090,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 local.set $0 @@ -1110,41 +1120,24 @@ i32.const 1 global.set $for/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $for/testRefAutorelease (; 14 ;) + (func $for/testRefAutorelease (; 18 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain - local.set $1 call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain local.set $0 - local.get $1 - i32.const 208 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release loop $for-loop|0 block $for-break0 call $~lib/rt/tlsf/maybeInitialize @@ -1153,16 +1146,7 @@ i32.add call $~lib/rt/pure/__retain local.tee $1 - local.set $3 - local.get $1 - i32.const 208 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 if local.get $2 @@ -1177,14 +1161,7 @@ local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 0 local.set $0 @@ -1196,14 +1173,7 @@ i32.add call $~lib/rt/pure/__retain local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.set $0 br $for-loop|0 end @@ -1232,16 +1202,9 @@ i32.const 1 global.set $for/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $start:for (; 15 ;) + (func $start:for (; 19 ;) (local $0 i32) i32.const 0 global.set $for/ran @@ -1484,7 +1447,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 20 ;) global.get $~started if return @@ -1494,7 +1457,7 @@ end call $start:for ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 2e4eb6a8e5..378226d55d 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -1,17 +1,52 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param 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 16) ",\00\00\00\01\00\00\00\01\00\00\00,\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (table $0 12 funcref) + (elem (i32.const 1) $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|2) (global $~argumentsLength (mut i32) (i32.const 0)) (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $~setArgumentsLength (; 0 ;) (param $0 i32) + (func $start:function-expression~anonymous|0 (; 1 ;) (param $0 i32) (result i32) local.get $0 + ) + (func $~setArgumentsLength (; 2 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $start:function-expression~someName (; 3 ;) + nop + ) + (func $start:function-expression~anonymous|2 (; 4 ;) (result i32) + i32.const 1 + ) + (func $start:function-expression~anonymous|3 (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.add + ) + (func $function-expression/testOmitted (; 6 ;) (param $0 i32) (result i32) + i32.const 2 global.set $~argumentsLength + i32.const 1 + i32.const 2 + local.get $0 + call_indirect (type $i32_i32_=>_i32) + ) + (func $start:function-expression~anonymous|4 (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 ) - (func $~start (; 1 ;) + (func $start:function-expression~anonymous|5 (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + i32.const 42 + ) + (func $start:function-expression (; 9 ;) i32.const 1 global.set $~argumentsLength i32.const 1 @@ -20,17 +55,50 @@ global.set $~argumentsLength i32.const 0 global.set $~argumentsLength + i32.const 5 + call $function-expression/testOmitted + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 6 + call $function-expression/testOmitted + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 22 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 7 + call $function-expression/testOmitted + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 23 + i32.const 0 + call $~lib/builtins/abort + unreachable + end i32.const 2 global.set $~argumentsLength i32.const 2 global.set $~argumentsLength i32.const 2 global.set $~argumentsLength - i32.const 2 - global.set $~argumentsLength - i32.const 2 - global.set $~argumentsLength - i32.const 2 - global.set $~argumentsLength + ) + (func $~start (; 10 ;) + call $start:function-expression ) ) diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index a4cc731e4e..59d5ccfdef 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -1,8 +1,9 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param 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_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -35,7 +36,15 @@ local.get $1 f64.add ) - (func $~start (; 5 ;) + (func $function-types/doAddWithFn (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $1 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + ) + (func $start:function-types (; 6 ;) i32.const 1 global.set $function-types/i32Adder i32.const 2 @@ -47,11 +56,9 @@ i32.const 2 global.set $~argumentsLength i32.const 2 - global.set $~argumentsLength - i32.const 2 i32.const 3 i32.const 1 - call_indirect (type $i32_i32_=>_i32) + call $function-types/doAddWithFn i32.const 5 i32.ne if @@ -64,13 +71,52 @@ end i32.const 2 global.set $~argumentsLength + i32.const 4 + i32.const 5 + i32.const 4 + call $function-types/doAddWithFn + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 35 + i32.const 0 + call $~lib/builtins/abort + unreachable + end i32.const 2 global.set $~argumentsLength + i32.const 1 i32.const 2 - global.set $~argumentsLength - i32.const 2 - global.set $~argumentsLength + i32.const 1 + call $function-types/doAddWithFn + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 41 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 i32.const 2 - global.set $~argumentsLength + i32.const 1 + call $function-types/doAddWithFn + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 42 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start (; 7 ;) + call $start:function-types ) ) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 580033e382..7d9a5e54ca 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -10,22 +10,10 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~setArgumentsLength (; 0 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 1 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size local.tee $2 i32.const 16 @@ -63,7 +51,21 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 2 ;) (result i32) + (local $0 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $0 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $0 i32.const 16 i32.sub local.tee $0 @@ -82,7 +84,7 @@ global.set $~argumentsLength i32.const 42 ) - (func $~start (; 2 ;) + (func $~start (; 3 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index dacef462fb..fb3ac2e329 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -1,5 +1,6 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -10,6 +11,7 @@ (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) (export "ifAlwaysReturns" (func $if/ifAlwaysReturns)) + (start $~start) (func $if/ifThenElse (; 1 ;) (param $0 i32) (result i32) i32.const 1 i32.const 0 @@ -37,4 +39,28 @@ unreachable end ) + (func $~start (; 4 ;) + i32.const 0 + call $if/ifThen + if + i32.const 0 + i32.const 32 + i32.const 17 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $if/ifThen + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 18 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) ) diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index fa51e9e2f9..dfcee59dc3 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -818,7 +818,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -894,10 +956,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -945,65 +1006,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1053,7 +1058,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1061,9 +1066,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 220 i32.gt_u @@ -1071,48 +1115,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1123,16 +1130,13 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1141,25 +1145,22 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 16 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 17 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 19 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1169,12 +1170,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 19 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 20 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 22 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1186,23 +1187,16 @@ call $~lib/rt/pure/__retain drop local.get $2 - i32.const 220 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 21 ;) + (func $~lib/rt/pure/__collect (; 23 ;) nop ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 6cee555feb..aa25df3123 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,5 +1,6 @@ (module (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -29,46 +30,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -76,16 +51,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -94,13 +69,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -111,9 +115,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -286,7 +290,7 @@ end end ) - (func $~lib/rt/__allocArray (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -323,7 +327,7 @@ i32.store offset=12 local.get $2 ) - (func $start:infer-array (; 4 ;) + (func $start:infer-array (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -506,7 +510,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) call $start:infer-array ) ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index c8e9c74040..524a39965c 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -2,6 +2,7 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_f32_i32_i32_=>_i32 (func (param i32 f32 i32 i32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (memory $0 1) (data (i32.const 16) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00i\00n\00f\00e\00r\00-\00g\00e\00n\00e\00r\00i\00c\00.\00t\00s") @@ -15,17 +16,19 @@ (export "test3" (func $infer-generic/test2)) (export "test4" (func $infer-generic/test2)) (start $~start) - (func $~setArgumentsLength (; 0 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $infer-generic/test1 (; 1 ;) (param $0 f32) (result f32) + (func $start:infer-generic~anonymous|0 (; 0 ;) (param $0 i32) (param $1 f32) (param $2 i32) (param $3 i32) (result i32) + local.get $1 + f32.const 0 + f32.ne + i32.const 0 local.get $0 + select ) - (func $infer-generic/test2 (; 2 ;) (param $0 i32) (result i32) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) local.get $0 + global.set $~argumentsLength ) - (func $~start (; 3 ;) + (func $~lib/array/Array#reduce (; 2 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -47,6 +50,7 @@ if i32.const 4 global.set $~argumentsLength + local.get $3 i32.const 116 i32.load local.get $0 @@ -54,11 +58,9 @@ i32.shl i32.add f32.load - f32.const 0 - f32.ne - i32.const 0 - local.get $3 - select + local.get $0 + i32.const 112 + call $start:infer-generic~anonymous|0 local.set $3 local.get $0 i32.const 1 @@ -68,4 +70,13 @@ end end ) + (func $infer-generic/test1 (; 3 ;) (param $0 f32) (result f32) + local.get $0 + ) + (func $infer-generic/test2 (; 4 ;) (param $0 i32) (result i32) + local.get $0 + ) + (func $~start (; 5 ;) + call $~lib/array/Array#reduce + ) ) diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index 49b142ecbf..daedfe913b 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -10,7 +10,7 @@ (global $inlining-blocklocals/theCall_c (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~start (; 1 ;) + (func $inlining-blocklocals/test (; 1 ;) (local $0 i32) global.get $inlining-blocklocals/b local.tee $0 @@ -46,4 +46,7 @@ unreachable end ) + (func $~start (; 2 ;) + call $inlining-blocklocals/test + ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 27f36ff0b3..ed205d4afd 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -21,46 +21,20 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -68,16 +42,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -86,13 +60,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -103,9 +106,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $inlining/test_ctor (; 4 ;) + (func $inlining/test_ctor (; 5 ;) (local $0 i32) i32.const 16 i32.const 4 @@ -185,7 +188,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) i32.const 1 global.set $~argumentsLength i32.const 64 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index ed55da4f34..ea73072a98 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) @@ -13,28 +14,20 @@ (global $instanceof-class/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -42,16 +35,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -60,9 +53,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -77,9 +81,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 2 ;) + (func $start:instanceof-class (; 3 ;) (local $0 i32) i32.const 144 global.set $~lib/rt/stub/startOffset @@ -138,7 +142,10 @@ unreachable end ) - (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~start (; 4 ;) + call $start:instanceof-class + ) + (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index a8b32c2517..483435f89e 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (result 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))) @@ -728,10 +728,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -755,49 +861,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -838,70 +903,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 252 i32.gt_u @@ -909,62 +959,29 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~start (; 12 ;) - (local $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + local.get $0 + i32.const 252 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $issues/1095/test (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 192 - i32.store local.get $0 - i32.load local.tee $1 + local.get $0 + i32.load + local.tee $0 i32.eqz if i32.const 0 @@ -974,39 +991,37 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 i32.load - local.tee $2 + local.tee $1 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - i32.const 252 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.set $0 + local.get $1 + call $~lib/rt/pure/__release end local.get $0 - local.get $1 + i32.store + ) + (func $~start (; 17 ;) + (local $0 i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 192 i32.store local.get $0 - i32.const 252 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $issues/1095/test + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index bdab016514..0298582781 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -8,7 +8,7 @@ (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~start (; 0 ;) + (func $start:logical (; 0 ;) i32.const 2 global.set $logical/i i32.const 1 @@ -42,4 +42,7 @@ f64.const nan:0x8000000000000 global.set $logical/F ) + (func $~start (; 1 ;) + call $start:logical + ) ) diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 4cf6e35cbf..97d51576a3 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -88,37 +88,7 @@ end end ) - (func $loop-flow/whileThrow (; 5 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 11 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/whileContinue (; 6 ;) (result i32) - loop $while-continue|0 - br $while-continue|0 - end - unreachable - ) - (func $loop-flow/forThrow (; 7 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 41 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/doThrow (; 8 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 71 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $~start (; 9 ;) + (func $start:loop-flow (; 5 ;) i32.const 1 call $loop-flow/whileAny i32.const 1 @@ -156,4 +126,37 @@ unreachable end ) + (func $loop-flow/whileThrow (; 6 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 11 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/whileContinue (; 7 ;) (result i32) + loop $while-continue|0 + br $while-continue|0 + end + unreachable + ) + (func $loop-flow/forThrow (; 8 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 41 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/doThrow (; 9 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 71 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~start (; 10 ;) + call $start:loop-flow + ) ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index de52ebd43e..14a242f60c 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -730,9 +730,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -756,49 +863,8 @@ local.tee $2 i32.eqz if - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $3 - local.get $2 - local.get $3 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $3 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $2 @@ -839,70 +905,55 @@ local.get $0 local.get $2 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $2 - i32.load + call $~lib/rt/tlsf/prepareBlock + local.get $2 + call $~lib/rt/rtrace/onalloc + local.get $2 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 local.tee $1 - i32.const -4 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $2 - local.get $1 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $2 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $2 - local.get $1 - i32.const -2 - i32.and - i32.store - local.get $2 - i32.const 16 - i32.add - local.tee $0 - local.get $2 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $2 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable end - local.get $2 - call $~lib/rt/rtrace/onalloc - local.get $2 ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 268 i32.gt_u @@ -910,48 +961,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $managed-cast/Cat#constructor (; 12 ;) (result i32) + (func $managed-cast/Cat#constructor (; 15 ;) (result i32) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize i32.const 3 @@ -971,7 +985,18 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/__instanceof (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + local.get $0 + i32.const 268 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/rt/__instanceof (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1001,7 +1026,7 @@ end i32.const 0 ) - (func $start:managed-cast (; 14 ;) + (func $start:managed-cast (; 18 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1011,7 +1036,6 @@ (local $6 i32) (local $7 i32) call $managed-cast/Cat#constructor - local.set $2 call $managed-cast/Cat#constructor local.tee $3 i32.eqz @@ -1084,80 +1108,23 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 268 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 268 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 268 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 268 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 268 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 268 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 268 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 268 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 15 ;) + (func $~start (; 19 ;) global.get $~started if return @@ -1167,7 +1134,7 @@ end call $start:managed-cast ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 2e14cfff60..62c4e11140 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $new/ref (mut i32) (i32.const 0)) @@ -9,28 +10,20 @@ (global $new/ref2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -38,16 +31,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -56,9 +49,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -73,9 +77,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 331b57e9f7..c8a2d56936 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,9 +1,12 @@ (module (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 $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $f32_=>_i32 (func (param f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -86,46 +89,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 - local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $5 - i32.add - local.tee $1 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -133,16 +110,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -151,13 +128,42 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $3 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 - local.get $5 + local.get $3 i32.store local.get $1 i32.const 1 @@ -168,9 +174,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~lib/util/number/utoa_simple (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -194,46 +200,55 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - local.get $0 + i32.eqz + if + i32.const 32 + return + end + local.get $0 + i32.const 0 + i32.lt_s + local.tee $1 + if i32.const 0 - i32.lt_s - 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 - i32.add - local.tee $3 - i32.const 1 - i32.shl - call $~lib/rt/stub/__alloc - local.tee $2 local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 - end + i32.sub + local.set $0 + end + local.get $0 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if local.get $2 - else - i32.const 32 + i32.const 45 + i32.store16 end + local.get $2 + ) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) - (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -309,7 +324,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -326,18 +341,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -349,7 +356,7 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (; 7 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -740,7 +747,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -913,7 +920,7 @@ end end ) - (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1158,7 +1165,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1296,17 +1303,13 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -1371,16 +1374,109 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $start:number (; 12 ;) + (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 1280 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1280 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end + ) + (func $~lib/number/F32.isSafeInteger (; 15 ;) (param $0 f32) (result i32) + local.get $0 + f32.trunc + local.get $0 + f32.eq + i32.const 0 + local.get $0 + f32.abs + f32.const 16777215 + f32.le + select + ) + (func $~lib/number/F32.isInteger (; 16 ;) (param $0 f32) (result i32) + local.get $0 + f32.trunc + local.get $0 + f32.eq + i32.const 0 + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + select + ) + (func $~lib/number/F64.isSafeInteger (; 17 ;) (param $0 f64) (result i32) + local.get $0 + f64.trunc + local.get $0 + f64.eq + i32.const 0 + local.get $0 + f64.abs + f64.const 9007199254740991 + f64.le + select + ) + (func $~lib/number/F64.isInteger (; 18 ;) (param $0 f64) (result i32) + local.get $0 + f64.trunc + local.get $0 + f64.eq + i32.const 0 + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.eq + select + ) + (func $start:number (; 19 ;) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 1536 global.set $~lib/rt/stub/startOffset i32.const 1536 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1404,46 +1500,7 @@ local.get $1 call $~lib/string/String#substring local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 1280 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $2 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1280 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $2 - i32.load - i32.add - i32.eq - if - local.get $2 - global.set $~lib/rt/stub/offset - end + call $~lib/rt/stub/__free local.set $0 end local.get $0 @@ -1459,7 +1516,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -1472,7 +1529,7 @@ unreachable end i32.const -5 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -1485,7 +1542,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -1502,7 +1559,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1519,7 +1576,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1561,7 +1618,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1579,7 +1636,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1591,8 +1648,448 @@ call $~lib/builtins/abort unreachable end + f32.const -16777216 + call $~lib/number/F32.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 25 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -16777215 + call $~lib/number/F32.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 26 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + call $~lib/number/F32.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 27 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -0 + call $~lib/number/F32.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 28 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const nan:0x400000 + call $~lib/number/F32.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 29 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const inf + call $~lib/number/F32.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 30 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 16777215 + call $~lib/number/F32.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 31 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 16777216 + call $~lib/number/F32.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 32 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 0.5 + call $~lib/number/F32.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 33 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 0 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 34 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -0 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 35 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const nan:0x400000 + call $~lib/number/F32.isInteger + if + i32.const 0 + i32.const 96 + i32.const 36 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const inf + call $~lib/number/F32.isInteger + if + i32.const 0 + i32.const 96 + i32.const 37 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 1.1920928955078125e-07 + call $~lib/number/F32.isInteger + if + i32.const 0 + i32.const 96 + i32.const 38 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 1 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 39 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -1 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 40 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -16777215 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 41 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 16777215 + call $~lib/number/F32.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 42 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const 0.5 + call $~lib/number/F32.isInteger + if + i32.const 0 + i32.const 96 + i32.const 43 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f32.const -1.5 + call $~lib/number/F32.isInteger + if + i32.const 0 + i32.const 96 + i32.const 44 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -9007199254740992 + call $~lib/number/F64.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 48 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -9007199254740991 + call $~lib/number/F64.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 49 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 0 + call $~lib/number/F64.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 50 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -0 + call $~lib/number/F64.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 51 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const nan:0x8000000000000 + call $~lib/number/F64.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 52 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const inf + call $~lib/number/F64.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 53 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 9007199254740991 + call $~lib/number/F64.isSafeInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 54 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 9007199254740992 + call $~lib/number/F64.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 55 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 0.5 + call $~lib/number/F64.isSafeInteger + if + i32.const 0 + i32.const 96 + i32.const 56 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 0 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 57 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -0 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 58 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const nan:0x8000000000000 + call $~lib/number/F64.isInteger + if + i32.const 0 + i32.const 96 + i32.const 59 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const inf + call $~lib/number/F64.isInteger + if + i32.const 0 + i32.const 96 + i32.const 60 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 2.220446049250313e-16 + call $~lib/number/F64.isInteger + if + i32.const 0 + i32.const 96 + i32.const 61 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 1 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 62 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -1 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 63 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -9007199254740991 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 64 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 9007199254740991 + call $~lib/number/F64.isInteger + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 96 + i32.const 65 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const 0.5 + call $~lib/number/F64.isInteger + if + i32.const 0 + i32.const 96 + i32.const 66 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + f64.const -1.5 + call $~lib/number/F64.isInteger + if + i32.const 0 + i32.const 96 + i32.const 67 + i32.const 0 + call $~lib/builtins/abort + unreachable + end ) - (func $~start (; 13 ;) + (func $~start (; 20 ;) call $start:number ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index f9e27ebac4..e5a0edcd04 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,28 +9,20 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -37,16 +30,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -55,9 +48,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -72,9 +76,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 741bc01de0..8698dfa1ef 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -727,10 +727,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -754,49 +860,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -837,71 +902,56 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 160 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~start (; 11 ;) + (func $~start (; 14 ;) (local $0 i32) - (local $1 i32) - (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -913,44 +963,7 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 i32.const 192 @@ -962,7 +975,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 9b04be60b0..8b81f07e0e 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_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_i32 (func (result i32))) @@ -727,10 +727,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -754,49 +860,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -837,70 +902,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -908,48 +958,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $start:rc/logical-and-mismatch (; 12 ;) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $start:rc/logical-and-mismatch (; 16 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -965,27 +989,13 @@ local.tee $0 if local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__retain local.set $0 end local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) @@ -998,15 +1008,7 @@ local.get $0 call $~lib/rt/pure/__retain end - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1015,14 +1017,7 @@ local.tee $0 if local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1031,29 +1026,14 @@ local.set $0 end local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 13 ;) + (func $~start (; 17 ;) call $start:rc/logical-and-mismatch ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 84cf34344e..50e94c8a0d 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_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result 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))) (type $none_=>_i32 (func (result i32))) @@ -727,10 +727,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -754,49 +860,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -837,70 +902,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -908,48 +958,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $start:rc/logical-or-mismatch (; 12 ;) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $start:rc/logical-or-mismatch (; 16 ;) (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock @@ -966,27 +990,13 @@ i32.eqz if local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__retain local.set $0 end local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef local.tee $0 if (result i32) @@ -999,15 +1009,7 @@ i32.add call $~lib/rt/pure/__retain end - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1017,14 +1019,7 @@ i32.eqz if local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1033,29 +1028,14 @@ local.set $0 end local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 13 ;) + (func $~start (; 17 ;) call $start:rc/logical-or-mismatch ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 302613c842..7a2122ac44 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -2,10 +2,10 @@ (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 $none_=>_none (func)) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result 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))) @@ -41,7 +41,7 @@ (export "OptimizeARC.eliminates.replaceAlreadyRetained" (func $rc/optimize/eliminated_rr)) (export "OptimizeARC.keeps.partialRetains" (func $rc/optimize/OptimizeARC.keeps.partialRetains)) (export "OptimizeARC.keeps.reachesReturn" (func $rc/optimize/OptimizeARC.keeps.reachesReturn)) - (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation)) + (export "FinalizeARC.eliminates.unnecessaryAllocation" (func $rc/optimize/eliminated_v)) (export "FinalizeARC.eliminates.unnecessaryPair" (func $rc/optimize/eliminated_vi)) (export "FinalizeARC.eliminates.unnecessaryStaticPair" (func $rc/optimize/eliminated_v)) (export "FinalizeARC.eliminates.unnecessaryStaticRetain" (func $rc/optimize/eliminated_v)) @@ -60,9 +60,48 @@ (func $rc/optimize/eliminated_viii (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 32 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) local.get $0 i32.const 196 i32.gt_u @@ -70,48 +109,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -277,7 +279,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -560,7 +562,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -674,7 +676,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -761,7 +763,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -892,7 +894,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -968,10 +1032,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1019,65 +1082,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1127,25 +1134,38 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $rc/optimize/getRef (; 17 ;) (result i32) + (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize - i32.const 0 - i32.const 3 + local.get $0 + local.get $1 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add + ) + (func $rc/optimize/getRef (; 20 ;) (result i32) + i32.const 0 + i32.const 3 + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/eliminated_rr (; 18 ;) (param $0 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize + (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + local.get $0 + i32.const 196 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $rc/optimize/eliminated_rr (; 22 ;) (param $0 i32) (result i32) i32.const 0 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1157,24 +1177,17 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 20 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 24 ;) (param $0 i32) (param $1 i32) local.get $1 - if + if (result i32) local.get $0 call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 196 - i32.gt_u - if + else local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement end + call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1184,52 +1197,19 @@ return end local.get $0 - i32.const 196 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - ) - (func $rc/optimize/FinalizeARC.eliminates.unnecessaryAllocation (; 22 ;) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 1 + call $~lib/rt/pure/__release i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 196 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 23 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 26 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 24 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 27 ;) (param $0 i32) local.get $0 - i32.const 196 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index f77c215f6e..9c64dd213e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,9 +1,9 @@ (module - (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 (func (param i32 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 (func (param i32) (result i32))) @@ -21,9 +21,8 @@ (export "__alloc" (func $~lib/rt/tlsf/__alloc)) (export "__retain" (func $~lib/rt/pure/__retain)) (export "__release" (func $~lib/rt/pure/__release)) - (export "__collect" (func $~lib/rt/pure/__collect)) + (export "__collect" (func $~start)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) - (start $~start) (func $~lib/rt/tlsf/removeBlock (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -805,7 +804,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -881,10 +942,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -932,65 +992,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1038,7 +1042,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1046,56 +1050,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 212 - i32.gt_u + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 212 i32.gt_u @@ -1103,35 +1097,25 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/increment end + local.get $0 ) - (func $~start (; 11 ;) - (local $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 0 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u if - local.get $1 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 12 ;) + (func $~start (; 13 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 1dcae470fb..c295c81656 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (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))) @@ -729,10 +729,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 12 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -756,49 +862,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -839,70 +904,55 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -910,48 +960,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $rc/ternary-mismatch/test1 (; 12 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test1 (; 15 ;) (param $0 i32) (result i32) local.get $0 if (result i32) call $~lib/rt/tlsf/maybeInitialize @@ -964,7 +977,18 @@ call $~lib/rt/pure/__retain end ) - (func $rc/ternary-mismatch/test2 (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + local.get $0 + i32.const 176 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $rc/ternary-mismatch/test2 (; 17 ;) (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef @@ -977,79 +1001,29 @@ call $~lib/rt/pure/__retain end ) - (func $start:rc/ternary-mismatch (; 14 ;) - (local $0 i32) + (func $~start (; 18 ;) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain global.set $rc/ternary-mismatch/gloRef - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + i32.const 1 + call $rc/ternary-mismatch/test1 + call $~lib/rt/pure/__release + i32.const 0 + call $rc/ternary-mismatch/test1 + call $~lib/rt/pure/__release + i32.const 1 + call $rc/ternary-mismatch/test2 + call $~lib/rt/pure/__release + i32.const 0 + call $rc/ternary-mismatch/test2 + call $~lib/rt/pure/__release global.get $rc/ternary-mismatch/gloRef - local.tee $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~start (; 15 ;) - call $start:rc/ternary-mismatch + call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index fa780a3b49..53530df67e 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,12 +1,12 @@ (module (type $none_=>_i32 (func (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i64_=>_i32 (func (param i64) (result 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))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\08\00\00\00\01\00\00\00\00\00\00\00\08\00\00\00\01") @@ -20,46 +20,20 @@ (export "fieldAccess" (func $resolve-access/fieldAccess)) (export "propertyAccess" (func $resolve-access/propertyAccess)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -67,16 +41,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -85,13 +59,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -102,9 +105,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -275,7 +278,7 @@ end end ) - (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -323,7 +326,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -347,7 +350,60 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 5 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 6 ;) (param $0 i64) (result i32) + i32.const 10 + i32.const 11 + i32.const 12 + local.get $0 + i64.const 100000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000 + i64.lt_u + select + i32.const 13 + i32.const 14 + i32.const 15 + local.get $0 + i64.const 100000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + i32.const 16 + i32.const 17 + local.get $0 + i64.const 10000000000000000 + i64.lt_u + select + i32.const 18 + i32.const 19 + i32.const 20 + local.get $0 + i64.const -8446744073709551616 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000000 + i64.lt_u + select + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select + ) + (func $~lib/util/number/utoa64 (; 7 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -376,57 +432,8 @@ local.get $1 call $~lib/util/number/utoa_simple else - i32.const 10 - i32.const 11 - i32.const 12 - local.get $0 - i64.const 100000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 - local.get $0 - i64.const 100000000000000 - i64.lt_u - select local.get $0 - i64.const 10000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - i32.const 16 - i32.const 17 - local.get $0 - i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 - local.get $0 - i64.const -8446744073709551616 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000000 - i64.lt_u - select - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select + call $~lib/util/number/decimalCount64 local.tee $1 i32.const 1 i32.shl @@ -461,7 +468,7 @@ end local.get $3 ) - (func $resolve-access/arrayAccess (; 6 ;) (result i32) + (func $resolve-access/arrayAccess (; 8 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -502,7 +509,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/fieldAccess (; 7 ;) (result i32) + (func $resolve-access/Container#constructor (; 9 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -511,23 +518,23 @@ i64.const 0 i64.store local.get $0 + ) + (func $resolve-access/fieldAccess (; 10 ;) (result i32) + (local $0 i32) + call $resolve-access/Container#constructor + local.tee $0 i64.const 1 i64.store local.get $0 i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/propertyAccess (; 8 ;) (result i32) + (func $resolve-access/propertyAccess (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 8 - i32.const 5 - call $~lib/rt/stub/__alloc + call $resolve-access/Container#constructor local.tee $0 - i64.const 0 - i64.store - local.get $0 i64.const 1 i64.store local.get $0 @@ -552,7 +559,7 @@ end local.get $0 ) - (func $~start (; 9 ;) + (func $~start (; 12 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 4cb6dff1e6..a30a8aa4e4 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -2,6 +2,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -56,7 +57,15 @@ (global $resolve-binary/bar2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/string/compareImpl (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 1 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -132,7 +141,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -149,18 +158,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -172,7 +173,7 @@ end i32.const 0 ) - (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -220,46 +221,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 5 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -267,16 +242,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -285,13 +260,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -302,9 +306,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -328,47 +332,48 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 6 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 8 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - if (result i32) - local.get $0 + i32.eqz + if + i32.const 192 + return + end + local.get $0 + i32.const 0 + i32.lt_s + local.tee $1 + if i32.const 0 - i32.lt_s - 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 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 - end + i32.sub + local.set $0 + end + local.get $0 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if local.get $2 - else - i32.const 192 + i32.const 45 + i32.store16 end + local.get $2 ) - (func $~lib/util/number/genDigits (; 7 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -759,7 +764,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -932,7 +937,7 @@ end end ) - (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1177,7 +1182,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1322,17 +1327,13 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -1398,25 +1399,8 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/util/number/dtoa (; 12 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) (local $1 i32) - (local $2 i32) - i32.const 56 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring local.get $0 i32.const 15 i32.and @@ -1459,7 +1443,28 @@ global.set $~lib/rt/stub/offset end ) - (func $start:resolve-binary (; 13 ;) + (func $~lib/util/number/dtoa (; 15 ;) (result i32) + (local $0 i32) + (local $1 i32) + i32.const 56 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/string/String#substring + local.get $0 + call $~lib/rt/stub/__free + ) + (func $start:resolve-binary (; 16 ;) i32.const 32 i32.const 32 call $~lib/string/String.__eq @@ -1563,7 +1568,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1580,7 +1585,7 @@ i32.add global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1597,7 +1602,7 @@ i32.sub global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1614,7 +1619,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1647,7 +1652,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1664,7 +1669,7 @@ i32.rem_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1681,7 +1686,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1698,7 +1703,7 @@ i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1715,7 +1720,7 @@ i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1732,7 +1737,7 @@ i32.and global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1749,7 +1754,7 @@ i32.or global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1766,7 +1771,7 @@ i32.xor global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1779,7 +1784,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1792,7 +1797,7 @@ unreachable end i32.const -1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1568 call $~lib/string/String.__eq i32.eqz @@ -1805,7 +1810,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1818,7 +1823,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1831,7 +1836,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1856,7 +1861,7 @@ unreachable end i32.const 4 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1869,7 +1874,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1882,7 +1887,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1895,7 +1900,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1908,7 +1913,7 @@ unreachable end i32.const 3 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1921,7 +1926,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1934,7 +1939,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1947,7 +1952,7 @@ unreachable end i32.const 0 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 192 call $~lib/string/String.__eq i32.eqz @@ -1960,7 +1965,7 @@ unreachable end i32.const 1 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1973,7 +1978,7 @@ unreachable end i32.const 2 - call $~lib/number/I32#toString + call $~lib/util/number/itoa32 i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -2166,7 +2171,7 @@ unreachable end ) - (func $~start (; 14 ;) + (func $~start (; 17 ;) call $start:resolve-binary ) ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 3ab7b7aecb..b6abe0288a 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,8 +1,9 @@ (module + (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) @@ -40,46 +41,20 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -87,16 +62,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -105,13 +80,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -122,55 +126,59 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 2 ;) (param $0 i32) (result i32) + (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (local $1 i32) - (local $2 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 + local.get $0 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 8 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 4 i32.sub i32.const 0 i32.store8 + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 + call $~lib/memory/memory.fill local.get $0 i32.eqz if @@ -202,7 +210,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 5 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -226,7 +234,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 6 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -249,7 +257,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -297,7 +305,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -687,7 +695,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -860,7 +868,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -884,7 +892,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1129,7 +1137,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -1438,17 +1446,21 @@ local.get $10 i32.add ) - (func $~lib/string/String#substring (; 11 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 + (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u + ) + (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 0 + local.get $0 + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -1514,10 +1526,53 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/util/number/dtoa (; 12 ;) (param $0 f64) (result i32) + (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 1408 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1408 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end + ) + (func $~lib/util/number/dtoa (; 16 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -1563,48 +1618,9 @@ local.get $2 call $~lib/string/String#substring local.get $1 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $1 - select - i32.eqz - if - i32.const 0 - i32.const 1408 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 16 - i32.sub - local.tee $3 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1408 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $1 - local.get $3 - i32.load - i32.add - i32.eq - if - local.get $3 - global.set $~lib/rt/stub/offset - end + call $~lib/rt/stub/__free ) - (func $~lib/util/string/compareImpl (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1680,7 +1696,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1697,18 +1713,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -1720,7 +1728,7 @@ end i32.const 0 ) - (func $start:resolve-elementaccess (; 15 ;) + (func $start:resolve-elementaccess (; 19 ;) (local $0 i32) i32.const 1600 global.set $~lib/rt/stub/startOffset @@ -1818,7 +1826,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 20 ;) call $start:resolve-elementaccess ) ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index ed3f068dee..06e278cf72 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -19,46 +19,68 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/util/number/decimalCount32 (; 2 ;) (param $0 i32) (result i32) + i32.const 1 + i32.const 2 local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 - local.get $1 - i32.const 16 - i32.gt_u + i32.const 10000 + i32.lt_u select - local.tee $5 - i32.add - local.tee $1 + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -66,16 +88,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -84,13 +106,42 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $3 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 - local.get $5 + local.get $3 i32.store local.get $1 i32.const 1 @@ -101,9 +152,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -125,53 +176,9 @@ i32.sub local.set $0 end - local.get $1 - i32.const 1 - i32.const 2 local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select + call $~lib/util/number/decimalCount32 + local.get $1 i32.add local.tee $2 i32.const 1 @@ -208,7 +215,15 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -283,7 +298,7 @@ end i32.const 0 ) - (func $~start (; 5 ;) + (func $start:resolve-function-expression (; 8 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -312,16 +327,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $1 - i32.const 140 - i32.load - i32.const 1 - i32.shr_u + i32.const 144 + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -342,4 +351,7 @@ unreachable end ) + (func $~start (; 9 ;) + call $start:resolve-function-expression + ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 86408cc663..0aaab3bea0 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -7,26 +8,18 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $resolve-new/Foo#constructor (; 0 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.sub @@ -37,7 +30,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 + local.get $2 local.get $1 i32.gt_s select @@ -56,7 +49,18 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 + ) + (func $resolve-new/Foo#constructor (; 1 ;) (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $1 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $1 i32.const 16 i32.sub local.tee $0 @@ -71,9 +75,9 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $1 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index cf13f4a47c..1ad123c0fb 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1,8 +1,9 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param 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) @@ -22,46 +23,68 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) + i32.const 1 + i32.const 2 local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u + i32.const 10000 + i32.lt_u select - local.tee $6 - i32.add - local.tee $2 + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -69,16 +92,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -87,13 +110,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -104,9 +156,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -128,53 +180,9 @@ i32.sub local.set $0 end - local.get $1 - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select + call $~lib/util/number/decimalCount32 + local.get $1 i32.add local.tee $2 i32.const 1 @@ -212,7 +220,15 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -288,7 +304,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -305,18 +321,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -328,7 +336,7 @@ end i32.const 0 ) - (func $start:resolve-propertyaccess (; 5 ;) + (func $start:resolve-propertyaccess (; 8 ;) (local $0 i32) i32.const 448 global.set $~lib/rt/stub/startOffset @@ -472,7 +480,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 9 ;) call $start:resolve-propertyaccess ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 92fcdd2df6..6e13abd4fd 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module + (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_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (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 $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -826,7 +826,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -902,10 +964,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -953,65 +1014,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1059,7 +1064,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1067,9 +1072,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 1524 i32.gt_u @@ -1077,46 +1119,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1127,7 +1134,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 13 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1175,7 +1182,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1199,7 +1206,15 @@ br_if $do-continue|0 end ) - (func $~lib/util/string/compareImpl (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 15 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1275,7 +1290,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1294,18 +1309,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -1317,7 +1324,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 15 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 18 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1708,7 +1715,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1881,7 +1888,7 @@ end end ) - (func $~lib/util/number/prettify (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2126,7 +2133,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 18 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 21 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2264,17 +2271,13 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -2330,12 +2333,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -2345,44 +2345,21 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/dtoa (; 20 ;) (result i32) - (local $0 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - call $~lib/util/number/dtoa_core - local.tee $0 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 local.get $0 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 16 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $1 + local.get $0 select if (result i32) - local.get $0 + local.get $1 i32.load i32.const 1 i32.and @@ -2391,7 +2368,7 @@ i32.const 0 end if (result i32) - local.get $0 + local.get $1 i32.load offset=4 i32.const -268435456 i32.and @@ -2408,41 +2385,41 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 + local.get $1 + ) + (func $~lib/rt/tlsf/freeBlock (; 24 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 i32.load i32.const 1 i32.or i32.store local.get $0 + local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~setArgumentsLength (; 21 ;) (param $0 i32) + (func $~setArgumentsLength (; 25 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-ternary (; 22 ;) + (func $start:resolve-ternary (; 26 ;) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 1 call $~lib/util/number/decimalCount32 local.tee $1 i32.const 1 i32.shl - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $0 i32.const 1 local.get $1 call $~lib/util/number/utoa_simple local.get $0 call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -2454,8 +2431,31 @@ call $~lib/builtins/abort unreachable end - call $~lib/util/number/dtoa - local.tee $0 + block $__inlined_func$~lib/util/number/dtoa + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + end + local.get $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2473,32 +2473,18 @@ global.set $~argumentsLength i32.const 1 global.set $~argumentsLength - local.get $1 - i32.const 1524 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release local.get $0 - i32.const 1524 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 23 ;) + (func $~start (; 27 ;) call $start:resolve-ternary ) - (func $~lib/rt/pure/__collect (; 24 ;) + (func $~lib/rt/pure/__collect (; 28 ;) nop ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 29 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2564,15 +2550,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index b63bfc2d23..6f79954fa4 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1,8 +1,9 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param 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) @@ -30,46 +31,68 @@ (global $resolve-unary/bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) + i32.const 1 + i32.const 2 local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u + i32.const 10000 + i32.lt_u select - local.tee $6 - i32.add - local.tee $2 + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -77,16 +100,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -95,13 +118,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -112,9 +164,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -136,53 +188,9 @@ i32.sub local.set $0 end - local.get $1 - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select + call $~lib/util/number/decimalCount32 + local.get $1 i32.add local.tee $2 i32.const 1 @@ -220,7 +228,15 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -296,7 +312,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -313,18 +329,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -336,7 +344,7 @@ end i32.const 0 ) - (func $start:resolve-unary (; 5 ;) + (func $start:resolve-unary (; 8 ;) (local $0 i32) i32.const 544 global.set $~lib/rt/stub/startOffset @@ -616,7 +624,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 9 ;) call $start:resolve-unary ) ) diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index c765419766..b27a25c7be 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -7,7 +7,7 @@ (global $retain-i32/ri (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~start (; 0 ;) + (func $start:retain-i32 (; 0 ;) (local $0 i32) i32.const -128 local.set $0 @@ -66,4 +66,7 @@ i32.load8_s drop ) + (func $~start (; 1 ;) + call $start:retain-i32 + ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 6721d62c61..98f96d23f2 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (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_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -842,7 +842,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -918,10 +980,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -950,65 +1011,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1058,7 +1063,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1269,9 +1282,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.const 708 i32.gt_u @@ -1279,48 +1331,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + local.get $0 + i32.const 708 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1335,27 +1361,21 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $2 call $~lib/memory/memory.fill local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1379,14 +1399,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1399,7 +1412,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 21 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1441,7 +1454,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1614,7 +1627,20 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1670,10 +1696,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -1711,21 +1737,13 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/array/ensureSize (; 20 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1784,7 +1802,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 21 ;) (param $0 i32) + (func $~lib/array/Array#push (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1807,7 +1825,15 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#concat (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#get:length (; 27 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/string/String#concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1823,60 +1849,34 @@ i32.ne if local.get $1 - i32.const 708 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 480 local.set $1 end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $4 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 i32.add local.tee $2 i32.eqz if - i32.const 400 - local.set $0 local.get $1 - i32.const 708 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 400 + local.tee $0 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -1889,29 +1889,27 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - i32.const 708 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 ) - (func $start:retain-release-sanity (; 23 ;) + (func $~lib/string/String.__concat (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 480 + local.get $0 + select + local.get $1 + call $~lib/string/String#concat + ) + (func $start:retain-release-sanity (; 30 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1926,8 +1924,9 @@ local.get $0 call $~lib/array/Array#push local.get $0 - i32.load offset=12 local.tee $2 + i32.load offset=12 + local.tee $1 i32.const 1 i32.lt_s if @@ -1938,35 +1937,25 @@ 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 - i32.const 708 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/pure/__release i32.const 16 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -1981,12 +1970,9 @@ i32.const 10 i32.lt_s if - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor @@ -2006,21 +1992,21 @@ local.get $0 local.get $0 i32.load offset=12 - local.tee $5 + local.tee $4 i32.const 1 i32.add - local.tee $4 + local.tee $5 call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $5 + local.get $4 i32.const 2 i32.shl i32.add i32.const 400 i32.store local.get $0 - local.get $4 + local.get $5 i32.store offset=12 local.get $1 i32.const 1 @@ -2030,14 +2016,7 @@ end end local.get $0 - i32.const 708 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -2046,90 +2025,53 @@ end end local.get $2 - i32.const 708 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 416 i32.const 448 - call $~lib/string/String#concat + call $~lib/string/String.__concat local.tee $2 - i32.const 480 - local.get $2 - select i32.const 512 - call $~lib/string/String#concat - local.set $0 + call $~lib/string/String.__concat local.get $2 - i32.const 708 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 708 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release i32.const 4 i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.store local.get $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 4 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 i32.store local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release end local.get $1 i32.store + local.get $0 + local.set $1 local.get $2 local.set $3 local.get $2 local.get $0 - local.tee $1 i32.load local.tee $4 i32.ne @@ -2138,14 +2080,7 @@ call $~lib/rt/pure/__retain local.set $3 local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $1 local.get $3 @@ -2162,20 +2097,14 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 local.get $1 i32.store local.get $0 - local.tee $1 + local.set $1 + local.get $0 local.get $3 i32.load local.tee $4 @@ -2185,14 +2114,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 local.get $1 @@ -2211,14 +2133,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 708 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 local.get $1 @@ -2233,42 +2148,21 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - i32.const 708 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 local.get $3 i32.store local.get $0 - i32.const 708 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 708 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) - (func $~start (; 24 ;) + (func $~start (; 31 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 32 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2292,7 +2186,20 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scan (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 33 ;) (param $0 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + i32.const 4 + call $~lib/rt/__visit_members + ) + (func $~lib/rt/pure/scan (; 34 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2309,16 +2216,7 @@ i32.gt_u if local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members + call $~lib/rt/pure/scanBlack else local.get $0 local.get $1 @@ -2335,7 +2233,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 35 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2363,20 +2261,12 @@ i32.add i32.const 5 call $~lib/rt/__visit_members - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 28 ;) + (func $~lib/rt/pure/__collect (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2385,26 +2275,26 @@ (local $5 i32) global.get $~lib/rt/pure/ROOTS local.tee $5 - local.tee $3 - local.set $4 + local.tee $2 + local.set $3 global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 + local.get $3 local.get $0 i32.lt_u if - local.get $4 + local.get $3 i32.load - local.tee $1 + local.tee $4 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1879048192 i32.and i32.const 805306368 i32.eq if (result i32) - local.get $2 + local.get $1 i32.const 268435455 i32.and i32.const 0 @@ -2413,59 +2303,51 @@ i32.const 0 end if - local.get $1 + local.get $4 call $~lib/rt/pure/markGray - local.get $3 - local.get $1 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $2 i32.const 4 i32.add - local.set $3 + local.set $2 else i32.const 0 - local.get $2 + local.get $1 i32.const 268435455 i32.and i32.eqz - local.get $2 + local.get $1 i32.const 1879048192 i32.and select if - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + local.get $4 + call $~lib/rt/tlsf/freeBlock else + local.get $4 local.get $1 - local.get $2 i32.const 2147483647 i32.and i32.store offset=4 end end - local.get $4 + local.get $3 i32.const 4 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $2 global.set $~lib/rt/pure/CUR local.get $5 local.set $0 loop $for-loop|1 local.get $0 - local.get $3 + local.get $2 i32.lt_u if local.get $0 @@ -2482,18 +2364,18 @@ local.set $0 loop $for-loop|2 local.get $0 - local.get $3 + local.get $2 i32.lt_u if local.get $0 i32.load - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 i32.load offset=4 i32.const 2147483647 i32.and i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/collectWhite local.get $0 i32.const 4 @@ -2505,72 +2387,58 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 29 ;) + (func $~lib/rt/pure/growRoots (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) global.get $~lib/rt/pure/CUR global.get $~lib/rt/pure/ROOTS - local.tee $0 + local.tee $1 i32.sub local.tee $2 i32.const 1 i32.shl - local.tee $1 + local.tee $0 i32.const 256 - local.get $1 + local.get $0 i32.const 256 i32.gt_u select - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $0 i32.const 16 i32.sub call $~lib/rt/rtrace/onfree - local.get $1 local.get $0 + local.get $1 local.get $2 call $~lib/memory/memory.copy - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.const 16 i32.sub call $~lib/rt/rtrace/onalloc call $~lib/rt/tlsf/maybeInitialize - local.get $0 + local.get $1 call $~lib/rt/tlsf/checkUsedBlock - local.tee $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end - local.get $1 + local.get $0 global.set $~lib/rt/pure/ROOTS - local.get $1 + local.get $0 local.get $2 i32.add global.set $~lib/rt/pure/CUR - local.get $1 + local.get $0 local.get $3 i32.add global.set $~lib/rt/pure/END ) - (func $~lib/rt/pure/decrement (; 30 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2611,17 +2479,9 @@ i32.const -2147483648 i32.store offset=4 else - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end else local.get $1 @@ -2700,7 +2560,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 39 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2787,16 +2647,7 @@ i32.and if local.get $0 - local.get $0 - i32.load offset=4 - i32.const -1879048193 - i32.and - i32.store offset=4 - local.get $0 - i32.const 16 - i32.add - i32.const 4 - call $~lib/rt/__visit_members + call $~lib/rt/pure/scanBlack end br $break|0 end @@ -2812,7 +2663,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 32 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2845,7 +2696,7 @@ end end ) - (func $~lib/rt/__visit_members (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 41 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index bb79b2231a..a0026aad7b 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -57,46 +57,20 @@ (export "provideRefIndirect" (func $retain-release/provideRefIndirect)) (export "receiveRefIndirect" (func $retain-release/receiveRefIndirect)) (export "receiveRefIndirectDrop" (func $retain-release/receiveRefIndirect)) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -104,16 +78,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -122,13 +96,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -139,31 +142,31 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $retain-release/returnRef (; 2 ;) (result i32) + (func $retain-release/returnRef (; 3 ;) (result i32) global.get $retain-release/REF ) - (func $retain-release/receiveRef (; 3 ;) + (func $retain-release/receiveRef (; 4 ;) nop ) - (func $retain-release/takeRef (; 4 ;) (param $0 i32) + (func $retain-release/takeRef (; 5 ;) (param $0 i32) nop ) - (func $retain-release/takeReturnRef (; 5 ;) (param $0 i32) (result i32) + (func $retain-release/takeReturnRef (; 6 ;) (param $0 i32) (result i32) local.get $0 ) - (func $retain-release/newRef (; 6 ;) + (func $retain-release/newRef (; 7 ;) i32.const 0 i32.const 3 call $~lib/rt/stub/__alloc drop ) - (func $retain-release/assignGlobal (; 7 ;) + (func $retain-release/assignGlobal (; 8 ;) global.get $retain-release/REF global.set $retain-release/glo ) - (func $retain-release/assignField (; 8 ;) + (func $retain-release/assignField (; 9 ;) (local $0 i32) (local $1 i32) global.get $retain-release/REF @@ -177,7 +180,7 @@ local.get $0 i32.store ) - (func $retain-release/scopeForComplex (; 9 ;) (param $0 i32) + (func $retain-release/scopeForComplex (; 10 ;) (param $0 i32) (local $1 i32) (local $2 i32) loop $for-loop|0 @@ -203,7 +206,7 @@ end end ) - (func $retain-release/scopeThrow (; 10 ;) (param $0 i32) + (func $retain-release/scopeThrow (; 11 ;) (param $0 i32) local.get $0 if i32.const 32 @@ -214,31 +217,31 @@ unreachable end ) - (func $retain-release/scopeUnreachable (; 11 ;) (param $0 i32) + (func $retain-release/scopeUnreachable (; 12 ;) (param $0 i32) local.get $0 if unreachable end ) - (func $~setArgumentsLength (; 12 ;) (param $0 i32) + (func $~setArgumentsLength (; 13 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $retain-release/provideRefIndirect (; 13 ;) (param $0 i32) + (func $retain-release/provideRefIndirect (; 14 ;) (param $0 i32) i32.const 1 global.set $~argumentsLength global.get $retain-release/REF local.get $0 call_indirect (type $i32_=>_none) ) - (func $retain-release/receiveRefIndirect (; 14 ;) (param $0 i32) + (func $retain-release/receiveRefIndirect (; 15 ;) (param $0 i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) drop ) - (func $~start (; 15 ;) + (func $~start (; 16 ;) (local $0 i32) global.get $~started if diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 2e1faeeae4..777f0f5983 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.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 $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))) @@ -726,10 +726,116 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + local.get $1 + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 (; 8 ;) (param $0 i32) (result i32) + (local $1 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -753,49 +859,8 @@ local.tee $1 i32.eqz if - memory.size - local.tee $2 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -836,68 +901,51 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock + local.get $0 local.get $1 - i32.load - local.tee $2 - i32.const -4 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + ) + (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $1 - local.get $2 + i32.const 0 + i32.const 144 + i32.const 109 i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $2 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 + call $~lib/builtins/abort + unreachable end + local.get $0 local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -905,347 +953,77 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~setArgumentsLength (; 8 ;) (param $0 i32) + (func $~setArgumentsLength (; 11 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:retain-return (; 9 ;) + (func $start:retain-return (; 12 ;) (local $0 i32) - (local $1 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain global.set $retain-return/ref - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 1 global.set $~argumentsLength - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 1 global.set $~argumentsLength - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 0 global.set $~argumentsLength - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 0 global.set $~argumentsLength - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 0 global.set $~argumentsLength call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + drop i32.const 0 global.set $~argumentsLength - global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end i32.const 0 global.set $~argumentsLength global.get $retain-return/ref - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 176 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $retain-return/ref local.tee $0 if local.get $0 @@ -1261,7 +1039,7 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start (; 10 ;) + (func $~start (; 13 ;) global.get $~started if return @@ -1271,7 +1049,7 @@ end call $start:retain-return ) - (func $~lib/rt/pure/decrement (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 9229c70045..7bf903065c 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,6 +1,7 @@ (module - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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))) @@ -18,28 +19,20 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -47,16 +40,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -65,9 +58,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -82,26 +86,30 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $rt/instanceof/Cat#constructor (; 2 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Animal#constructor (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if - i32.const 4 + i32.const 3 call $~lib/rt/stub/__alloc local.set $0 end local.get $0 + ) + (func $rt/instanceof/Cat#constructor (; 4 ;) (param $0 i32) (result i32) + local.get $0 i32.eqz - if (result i32) - i32.const 3 + if + i32.const 4 call $~lib/rt/stub/__alloc - else - local.get $0 + local.set $0 end + local.get $0 + call $rt/instanceof/Animal#constructor ) - (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -131,14 +139,14 @@ end i32.const 0 ) - (func $start:rt/instanceof (; 4 ;) + (func $start:rt/instanceof (; 6 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 global.set $~lib/rt/stub/offset - i32.const 3 - call $~lib/rt/stub/__alloc + i32.const 0 + call $rt/instanceof/Animal#constructor global.set $rt/instanceof/animal i32.const 0 call $rt/instanceof/Cat#constructor @@ -252,8 +260,8 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc + i32.const 0 + call $rt/instanceof/Animal#constructor global.set $rt/instanceof/nullableAnimal i32.const 0 call $rt/instanceof/Cat#constructor @@ -398,7 +406,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 7 ;) global.get $~started if return diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 0fff930a82..5a7324aad9 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -409,9 +409,51 @@ i32.store offset=12 local.get $0 ) - (func $start:rt/stub-realloc (; 9 ;) - (local $0 i32) + (func $~lib/rt/stub/__free (; 9 ;) (param $0 i32) (local $1 i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end + ) + (func $start:rt/stub-realloc (; 10 ;) i32.const 10 i32.const 0 call $~lib/rt/stub/__alloc @@ -530,47 +572,7 @@ unreachable end global.get $rt/stub-realloc/ptr - local.tee $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $1 - i32.load - i32.add - i32.eq - if - local.get $1 - global.set $~lib/rt/stub/offset - end + call $~lib/rt/stub/__free i32.const 1 i32.const 0 call $~lib/rt/stub/__alloc @@ -585,7 +587,7 @@ unreachable end ) - (func $~start (; 10 ;) + (func $~start (; 11 ;) global.get $~started if return diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 5a73786eb5..11cd08d75e 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -804,7 +804,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -880,10 +942,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -931,65 +992,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1037,7 +1042,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1045,9 +1050,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 204 i32.gt_u @@ -1055,46 +1097,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1105,10 +1112,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 11 ;) + (func $~lib/rt/pure/__collect (; 13 ;) nop ) - (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index eab4d7d804..4647e2d833 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -16,46 +16,20 @@ (export "__reset" (func $~lib/rt/stub/__reset)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -63,16 +37,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -81,13 +55,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -98,22 +101,22 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/rt/stub/__retain (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__retain (; 2 ;) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/rt/stub/__release (; 2 ;) (param $0 i32) + (func $~lib/rt/stub/__release (; 3 ;) (param $0 i32) nop ) - (func $~lib/rt/stub/__collect (; 3 ;) + (func $~lib/rt/stub/__collect (; 4 ;) nop ) - (func $~lib/rt/stub/__reset (; 4 ;) + (func $~lib/rt/stub/__reset (; 5 ;) global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) i32.const 48 global.set $~lib/rt/stub/startOffset i32.const 48 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index faf72b68db..d146434614 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -70,17 +70,21 @@ i32.add i32.load ) - (func $std/array-access/stringArrayPropertyAccess (; 3 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) local.get $0 - i32.const 0 - call $~lib/array/Array<~lib/array/Array>#__get i32.const 16 i32.sub i32.load offset=12 i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 4 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + call $~lib/string/String#get:length + ) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) i32.const 256 @@ -159,29 +163,21 @@ end i32.const 0 ) - (func $~lib/string/String#startsWith (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 252 - i32.load - i32.const 1 - i32.shr_u - local.tee $1 - local.set $2 - local.get $1 i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $1 i32.const 0 local.get $1 i32.lt_s select + local.tee $2 + i32.const 256 + call $~lib/string/String#get:length local.tee $3 i32.add local.get $1 @@ -191,30 +187,26 @@ return end local.get $0 - local.get $3 local.get $2 + local.get $3 call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 6 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 7 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get i32.const 1 call $~lib/array/Array<~lib/array/Array>#__get - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length ) - (func $std/array-access/stringArrayArrayMethodCall (; 8 ;) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index f56c3222a5..6d9d6e3e15 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (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 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -856,7 +856,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -932,10 +994,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -983,65 +1044,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1091,9 +1096,56 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 496 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 496 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 528 i32.gt_u @@ -1101,65 +1153,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 496 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 496 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/__allocArray (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 - call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 i32.shl local.tee $1 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -1174,7 +1183,18 @@ i32.store offset=12 local.get $2 ) - (func $start:std/array-literal (; 16 ;) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + local.get $0 + i32.const 528 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $start:std/array-literal (; 20 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1445,30 +1465,21 @@ local.tee $1 i32.load offset=4 local.tee $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store local.get $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 @@ -1493,30 +1504,21 @@ local.tee $1 i32.load offset=4 local.tee $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store local.get $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store offset=4 local.get $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store offset=8 local.get $1 @@ -1534,45 +1536,13 @@ unreachable end global.get $std/array-literal/dynamicArrayI8 - local.tee $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $std/array-literal/dynamicArrayI32 - local.tee $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $std/array-literal/dynamicArrayRef - local.tee $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $std/array-literal/dynamicArrayRefWithCtor - local.tee $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 1 i32.const 2 i32.const 6 @@ -1580,28 +1550,18 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - call $~lib/rt/tlsf/maybeInitialize i32.const 0 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store local.get $0 - i32.const 528 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 17 ;) + (func $~start (; 21 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1657,14 +1617,7 @@ local.tee $1 if local.get $1 - i32.const 528 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end end local.get $2 @@ -1712,7 +1665,19 @@ i32.store offset=4 end ) - (func $~lib/array/Array#__visit_impl (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 23 ;) (param $0 i32) + local.get $0 + i32.const 528 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) + (func $~lib/array/Array#__visit_impl (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1723,25 +1688,18 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $0 loop $while-continue|0 local.get $1 - local.get $2 + local.get $0 i32.lt_u if local.get $1 i32.load - local.tee $0 + local.tee $2 if - local.get $0 - i32.const 528 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__visit end local.get $1 i32.const 4 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index f6489609cc..4dfa69ba96 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1,23 +1,25 @@ (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_i32_=>_none (func (param i32 i32 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_i32_=>_none (func (param i32 i32))) + (type $i32_i32_i32_=>_none (func (param i32 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 $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $none_=>_i32 (func (result i32))) + (type $i64_=>_none (func (param i64))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) @@ -1040,7 +1042,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1116,10 +1180,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1147,65 +1210,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1255,7 +1262,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1480,9 +1495,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.const 8292 i32.gt_u @@ -1490,48 +1544,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + local.get $0 + i32.const 8292 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1547,15 +1575,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 i32.const 0 local.get $3 @@ -1563,12 +1588,9 @@ local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1582,7 +1604,8 @@ i32.const 0 i32.store offset=8 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load local.tee $4 @@ -1592,14 +1615,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1612,14 +1628,11 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 22 ;) (param $0 i32) (result i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $0 i32.const 2 @@ -1632,7 +1645,18 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/array/Ref#constructor (; 23 ;) (param $0 i32) (result i32) + (local $1 i32) + i32.const 4 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $1 + local.get $0 + i32.store + local.get $1 + ) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1805,28 +1829,22 @@ end end ) - (func $~lib/rt/__allocArray (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 i32.shl local.tee $4 local.set $6 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 local.get $3 if @@ -1849,7 +1867,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1916,7 +1934,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1935,7 +1953,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1980,7 +1998,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2055,7 +2073,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2076,7 +2094,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2124,7 +2142,16 @@ end i32.const 1 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 27 ;) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 32 ;) (param $0 i32) (result i32) + local.get $0 + i32.load + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 2 + i32.shr_s + ) + (func $~lib/rt/tlsf/checkUsedBlock (; 33 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2166,14 +2193,27 @@ end local.get $1 ) - (func $~lib/rt/tlsf/reallocateBlock (; 28 ;) (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 - call $~lib/rt/tlsf/prepareSize - local.tee $3 + (func $~lib/rt/tlsf/freeBlock (; 34 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 35 ;) (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 + call $~lib/rt/tlsf/prepareSize + local.tee $3 local.get $1 i32.load local.tee $5 @@ -2222,10 +2262,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -2263,21 +2303,13 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/array/ensureSize (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2337,7 +2369,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2360,7 +2392,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 31 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 38 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2390,7 +2422,45 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#concat (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#set:length (; 39 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $do-continue|0 + local.get $2 + i32.load + call $~lib/rt/pure/__release + local.get $2 + i32.const 4 + i32.add + local.tee $2 + local.get $1 + i32.lt_u + br_if $do-continue|0 + end + else + local.get $0 + i32.const 0 + call $~lib/array/ensureSize + end + local.get $0 + i32.const 0 + i32.store offset=12 + ) + (func $~lib/array/Array#concat (; 40 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2443,7 +2513,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2547,7 +2617,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 42 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2576,7 +2646,100 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#indexOf (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#shift (; 43 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 512 + i32.const 349 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $4 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#reverse (; 44 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $while-continue|0 + local.get $2 + local.get $1 + i32.lt_u + if + local.get $2 + i32.load + local.set $3 + local.get $2 + local.get $1 + i32.load + i32.store + local.get $1 + local.get $3 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.const 4 + i32.sub + local.set $1 + br $while-continue|0 + end + end + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#indexOf (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2636,69 +2799,279 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 36 ;) (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 + (func $~lib/array/Array#indexOf (; 46 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 i32.load offset=12 - local.tee $3 - local.get $1 - i32.const 0 - i32.lt_s + local.tee $2 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 + local.get $2 + i32.ge_s else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 local.get $1 - local.get $3 - local.get $1 - local.get $3 + local.get $2 i32.lt_s - select + if + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.const nan:0x400000 + f32.eq + if + local.get $1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end 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 + i32.const -1 + ) + (func $~lib/array/Array#indexOf (; 47 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 local.tee $2 - i32.const 2 - i32.const 3 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end local.get $0 i32.load offset=4 - local.tee $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $6 - local.get $2 - i32.const 2 - i32.shl - call $~lib/memory/memory.copy + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.const nan:0x8000000000000 + f64.eq + if + local.get $1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#includes (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#includes (; 49 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + local.get $0 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const 0 + return + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $3 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $3 + local.get $3 + f32.ne + end + if + i32.const 1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array#includes (; 50 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + local.get $0 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const 0 + return + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $3 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $3 + local.get $3 + f64.ne + end + if + i32.const 1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/array/Array#splice (; 51 ;) (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 2 + i32.const 3 + i32.const 0 + call $~lib/rt/__allocArray + 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.const 2 + i32.shl + i32.add + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $3 local.get $1 local.get $2 @@ -2726,7 +3099,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 37 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 52 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2817,7 +3190,17 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 38 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2831,25 +3214,13 @@ unreachable end local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/rt/pure/__retain + call $~lib/array/Array#__unchecked_get local.tee $0 i32.eqz if local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 3920 i32.const 512 i32.const 97 @@ -2859,7 +3230,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 39 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 55 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2937,7 +3308,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2951,15 +3322,10 @@ unreachable end local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/rt/pure/__retain + call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2996,15 +3362,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 43 ;) (param $0 i32) + (func $~setArgumentsLength (; 59 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 60 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3049,17 +3415,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3067,7 +3433,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3075,12 +3441,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 66 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3126,12 +3492,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3139,12 +3505,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3152,12 +3518,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 72 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3202,12 +3568,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3215,12 +3581,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3228,13 +3594,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 78 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3274,7 +3640,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3283,7 +3649,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3292,7 +3658,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3385,42 +3751,98 @@ end end ) - (func $start:std/array~anonymous|21 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#__get (; 67 ;) (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 448 - i32.const 512 - i32.const 93 - i32.const 41 - 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 $start:std/array~anonymous|22 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - i32.const 100 - call $~lib/array/Array#push - local.get $0 - global.get $std/array/i - i32.add - global.set $std/array/i - local.get $0 - ) - (func $~lib/array/Array#map (; 69 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 83 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 f32) + local.get $0 + i32.load offset=12 + local.tee $3 + i32.const 2 + i32.const 9 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.set $5 + loop $for-loop|0 + local.get $1 + local.get $3 + local.get $0 + i32.load offset=12 + local.tee $2 + local.get $3 + local.get $2 + i32.lt_s + select + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + i32.const 2 + i32.shl + local.tee $2 + local.get $0 + i32.load offset=4 + i32.add + i32.load + f32.convert_i32_s + local.set $6 + local.get $2 + local.get $5 + i32.add + local.get $6 + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $4 + ) + (func $~lib/array/Array#__get (; 84 ;) (param $0 i32) (param $1 i32) (result f32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 448 + i32.const 512 + i32.const 93 + i32.const 41 + 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 $start:std/array~anonymous|22 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 100 + call $~lib/array/Array#push + local.get $0 + global.get $std/array/i + i32.add + global.set $std/array/i + local.get $0 + ) + (func $~lib/array/Array#map (; 86 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3479,14 +3901,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3496,12 +3918,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 90 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3557,7 +3979,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3569,7 +3991,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -3578,7 +4000,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3590,12 +4012,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3638,7 +4060,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -3646,7 +4068,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -3654,7 +4076,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3662,7 +4084,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3670,7 +4092,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 100 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3706,7 +4128,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 84 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 101 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -3727,7 +4149,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 85 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 102 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3759,109 +4181,135 @@ i32.shr_u i32.xor ) - (func $~lib/util/sort/insertionSort (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/math/NativeMath.seedRandom (; 103 ;) (param $0 i64) + i32.const 1 + global.set $~lib/math/random_seeded + local.get $0 + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state0_64 + global.get $~lib/math/random_state0_64 + i64.const -1 + i64.xor + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state1_64 + local.get $0 + i32.wrap_i64 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state0_32 + global.get $~lib/math/random_state0_32 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state1_32 + global.get $~lib/math/random_state1_32 + i32.const 0 + i32.ne + i32.const 0 + global.get $~lib/math/random_state0_32 + i32.const 0 + global.get $~lib/math/random_state1_64 + i64.const 0 + i64.ne + i32.const 0 + global.get $~lib/math/random_state0_64 + i64.const 0 + i64.ne + select + select + select + i32.eqz + if + i32.const 0 + i32.const 4032 + i32.const 1406 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/util/sort/insertionSort (; 104 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 f32) - (local $6 f32) - (local $7 i32) + (local $6 i32) loop $for-loop|0 - local.get $4 + local.get $3 local.get $1 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $5 - local.get $4 + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $2 loop $while-continue|1 - local.get $3 + local.get $2 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $5 i32.const 2 global.set $~argumentsLength + local.get $4 local.get $5 - local.get $6 - local.get $2 - call_indirect (type $f32_f32_=>_i32) + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.ge_s br_if $while-break|1 - local.get $3 - local.tee $7 + local.get $2 + local.tee $6 i32.const 1 i32.sub - local.set $3 + local.set $2 local.get $0 - local.get $7 + local.get $6 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 f32.store br $while-continue|1 end end end local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $5 - f32.store local.get $4 + f32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end ) - (func $~lib/rt/tlsf/__free (; 87 ;) (param $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.tee $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree - ) - (func $~lib/util/sort/weakHeapSort (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 105 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 i32) - (local $7 f32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize + (local $4 f32) + (local $5 i32) + (local $6 f32) + (local $7 i32) local.get $1 i32.const 31 i32.add @@ -3869,39 +4317,37 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 + local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $6 + call $~lib/rt/tlsf/__alloc + local.tee $5 i32.const 0 - local.get $3 + local.get $2 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $2 loop $while-continue|1 - local.get $3 + local.get $2 i32.const 1 i32.and - local.get $6 - local.get $3 + local.get $5 + local.get $2 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 i32.const 1 i32.shr_s i32.const 31 @@ -3911,93 +4357,92 @@ i32.and i32.eq if - local.get $3 + local.get $2 i32.const 1 i32.shr_s - local.set $3 + local.set $2 br $while-continue|1 end end local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shr_s - local.tee $3 + local.tee $2 i32.const 2 i32.shl i32.add f32.load - local.set $5 + local.set $4 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $7 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f32_f32_=>_i32) + local.get $4 + local.get $6 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add - local.get $5 + local.get $4 f32.store local.get $0 - local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.get $7 + local.get $6 f32.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 f32.load - local.set $5 + local.set $4 local.get $0 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add @@ -4005,12 +4450,12 @@ f32.load f32.store local.get $1 - local.get $5 + local.get $4 f32.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $6 + local.get $5 local.get $1 i32.const 5 i32.shr_s @@ -4028,11 +4473,11 @@ i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.set $1 br $while-continue|3 end @@ -4044,32 +4489,31 @@ if local.get $0 f32.load - local.set $5 + local.set $4 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $7 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f32_f32_=>_i32) + local.get $4 + local.get $6 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $6 + local.get $5 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 i32.load i32.const 1 local.get $1 @@ -4083,10 +4527,10 @@ i32.const 2 i32.shl i32.add - local.get $5 + local.get $4 f32.store local.get $0 - local.get $7 + local.get $6 f32.store end local.get $1 @@ -4096,27 +4540,91 @@ br $while-continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|2 end end - local.get $6 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f32.load offset=4 - local.set $5 + local.set $4 local.get $0 local.get $0 f32.load f32.store offset=4 local.get $0 - local.get $5 + local.get $4 f32.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/array/Array#sort (; 106 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 f32) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f32.load offset=4 + local.set $3 + local.get $1 + f32.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $4 + f32.store offset=4 + local.get $1 + local.get $3 + f32.store + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4145,172 +4653,156 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 90 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 108 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 44 - local.set $3 + (local $3 f32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return end - block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $0 - i32.load offset=12 - local.tee $2 + local.get $0 + local.get $1 + i32.eq + if i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $0 - i32.load offset=4 - local.set $1 + return + end + loop $for-loop|0 local.get $2 - i32.const 2 - i32.eq + local.get $4 + i32.lt_s if - local.get $1 - f32.load offset=4 - local.set $4 - local.get $1 - f32.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $5 + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.tee $3 local.get $3 - call_indirect (type $f32_f32_=>_i32) - i32.const 0 - i32.lt_s - if + f32.ne + if (result i32) local.get $1 - local.get $5 - f32.store offset=4 + 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 $4 - f32.store + local.get $2 + call $~lib/array/Array#__get + f32.ne + if + i32.const 0 + return + end end - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $3 - call $~lib/util/sort/insertionSort - else - local.get $1 local.get $2 - local.get $3 - call $~lib/util/sort/weakHeapSort + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $0 - call $~lib/rt/pure/__retain end + i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 109 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) + (local $6 i32) loop $for-loop|0 - local.get $4 + local.get $3 local.get $1 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $5 - local.get $4 + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $2 loop $while-continue|1 - local.get $3 + local.get $2 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $5 i32.const 2 global.set $~argumentsLength + local.get $4 local.get $5 - local.get $6 - local.get $2 - call_indirect (type $f64_f64_=>_i32) + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.ge_s br_if $while-break|1 - local.get $3 - local.tee $7 + local.get $2 + local.tee $6 i32.const 1 i32.sub - local.set $3 + local.set $2 local.get $0 - local.get $7 + local.get $6 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $6 + local.get $5 f64.store br $while-continue|1 end end end local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $5 - f64.store local.get $4 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end ) - (func $~lib/util/sort/weakHeapSort (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 110 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) - (local $7 f64) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize + (local $4 f64) + (local $5 i32) + (local $6 f64) + (local $7 i32) local.get $1 i32.const 31 i32.add @@ -4318,39 +4810,37 @@ i32.shr_s i32.const 2 i32.shl - local.tee $3 + local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $6 + call $~lib/rt/tlsf/__alloc + local.tee $5 i32.const 0 - local.get $3 + local.get $2 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|0 - local.get $4 + local.get $3 i32.const 0 i32.gt_s if - local.get $4 - local.set $3 + local.get $3 + local.set $2 loop $while-continue|1 - local.get $3 + local.get $2 i32.const 1 i32.and - local.get $6 - local.get $3 + local.get $5 + local.get $2 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $3 + local.get $2 i32.const 1 i32.shr_s i32.const 31 @@ -4360,93 +4850,92 @@ i32.and i32.eq if - local.get $3 + local.get $2 i32.const 1 i32.shr_s - local.set $3 + local.set $2 br $while-continue|1 end end local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shr_s - local.tee $3 + local.tee $2 i32.const 3 i32.shl i32.add f64.load - local.set $5 + local.set $4 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $7 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f64_f64_=>_i32) + local.get $4 + local.get $6 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 i32.load i32.const 1 - local.get $4 + local.get $3 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add - local.get $5 + local.get $4 f64.store local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl i32.add - local.get $7 + local.get $6 f64.store end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $4 + local.set $3 loop $for-loop|2 - local.get $4 + local.get $3 i32.const 2 i32.ge_s if local.get $0 f64.load - local.set $5 + local.set $4 local.get $0 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add @@ -4454,12 +4943,12 @@ f64.load f64.store local.get $1 - local.get $5 + local.get $4 f64.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $6 + local.get $5 local.get $1 i32.const 5 i32.shr_s @@ -4477,11 +4966,11 @@ i32.const 1 i32.shl i32.add - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.set $1 br $while-continue|3 end @@ -4493,32 +4982,31 @@ if local.get $0 f64.load - local.set $5 + local.set $4 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $7 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $5 - local.get $7 - local.get $2 - call_indirect (type $f64_f64_=>_i32) + local.get $4 + local.get $6 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $6 + local.get $5 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 i32.load i32.const 1 local.get $1 @@ -4532,10 +5020,10 @@ i32.const 3 i32.shl i32.add - local.get $5 + local.get $4 f64.store local.get $0 - local.get $7 + local.get $6 f64.store end local.get $1 @@ -4545,27 +5033,91 @@ br $while-continue|4 end end - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $for-loop|2 end end - local.get $6 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f64.load offset=8 - local.set $5 + local.set $4 local.get $0 local.get $0 f64.load f64.store offset=8 local.get $0 - local.get $5 + local.get $4 f64.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 93 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/array/Array#sort (; 111 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f64.load offset=8 + local.set $3 + local.get $1 + f64.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $4 + f64.store offset=8 + local.get $1 + local.get $3 + f64.store + end + local.get $0 + call $~lib/rt/pure/__retain + return + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4594,86 +5146,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 94 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 f64) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 45 - local.set $3 - end - block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $0 - i32.load offset=4 - local.set $1 - local.get $2 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.set $4 - local.get $1 - f64.load - local.set $5 - i32.const 2 - global.set $~argumentsLength - local.get $4 - local.get $5 - local.get $3 - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $5 - f64.store offset=8 - local.get $1 - local.get $4 - f64.store - end - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $3 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $2 - local.get $3 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - end - ) - (func $~lib/array/Array#__get (; 95 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 113 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -4694,20 +5167,85 @@ i32.add f64.load ) - (func $~lib/util/sort/insertionSort (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $std/array/isArraysEqual (; 114 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end loop $for-loop|0 + local.get $2 local.get $4 - local.get $1 i32.lt_s if local.get $0 - local.get $4 - i32.const 2 + 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 + if + i32.const 0 + return + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + ) + (func $~lib/util/sort/insertionSort (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + 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 @@ -4773,14 +5311,13 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 116 ;) (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 $8 i32) - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -4790,9 +5327,7 @@ i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $5 i32.const 0 local.get $3 @@ -5022,8 +5557,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 i32.load offset=4 local.set $1 @@ -5035,7 +5572,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 98 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 117 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5099,12 +5636,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 100 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5113,7 +5650,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 101 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 120 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5141,7 +5678,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 102 ;) (result f64) + (func $~lib/math/NativeMath.random (; 121 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5185,7 +5722,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 103 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 122 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5213,52 +5750,53 @@ end local.get $2 ) - (func $std/array/assertSorted (; 104 ;) (param $0 i32) (param $1 i32) + (func $std/array/isSorted (; 123 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - block $__inlined_func$std/array/isSorted (result i32) - i32.const 1 - local.set $2 - local.get $0 - local.get $1 - call $~lib/array/Array#sort - local.tee $0 - local.set $3 - local.get $0 - i32.load offset=12 - local.set $4 - loop $for-loop|0 + i32.const 1 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + i32.const 2 + global.set $~argumentsLength + local.get $0 local.get $2 - local.get $4 - i32.lt_s + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s if - i32.const 2 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.get $3 - local.get $2 - call $~lib/array/Array#__get - local.get $1 - call_indirect (type $i32_i32_=>_i32) i32.const 0 - i32.gt_s - br_if $__inlined_func$std/array/isSorted - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + return end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const 1 end + i32.const 1 + ) + (func $std/array/assertSorted (; 124 ;) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + call $~lib/array/Array#sort + local.tee $0 + local.get $1 + call $std/array/isSorted i32.eqz if i32.const 0 @@ -5269,21 +5807,14 @@ unreachable end local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|44 (; 105 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 125 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 106 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5318,27 +5849,65 @@ i32.const 2 i32.shl i32.add - local.tee $1 - i32.load local.tee $0 + i32.load + local.tee $1 i32.ne if - local.get $1 + local.get $0 local.get $2 call $~lib/rt/pure/__retain i32.store + local.get $1 + call $~lib/rt/pure/__release + end + ) + (func $std/array/createReverseOrderedNestedArray (; 127 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 2 + i32.store offset=12 + loop $for-loop|0 local.get $0 - i32.const 8292 - i32.gt_u + i32.const 2 + i32.lt_s if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 local.get $0 - i32.const 16 i32.sub - call $~lib/rt/pure/decrement + call $~lib/array/Array#__set + local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end end + local.get $1 ) - (func $start:std/array~anonymous|47 (; 107 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 128 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5347,7 +5916,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 108 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 129 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5401,7 +5970,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 109 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 130 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5434,44 +6003,16 @@ i32.gt_s if local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 return end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 i32.const 1 i32.add @@ -5481,7 +6022,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 110 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 131 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5498,23 +6039,62 @@ unreachable end local.get $0 - i32.const 8292 - i32.gt_u - if + call $~lib/rt/pure/__release + ) + (func $std/array/createReverseOrderedElementsArray (; 132 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 512 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 512 + i32.store offset=12 + loop $for-loop|0 local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 511 + local.get $0 + i32.sub + i32.store + local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end + local.get $1 ) - (func $start:std/array~anonymous|48 (; 111 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 133 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 112 ;) (param $0 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 134 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5546,44 +6126,16 @@ i32.gt_s if local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 return end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.const 1 i32.add @@ -5593,7 +6145,15 @@ end i32.const 1 ) - (func $~lib/util/string/compareImpl (; 113 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 135 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5669,7 +6229,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 137 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5687,34 +6247,27 @@ i32.const 0 return end + local.get $0 + call $~lib/string/String#get:length + local.set $2 i32.const 0 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 - i32.eqz - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 + i32.eqz + local.get $2 select if i32.const 0 return end - local.get $3 + local.get $2 i32.eqz if i32.const -1 return end - local.get $2 + local.get $3 i32.eqz if i32.const 1 @@ -5722,15 +6275,15 @@ end local.get $0 local.get $1 - local.get $3 local.get $2 local.get $3 local.get $2 + local.get $3 i32.lt_s select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 115 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 138 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5749,18 +6302,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -5772,7 +6317,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 116 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 139 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5811,44 +6356,16 @@ i32.eqz if local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 return end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 i32.const 1 i32.add @@ -5858,7 +6375,7 @@ end i32.const 1 ) - (func $~lib/string/String#concat (; 117 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 140 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5874,60 +6391,34 @@ i32.ne if local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 5232 local.set $1 end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $4 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 i32.add local.tee $2 i32.eqz if - i32.const 5120 - local.set $0 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 5120 + local.tee $0 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -5940,59 +6431,52 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 ) - (func $std/array/createRandomString (; 118 ;) (param $0 i32) (result i32) + (func $~lib/string/String.__concat (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 5232 + local.get $0 + select + local.get $1 + call $~lib/string/String#concat + ) + (func $std/array/createRandomString (; 142 ;) (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 5120 local.set $1 loop $for-loop|0 - local.get $4 + local.get $3 local.get $0 i32.lt_s if local.get $1 - local.tee $3 - i32.const 5232 - local.get $1 - select + local.tee $4 + local.tee $5 block $__inlined_func$~lib/string/String#charAt (result i32) i32.const 5120 call $~lib/math/NativeMath.random - i32.const 4076 - i32.load - i32.const 1 - i32.shr_u + i32.const 4080 + call $~lib/string/String#get:length f64.convert_i32_s f64.mul f64.floor i32.trunc_f64_s local.tee $1 - i32.const 4076 - i32.load - i32.const 1 - i32.shr_u + i32.const 4080 + call $~lib/string/String#get:length i32.ge_u br_if $__inlined_func$~lib/string/String#charAt drop - call $~lib/rt/tlsf/maybeInitialize i32.const 2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $1 i32.const 1 @@ -6005,63 +6489,80 @@ call $~lib/rt/pure/__retain end local.tee $2 - call $~lib/string/String#concat - local.tee $5 + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.get $3 + local.get $5 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__release end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end local.get $1 ) - (func $~lib/string/String#substring (; 119 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/createRandomStringArray (; 143 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 400 + i32.store offset=12 + loop $for-loop|0 + local.get $1 + i32.const 400 + i32.lt_s + if + local.get $0 + local.get $1 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + ) + (func $~lib/string/String#substring (; 144 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -6117,12 +6618,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -6132,7 +6630,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 120 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6143,14 +6641,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $3 + local.get $2 i32.eqz if i32.const 5296 @@ -6161,11 +6659,9 @@ call $~lib/rt/pure/__retain return end - local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + local.get $2 + i32.const 5360 + call $~lib/string/String#get:length local.tee $4 i32.const 5 i32.add @@ -6175,20 +6671,15 @@ local.tee $7 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 + local.set $3 i32.const 0 local.set $1 loop $for-loop|1 local.get $5 - local.get $3 + local.get $2 i32.lt_s if local.get $0 @@ -6200,7 +6691,7 @@ i32.const 4 i32.add local.set $6 - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl @@ -6219,7 +6710,7 @@ local.set $1 local.get $4 if - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl @@ -6242,22 +6733,22 @@ end end local.get $0 - local.get $3 + local.get $2 i32.add i32.load8_u - local.tee $3 + local.tee $2 i32.eqz i32.const 4 i32.add local.set $0 - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl i32.add i32.const 5296 i32.const 5328 - local.get $3 + local.get $2 select local.get $0 i32.const 1 @@ -6270,23 +6761,16 @@ local.tee $0 i32.gt_s if - local.get $2 + local.get $3 local.get $0 call $~lib/string/String#substring - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release return end - local.get $2 + local.get $3 ) - (func $~lib/util/number/decimalCount32 (; 121 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 146 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6334,7 +6818,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6358,7 +6842,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 123 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 148 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6371,7 +6855,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 @@ -6380,32 +6864,27 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $3 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $2 + local.get $1 if - local.get $1 + local.get $2 i32.const 45 i32.store16 end - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6447,7 +6926,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6473,11 +6952,7 @@ end local.get $4 local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $5 i32.const 11 i32.add @@ -6487,13 +6962,8 @@ local.tee $7 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $3 i32.const 0 @@ -6558,19 +7028,20 @@ local.get $0 call $~lib/string/String#substring local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $3 ) - (func $~lib/util/number/utoa32 (; 126 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + local.get $1 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/utoa32 (; 152 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6581,24 +7052,19 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple local.get $1 + call $~lib/util/number/utoa_simple + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6622,7 +7088,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6648,11 +7114,7 @@ end local.get $4 local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $5 i32.const 10 i32.add @@ -6662,13 +7124,8 @@ local.tee $7 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $3 i32.const 0 @@ -6733,19 +7190,20 @@ local.get $0 call $~lib/string/String#substring local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $3 ) - (func $~lib/util/number/genDigits (; 129 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#join (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + local.get $1 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/genDigits (; 156 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7135,7 +7593,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7380,7 +7838,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 131 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 158 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7689,7 +8147,61 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa (; 159 ;) (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + f64.const 0 + f64.eq + if + i32.const 5824 + return + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if + local.get $0 + local.get $0 + f64.ne + if + i32.const 5856 + return + end + i32.const 5888 + i32.const 5936 + local.get $0 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + return + end + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/util/number/dtoa_core + local.tee $2 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + return + end + local.get $1 + local.get $2 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/util/number/dtoa_stream (; 160 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -7760,123 +8272,57 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 133 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $4 + local.get $3 i32.eqz if - block $__inlined_func$~lib/util/number/dtoa - local.get $0 - f64.load - local.tee $3 - f64.const 0 - f64.eq - if - i32.const 5824 - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $3 - local.get $3 - f64.sub - f64.const 0 - f64.ne - if - local.get $3 - local.get $3 - f64.ne - if - i32.const 5856 - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - i32.const 5888 - i32.const 5936 - local.get $3 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $3 - call $~lib/util/number/dtoa_core - local.tee $0 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - local.get $1 - call $~lib/rt/tlsf/__free - end local.get $0 + f64.load + call $~lib/util/number/dtoa return end - local.get $4 - i32.const 5788 - i32.load - i32.const 1 - i32.shr_u - local.tee $5 + local.get $3 + i32.const 5792 + call $~lib/string/String#get:length + local.tee $4 i32.const 28 i32.add i32.mul i32.const 28 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add @@ -7885,7 +8331,7 @@ local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -7893,27 +8339,27 @@ i32.shl i32.add i32.const 5792 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add @@ -7928,19 +8374,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 134 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7948,6 +8387,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) + local.get $2 + local.set $5 local.get $1 i32.const 1 i32.sub @@ -7958,8 +8399,6 @@ i32.const 5120 return end - local.get $2 - local.set $7 i32.const 0 local.set $2 local.get $6 @@ -7981,25 +8420,14 @@ i32.const 5120 end local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - local.get $7 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.set $9 + local.get $5 + call $~lib/string/String#get:length + local.set $8 loop $for-loop|0 local.get $4 local.get $6 @@ -8020,29 +8448,18 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if local.get $2 call $~lib/rt/pure/__retain local.tee $3 - local.set $8 local.get $1 local.get $1 - i32.const 5232 - local.get $1 - select local.get $3 - call $~lib/string/String#concat - local.tee $5 + call $~lib/string/String.__concat + local.tee $9 local.tee $3 i32.ne if @@ -8050,48 +8467,22 @@ call $~lib/rt/pure/__retain local.set $3 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $8 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release local.get $3 local.set $1 end - local.get $9 + local.get $8 if local.get $1 local.tee $3 - i32.const 5232 - local.get $1 - select - local.get $7 - call $~lib/string/String#concat + local.get $5 + call $~lib/string/String.__concat + local.tee $7 local.tee $1 - local.set $5 - local.get $1 local.get $3 i32.ne if @@ -8099,24 +8490,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $7 + call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -8139,79 +8516,46 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 if local.get $3 call $~lib/rt/pure/__retain - local.tee $2 - local.set $0 + local.tee $0 local.get $1 - i32.const 5232 local.get $1 - select - local.get $2 - call $~lib/string/String#concat + local.get $0 + call $~lib/string/String.__concat + local.tee $0 local.tee $2 - local.set $4 - local.get $1 - local.get $2 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 local.set $1 end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + ) + (func $~lib/array/Array<~lib/string/String | null>#join (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 local.get $1 + call $~lib/util/string/joinReferenceArray<~lib/string/String | null> ) - (func $~lib/util/string/joinReferenceArray (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 164 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8221,14 +8565,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -8240,32 +8584,21 @@ local.set $4 end local.get $4 - if (result i32) - i32.const 7104 - else - i32.const 5120 - end + call $~lib/rt/pure/__release + i32.const 7104 + i32.const 5120 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + select return end i32.const 5120 local.set $1 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + i32.const 5360 + call $~lib/string/String#get:length local.set $7 loop $for-loop|0 local.get $4 - local.get $6 + local.get $5 i32.lt_s if local.get $3 @@ -8283,25 +8616,15 @@ call $~lib/rt/pure/__retain local.set $3 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 if local.get $1 local.get $1 - i32.const 5232 - local.get $1 - select i32.const 7104 - call $~lib/string/String#concat - local.tee $5 + call $~lib/string/String.__concat + local.tee $6 local.tee $2 i32.ne if @@ -8309,24 +8632,10 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release local.get $2 local.set $1 end @@ -8334,14 +8643,10 @@ if local.get $1 local.tee $2 - i32.const 5232 - local.get $1 - select i32.const 5360 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.set $5 - local.get $1 local.get $2 i32.ne if @@ -8349,24 +8654,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release end local.get $4 i32.const 1 @@ -8376,7 +8667,7 @@ end end local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -8389,66 +8680,34 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if local.get $1 - i32.const 5232 local.get $1 - select i32.const 7104 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $0 local.tee $3 - local.set $0 - local.get $1 - local.get $3 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 local.set $1 end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 165 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8503,7 +8762,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 137 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 166 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8528,10 +8787,8 @@ return end local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + i32.const 5360 + call $~lib/string/String#get:length local.tee $4 i32.const 11 i32.add @@ -8541,13 +8798,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -8608,19 +8860,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8650,7 +8895,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8675,10 +8920,8 @@ return end local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + i32.const 5360 + call $~lib/string/String#get:length local.tee $4 i32.const 10 i32.add @@ -8688,13 +8931,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -8759,19 +8997,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 140 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 169 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -8824,7 +9055,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 141 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 170 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -8851,7 +9082,50 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/utoa64 (; 171 ;) (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i64.eqz + if + i32.const 5472 + return + end + local.get $0 + i64.const 4294967295 + i64.le_u + if + local.get $0 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8891,13 +9165,12 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 173 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -8911,102 +9184,47 @@ local.get $3 i32.eqz if - block $__inlined_func$~lib/util/number/utoa64 (result i32) - i32.const 5472 + local.get $0 + i64.load + call $~lib/util/number/utoa64 + return + end + local.get $3 + i32.const 5360 + call $~lib/string/String#get:length + local.tee $4 + i32.const 20 + i32.add + i32.mul + i32.const 20 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 local.get $0 - i64.load - local.tee $4 - i64.eqz - br_if $__inlined_func$~lib/util/number/utoa64 - drop - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end - return - end - local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u - local.tee $5 - i32.const 20 - i32.add - i32.mul - i32.const 20 - i32.add - local.tee $7 - i32.const 1 - i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $6 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add + local.get $5 + i32.const 3 + i32.shl + i32.add i64.load call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -9014,23 +9232,23 @@ i32.shl i32.add i32.const 5360 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 @@ -9049,19 +9267,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/number/itoa64 (; 144 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 174 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9075,7 +9286,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $2 + local.tee $1 if i64.const 0 local.get $0 @@ -9088,54 +9299,44 @@ if local.get $0 i32.wrap_i64 - local.tee $3 + local.tee $2 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $4 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $3 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $2 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $2 + local.get $1 i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $3 local.get $0 - local.get $3 + local.get $2 call $~lib/util/number/utoa_simple end - local.get $2 + local.get $1 if - local.get $1 + local.get $3 i32.const 45 i32.store16 end - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9196,7 +9397,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 176 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9221,10 +9422,8 @@ return end local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + i32.const 5360 + call $~lib/string/String#get:length local.tee $4 i32.const 21 i32.add @@ -9234,13 +9433,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -9305,19 +9499,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 147 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 177 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9328,14 +9515,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -9349,35 +9536,23 @@ local.get $3 if (result i32) local.get $3 - i32.load offset=4 - local.get $3 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#join else i32.const 5120 end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u - local.set $8 + i32.const 5360 + call $~lib/string/String#get:length + local.set $7 loop $for-loop|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $4 @@ -9395,31 +9570,19 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $4 if - local.get $1 - local.get $1 - i32.const 5232 - local.get $1 - select local.get $4 - i32.load offset=4 - local.get $4 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $5 - call $~lib/string/String#concat - local.tee $7 + call $~lib/array/Array#join + local.tee $2 + local.get $1 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.tee $8 local.tee $2 i32.ne if @@ -9427,48 +9590,22 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $8 + local.get $7 if local.get $1 local.tee $2 - i32.const 5232 - local.get $1 - select i32.const 5360 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.set $5 - local.get $1 local.get $2 i32.ne if @@ -9476,24 +9613,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -9503,7 +9626,7 @@ end end local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -9516,81 +9639,39 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if - local.get $1 - i32.const 5232 - local.get $1 - select - local.get $2 - i32.load offset=4 local.get $2 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#join local.tee $0 - call $~lib/string/String#concat - local.tee $4 - local.set $3 local.get $1 - local.get $4 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.tee $0 + local.tee $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 local.set $1 end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9620,7 +9701,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 149 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 179 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9645,10 +9726,8 @@ return end local.get $3 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u + i32.const 5360 + call $~lib/string/String#get:length local.tee $4 i32.const 10 i32.add @@ -9658,13 +9737,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -9725,19 +9799,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 180 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9748,14 +9815,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -9777,26 +9844,17 @@ i32.const 5120 end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u - local.set $8 + i32.const 5360 + call $~lib/string/String#get:length + local.set $7 loop $for-loop|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $4 @@ -9814,30 +9872,21 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $4 if - local.get $1 - local.get $1 - i32.const 5232 - local.get $1 - select local.get $4 i32.load offset=4 local.get $4 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $5 - call $~lib/string/String#concat - local.tee $7 + local.tee $2 + local.get $1 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.tee $8 local.tee $2 i32.ne if @@ -9845,48 +9894,22 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $8 + local.get $7 if local.get $1 local.tee $2 - i32.const 5232 - local.get $1 - select i32.const 5360 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.set $5 - local.get $1 local.get $2 i32.ne if @@ -9894,24 +9917,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -9921,7 +9930,7 @@ end end local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -9934,80 +9943,41 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if - local.get $1 - i32.const 5232 - local.get $1 - select local.get $2 i32.load offset=4 local.get $2 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - call $~lib/string/String#concat - local.tee $4 - local.set $3 local.get $1 - local.get $4 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.tee $0 + local.tee $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 local.set $1 end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 181 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10018,14 +9988,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -10039,35 +10009,23 @@ local.get $3 if (result i32) local.get $3 - i32.load offset=4 - local.get $3 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#join else i32.const 5120 end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u - local.set $8 + i32.const 5360 + call $~lib/string/String#get:length + local.set $7 loop $for-loop|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $4 @@ -10085,31 +10043,19 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $4 if - local.get $1 - local.get $1 - i32.const 5232 - local.get $1 - select - local.get $4 - i32.load offset=4 local.get $4 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $5 - call $~lib/string/String#concat - local.tee $7 + call $~lib/array/Array#join + local.tee $2 + local.get $1 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.tee $8 local.tee $2 i32.ne if @@ -10117,48 +10063,22 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $8 + local.get $7 if local.get $1 local.tee $2 - i32.const 5232 - local.get $1 - select i32.const 5360 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.set $5 - local.get $1 local.get $2 i32.ne if @@ -10166,24 +10086,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -10193,7 +10099,7 @@ end end local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -10206,81 +10112,39 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if - local.get $1 - i32.const 5232 - local.get $1 - select local.get $2 - i32.load offset=4 - local.get $2 - i32.load offset=12 i32.const 5360 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#join local.tee $0 - call $~lib/string/String#concat - local.tee $4 - local.set $3 local.get $1 - local.get $4 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.tee $0 + local.tee $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 local.set $1 end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 152 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 182 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10291,14 +10155,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -10320,26 +10184,17 @@ i32.const 5120 end local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - i32.const 5356 - i32.load - i32.const 1 - i32.shr_u - local.set $8 + i32.const 5360 + call $~lib/string/String#get:length + local.set $7 loop $for-loop|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $4 @@ -10357,30 +10212,21 @@ call $~lib/rt/pure/__retain local.set $4 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $4 if - local.get $1 - local.get $1 - i32.const 5232 - local.get $1 - select local.get $4 i32.load offset=4 local.get $4 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $5 - call $~lib/string/String#concat - local.tee $7 + local.tee $2 + local.get $1 + local.get $1 + local.get $2 + call $~lib/string/String.__concat + local.tee $8 local.tee $2 i32.ne if @@ -10388,48 +10234,22 @@ call $~lib/rt/pure/__retain local.set $2 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release local.get $2 local.set $1 end - local.get $8 + local.get $7 if local.get $1 local.tee $2 - i32.const 5232 - local.get $1 - select i32.const 5360 - call $~lib/string/String#concat + call $~lib/string/String.__concat + local.tee $6 local.tee $1 - local.set $5 - local.get $1 local.get $2 i32.ne if @@ -10437,24 +10257,10 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + call $~lib/rt/pure/__release end + local.get $6 + call $~lib/rt/pure/__release end local.get $3 i32.const 1 @@ -10464,7 +10270,7 @@ end end local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -10477,80 +10283,41 @@ call $~lib/rt/pure/__retain local.set $2 local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 if - local.get $1 - i32.const 5232 - local.get $1 - select local.get $2 i32.load offset=4 local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - call $~lib/string/String#concat - local.tee $4 - local.set $3 local.get $1 - local.get $4 + local.get $1 + local.get $0 + call $~lib/string/String.__concat + local.tee $0 + local.tee $4 i32.ne if local.get $4 call $~lib/rt/pure/__retain local.set $4 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 local.set $1 end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 ) - (func $start:std/array (; 153 ;) + (func $start:std/array (; 183 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10575,10 +10342,10 @@ (local $21 i32) (local $22 i32) (local $23 i32) - (local $24 f32) + (local $24 i32) (local $25 i32) (local $26 i32) - (local $27 f64) + (local $27 i32) (local $28 i32) (local $29 i32) (local $30 i32) @@ -10607,33 +10374,19 @@ (local $53 i32) (local $54 i32) (local $55 i32) - (local $56 i32) - (local $57 i64) - (local $58 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 i32.const 0 - i32.store - call $~lib/rt/tlsf/maybeInitialize + call $std/array/Ref#constructor i32.const 12 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $1 + local.set $0 global.get $std/array/arr i32.eqz if @@ -10644,52 +10397,29 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 5 i32.const 0 i32.const 6 i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill - local.tee $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -10700,28 +10430,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -10732,28 +10454,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill - local.tee $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -10764,28 +10478,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -10796,28 +10502,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill - local.tee $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -10828,88 +10526,38 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 7 i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill - local.tee $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10921,28 +10569,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10954,28 +10594,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill - local.tee $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10987,28 +10619,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill - local.tee $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11020,28 +10644,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill - local.tee $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11053,60 +10669,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 if @@ -11118,12 +10692,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity if i32.const 0 i32.const 304 @@ -11161,12 +10730,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 1 i32.ne if @@ -11200,12 +10764,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 1 i32.ne if @@ -11232,12 +10791,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 1 i32.ne if @@ -11277,12 +10831,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 2 i32.ne if @@ -11335,12 +10884,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 3 i32.ne if @@ -11398,75 +10942,16 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=4 - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 + call $std/array/Ref#constructor i32.store local.get $0 - local.get $3 - i32.store - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $3 i32.const 0 - i32.store - local.get $0 - local.get $3 + call $std/array/Ref#constructor i32.store offset=4 local.get $1 - i32.load offset=12 - local.tee $3 - i32.const 0 - i32.gt_s - if - local.get $1 - i32.load offset=4 - local.tee $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.set $3 - loop $do-continue|0 - local.get $0 - i32.load - local.tee $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 4 - i32.add - local.tee $0 - local.get $3 - i32.lt_u - br_if $do-continue|0 - end - else - local.get $1 - i32.const 0 - call $~lib/array/ensureSize - end - local.get $1 - i32.const 0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 i32.load offset=12 if @@ -11478,28 +10963,16 @@ unreachable end local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $1 + local.set $4 global.get $std/array/arr - local.get $1 + local.get $4 call $~lib/array/Array#concat - local.set $3 + local.set $1 global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 3 i32.ne if @@ -11522,7 +10995,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -11534,31 +11007,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 1024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $~lib/array/Array#concat local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/array/Array#concat + call $~lib/rt/pure/__release global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 3 i32.ne if @@ -11569,7 +11029,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -11582,7 +11042,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -11595,7 +11055,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -11608,32 +11068,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 i32.const 46 call $~lib/array/Array#push - local.get $1 + local.get $4 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $1 + local.get $4 call $~lib/array/Array#concat - local.set $0 - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.set $3 + local.get $1 + call $~lib/rt/pure/__release global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 3 i32.ne if @@ -11644,7 +11092,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 i32.load offset=12 i32.const 2 i32.ne @@ -11656,7 +11104,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.load offset=12 i32.const 5 i32.ne @@ -11668,7 +11116,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -11681,7 +11129,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -11694,7 +11142,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -11707,7 +11155,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -11720,7 +11168,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -11733,10 +11181,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/array/Array#pop drop - local.get $0 + local.get $3 i32.load offset=12 i32.const 4 i32.ne @@ -11754,7 +11202,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.load offset=12 if i32.const 0 @@ -11764,20 +11212,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 global.get $std/array/arr call $~lib/array/Array#concat - local.set $2 - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -11789,7 +11230,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.load offset=12 if i32.const 0 @@ -11799,42 +11240,14 @@ call $~lib/builtins/abort unreachable end + local.get $4 + call $~lib/rt/pure/__release local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 3 @@ -11846,14 +11259,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $20 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11873,27 +11286,20 @@ call $~lib/rt/pure/__retain local.set $1 local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $22 i32.const 5 i32.const 2 i32.const 3 i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11913,27 +11319,20 @@ call $~lib/rt/pure/__retain local.set $0 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $6 + local.tee $24 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11952,27 +11351,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $7 + local.tee $16 i32.const 5 i32.const 2 i32.const 3 i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11991,27 +11383,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $9 + local.tee $6 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12030,27 +11415,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $9 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12069,27 +11447,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $11 i32.const 5 i32.const 2 i32.const 3 i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12108,27 +11479,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12147,27 +11511,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12186,14 +11543,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const -4 i32.const -3 @@ -12206,7 +11556,7 @@ i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12225,27 +11575,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $0 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $21 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12263,29 +11606,21 @@ i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 + call $~lib/rt/pure/__release + local.tee $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12297,231 +11632,56 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 8292 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $11 - i32.const 8292 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $0 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $23 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $8 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $9 - i32.const 8292 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release local.get $13 - i32.const 8292 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $14 - i32.const 8292 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $15 - i32.const 8292 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $16 - i32.const 8292 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $17 - i32.const 8292 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $18 - i32.const 8292 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $26 - i32.const 8292 - i32.gt_u - if - local.get $26 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 8292 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $12 - i32.const 8292 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $19 - i32.const 8292 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $20 - i32.const 8292 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $21 - i32.const 8292 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $22 - i32.const 8292 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $23 - i32.const 8292 - i32.gt_u - if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + 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 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift @@ -12538,12 +11698,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 4 i32.ne if @@ -12622,12 +11777,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 5 i32.ne if @@ -12704,57 +11854,21 @@ unreachable end global.get $std/array/arr - local.tee $1 - i32.load offset=12 - local.tee $3 - i32.const 1 - i32.lt_s + call $~lib/array/Array#shift + global.set $std/array/i + global.get $std/array/i + i32.const 41 + i32.ne if - i32.const 976 - i32.const 512 - i32.const 349 - i32.const 20 + i32.const 0 + i32.const 304 + i32.const 240 + i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.tee $0 - i32.load - local.get $0 - local.get $0 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.tee $3 - i32.const 2 - i32.shl - local.tee $5 - call $~lib/memory/memory.copy - local.get $0 - local.get $5 - i32.add - i32.const 0 - i32.store - local.get $1 - local.get $3 - i32.store offset=12 - global.set $std/array/i - global.get $std/array/i - i32.const 41 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 240 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.load offset=12 + global.get $std/array/arr + i32.load offset=12 i32.const 4 i32.ne if @@ -12766,12 +11880,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 5 i32.ne if @@ -12861,12 +11970,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 5 i32.ne if @@ -12917,62 +12021,8 @@ unreachable end global.get $std/array/arr - local.tee $3 - i32.load offset=12 - local.tee $0 - if - local.get $3 - i32.load offset=4 - local.set $1 - local.get $3 - i32.load offset=4 - local.get $0 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - i32.add - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $0 - i32.lt_u - if - local.get $1 - i32.load - local.set $2 - local.get $1 - local.get $0 - i32.load - i32.store - local.get $0 - local.get $2 - i32.store - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.sub - local.set $0 - br $while-continue|0 - end - end - end - local.get $3 - call $~lib/rt/pure/__retain - local.tee $0 - local.set $1 - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/array/Array#reverse + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 i32.const 3 @@ -12986,12 +12036,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 5 i32.ne if @@ -13211,54 +12256,8 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $5 - i32.const 0 - local.set $1 - block $__inlined_func$~lib/array/Array#indexOf - local.get $0 - i32.load offset=12 - local.tee $3 - if (result i32) - i32.const 0 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $1 - br $__inlined_func$~lib/array/Array#indexOf - end - local.get $5 - i32.load offset=4 - local.set $2 - loop $while-continue|090 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.const nan:0x400000 - f32.eq - br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|090 - end - end - i32.const -1 - local.set $1 - end - local.get $1 + local.tee $1 + call $~lib/array/Array#indexOf i32.const -1 i32.ne if @@ -13275,54 +12274,8 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - local.set $4 - i32.const 0 - local.set $1 - block $__inlined_func$~lib/array/Array#indexOf - local.get $3 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $1 - br $__inlined_func$~lib/array/Array#indexOf - end - local.get $4 - i32.load offset=4 - local.set $5 - loop $while-continue|091 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.const nan:0x8000000000000 - f64.eq - br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|091 - end - end - i32.const -1 - local.set $1 - end - local.get $1 + local.tee $0 + call $~lib/array/Array#indexOf i32.const -1 i32.ne if @@ -13333,30 +12286,14 @@ call $~lib/builtins/abort unreachable end + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13370,9 +12307,7 @@ global.get $std/array/arr i32.const 42 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13386,9 +12321,7 @@ global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes if i32.const 0 i32.const 304 @@ -13400,9 +12333,7 @@ global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes if i32.const 0 i32.const 304 @@ -13414,9 +12345,7 @@ global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13430,9 +12359,7 @@ global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13446,9 +12373,7 @@ global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13462,9 +12387,7 @@ global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13478,9 +12401,7 @@ global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13494,9 +12415,7 @@ global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s + call $~lib/array/Array#includes i32.const 1 i32.ne if @@ -13507,131 +12426,31 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#includes (result i32) - i32.const 0 - local.set $0 + i32.const 1 + i32.const 2 + i32.const 9 + i32.const 2272 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $~lib/array/Array#includes + i32.eqz + if i32.const 0 - i32.const 1 - i32.const 2 - i32.const 9 - i32.const 2272 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/array/Array#includes - drop - local.get $1 - i32.load offset=4 - local.set $4 - loop $while-continue|0103 - local.get $0 - local.get $2 - i32.lt_s - if - i32.const 1 - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $24 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $24 - local.get $24 - f32.ne - end - br_if $__inlined_func$~lib/array/Array#includes - drop - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|0103 - end - end - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 343 + i32.const 304 + i32.const 343 i32.const 2 call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/array/Array#includes (result i32) - i32.const 0 - local.set $0 - i32.const 0 - i32.const 1 - i32.const 3 - i32.const 10 - i32.const 2304 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=12 - local.tee $5 - if (result i32) - i32.const 0 - local.get $5 - i32.ge_s - else - i32.const 1 - end - br_if $__inlined_func$~lib/array/Array#includes - drop - local.get $3 - i32.load offset=4 - local.set $6 - loop $while-continue|0104 - local.get $0 - local.get $5 - i32.lt_s - if - i32.const 1 - local.get $6 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $27 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $27 - local.get $27 - f64.ne - end - br_if $__inlined_func$~lib/array/Array#includes - drop - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $while-continue|0104 - end - end - i32.const 0 - end + i32.const 1 + i32.const 3 + i32.const 10 + i32.const 2304 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $~lib/array/Array#includes i32.eqz if i32.const 0 @@ -13645,15 +12464,7 @@ i32.const 1 i32.const 1 call $~lib/array/Array#splice - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 i32.const 4 @@ -13667,12 +12478,7 @@ unreachable end global.get $std/array/arr - i32.load - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_s + call $std/array/internalCapacity i32.const 5 i32.ne if @@ -13710,41 +12516,27 @@ unreachable end local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 3 i32.const 2336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $4 + local.tee $34 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13756,14 +12548,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 2 i32.const 3 i32.const 2432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13781,28 +12573,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $8 + local.tee $37 i32.const 0 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13814,14 +12599,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13839,28 +12624,20 @@ i32.const 2560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $14 + local.tee $40 i32.const 3 i32.const 2 i32.const 3 i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13879,7 +12656,7 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13897,28 +12674,20 @@ i32.const 2672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.tee $1 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $17 + local.tee $43 i32.const 2 i32.const 2 i32.const 3 i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13930,14 +12699,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13955,27 +12724,20 @@ i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $12 + local.tee $46 i32.const 1 i32.const 2 i32.const 3 i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13987,14 +12749,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14012,27 +12774,20 @@ i32.const 2896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $21 + local.tee $49 i32.const 1 i32.const 2 i32.const 3 i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14044,14 +12799,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14069,27 +12824,20 @@ i32.const 3008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $28 + local.tee $52 i32.const 2 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14101,14 +12849,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $30 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14126,27 +12874,20 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $31 + local.tee $55 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14158,14 +12899,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14183,27 +12924,20 @@ i32.const 3232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $33 + local.tee $20 i32.const 1 i32.const 2 i32.const 3 i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14215,14 +12949,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14240,27 +12974,20 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $36 + local.tee $23 i32.const 0 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14272,14 +12999,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3408 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14297,27 +13024,20 @@ i32.const 3456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $39 + local.tee $16 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14329,14 +13049,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14354,27 +13074,21 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $42 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14393,7 +13107,7 @@ i32.const 3632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14413,26 +13127,19 @@ call $~lib/rt/pure/__retain local.set $1 local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $45 + local.tee $11 i32.const 0 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14451,7 +13158,7 @@ i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14469,28 +13176,21 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $30 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 + call $~lib/rt/pure/__release + local.get $30 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $48 + local.tee $14 i32.const 0 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14502,14 +13202,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $30 i32.const 5 i32.const 2 i32.const 3 i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14530,7 +13230,7 @@ local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $5 + local.tee $0 i32.load offset=12 if i32.const 0 @@ -14556,97 +13256,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $25 i32.load offset=4 - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $11 + local.tee $5 i32.const 1 + call $std/array/Ref#constructor i32.store - local.get $0 - local.get $11 - i32.store - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $11 + local.get $5 i32.const 2 - i32.store - local.get $0 - local.get $11 + call $std/array/Ref#constructor i32.store offset=4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $11 + local.get $5 i32.const 3 - i32.store - local.get $0 - local.get $11 + call $std/array/Ref#constructor i32.store offset=8 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $11 + local.get $5 i32.const 4 - i32.store - local.get $0 - local.get $11 + call $std/array/Ref#constructor i32.store offset=12 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $11 + local.get $5 i32.const 5 - i32.store - local.get $0 - local.get $11 + call $std/array/Ref#constructor i32.store offset=16 local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 + call $~lib/rt/pure/__release + local.get $25 i32.const 2 call $~lib/array/Array#splice - local.set $11 - local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $11 + local.set $29 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 i32.load offset=12 i32.const 2 i32.ne @@ -14658,10 +13298,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $29 i32.const 0 call $~lib/array/Array#__get - local.tee $51 + local.tee $19 i32.load i32.const 3 i32.ne @@ -14673,10 +13313,10 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $29 i32.const 1 call $~lib/array/Array#__get - local.tee $52 + local.tee $2 i32.load i32.const 4 i32.ne @@ -14688,7 +13328,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $25 i32.load offset=12 i32.const 3 i32.ne @@ -14700,10 +13340,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $25 i32.const 0 call $~lib/array/Array#__get - local.tee $53 + local.tee $3 i32.load i32.const 1 i32.ne @@ -14715,10 +13355,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $25 i32.const 1 call $~lib/array/Array#__get - local.tee $54 + local.tee $4 i32.load i32.const 2 i32.ne @@ -14730,10 +13370,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $25 i32.const 2 call $~lib/array/Array#__get - local.tee $55 + local.tee $5 i32.load i32.const 5 i32.ne @@ -14751,41 +13391,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $28 i32.load offset=4 - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 1 - i32.store - local.get $0 - local.get $1 + call $std/array/Ref#constructor i32.store local.get $0 i32.const 0 i32.store offset=4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 2 - i32.store local.get $0 - local.get $1 + i32.const 2 + call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $28 call $~lib/array/Array#splice - local.tee $26 + local.tee $31 i32.load offset=12 i32.const 1 i32.ne @@ -14797,11 +13418,11 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $31 i32.const 0 call $~lib/array/Array#__get - local.tee $0 - local.get $0 + local.tee $32 + local.get $32 i32.eqz if i32.const 0 @@ -14822,7 +13443,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $28 i32.load offset=12 i32.const 2 i32.ne @@ -14834,10 +13455,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $28 i32.const 0 call $~lib/array/Array#__get - local.tee $56 + local.tee $1 if i32.const 0 i32.const 304 @@ -14846,11 +13467,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $28 i32.const 1 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $33 + local.get $33 i32.eqz if i32.const 0 @@ -14871,535 +13492,486 @@ call $~lib/builtins/abort unreachable end + local.get $30 + call $~lib/rt/pure/__release + local.get $34 + call $~lib/rt/pure/__release + local.get $35 + call $~lib/rt/pure/__release + local.get $36 + call $~lib/rt/pure/__release + local.get $37 + call $~lib/rt/pure/__release + local.get $38 + call $~lib/rt/pure/__release + local.get $39 + call $~lib/rt/pure/__release + local.get $40 + call $~lib/rt/pure/__release + local.get $41 + call $~lib/rt/pure/__release + local.get $42 + call $~lib/rt/pure/__release + local.get $43 + call $~lib/rt/pure/__release + local.get $44 + call $~lib/rt/pure/__release + local.get $45 + call $~lib/rt/pure/__release + local.get $46 + call $~lib/rt/pure/__release + local.get $47 + call $~lib/rt/pure/__release + local.get $48 + call $~lib/rt/pure/__release + local.get $49 + call $~lib/rt/pure/__release + local.get $50 + call $~lib/rt/pure/__release + local.get $51 + call $~lib/rt/pure/__release + local.get $52 + call $~lib/rt/pure/__release + local.get $53 + call $~lib/rt/pure/__release + local.get $54 + call $~lib/rt/pure/__release + local.get $55 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release + local.get $21 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $23 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $17 + 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 $12 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release + local.get $18 + call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $4 - i32.const 8292 - i32.gt_u + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $32 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $33 + call $~lib/rt/pure/__release + global.get $std/array/arr + i32.const 0 + i32.const 0 + call $~lib/array/Array#__set + global.get $std/array/arr + i32.const 1 + i32.const 1 + call $~lib/array/Array#__set + global.get $std/array/arr + i32.const 2 + i32.const 2 + call $~lib/array/Array#__set + global.get $std/array/arr + i32.const 3 + i32.const 3 + call $~lib/array/Array#__set + global.get $std/array/arr + i32.const 1 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 451 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $6 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i + i32.const 1 + i32.ne if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 454 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $7 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.ne if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 457 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $8 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 4 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.ne if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 465 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $9 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 8 + i32.ne if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 466 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $13 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 5 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.eq if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 468 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $14 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + i32.const 6 + call $~lib/array/Array#findIndex + global.set $std/array/i + global.get $std/array/i + i32.const -1 + i32.ne if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 481 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $15 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 2 + i32.ne if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 482 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $16 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 7 + call $~lib/array/Array#every + i32.const 1 + i32.ne if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $17 - i32.const 8292 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $18 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 8 + call $~lib/array/Array#every if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $10 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 9 + call $~lib/array/Array#every + i32.const 1 + i32.ne if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 503 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $12 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 8 + i32.ne if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 504 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $19 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 10 + call $~lib/array/Array#every if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 506 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $20 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + i32.const 11 + call $~lib/array/Array#every + i32.const 1 + i32.ne if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 519 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $21 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 2 + i32.ne if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 520 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $22 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 12 + call $~lib/array/Array#some + i32.const 1 + i32.ne if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 530 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $23 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 13 + call $~lib/array/Array#some if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 533 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $28 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 14 + call $~lib/array/Array#some if - local.get $28 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 541 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $29 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 8 + i32.ne if - local.get $29 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 542 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $30 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.const 15 + call $~lib/array/Array#some + i32.const 1 + i32.ne if - local.get $30 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 544 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $31 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + i32.const 16 + call $~lib/array/Array#some if - local.get $31 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $25 - i32.const 8292 - i32.gt_u + global.get $std/array/arr + i32.load offset=12 + i32.const 2 + i32.ne if - local.get $25 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 558 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $32 - i32.const 8292 - i32.gt_u - if - local.get $32 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $33 - i32.const 8292 - i32.gt_u - if - local.get $33 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $34 - i32.const 8292 - i32.gt_u - if - local.get $34 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $35 - i32.const 8292 - i32.gt_u - if - local.get $35 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $36 - i32.const 8292 - i32.gt_u - if - local.get $36 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $37 - i32.const 8292 - i32.gt_u - if - local.get $37 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $38 - i32.const 8292 - i32.gt_u - if - local.get $38 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $39 - i32.const 8292 - i32.gt_u - if - local.get $39 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $40 - i32.const 8292 - i32.gt_u - if - local.get $40 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $41 - i32.const 8292 - i32.gt_u - if - local.get $41 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $42 - i32.const 8292 - i32.gt_u - if - local.get $42 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $43 - i32.const 8292 - i32.gt_u - if - local.get $43 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $44 - i32.const 8292 - i32.gt_u - if - local.get $44 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $45 - i32.const 8292 - i32.gt_u - if - local.get $45 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $46 - i32.const 8292 - i32.gt_u - if - local.get $46 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $47 - i32.const 8292 - i32.gt_u - if - local.get $47 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $48 - i32.const 8292 - i32.gt_u - if - local.get $48 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $49 - i32.const 8292 - i32.gt_u - if - local.get $49 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $50 - i32.const 8292 - i32.gt_u - if - local.get $50 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $51 - i32.const 8292 - i32.gt_u - if - local.get $51 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $52 - i32.const 8292 - i32.gt_u - if - local.get $52 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $53 - i32.const 8292 - i32.gt_u - if - local.get $53 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $54 - i32.const 8292 - i32.gt_u - if - local.get $54 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $55 - i32.const 8292 - i32.gt_u - if - local.get $55 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $56 - i32.const 8292 - i32.gt_u - if - local.get $56 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $std/array/arr - i32.const 0 - i32.const 0 - call $~lib/array/Array#__set - global.get $std/array/arr - i32.const 1 - i32.const 1 - call $~lib/array/Array#__set global.get $std/array/arr i32.const 2 - i32.const 2 - call $~lib/array/Array#__set + call $~lib/array/Array#push global.get $std/array/arr i32.const 3 - i32.const 3 - call $~lib/array/Array#__set - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#findIndex + call $~lib/array/Array#push + i32.const 0 global.set $std/array/i + global.get $std/array/arr + i32.const 17 + call $~lib/array/Array#forEach global.get $std/array/i + i32.const 6 + i32.ne if i32.const 0 i32.const 304 - i32.const 451 + i32.const 569 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#findIndex + i32.const 0 global.set $std/array/i + global.get $std/array/arr + i32.const 18 + call $~lib/array/Array#forEach global.get $std/array/i - i32.const 1 + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 454 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#findIndex - global.set $std/array/i - global.get $std/array/i - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 457 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 4 - call $~lib/array/Array#findIndex - global.set $std/array/i - global.get $std/array/i - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 465 + i32.const 578 i32.const 2 call $~lib/builtins/abort unreachable @@ -15411,22 +13983,23 @@ if i32.const 0 i32.const 304 - i32.const 466 + i32.const 579 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 5 - call $~lib/array/Array#findIndex + i32.const 0 global.set $std/array/i + global.get $std/array/arr + i32.const 19 + call $~lib/array/Array#forEach global.get $std/array/i - i32.const -1 - i32.eq + i32.const 406 + i32.ne if i32.const 0 i32.const 304 - i32.const 468 + i32.const 582 i32.const 2 call $~lib/builtins/abort unreachable @@ -15443,17 +14016,18 @@ global.get $std/array/arr call $~lib/array/Array#pop drop - global.get $std/array/arr - i32.const 6 - call $~lib/array/Array#findIndex + i32.const 0 global.set $std/array/i + global.get $std/array/arr + i32.const 20 + call $~lib/array/Array#forEach global.get $std/array/i - i32.const -1 + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 481 + i32.const 596 i32.const 2 call $~lib/builtins/abort unreachable @@ -15465,7 +14039,7 @@ if i32.const 0 i32.const 304 - i32.const 482 + i32.const 597 i32.const 2 call $~lib/builtins/abort unreachable @@ -15477,38 +14051,92 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 7 - call $~lib/array/Array#every + i32.const 21 + call $~lib/array/Array#forEach + global.get $std/array/arr + i32.load offset=12 + i32.const 100 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 622 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 100 + i32.lt_s + if + global.get $std/array/arr + call $~lib/array/Array#pop + drop + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + global.get $std/array/arr + i32.const 0 + call $~lib/array/Array#push + global.get $std/array/arr i32.const 1 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 2 + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#push + global.get $std/array/arr + call $~lib/array/Array#map + local.tee $0 + i32.load offset=12 + i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 492 + i32.const 636 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $0 + i32.const 0 + call $~lib/array/Array#__get global.get $std/array/arr - i32.const 8 - call $~lib/array/Array#every + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 637 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 9 - call $~lib/array/Array#every - i32.const 1 + i32.const 23 + call $~lib/array/Array#map + call $~lib/rt/pure/__release + global.get $std/array/i + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 503 + i32.const 646 i32.const 2 call $~lib/builtins/abort unreachable @@ -15520,18 +14148,24 @@ if i32.const 0 i32.const 304 - i32.const 504 + i32.const 647 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 10 - call $~lib/array/Array#every + i32.const 24 + call $~lib/array/Array#map + call $~lib/rt/pure/__release + global.get $std/array/i + i32.const 406 + i32.ne if i32.const 0 i32.const 304 - i32.const 506 + i32.const 654 i32.const 2 call $~lib/builtins/abort unreachable @@ -15548,15 +14182,19 @@ global.get $std/array/arr call $~lib/array/Array#pop drop + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 11 - call $~lib/array/Array#every + i32.const 25 + call $~lib/array/Array#map + call $~lib/rt/pure/__release + global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 519 + i32.const 669 i32.const 2 call $~lib/builtins/abort unreachable @@ -15568,7 +14206,7 @@ if i32.const 0 i32.const 304 - i32.const 520 + i32.const 670 i32.const 2 call $~lib/builtins/abort unreachable @@ -15579,37 +14217,36 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + local.get $0 + call $~lib/rt/pure/__release global.get $std/array/arr - i32.const 12 - call $~lib/array/Array#some - i32.const 1 + i32.const 26 + call $~lib/array/Array#filter + local.tee $0 + i32.load offset=12 + i32.const 2 i32.ne if i32.const 0 i32.const 304 - i32.const 530 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 13 - call $~lib/array/Array#some - if - i32.const 0 - i32.const 304 - i32.const 533 + i32.const 680 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 14 - call $~lib/array/Array#some + i32.const 27 + call $~lib/array/Array#filter + call $~lib/rt/pure/__release + global.get $std/array/i + i32.const 6 + i32.ne if i32.const 0 i32.const 304 - i32.const 541 + i32.const 689 i32.const 2 call $~lib/builtins/abort unreachable @@ -15621,20 +14258,24 @@ if i32.const 0 i32.const 304 - i32.const 542 + i32.const 690 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 15 - call $~lib/array/Array#some - i32.const 1 + i32.const 28 + call $~lib/array/Array#filter + call $~lib/rt/pure/__release + global.get $std/array/i + i32.const 406 i32.ne if i32.const 0 i32.const 304 - i32.const 544 + i32.const 697 i32.const 2 call $~lib/builtins/abort unreachable @@ -15651,13 +14292,19 @@ global.get $std/array/arr call $~lib/array/Array#pop drop + i32.const 0 + global.set $std/array/i global.get $std/array/arr - i32.const 16 - call $~lib/array/Array#some + i32.const 29 + call $~lib/array/Array#filter + call $~lib/rt/pure/__release + global.get $std/array/i + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 557 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable @@ -15669,7 +14316,7 @@ if i32.const 0 i32.const 304 - i32.const 558 + i32.const 713 i32.const 2 call $~lib/builtins/abort unreachable @@ -15680,90 +14327,136 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + local.get $0 + call $~lib/rt/pure/__release + global.get $std/array/arr + i32.const 30 i32.const 0 + call $~lib/array/Array#reduce global.set $std/array/i - global.get $std/array/arr - i32.const 17 - call $~lib/array/Array#forEach global.get $std/array/i i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 569 + i32.const 723 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 0 - global.set $std/array/i global.get $std/array/arr - i32.const 18 - call $~lib/array/Array#forEach + i32.const 31 + i32.const 4 + call $~lib/array/Array#reduce + global.set $std/array/i global.get $std/array/i - i32.const 6 + i32.const 10 i32.ne if i32.const 0 i32.const 304 - i32.const 578 + i32.const 727 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=12 - i32.const 8 + i32.const 32 + i32.const 0 + call $~lib/array/Array#reduce + i32.const 0 + i32.ne + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 579 + i32.const 730 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 0 - global.set $std/array/i global.get $std/array/arr - i32.const 19 - call $~lib/array/Array#forEach - global.get $std/array/i - i32.const 406 - i32.ne + i32.const 33 + i32.const 0 + call $~lib/array/Array#reduce if i32.const 0 i32.const 304 - i32.const 582 + i32.const 733 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr + i32.const 34 + i32.const 0 + call $~lib/array/Array#reduce + global.set $std/array/i + global.get $std/array/i + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 741 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.load offset=12 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 742 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 35 + i32.const 0 + call $~lib/array/Array#reduce + global.set $std/array/i + global.get $std/array/i + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 744 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr + call $~lib/array/Array#pop + drop + global.get $std/array/arr call $~lib/array/Array#pop drop global.get $std/array/arr call $~lib/array/Array#pop drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop + global.get $std/array/arr + i32.const 36 i32.const 0 + call $~lib/array/Array#reduce global.set $std/array/i - global.get $std/array/arr - i32.const 20 - call $~lib/array/Array#forEach global.get $std/array/i i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 596 + i32.const 757 i32.const 2 call $~lib/builtins/abort unreachable @@ -15775,7 +14468,7 @@ if i32.const 0 i32.const 304 - i32.const 597 + i32.const 758 i32.const 2 call $~lib/builtins/abort unreachable @@ -15787,148 +14480,77 @@ i32.const 3 call $~lib/array/Array#push global.get $std/array/arr - i32.const 21 - call $~lib/array/Array#forEach - global.get $std/array/arr - i32.load offset=12 - i32.const 100 + i32.const 37 + i32.const 0 + call $~lib/array/Array#reduceRight + global.set $std/array/i + global.get $std/array/i + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 622 + i32.const 768 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - i32.const 100 - i32.lt_s - if - global.get $std/array/arr - call $~lib/array/Array#pop - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#push global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#push + i32.const 38 + i32.const 4 + call $~lib/array/Array#reduceRight + global.set $std/array/i + global.get $std/array/i + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 772 + i32.const 2 + call $~lib/builtins/abort + unreachable + end global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#push + i32.const 39 i32.const 0 - local.set $0 - global.get $std/array/arr - local.tee $2 - i32.load offset=12 - local.tee $4 - i32.const 2 - i32.const 9 + call $~lib/array/Array#reduceRight i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 - local.set $6 - loop $for-loop|0191 - local.get $0 - local.get $4 - local.get $2 - i32.load offset=12 - local.tee $7 - local.get $4 - local.get $7 - i32.lt_s - select - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $0 - i32.const 2 - i32.shl - local.tee $7 - local.get $2 - i32.load offset=4 - i32.add - i32.load - f32.convert_i32_s - local.set $24 - local.get $6 - local.get $7 - i32.add - local.get $24 - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0191 - end - end - local.get $1 - i32.load offset=12 - i32.const 4 + i32.ne + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 636 + i32.const 775 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 0 - call $~lib/array/Array#__get global.get $std/array/arr + i32.const 40 i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + call $~lib/array/Array#reduceRight if i32.const 0 i32.const 304 - i32.const 637 + i32.const 778 i32.const 2 call $~lib/builtins/abort unreachable end + global.get $std/array/arr + i32.const 41 i32.const 0 + call $~lib/array/Array#reduceRight global.set $std/array/i - global.get $std/array/arr - i32.const 23 - call $~lib/array/Array#map - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end global.get $std/array/i i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 646 + i32.const 786 i32.const 2 call $~lib/builtins/abort unreachable @@ -15940,32 +14562,23 @@ if i32.const 0 i32.const 304 - i32.const 647 + i32.const 787 i32.const 2 call $~lib/builtins/abort unreachable end + global.get $std/array/arr + i32.const 42 i32.const 0 + call $~lib/array/Array#reduceRight global.set $std/array/i - global.get $std/array/arr - i32.const 24 - call $~lib/array/Array#map - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end global.get $std/array/i - i32.const 406 + i32.const 10 i32.ne if i32.const 0 i32.const 304 - i32.const 654 + i32.const 789 i32.const 2 call $~lib/builtins/abort unreachable @@ -15982,1359 +14595,432 @@ global.get $std/array/arr call $~lib/array/Array#pop drop + global.get $std/array/arr + i32.const 43 i32.const 0 + call $~lib/array/Array#reduceRight global.set $std/array/i - global.get $std/array/arr - i32.const 25 - call $~lib/array/Array#map - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end global.get $std/array/i - i32.const 1 + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 669 + i32.const 802 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load offset=12 - i32.const 2 - i32.ne if i32.const 0 i32.const 304 - i32.const 670 + i32.const 803 i32.const 2 call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.const 2 + i32.const 0 call $~lib/array/Array#push global.get $std/array/arr - i32.const 3 + i32.const 1 call $~lib/array/Array#push - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end global.get $std/array/arr - i32.const 26 - call $~lib/array/Array#filter - local.tee $0 - i32.load offset=12 i32.const 2 - i32.ne + call $~lib/array/Array#push + global.get $std/array/arr + i32.const 3 + call $~lib/array/Array#push + call $~lib/bindings/Math/random + i64.reinterpret_f64 + call $~lib/math/NativeMath.seedRandom + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 4272 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $16 + i32.const 0 + global.set $~argumentsLength + local.get $16 + call $~lib/array/Array#sort + call $~lib/rt/pure/__release + local.get $16 + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 4320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 680 + i32.const 892 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 4368 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $17 i32.const 0 - global.set $std/array/i - global.get $std/array/arr - i32.const 27 - call $~lib/array/Array#filter - local.tee $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $std/array/i - i32.const 6 - i32.ne + global.set $~argumentsLength + local.get $17 + call $~lib/array/Array#sort + call $~lib/rt/pure/__release + local.get $17 + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 4448 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 689 + i32.const 896 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.load offset=12 - i32.const 8 - i32.ne + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 4528 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $6 + i32.const 0 + global.set $~argumentsLength + local.get $6 + i32.const 46 + call $~lib/array/Array#sort + call $~lib/rt/pure/__release + local.get $6 + i32.const 5 + i32.const 2 + i32.const 3 + i32.const 4576 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 690 + i32.const 900 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 5 + i32.const 2 + i32.const 7 + i32.const 4624 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $8 i32.const 0 - global.set $std/array/i - global.get $std/array/arr - i32.const 28 - call $~lib/array/Array#filter - local.tee $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $std/array/i - i32.const 406 - i32.ne + global.set $~argumentsLength + local.get $8 + i32.const 47 + call $~lib/array/Array#sort + call $~lib/rt/pure/__release + local.get $8 + i32.const 5 + i32.const 2 + i32.const 7 + i32.const 4672 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 697 + i32.const 904 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop i32.const 0 - global.set $std/array/i - global.get $std/array/arr - i32.const 29 - call $~lib/array/Array#filter + i32.const 2 + i32.const 3 + i32.const 4720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $18 + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 4736 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $9 + i32.const 2 + i32.const 2 + i32.const 3 + i32.const 4768 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $10 + i32.const 4 + i32.const 2 + i32.const 3 + i32.const 4800 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $11 + i32.const 4 + i32.const 2 + i32.const 3 + i32.const 4832 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $7 + i32.const 64 + call $std/array/createReverseOrderedArray + local.set $12 + i32.const 128 + call $std/array/createReverseOrderedArray + local.set $13 + i32.const 1024 + call $std/array/createReverseOrderedArray + local.set $14 + i32.const 10000 + call $std/array/createReverseOrderedArray + local.set $15 + i32.const 512 + call $std/array/createRandomOrderedArray + local.set $19 + local.get $18 + i32.const 48 + call $std/array/assertSorted + local.get $9 + i32.const 48 + call $std/array/assertSorted + local.get $9 + i32.const 1 + i32.const 2 + i32.const 3 + i32.const 4928 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain local.tee $1 - i32.const 8292 - i32.gt_u + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 924 + i32.const 2 + call $~lib/builtins/abort + unreachable end - global.get $std/array/i - i32.const 1 - i32.ne + local.get $10 + i32.const 48 + call $std/array/assertSorted + local.get $10 + i32.const 2 + i32.const 2 + i32.const 3 + i32.const 4960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 712 + i32.const 927 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.load offset=12 - i32.const 2 - i32.ne + local.get $11 + i32.const 48 + call $std/array/assertSorted + local.get $11 + local.get $7 + i32.const 0 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 713 + i32.const 930 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#push - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - global.get $std/array/arr - i32.const 30 - i32.const 0 - call $~lib/array/Array#reduce - global.set $std/array/i - global.get $std/array/i - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 723 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 31 + local.get $12 + i32.const 48 + call $std/array/assertSorted + local.get $12 + local.get $7 i32.const 4 - call $~lib/array/Array#reduce - global.set $std/array/i - global.get $std/array/i - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 727 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 32 - i32.const 0 - call $~lib/array/Array#reduce - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 730 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 33 - i32.const 0 - call $~lib/array/Array#reduce - if - i32.const 0 - i32.const 304 - i32.const 733 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 34 - i32.const 0 - call $~lib/array/Array#reduce - global.set $std/array/i - global.get $std/array/i - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 741 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.load offset=12 - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 742 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 35 - i32.const 0 - call $~lib/array/Array#reduce - global.set $std/array/i - global.get $std/array/i - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 744 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - i32.const 36 - i32.const 0 - call $~lib/array/Array#reduce - global.set $std/array/i - global.get $std/array/i - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 757 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.load offset=12 - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 758 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 37 - i32.const 0 - call $~lib/array/Array#reduceRight - global.set $std/array/i - global.get $std/array/i - i32.const 6 - i32.ne + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 768 + i32.const 933 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 38 + local.get $13 + i32.const 48 + call $std/array/assertSorted + local.get $13 + local.get $7 i32.const 4 - call $~lib/array/Array#reduceRight - global.set $std/array/i - global.get $std/array/i - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 772 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 39 - i32.const 0 - call $~lib/array/Array#reduceRight - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 775 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 40 - i32.const 0 - call $~lib/array/Array#reduceRight + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 778 + i32.const 936 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 41 - i32.const 0 - call $~lib/array/Array#reduceRight - global.set $std/array/i - global.get $std/array/i - i32.const 6 - i32.ne + local.get $14 + i32.const 48 + call $std/array/assertSorted + local.get $14 + local.get $7 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 786 + i32.const 939 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.load offset=12 - i32.const 8 - i32.ne + local.get $15 + i32.const 48 + call $std/array/assertSorted + local.get $15 + local.get $7 + i32.const 4 + call $std/array/isArraysEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 787 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 42 - i32.const 0 - call $~lib/array/Array#reduceRight - global.set $std/array/i - global.get $std/array/i - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 789 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - call $~lib/array/Array#pop - drop - global.get $std/array/arr - i32.const 43 - i32.const 0 - call $~lib/array/Array#reduceRight - global.set $std/array/i - global.get $std/array/i - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 802 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.load offset=12 - if - i32.const 0 - i32.const 304 - i32.const 803 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - i32.const 0 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 1 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 2 - call $~lib/array/Array#push - global.get $std/array/arr - i32.const 3 - call $~lib/array/Array#push - call $~lib/bindings/Math/random - i64.reinterpret_f64 - local.set $57 - i32.const 1 - global.set $~lib/math/random_seeded - local.get $57 - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state0_64 - global.get $~lib/math/random_state0_64 - i64.const -1 - i64.xor - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state1_64 - local.get $57 - i32.wrap_i64 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state0_32 - global.get $~lib/math/random_state0_32 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state1_32 - global.get $~lib/math/random_state1_32 - i32.const 0 - i32.ne - i32.const 0 - global.get $~lib/math/random_state0_32 - i32.const 0 - global.get $~lib/math/random_state1_64 - i64.const 0 - i64.ne - i32.const 0 - global.get $~lib/math/random_state0_64 - i64.const 0 - i64.ne - select - select - select - i32.eqz - if - i32.const 0 - i32.const 4032 - i32.const 1406 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 4272 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $1 - i32.const 0 - global.set $~argumentsLength - local.get $1 - call $~lib/array/Array#sort|trampoline - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - block $__inlined_func$std/array/isArraysEqual (result i32) - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 4320 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $4 - i32.const 0 - local.set $0 - i32.const 0 - local.get $1 - i32.load offset=12 - local.tee $6 - local.get $4 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - i32.const 1 - local.get $1 - local.get $4 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|023 - local.get $0 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $0 - call $~lib/array/Array#__get - local.tee $24 - local.get $24 - f32.ne - if (result i32) - local.get $4 - local.get $0 - call $~lib/array/Array#__get - local.tee $24 - local.get $24 - f32.ne - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - local.get $1 - local.get $0 - call $~lib/array/Array#__get - local.get $4 - local.get $0 - call $~lib/array/Array#__get - f32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|023 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 892 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 4368 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - global.set $~argumentsLength - local.get $2 - call $~lib/array/Array#sort|trampoline - local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - block $__inlined_func$std/array/isArraysEqual (result i32) - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 4448 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $6 - i32.const 0 - local.set $0 - i32.const 0 - local.get $2 - i32.load offset=12 - local.tee $8 - local.get $6 - i32.load offset=12 - i32.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - i32.const 1 - local.get $2 - local.get $6 - i32.eq - br_if $__inlined_func$std/array/isArraysEqual - drop - loop $for-loop|024 - local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - local.get $0 - call $~lib/array/Array#__get - local.tee $27 - local.get $27 - f64.ne - if (result i32) - local.get $6 - local.get $0 - call $~lib/array/Array#__get - local.tee $27 - local.get $27 - f64.ne - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - local.get $2 - local.get $0 - call $~lib/array/Array#__get - local.get $6 - local.get $0 - call $~lib/array/Array#__get - f64.ne - br_if $__inlined_func$std/array/isArraysEqual - drop - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|024 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 896 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 4528 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $7 - i32.const 0 - global.set $~argumentsLength - local.get $7 - i32.const 46 - call $~lib/array/Array#sort - local.tee $0 - local.set $8 - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 5 - i32.const 2 - i32.const 3 - i32.const 4576 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $19 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 900 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 5 - i32.const 2 - i32.const 7 - i32.const 4624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $8 - i32.const 0 - global.set $~argumentsLength - local.get $8 - i32.const 47 - call $~lib/array/Array#sort - local.tee $0 - local.set $9 - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 5 - i32.const 2 - i32.const 7 - i32.const 4672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $20 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 904 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 2 - i32.const 3 - i32.const 4720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $10 - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 4736 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $9 - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 4768 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $13 - i32.const 4 - i32.const 2 - i32.const 3 - i32.const 4800 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $14 - i32.const 4 - i32.const 2 - i32.const 3 - i32.const 4832 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.set $0 - i32.const 64 - call $std/array/createReverseOrderedArray - local.set $15 - i32.const 128 - call $std/array/createReverseOrderedArray - local.set $16 - i32.const 1024 - call $std/array/createReverseOrderedArray - local.set $17 - i32.const 10000 - call $std/array/createReverseOrderedArray - local.set $18 - i32.const 512 - call $std/array/createRandomOrderedArray - local.set $12 - local.get $10 - i32.const 48 - call $std/array/assertSorted - local.get $9 - i32.const 48 - call $std/array/assertSorted - local.get $9 - i32.const 1 - i32.const 2 - i32.const 3 - i32.const 4928 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $21 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 924 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $13 - i32.const 48 - call $std/array/assertSorted - local.get $13 - i32.const 2 - i32.const 2 - i32.const 3 - i32.const 4960 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $22 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 927 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $14 - i32.const 48 - call $std/array/assertSorted - local.get $14 - local.get $0 - i32.const 0 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 930 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $15 - i32.const 48 - call $std/array/assertSorted - local.get $15 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 933 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $16 - i32.const 48 - call $std/array/assertSorted - local.get $16 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 936 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $17 - i32.const 48 - call $std/array/assertSorted - local.get $17 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 939 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $18 - i32.const 48 - call $std/array/assertSorted - local.get $18 - local.get $0 - i32.const 4 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 942 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $12 - i32.const 48 - call $std/array/assertSorted - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 8292 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $19 - i32.const 8292 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $20 - i32.const 8292 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 8292 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $9 - i32.const 8292 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $13 - i32.const 8292 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $14 - i32.const 8292 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $15 - i32.const 8292 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $16 - i32.const 8292 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $17 - i32.const 8292 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $18 - i32.const 8292 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $12 - i32.const 8292 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $21 - i32.const 8292 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $22 - i32.const 8292 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 64 - call $std/array/createRandomOrderedArray - local.set $0 - i32.const 257 - call $std/array/createRandomOrderedArray - local.set $1 - local.get $0 - i32.const 49 - call $std/array/assertSorted - local.get $0 - i32.const 50 - call $std/array/assertSorted - local.get $1 - i32.const 51 - call $std/array/assertSorted - local.get $1 - i32.const 52 - call $std/array/assertSorted - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 2 - i32.store offset=12 - loop $for-loop|00 - local.get $0 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - local.get $0 - i32.sub - call $~lib/array/Array#__set - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 53 - call $std/array/assertSorted<~lib/array/Array> - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 512 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 512 - i32.store offset=12 - loop $for-loop|01 - local.get $0 - i32.const 512 - i32.lt_s - if - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 511 - local.get $0 - i32.sub - i32.store - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end + i32.const 942 + i32.const 2 + call $~lib/builtins/abort + unreachable end + local.get $19 + i32.const 48 + call $std/array/assertSorted + local.get $16 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $18 + 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 $7 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 64 + call $std/array/createRandomOrderedArray + local.set $1 + i32.const 257 + call $std/array/createRandomOrderedArray + local.set $0 + local.get $1 + i32.const 49 + call $std/array/assertSorted + local.get $1 + i32.const 50 + call $std/array/assertSorted + local.get $0 + i32.const 51 + call $std/array/assertSorted + local.get $0 + i32.const 52 + call $std/array/assertSorted local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/array/createReverseOrderedNestedArray + local.tee $0 + i32.const 53 + call $std/array/assertSorted<~lib/array/Array> + local.get $0 + call $~lib/rt/pure/__release + call $std/array/createReverseOrderedElementsArray + local.tee $0 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $0 + call $~lib/rt/pure/__release i32.const 7 i32.const 2 i32.const 15 i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 7 i32.const 2 i32.const 15 @@ -17344,8 +15030,9 @@ local.set $4 i32.const 1 global.set $~argumentsLength - local.get $2 + local.get $1 i32.const 55 + local.tee $5 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 call $std/array/isSorted<~lib/string/String | null> @@ -17359,15 +15046,8 @@ unreachable end local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 + call $~lib/rt/pure/__release + local.get $1 local.get $4 call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz @@ -17379,98 +15059,32 @@ call $~lib/builtins/abort unreachable end - i32.const 0 + call $std/array/createRandomStringArray local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 400 - i32.store offset=12 - loop $for-loop|02 - local.get $0 - i32.const 400 - i32.lt_s - if - local.get $1 - local.get $0 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $6 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $6 - i32.const 8292 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 2 i32.const 0 i32.const 17 i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $9 i32.load offset=4 - local.get $2 + local.get $9 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $13 + local.tee $0 + local.get $0 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -17488,13 +15102,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.get $4 - i32.load offset=12 + local.tee $12 i32.const 5120 - call $~lib/util/string/joinIntegerArray - local.tee $14 + call $~lib/array/Array#join + local.tee $13 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -17512,12 +15123,9 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - i32.load offset=4 - local.get $6 - i32.load offset=12 + local.tee $14 i32.const 5568 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#join local.tee $15 i32.const 5504 call $~lib/string/String.__eq @@ -17536,13 +15144,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - i32.load offset=4 - local.get $7 - i32.load offset=12 + local.tee $18 i32.const 5632 - call $~lib/util/string/joinIntegerArray - local.tee $16 + call $~lib/array/Array#join + local.tee $19 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -17560,12 +15165,14 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 i32.load offset=4 - local.get $8 + local.get $10 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $17 + local.tee $0 + local.set $2 + local.get $0 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -17583,13 +15190,10 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 - i32.load offset=4 - local.get $9 - i32.load offset=12 + local.tee $3 i32.const 5120 - call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $18 + call $~lib/array/Array<~lib/string/String | null>#join + local.tee $4 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -17607,44 +15211,27 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $6 i32.load offset=4 - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $10 + local.tee $0 i32.const 0 + call $std/array/Ref#constructor i32.store - local.get $1 - local.get $10 - i32.store - local.get $1 + local.get $0 i32.const 0 i32.store offset=4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $10 + local.get $0 i32.const 0 - i32.store - local.get $1 - local.get $10 + call $std/array/Ref#constructor i32.store offset=8 - local.get $0 + local.get $6 i32.load offset=4 - local.get $0 + local.get $6 i32.load offset=12 call $~lib/util/string/joinReferenceArray - local.tee $10 + local.tee $0 + local.set $5 + local.get $0 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -17658,45 +15245,28 @@ end i32.const 2 i32.const 2 - i32.const 8 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 - local.set $12 - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $19 - i32.const 0 - i32.store - local.get $12 - local.get $19 - i32.store - call $~lib/rt/tlsf/maybeInitialize - i32.const 4 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + i32.const 8 + i32.const 0 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $8 + i32.load offset=4 + local.tee $0 i32.const 0 + call $std/array/Ref#constructor i32.store - local.get $12 - local.get $19 + local.get $0 + i32.const 0 + call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $8 i32.load offset=4 - local.get $1 + local.get $8 i32.load offset=12 call $~lib/util/string/joinReferenceArray - local.tee $12 + local.tee $1 + local.set $0 + local.get $1 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -17708,185 +15278,70 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $9 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release local.get $13 - i32.const 8292 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $14 - i32.const 8292 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 8292 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $15 - i32.const 8292 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $16 - i32.const 8292 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $17 - i32.const 8292 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $9 - i32.const 8292 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $18 - i32.const 8292 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release local.get $10 - i32.const 8292 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $12 - i32.const 8292 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + 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 + local.get $6 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 0 i32.const 2 i32.const 3 i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $21 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $22 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $23 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=12 + local.set $24 + local.get $21 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $18 + call $~lib/array/Array#join + local.tee $0 + local.get $0 i32.const 5120 call $~lib/string/String.__eq i32.eqz @@ -17898,13 +15353,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=12 + local.get $22 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $10 + call $~lib/array/Array#join + local.tee $0 + local.set $9 + local.get $0 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -17916,13 +15370,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.load offset=4 - local.get $2 - i32.load offset=12 + local.get $23 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $12 + call $~lib/array/Array#join + local.tee $0 + local.set $10 + local.get $0 i32.const 7424 call $~lib/string/String.__eq i32.eqz @@ -17934,13 +15387,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=4 - local.get $4 - i32.load offset=12 + local.get $24 i32.const 5360 - call $~lib/util/string/joinIntegerArray - local.tee $19 + call $~lib/array/Array#join + local.tee $0 + local.set $11 + local.get $0 i32.const 7456 call $~lib/string/String.__eq i32.eqz @@ -17958,12 +15410,14 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $7 i32.load offset=4 - local.get $9 + local.get $7 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $20 + local.tee $0 + local.set $12 + local.get $0 i32.const 7520 call $~lib/string/String.__eq i32.eqz @@ -17981,12 +15435,14 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $16 i32.load offset=4 - local.get $13 + local.get $16 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $21 + local.tee $0 + local.set $13 + local.get $0 i32.const 7584 call $~lib/string/String.__eq i32.eqz @@ -18004,12 +15460,14 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $17 i32.load offset=4 - local.get $14 + local.get $17 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $22 + local.tee $0 + local.set $14 + local.get $0 i32.const 7680 call $~lib/string/String.__eq i32.eqz @@ -18027,12 +15485,14 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $6 i32.load offset=4 - local.get $15 + local.get $6 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $23 + local.tee $0 + local.set $15 + local.get $0 i32.const 7792 call $~lib/string/String.__eq i32.eqz @@ -18050,13 +15510,12 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 - i32.load offset=4 - local.get $16 - i32.load offset=12 + local.tee $18 i32.const 5360 - call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $28 + call $~lib/array/Array<~lib/string/String | null>#join + local.tee $0 + local.set $19 + local.get $0 i32.const 7952 call $~lib/string/String.__eq i32.eqz @@ -18074,13 +15533,12 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 - i32.load offset=4 - local.get $17 - i32.load offset=12 + local.tee $2 i32.const 5360 - call $~lib/util/string/joinReferenceArray<~lib/string/String | null> - local.tee $29 + call $~lib/array/Array<~lib/string/String | null>#join + local.tee $0 + local.set $3 + local.get $0 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -18098,9 +15556,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $26 i32.load offset=4 - local.tee $7 + local.tee $0 i32.const 2 i32.const 2 i32.const 3 @@ -18108,7 +15566,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $7 + local.get $0 i32.const 2 i32.const 2 i32.const 3 @@ -18116,12 +15574,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $6 + local.get $26 i32.load offset=4 - local.get $6 + local.get $26 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $30 + local.tee $0 + local.set $4 + local.get $0 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -18139,9 +15599,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $27 i32.load offset=4 - local.tee $8 + local.tee $0 i32.const 2 i32.const 0 i32.const 6 @@ -18149,7 +15609,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $8 + local.get $0 i32.const 2 i32.const 0 i32.const 6 @@ -18157,12 +15617,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $7 + local.get $27 i32.load offset=4 - local.get $7 + local.get $27 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $31 + local.tee $0 + local.set $5 + local.get $0 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -18172,332 +15634,115 @@ i32.const 1027 i32.const 2 call $~lib/builtins/abort - unreachable - end - i32.const 1 - i32.const 2 - i32.const 27 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $8 - i32.load offset=4 - i32.const 1 - i32.const 2 - i32.const 26 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $32 - i32.load offset=4 - i32.const 1 - i32.const 2 - i32.const 7 - i32.const 8288 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - i32.store - local.get $32 - i32.store - local.get $8 - i32.load offset=4 - local.get $8 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $25 - i32.const 7040 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 1030 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 8292 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 8292 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 8292 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $18 - i32.const 8292 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 8292 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $12 - i32.const 8292 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $19 - i32.const 8292 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $9 - i32.const 8292 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $20 - i32.const 8292 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $13 - i32.const 8292 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $21 - i32.const 8292 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $14 - i32.const 8292 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $22 - i32.const 8292 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $15 - i32.const 8292 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $23 - i32.const 8292 - i32.gt_u - if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $16 - i32.const 8292 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $28 - i32.const 8292 - i32.gt_u - if - local.get $28 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $17 - i32.const 8292 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $29 - i32.const 8292 - i32.gt_u - if - local.get $29 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $30 - i32.const 8292 - i32.gt_u - if - local.get $30 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $31 - i32.const 8292 - i32.gt_u - if - local.get $31 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $25 - i32.const 8292 - i32.gt_u - if - local.get $25 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + unreachable end - global.get $std/array/arr + i32.const 1 + i32.const 2 + i32.const 27 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + i32.load offset=4 + i32.const 1 + i32.const 2 + i32.const 26 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain local.tee $0 - i32.const 8292 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 8292 - i32.gt_u + i32.load offset=4 + i32.const 1 + i32.const 2 + i32.const 7 + i32.const 8288 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + i32.store + local.get $0 + i32.store + local.get $20 + i32.load offset=4 + local.get $20 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> + local.tee $1 + local.set $0 + local.get $1 + i32.const 7040 + call $~lib/string/String.__eq + i32.eqz if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 1030 + i32.const 2 + call $~lib/builtins/abort + unreachable end + local.get $21 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $23 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release local.get $11 - i32.const 8292 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release + local.get $18 + call $~lib/rt/pure/__release + local.get $19 + 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 local.get $5 - i32.const 8292 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + global.get $std/array/arr + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $31 + call $~lib/rt/pure/__release local.get $26 - i32.const 8292 - i32.gt_u - if - local.get $26 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 8292 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 8292 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 8292 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release ) - (func $~start (; 154 ;) + (func $~start (; 184 ;) global.get $~started if return @@ -18507,7 +15752,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 155 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 185 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -18534,80 +15779,10 @@ i32.const 1 i32.eq if - block $__inlined_func$~lib/rt/__visit_members - block $block$4$break - block $switch$1$default - block $switch$1$case$29 - block $switch$1$case$28 - block $switch$1$case$27 - block $switch$1$case$18 - block $switch$1$case$17 - block $switch$1$case$16 - block $switch$1$case$14 - block $switch$1$case$13 - block $switch$1$case$10 - local.get $0 - i32.const 16 - i32.add - local.tee $1 - i32.const 8 - i32.sub - i32.load - br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $__inlined_func$~lib/rt/__visit_members $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $1 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - unreachable - end - local.get $1 - i32.load - local.tee $1 - if - local.get $1 - i32.const 8292 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - end + local.get $0 + i32.const 16 + i32.add + call $~lib/rt/__visit_members local.get $2 i32.const -2147483648 i32.and @@ -18619,17 +15794,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 @@ -18653,7 +15820,19 @@ i32.store offset=4 end ) - (func $~lib/array/Array#__visit_impl (; 156 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 186 ;) (param $0 i32) + local.get $0 + i32.const 8292 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) + (func $~lib/array/Array#__visit_impl (; 187 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -18664,25 +15843,18 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $0 loop $while-continue|0 local.get $1 - local.get $2 + local.get $0 i32.lt_u if local.get $1 i32.load - local.tee $0 + local.tee $2 if - local.get $0 - i32.const 8292 - i32.ge_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__visit end local.get $1 i32.const 4 @@ -18692,4 +15864,73 @@ end end ) + (func $~lib/rt/__visit_members (; 188 ;) (param $0 i32) + block $folding-inner0 + block $block$4$break + block $switch$1$default + block $switch$1$case$29 + block $switch$1$case$28 + block $switch$1$case$27 + block $switch$1$case$18 + block $switch$1$case$17 + block $switch$1$case$16 + block $switch$1$case$14 + block $switch$1$case$13 + block $switch$1$case$10 + 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 $block$4$break $block$4$break $switch$1$case$2 $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $switch$1$case$2 $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default + end + return + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $0 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + unreachable + end + local.get $0 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/rt/pure/__visit + end + end + ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 34794de573..2dede897a4 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,8 +1,8 @@ (module (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 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -809,7 +809,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -885,10 +947,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -936,65 +997,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1044,7 +1049,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1255,9 +1268,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 432 i32.gt_u @@ -1265,48 +1317,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1479,7 +1494,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1508,7 +1523,6 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 0 i32.lt_s @@ -1540,9 +1554,7 @@ select local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -1552,7 +1564,18 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + local.get $0 + i32.const 432 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1569,27 +1592,21 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 1 local.get $1 i32.shl - local.tee $4 + local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $4 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1602,39 +1619,32 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $3 - local.get $2 + local.get $1 + local.set $2 local.get $0 i32.load - local.tee $1 + local.tee $4 + local.get $1 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 - i32.const 432 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.set $2 + local.get $4 + call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 - local.get $4 + local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1656,12 +1666,9 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 15 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -1684,14 +1691,7 @@ call $~lib/rt/pure/__retain local.set $3 local.get $4 - i32.const 432 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 local.get $3 @@ -1704,23 +1704,21 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 18 ;) (param $0 i32) + (func $~setArgumentsLength (; 22 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 19 ;) + (func $start:std/arraybuffer (; 23 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - call $~lib/rt/tlsf/maybeInitialize + (local $6 i32) i32.const 8 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $0 i32.const 8 call $~lib/memory/memory.fill @@ -1775,14 +1773,7 @@ call $~lib/arraybuffer/ArrayBuffer#slice local.set $1 local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.const 16 i32.sub @@ -1801,17 +1792,9 @@ i32.const -1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 local.get $1 - i32.const 432 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.tee $1 i32.const 16 i32.sub i32.load offset=12 @@ -1829,17 +1812,9 @@ i32.const 1 i32.const 3 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 - local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 16 i32.sub i32.load offset=12 @@ -1859,14 +1834,7 @@ call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 local.get $1 - i32.const 432 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 16 i32.sub @@ -1885,16 +1853,10 @@ i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice + local.set $1 local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 16 i32.sub i32.load offset=12 @@ -1912,17 +1874,10 @@ i32.const -4 i32.const 42 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $3 + local.set $0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 i32.const 16 i32.sub i32.load offset=12 @@ -1941,15 +1896,8 @@ i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.set $1 - local.get $3 - i32.const 432 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $0 + call $~lib/rt/pure/__release local.get $1 i32.const 16 i32.sub @@ -1972,39 +1920,30 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $3 - call $~lib/rt/tlsf/maybeInitialize + local.set $4 i32.const 16 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 8 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $4 + call $~lib/rt/tlsf/__alloc + local.tee $3 i32.const 368 i32.const 8 call $~lib/memory/memory.copy local.get $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $4 + local.get $3 i32.store offset=4 local.get $0 i32.const 8 @@ -2014,87 +1953,42 @@ i32.store offset=12 local.get $0 call $~lib/rt/pure/__retain - local.set $0 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $4 + local.set $6 i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $4 i32.load - local.tee $5 - local.get $5 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 + local.set $3 + local.get $0 + local.get $3 call $~lib/dataview/DataView#constructor - local.set $5 + local.set $0 local.get $2 - i32.const 432 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 432 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 432 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 432 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 432 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 432 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~start (; 20 ;) + (func $~start (; 24 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 0f10d3edc2..6199423dd1 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,12 +1,12 @@ (module - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 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 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_f32_i32_=>_none (func (param i32 f32 i32))) @@ -817,7 +817,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -893,10 +955,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -944,65 +1005,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1052,117 +1057,137 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - end - local.get $0 - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 13 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize - i32.const 8 - i32.const 0 + local.get $0 + local.get $1 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $1 + ) + (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) + (local $1 i32) + local.get $0 i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 8 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $0 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 4 i32.sub i32.const 0 i32.store8 + ) + (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 + ) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + local.get $0 + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 + call $~lib/memory/memory.fill local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1176,28 +1201,21 @@ i32.const 0 i32.store offset=8 local.get $1 - local.set $3 + local.set $2 local.get $1 local.get $0 i32.load - local.tee $2 + local.tee $3 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $2 - i32.const 512 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 + call $~lib/rt/pure/__release end local.get $0 - local.get $3 + local.get $2 i32.store local.get $0 local.get $1 @@ -1207,7 +1225,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1227,7 +1245,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1251,12 +1269,9 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $3 i32.const 0 @@ -1279,14 +1294,7 @@ call $~lib/rt/pure/__retain local.set $4 local.get $5 - i32.const 512 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $3 local.get $4 @@ -1301,7 +1309,20 @@ i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/polyfills/bswap (; 21 ;) (param $0 i32) (result i32) + local.get $0 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $0 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + ) + (func $~lib/dataview/DataView#getFloat32 (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1333,21 +1354,11 @@ i32.load offset=4 i32.add i32.load - local.tee $0 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl - local.get $0 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or + call $~lib/polyfills/bswap f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 17 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 23 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1373,7 +1384,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 18 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 24 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1399,7 +1410,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1418,7 +1429,20 @@ i32.add i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/polyfills/bswap (; 26 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 24 + i32.shr_s + i32.const 255 + i32.and + local.get $0 + i32.const 8 + i32.shl + i32.or + ) + (func $~lib/dataview/DataView#getInt16 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1442,22 +1466,17 @@ i32.load offset=4 i32.add i32.load16_s - local.tee $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 24 - i32.shr_s - i32.const 255 - i32.and - local.get $0 - i32.const 8 - i32.shl - i32.or + local.set $0 local.get $2 - select + i32.eqz + if + local.get $0 + call $~lib/polyfills/bswap + local.set $0 + end + local.get $0 ) - (func $~lib/dataview/DataView#getInt32 (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1481,22 +1500,17 @@ i32.load offset=4 i32.add i32.load - local.tee $0 - local.get $0 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl - local.get $0 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or + local.set $0 local.get $2 - select + i32.eqz + if + local.get $0 + call $~lib/polyfills/bswap + local.set $0 + end + local.get $0 ) - (func $~lib/dataview/DataView#getInt64 (; 22 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 29 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1522,7 +1536,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1541,7 +1555,18 @@ i32.add i32.load8_u ) - (func $~lib/dataview/DataView#getUint16 (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/polyfills/bswap (; 31 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or + ) + (func $~lib/dataview/DataView#getUint16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1565,20 +1590,17 @@ i32.load offset=4 i32.add i32.load16_u - local.tee $0 - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 65535 - i32.and - i32.const 8 - i32.shr_u - i32.or + local.set $0 local.get $2 - select + i32.eqz + if + local.get $0 + call $~lib/polyfills/bswap + local.set $0 + end + local.get $0 ) - (func $~lib/dataview/DataView#getUint32 (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1602,22 +1624,17 @@ i32.load offset=4 i32.add i32.load - local.tee $0 - local.get $0 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl - local.get $0 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or + local.set $0 local.get $2 - select + i32.eqz + if + local.get $0 + call $~lib/polyfills/bswap + local.set $0 + end + local.get $0 ) - (func $~lib/dataview/DataView#getUint64 (; 26 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 34 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1643,7 +1660,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 27 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 35 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1667,21 +1684,11 @@ i32.load offset=4 local.get $1 i32.reinterpret_f32 - local.tee $0 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl - local.get $0 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or + call $~lib/polyfills/bswap i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 28 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 36 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1709,7 +1716,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt16 (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1725,25 +1732,15 @@ local.get $0 i32.load offset=4 local.get $2 - i32.eqz - if + if (result i32) local.get $1 - i32.const 16 - i32.shl - i32.const 24 - i32.shr_s - i32.const 255 - i32.and + else local.get $1 - i32.const 8 - i32.shl - i32.or - local.set $1 + call $~lib/polyfills/bswap end - local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1759,25 +1756,15 @@ local.get $0 i32.load offset=4 local.get $2 - i32.eqz - if + if (result i32) local.get $1 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl + else local.get $1 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or - local.set $1 + call $~lib/polyfills/bswap end - local.get $1 i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 31 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 39 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1801,7 +1788,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1817,23 +1804,15 @@ local.get $0 i32.load offset=4 local.get $2 - i32.eqz - if + if (result i32) local.get $1 - i32.const 8 - i32.shl + else local.get $1 - i32.const 65535 - i32.and - i32.const 8 - i32.shr_u - i32.or - local.set $1 + call $~lib/polyfills/bswap end - local.get $1 i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1849,25 +1828,15 @@ local.get $0 i32.load offset=4 local.get $2 - i32.eqz - if + if (result i32) local.get $1 - i32.const -16711936 - i32.and - i32.const 8 - i32.rotl + else local.get $1 - i32.const 16711935 - i32.and - i32.const 8 - i32.rotr - i32.or - local.set $1 + call $~lib/polyfills/bswap end - local.get $1 i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 34 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 42 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1891,20 +1860,17 @@ end i64.store ) - (func $~setArgumentsLength (; 35 ;) (param $0 i32) + (func $~setArgumentsLength (; 43 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 36 ;) + (func $start:std/dataview (; 44 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 @@ -3464,14 +3430,7 @@ call $~lib/dataview/DataView#constructor local.set $2 local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 i32.load offset=4 local.get $2 @@ -3498,28 +3457,14 @@ unreachable end local.get $1 - i32.const 512 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 512 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 37 ;) + (func $~start (; 45 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 46 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index b155c1c690..ea90a4f667 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,28 +15,20 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/date/Date#constructor (; 3 ;) (param $0 i64) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $4 + local.get $2 + local.get $0 local.get $1 - local.get $3 i32.sub i32.const 65535 i32.add @@ -44,16 +36,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $4 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -62,32 +54,11 @@ end end end - local.get $1 - global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $1 - i32.const 16 - i32.store - local.get $1 - i32.const 1 - i32.store offset=4 - local.get $1 - i32.const 3 - i32.store offset=8 - local.get $1 - i32.const 8 - i32.store offset=12 - local.get $2 - i64.const 0 - i64.store - local.get $2 local.get $0 - i64.store - local.get $2 + global.set $~lib/rt/stub/offset ) (func $start:std/date (; 4 ;) + (local $0 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -164,10 +135,31 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - call $~lib/date/Date#constructor + local.set $0 + i32.const 96 + call $~lib/rt/stub/maybeGrowMemory + i32.const 64 + i32.const 16 + i32.store + i32.const 68 + i32.const 1 + i32.store + i32.const 72 + i32.const 3 + i32.store + i32.const 76 + i32.const 8 + i32.store + i32.const 80 + i64.const 0 + i64.store + i32.const 80 + local.get $0 + i64.store + i32.const 80 global.set $std/date/date global.get $std/date/creationTime - global.get $std/date/date + i32.const 80 i64.load i64.ne if diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 453e69eaf3..04613ef318 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1,9 +1,10 @@ (module - (type $f64_=>_f64 (func (param f64) (result f64))) (type $f32_=>_f32 (func (param f32) (result f32))) + (type $f64_=>_f64 (func (param f64) (result f64))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) @@ -658,63 +659,65 @@ f64.mul f64.add ) - (func $../../lib/libm/assembly/libm/acosh (; 6 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acosh (; 6 ;) (param $0 f64) (result f64) (local $1 i64) - block $__inlined_func$~lib/math/NativeMath.acosh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $1 + i64.const 1024 + i64.lt_u + if local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $1 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $0 - local.get $0 - local.get $0 - f64.mul - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - br $__inlined_func$~lib/math/NativeMath.acosh - end - local.get $1 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 - local.get $0 - local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub - call $~lib/math/NativeMath.log - br $__inlined_func$~lib/math/NativeMath.acosh - end + f64.const 1 + f64.sub + local.tee $0 local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 + local.get $0 + f64.mul + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + return + end + local.get $1 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + return end + local.get $0 + call $~lib/math/NativeMath.log + f64.const 0.6931471805599453 + f64.add + ) + (func $../../lib/libm/assembly/libm/acosh (; 7 ;) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.acosh ) - (func $~lib/math/NativeMath.asin (; 7 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 8 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -852,11 +855,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/asin (; 8 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asin (; 9 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 9 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 10 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -926,11 +929,11 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/asinh (; 10 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asinh (; 11 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asinh ) - (func $~lib/math/NativeMath.atan (; 11 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 12 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1153,19 +1156,18 @@ local.get $3 f64.copysign ) - (func $../../lib/libm/assembly/libm/atan (; 12 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 13 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $../../lib/libm/assembly/libm/atanh (; 13 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atanh (; 14 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) local.get $0 - local.tee $1 f64.abs - local.set $0 - local.get $1 + local.set $1 + local.get $0 i64.reinterpret_f64 i64.const 52 i64.shr_u @@ -1174,46 +1176,49 @@ local.tee $2 i64.const 1022 i64.lt_u - if + if (result f64) local.get $2 i64.const 991 i64.ge_u - if + if (result f64) f64.const 0.5 f64.const 2 - local.get $0 + local.get $1 f64.mul local.tee $3 local.get $3 - local.get $0 + local.get $1 f64.mul f64.const 1 - local.get $0 + local.get $1 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - local.set $0 + else + local.get $1 end else f64.const 0.5 f64.const 2 - local.get $0 + local.get $1 f64.const 1 - local.get $0 + local.get $1 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul - local.set $0 end local.get $0 - local.get $1 f64.copysign ) - (func $~lib/math/NativeMath.atan2 (; 14 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 15 ;) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.atanh + ) + (func $~lib/math/NativeMath.atan2 (; 16 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1423,12 +1428,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libm/atan2 (; 15 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 17 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 16 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 18 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1550,15 +1555,27 @@ f64.mul f64.add ) - (func $../../lib/libm/assembly/libm/cbrt (; 17 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 19 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $../../lib/libm/assembly/libm/ceil (; 18 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 20 ;) (param $0 f64) (result f64) local.get $0 f64.ceil ) - (func $../../lib/libm/assembly/libm/clz32 (; 19 ;) (param $0 f64) (result f64) + (func $~lib/math/dtoi32 (; 21 ;) (param $0 f64) (result i32) + local.get $0 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + ) + (func $../../lib/libm/assembly/libm/clz32 (; 22 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -1568,20 +1585,12 @@ f64.const 32 else local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.clz f64.convert_i32_s end ) - (func $~lib/math/pio2_large_quot (; 20 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 23 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1867,7 +1876,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 21 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 24 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -2205,11 +2214,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/cos (; 22 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cos (; 25 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cos ) - (func $~lib/math/NativeMath.expm1 (; 23 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 26 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2480,7 +2489,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 24 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 27 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -2557,7 +2566,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 25 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 28 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -2709,89 +2718,92 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/cosh (; 26 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 29 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) - block $__inlined_func$~lib/math/NativeMath.cosh (result f64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - f64.reinterpret_i64 - local.set $0 - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 1072049730 - i32.lt_u - if - f64.const 1 - local.get $1 - i32.const 1045430272 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMath.cosh - drop - f64.const 1 - local.get $0 - call $~lib/math/NativeMath.expm1 - local.tee $0 - local.get $0 - f64.mul - f64.const 2 - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.div - f64.add - br $__inlined_func$~lib/math/NativeMath.cosh - end + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + f64.reinterpret_i64 + local.set $0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1072049730 + i32.lt_u + if local.get $1 - i32.const 1082535490 + i32.const 1045430272 i32.lt_u if - f64.const 0.5 - local.get $0 - call $~lib/math/NativeMath.exp - local.tee $0 f64.const 1 - local.get $0 - f64.div - f64.add - f64.mul - br $__inlined_func$~lib/math/NativeMath.cosh + return end + f64.const 1 + local.get $0 + call $~lib/math/NativeMath.expm1 + local.tee $0 local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 f64.mul - f64.const 2247116418577894884661631e283 + f64.const 2 + f64.const 2 + local.get $0 f64.mul + f64.add + f64.div + f64.add + return end + local.get $1 + i32.const 1082535490 + i32.lt_u + if + f64.const 0.5 + local.get $0 + call $~lib/math/NativeMath.exp + local.tee $0 + f64.const 1 + local.get $0 + f64.div + f64.add + f64.mul + return + end + local.get $0 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + ) + (func $../../lib/libm/assembly/libm/cosh (; 30 ;) (param $0 f64) (result f64) + local.get $0 + call $~lib/math/NativeMath.cosh ) - (func $../../lib/libm/assembly/libm/exp (; 27 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 31 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $../../lib/libm/assembly/libm/expm1 (; 28 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 32 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $../../lib/libm/assembly/libm/floor (; 29 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 33 ;) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $../../lib/libm/assembly/libm/fround (; 30 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/fround (; 34 ;) (param $0 f64) (result f64) local.get $0 f32.demote_f64 f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 31 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 35 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -2960,12 +2972,12 @@ f64.sqrt f64.mul ) - (func $../../lib/libm/assembly/libm/hypot (; 32 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 36 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $../../lib/libm/assembly/libm/imul (; 33 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 37 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) block $__inlined_func$~lib/math/NativeMath.imul (result f64) f64.const 0 @@ -2980,34 +2992,18 @@ br_if $__inlined_func$~lib/math/NativeMath.imul drop local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 local.get $1 - f64.const 4294967296 - local.get $1 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.mul f64.convert_i32_s end ) - (func $../../lib/libm/assembly/libm/log (; 34 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 38 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 35 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 39 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3209,15 +3205,15 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 40 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $../../lib/libm/assembly/libm/log1p (; 37 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 41 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 38 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 42 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3412,21 +3408,21 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 43 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $../../lib/libm/assembly/libm/max (; 40 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 44 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $../../lib/libm/assembly/libm/min (; 41 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 45 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 42 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 46 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -4382,12 +4378,12 @@ f64.const 1e-300 f64.mul ) - (func $../../lib/libm/assembly/libm/pow (; 43 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 47 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $../../lib/libm/assembly/libm/round (; 44 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 48 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -4395,7 +4391,7 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/sign (; 45 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 49 ;) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -4408,7 +4404,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 46 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 50 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -4728,11 +4724,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/sin (; 47 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 51 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 48 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 52 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -4809,15 +4805,15 @@ f64.mul f64.mul ) - (func $../../lib/libm/assembly/libm/sinh (; 49 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 53 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $../../lib/libm/assembly/libm/sqrt (; 50 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 54 ;) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/tan_kern (; 51 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 55 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -4999,7 +4995,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 52 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 56 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -5176,11 +5172,11 @@ i32.sub call $~lib/math/tan_kern ) - (func $../../lib/libm/assembly/libm/tan (; 53 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 57 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 54 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 58 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5259,19 +5255,19 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/tanh (; 55 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 59 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $../../lib/libm/assembly/libm/trunc (; 56 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 60 ;) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $../../lib/libm/assembly/libmf/abs (; 57 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/abs (; 61 ;) (param $0 f32) (result f32) local.get $0 f32.abs ) - (func $~lib/math/Rf (; 58 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 62 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -5290,7 +5286,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 59 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 63 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5406,11 +5402,11 @@ f32.add f32.mul ) - (func $../../lib/libm/assembly/libmf/acos (; 60 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acos (; 64 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.acos ) - (func $~lib/math/NativeMathf.log1p (; 61 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 65 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5580,7 +5576,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 62 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 66 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5714,59 +5710,61 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/acosh (; 63 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acosh (; 67 ;) (param $0 f32) (result f32) (local $1 i32) - block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - br $__inlined_func$~lib/math/NativeMathf.acosh - end - local.get $1 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 - local.get $0 - local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub - call $~lib/math/NativeMathf.log - br $__inlined_func$~lib/math/NativeMathf.acosh - end + f32.const 1 + f32.sub + local.tee $0 local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt f32.add + call $~lib/math/NativeMathf.log1p + return end + local.get $1 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + return + end + local.get $0 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add ) - (func $~lib/math/NativeMathf.asin (; 64 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acosh (; 68 ;) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.acosh + ) + (func $~lib/math/NativeMathf.asin (; 69 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -5846,62 +5844,59 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asin (; 65 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asin (; 70 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asin ) - (func $../../lib/libm/assembly/libmf/asinh (; 66 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (func $~lib/math/NativeMathf.asinh (; 71 ;) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) local.get $0 - local.tee $2 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 f32.reinterpret_i32 - local.set $0 - local.get $1 + local.set $1 + local.get $2 i32.const 1166016512 i32.ge_u - if - local.get $0 + if (result f32) + local.get $1 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - local.set $0 else - local.get $1 + local.get $2 i32.const 1073741824 i32.ge_u - if + if (result f32) f32.const 2 - local.get $0 + local.get $1 f32.mul f32.const 1 - local.get $0 - local.get $0 + local.get $1 + local.get $1 f32.mul f32.const 1 f32.add f32.sqrt - local.get $0 + local.get $1 f32.add f32.div f32.add call $~lib/math/NativeMathf.log - local.set $0 else - local.get $1 + local.get $2 i32.const 964689920 i32.ge_u - if - local.get $0 - local.get $0 - local.get $0 + if (result f32) + local.get $1 + local.get $1 + local.get $1 f32.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 f32.const 1 f32.add f32.sqrt @@ -5910,15 +5905,19 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $0 + else + local.get $1 end end end local.get $0 - local.get $2 f32.copysign ) - (func $~lib/math/NativeMathf.atan (; 67 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asinh (; 72 ;) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.asinh + ) + (func $~lib/math/NativeMathf.atan (; 73 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6114,61 +6113,63 @@ local.get $4 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atan (; 68 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan (; 74 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.atan ) - (func $../../lib/libm/assembly/libmf/atanh (; 69 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atanh (; 75 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 - local.tee $1 f32.abs - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.reinterpret_f32 local.tee $2 i32.const 1056964608 i32.lt_u - if + if (result f32) local.get $2 i32.const 796917760 i32.ge_u - if + if (result f32) f32.const 0.5 f32.const 2 - local.get $0 + local.get $1 f32.mul f32.const 1 - local.get $0 + local.get $1 f32.const 1 - local.get $0 + local.get $1 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 + else + local.get $1 end else f32.const 0.5 f32.const 2 - local.get $0 + local.get $1 f32.const 1 - local.get $0 + local.get $1 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 end local.get $0 - local.get $1 f32.copysign ) - (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atanh (; 76 ;) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.atanh + ) + (func $~lib/math/NativeMathf.atan2 (; 77 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6361,12 +6362,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libmf/atan2 (; 71 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan2 (; 78 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 ) - (func $~lib/math/NativeMathf.cbrt (; 72 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 79 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -6465,16 +6466,15 @@ f64.div f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/cbrt (; 73 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cbrt (; 80 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cbrt ) - (func $../../lib/libm/assembly/libmf/ceil (; 74 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/ceil (; 81 ;) (param $0 f32) (result f32) local.get $0 f32.ceil ) - (func $../../lib/libm/assembly/libmf/clz32 (; 75 ;) (param $0 f32) (result f32) - (local $1 f64) + (func $../../lib/libm/assembly/libmf/clz32 (; 82 ;) (param $0 f32) (result f32) local.get $0 local.get $0 f32.sub @@ -6485,21 +6485,12 @@ else local.get $0 f64.promote_f32 - local.tee $1 - f64.const 4294967296 - local.get $1 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.clz f32.convert_i32_s end ) - (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 83 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -6768,11 +6759,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cos (; 77 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cos (; 84 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cos ) - (func $~lib/math/NativeMathf.expm1 (; 78 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 85 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7022,7 +7013,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.scalbn (; 79 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 86 ;) (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 i32.gt_s @@ -7098,7 +7089,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 80 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 87 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -7232,82 +7223,85 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cosh (; 81 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 88 ;) (param $0 f32) (result f32) (local $1 i32) - block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - f32.reinterpret_i32 - local.set $0 + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if local.get $1 - i32.const 1060205079 + i32.const 964689920 i32.lt_u if f32.const 1 - local.get $1 - i32.const 964689920 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMathf.cosh - drop - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh - end - local.get $1 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 - local.get $0 - call $~lib/math/NativeMathf.exp - local.tee $0 - f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh + return end + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 f32.mul - f32.const 1661534994731144841129758e11 + f32.const 2 + f32.const 2 + local.get $0 f32.mul + f32.add + f32.div + f32.add + return + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + return end + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + ) + (func $../../lib/libm/assembly/libmf/cosh (; 89 ;) (param $0 f32) (result f32) + local.get $0 + call $~lib/math/NativeMathf.cosh ) - (func $../../lib/libm/assembly/libmf/exp (; 82 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/exp (; 90 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.exp ) - (func $../../lib/libm/assembly/libmf/expm1 (; 83 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/expm1 (; 91 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.expm1 ) - (func $../../lib/libm/assembly/libmf/floor (; 84 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/floor (; 92 ;) (param $0 f32) (result f32) local.get $0 f32.floor ) - (func $../../lib/libm/assembly/libmf/fround (; 85 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/fround (; 93 ;) (param $0 f32) (result f32) local.get $0 ) - (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 94 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -7412,21 +7406,20 @@ f32.sqrt f32.mul ) - (func $../../lib/libm/assembly/libmf/hypot (; 87 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/hypot (; 95 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot ) - (func $../../lib/libm/assembly/libmf/imul (; 88 ;) (param $0 f32) (param $1 f32) (result f32) - (local $2 f64) - (local $3 f32) + (func $../../lib/libm/assembly/libmf/imul (; 96 ;) (param $0 f32) (param $1 f32) (result f32) + (local $2 f32) block $~lib/math/NativeMathf.imul|inlined.0 (result f32) f32.const 0 local.get $0 local.get $1 f32.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f32.sub f32.const 0 f32.ne @@ -7434,37 +7427,19 @@ drop local.get $0 f64.promote_f32 - local.tee $2 - f64.const 4294967296 - local.get $2 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 local.get $1 f64.promote_f32 - local.tee $2 - f64.const 4294967296 - local.get $2 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.mul f32.convert_i32_s end ) - (func $../../lib/libm/assembly/libmf/log (; 89 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log (; 97 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log ) - (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 98 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7622,15 +7597,15 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/log10 (; 91 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log10 (; 99 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log10 ) - (func $../../lib/libm/assembly/libmf/log1p (; 92 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log1p (; 100 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log1p ) - (func $~lib/math/NativeMathf.log2 (; 93 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 101 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7780,21 +7755,21 @@ f32.convert_i32_s f32.add ) - (func $../../lib/libm/assembly/libmf/log2 (; 94 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log2 (; 102 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log2 ) - (func $../../lib/libm/assembly/libmf/max (; 95 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/max (; 103 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.max ) - (func $../../lib/libm/assembly/libmf/min (; 96 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/min (; 104 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.min ) - (func $~lib/math/NativeMathf.pow (; 97 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 105 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8252,12 +8227,12 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/pow (; 98 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/pow (; 106 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow ) - (func $../../lib/libm/assembly/libmf/round (; 99 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/round (; 107 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.5 f32.add @@ -8265,7 +8240,7 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/sign (; 100 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sign (; 108 ;) (param $0 f32) (result f32) local.get $0 f32.abs f32.const 0 @@ -8278,7 +8253,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 101 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 109 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8548,11 +8523,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/sin (; 102 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sin (; 110 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sin ) - (func $~lib/math/NativeMathf.sinh (; 103 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 111 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -8624,15 +8599,15 @@ f32.mul f32.mul ) - (func $../../lib/libm/assembly/libmf/sinh (; 104 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sinh (; 112 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sinh ) - (func $../../lib/libm/assembly/libmf/sqrt (; 105 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sqrt (; 113 ;) (param $0 f32) (result f32) local.get $0 f32.sqrt ) - (func $~lib/math/NativeMathf.tan (; 106 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 114 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8886,11 +8861,11 @@ local.get $1 f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/tan (; 107 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tan (; 115 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tan ) - (func $~lib/math/NativeMathf.tanh (; 108 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 116 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -8964,11 +8939,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/tanh (; 109 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tanh (; 117 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tanh ) - (func $../../lib/libm/assembly/libmf/trunc (; 110 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/trunc (; 118 ;) (param $0 f32) (result f32) local.get $0 f32.trunc ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 10f4de8ec7..f10b50ad55 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -2,24 +2,26 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) + (type $none_=>_i32 (func (result i32))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) + (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i64_=>_i32 (func (param i32 i64 i64) (result i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_f32_=>_i32 (func (param i32 f32 f32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_f64_=>_i32 (func (param i32 f64 f64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -849,7 +851,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -925,10 +989,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -956,65 +1019,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1064,9 +1071,56 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 556 i32.gt_u @@ -1074,48 +1128,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1326,7 +1343,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 16 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1339,35 +1356,34 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#clear (; 17 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 - i32.load - local.tee $2 i32.const 556 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end + ) + (func $~lib/map/Map#clear (; 21 ;) (param $0 i32) + (local $1 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1379,15 +1395,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -1401,7 +1409,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#find (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1444,7 +1452,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1460,7 +1468,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 20 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1558,14 +1566,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -1584,14 +1585,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1604,25 +1598,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1721,7 +1701,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1747,7 +1727,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1763,27 +1743,21 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1797,7 +1771,8 @@ i32.const 0 i32.store offset=8 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load local.tee $4 @@ -1807,14 +1782,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1827,7 +1795,49 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 28 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2000,7 +2010,20 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2056,10 +2079,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -2097,29 +2120,19 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/array/ensureSize (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 local.get $2 i32.shr_u i32.gt_u @@ -2139,67 +2152,26 @@ end local.get $0 i32.load - local.set $3 + local.set $4 + local.get $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $2 i32.shl local.tee $2 - local.set $5 - call $~lib/rt/tlsf/maybeInitialize - local.set $6 - local.get $3 - i32.const 16 - i32.sub - local.set $1 - local.get $3 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $3 - select - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $6 - local.get $1 - local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 i32.add local.get $2 - local.get $4 + local.get $3 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $3 + local.get $4 i32.ne if local.get $0 @@ -2214,7 +2186,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2250,7 +2222,19 @@ local.get $2 i32.store8 ) - (func $~lib/map/Map#keys (; 28 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#set:length (; 34 ;) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 0 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/map/Map#keys (; 35 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2263,12 +2247,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 0 @@ -2316,25 +2297,15 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 local.get $0 - i32.const 0 - call $~lib/array/ensureSize - local.get $1 - local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/array/Array#constructor (; 29 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 36 ;) (param $0 i32) (result i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $0 i32.const 2 @@ -2347,7 +2318,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2385,7 +2356,19 @@ local.get $2 i32.store ) - (func $~lib/map/Map#values (; 31 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#set:length (; 38 ;) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/map/Map#values (; 39 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2437,34 +2420,18 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 32 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 40 ;) (param $0 i32) (local $1 i32) - (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -2476,15 +2443,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -2498,14 +2457,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 33 ;) (result i32) + (func $~lib/map/Map#constructor (; 41 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2529,7 +2485,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 42 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2550,7 +2506,50 @@ i32.add i32.load ) - (func $~lib/map/Map#rehash (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2648,14 +2647,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -2674,14 +2666,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -2694,32 +2679,15 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load local.get $1 - local.tee $3 i32.const 24 i32.shl i32.const 24 @@ -2728,48 +2696,15 @@ i32.xor i32.const 16777619 i32.mul - local.tee $4 + local.tee $3 + local.set $4 local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end local.get $1 + local.get $3 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store8 offset=1 else @@ -2815,10 +2750,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store8 + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store8 offset=1 local.get $0 @@ -2827,7 +2762,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -2837,17 +2772,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 37 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 46 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2878,7 +2813,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2919,7 +2854,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 48 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3014,14 +2949,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -3040,14 +2968,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -3060,25 +2981,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3168,7 +3075,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 50 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3234,7 +3141,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 42 ;) + (func $std/map/testNumeric (; 51 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3243,12 +3150,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -3300,15 +3204,7 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/map/Map#has @@ -3411,15 +3307,7 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/map/Map#has @@ -3472,52 +3360,47 @@ end local.get $1 call $~lib/map/Map#keys - local.set $2 + local.set $3 local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc 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 - local.get $0 + local.get $2 i32.const 0 i32.store offset=16 - local.get $0 + local.get $2 i32.const 0 i32.store offset=20 - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 - local.set $4 call $~lib/map/Map#constructor - local.set $5 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $2 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $3 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=12 i32.ge_u if @@ -3528,14 +3411,14 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $3 - local.get $2 i32.load offset=4 i32.add i32.load8_s local.set $0 local.get $6 - local.get $3 + local.get $5 call $~lib/array/Array#__get local.set $7 local.get $1 @@ -3564,43 +3447,27 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $4 local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 + call $~lib/rt/pure/__release + local.get $5 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -3612,7 +3479,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3731,15 +3598,7 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/map/Map#has @@ -3797,53 +3656,32 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#has (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/map/Map#find + i32.const 0 + i32.ne ) - (func $~lib/map/Map#rehash (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3941,14 +3779,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -3967,14 +3798,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -3987,25 +3811,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4102,7 +3912,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4126,7 +3936,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 46 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 56 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4139,12 +3949,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 0 @@ -4192,18 +3999,11 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 0 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4301,14 +4101,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -4327,14 +4120,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -4347,80 +4133,30 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load local.get $1 - local.tee $3 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.tee $4 + local.tee $3 + local.set $4 local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end local.get $1 + local.get $3 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store8 offset=1 else @@ -4466,10 +4202,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store8 + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store8 offset=1 local.get $0 @@ -4478,7 +4214,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -4488,17 +4224,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 49 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4562,7 +4298,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 50 ;) + (func $std/map/testNumeric (; 60 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4571,13 +4307,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -4608,14 +4340,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -4632,25 +4357,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -4707,14 +4417,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -4749,25 +4452,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -4815,52 +4503,47 @@ end local.get $1 call $~lib/map/Map#keys - local.set $2 + local.set $3 local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc 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 - local.get $0 + local.get $2 i32.const 0 i32.store offset=16 - local.get $0 + local.get $2 i32.const 0 i32.store offset=20 - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 - local.set $4 call $~lib/map/Map#constructor - local.set $5 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $2 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $3 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=12 i32.ge_u if @@ -4871,26 +4554,19 @@ call $~lib/builtins/abort unreachable end + local.get $5 local.get $3 - local.get $2 i32.load offset=4 i32.add i32.load8_u local.set $0 local.get $6 - local.get $3 + local.get $5 call $~lib/array/Array#__get local.set $7 local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -4904,15 +4580,7 @@ local.get $7 i32.const 20 i32.sub - local.tee $8 - local.get $8 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -4922,43 +4590,27 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $4 local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 + call $~lib/rt/pure/__release + local.get $5 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -4970,7 +4622,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4993,14 +4645,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -5032,14 +4677,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -5078,14 +4716,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -5102,25 +4733,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -5135,14 +4751,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -5182,53 +4791,18 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (; 51 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 61 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -5243,7 +4817,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5286,8 +4860,21 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 53 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/map/Map#has (; 63 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (; 64 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5381,14 +4968,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -5407,14 +4987,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -5427,25 +5000,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5539,7 +5098,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 66 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5562,7 +5121,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5600,7 +5159,19 @@ local.get $2 i32.store16 ) - (func $~lib/map/Map#keys (; 57 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#set:length (; 68 ;) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 1 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/map/Map#keys (; 69 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5613,12 +5184,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 1 @@ -5666,18 +5234,54 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 local.get $0 - i32.const 1 - call $~lib/array/ensureSize + call $~lib/array/Array#set:length local.get $1 + ) + (func $~lib/map/Map#find (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.store offset=12 - local.get $1 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 ) - (func $~lib/map/Map#rehash (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 71 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5772,14 +5376,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -5798,14 +5395,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -5818,80 +5408,27 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 16 i32.shl i32.const 16 i32.shr_s call $~lib/util/hash/hash16 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store16 offset=2 else @@ -5937,10 +5474,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store16 + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store16 offset=2 local.get $0 @@ -5949,7 +5486,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -5959,17 +5496,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 73 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6032,7 +5569,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 61 ;) + (func $std/map/testNumeric (; 74 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6041,13 +5578,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -6080,13 +5613,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -6105,24 +5632,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6183,13 +5696,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6228,24 +5735,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6295,52 +5788,47 @@ end local.get $1 call $~lib/map/Map#keys - local.set $2 + local.set $3 local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc 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 - local.get $0 + local.get $2 i32.const 0 i32.store offset=16 - local.get $0 + local.get $2 i32.const 0 i32.store offset=20 - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 - local.set $4 call $~lib/map/Map#constructor - local.set $5 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $2 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $3 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=12 i32.ge_u if @@ -6351,27 +5839,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.load offset=4 local.get $3 + i32.load offset=4 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_s local.set $0 local.get $6 - local.get $3 + local.get $5 call $~lib/array/Array#__get local.set $7 local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6385,14 +5867,7 @@ local.get $7 i32.const 20 i32.sub - local.tee $8 - local.get $8 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6402,43 +5877,27 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $4 local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 + call $~lib/rt/pure/__release + local.get $5 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -6450,7 +5909,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6475,13 +5934,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6515,13 +5968,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -6562,13 +6009,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -6587,24 +6028,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -6619,13 +6046,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -6665,53 +6086,29 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#has (; 75 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (; 76 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6806,14 +6203,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -6832,14 +6222,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -6852,25 +6235,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6962,7 +6331,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6983,7 +6352,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 65 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 79 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6996,12 +6365,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 15 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 1 @@ -7049,18 +6415,11 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 local.get $0 - i32.const 1 - call $~lib/array/ensureSize - local.get $1 - local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 66 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 80 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7155,14 +6514,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -7181,14 +6533,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -7201,78 +6546,25 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store16 offset=2 else @@ -7318,10 +6610,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store16 + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store16 offset=2 local.get $0 @@ -7330,7 +6622,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -7340,17 +6632,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 68 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 82 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7411,7 +6703,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 69 ;) + (func $std/map/testNumeric (; 83 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7420,13 +6712,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 14 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -7457,11 +6745,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -7478,22 +6762,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7550,11 +6822,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7589,22 +6857,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7652,52 +6908,47 @@ end local.get $1 call $~lib/map/Map#keys - local.set $2 + local.set $3 local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc 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 - local.get $0 + local.get $2 i32.const 0 i32.store offset=16 - local.get $0 + local.get $2 i32.const 0 i32.store offset=20 - local.get $0 + local.get $2 call $~lib/map/Map#clear - local.get $0 - local.set $4 call $~lib/map/Map#constructor - local.set $5 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $2 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $3 - local.get $2 + local.tee $5 + local.get $3 i32.load offset=12 i32.ge_u if @@ -7708,25 +6959,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.load offset=4 local.get $3 + i32.load offset=4 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_u local.set $0 local.get $6 - local.get $3 + local.get $5 call $~lib/array/Array#__get local.set $7 local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7740,12 +6987,7 @@ local.get $7 i32.const 20 i32.sub - local.tee $8 - local.get $8 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7755,43 +6997,27 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $4 local.get $7 i32.const 20 i32.sub local.tee $0 local.get $0 call $~lib/map/Map#set - local.tee $0 - i32.const 556 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 + call $~lib/rt/pure/__release + local.get $5 i32.const 1 i32.add local.set $0 br $for-loop|4 end end - local.get $4 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -7803,7 +7029,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7826,11 +7052,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7862,11 +7084,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -7905,11 +7123,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -7926,22 +7140,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -7956,11 +7158,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8000,53 +7198,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#has (; 84 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.const 0 + i32.ne ) - (func $~lib/map/Map#get (; 70 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -8063,9 +7235,65 @@ unreachable end local.get $0 - i32.load offset=4 + i32.load offset=4 + ) + (func $~lib/map/Map#keys (; 86 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $3 + local.get $0 + i32.load offset=16 + local.tee $4 + call $~lib/array/Array#constructor + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $3 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $1 + local.get $6 + local.get $5 + i32.load + call $~lib/array/Array#__set + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $1 + local.get $0 + call $~lib/array/Array#set:length + local.get $1 ) - (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 87 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -8124,7 +7352,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 72 ;) + (func $std/map/testNumeric (; 88 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8133,7 +7361,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) call $~lib/map/Map#constructor local.set $1 loop $for-loop|0 @@ -8143,9 +7370,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8160,20 +7385,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8226,9 +7441,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8259,20 +7472,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8317,66 +7520,15 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $2 - local.get $1 - i32.load offset=16 - local.tee $6 - call $~lib/array/Array#constructor + call $~lib/map/Map#keys local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|00 - local.get $4 - local.get $6 - i32.lt_s - if - local.get $2 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $7 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $3 - local.get $5 - local.get $7 - i32.load - call $~lib/array/Array#__set - end - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|00 - end - end - local.get $3 - i32.load offset=12 - drop - local.get $3 - local.get $0 - i32.const 2 - call $~lib/array/ensureSize - local.get $3 - local.get $0 - i32.store offset=12 local.get $1 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $5 - call $~lib/map/Map#constructor local.set $4 + call $~lib/map/Map#constructor + local.set $5 i32.const 0 local.set $0 loop $for-loop|2 @@ -8395,9 +7547,7 @@ local.set $7 local.get $1 local.get $2 - local.get $2 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8411,10 +7561,7 @@ local.get $7 i32.const 20 i32.sub - local.tee $8 - local.get $8 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8424,35 +7571,19 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 local.get $2 local.get $2 call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 + call $~lib/rt/pure/__release + local.get $5 local.get $7 i32.const 20 i32.sub local.tee $2 local.get $2 call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -8460,7 +7591,7 @@ br $for-loop|2 end end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -8472,7 +7603,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -8493,9 +7624,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8525,9 +7654,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8564,9 +7691,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8581,20 +7706,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8609,9 +7724,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8652,52 +7765,17 @@ unreachable end local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 73 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 89 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8710,12 +7788,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 18 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 2 @@ -8763,18 +7838,11 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 74 ;) + (func $std/map/testNumeric (; 90 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8783,13 +7851,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 17 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -8818,9 +7882,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -8835,20 +7897,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8901,9 +7953,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8934,20 +7984,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -8997,12 +8037,9 @@ local.get $1 call $~lib/map/Map#values local.set $6 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 19 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -9044,9 +8081,7 @@ local.set $7 local.get $1 local.get $3 - local.get $3 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -9060,10 +8095,7 @@ local.get $7 i32.const 20 i32.sub - local.tee $8 - local.get $8 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -9077,15 +8109,7 @@ local.get $3 local.get $3 call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 @@ -9093,15 +8117,7 @@ local.tee $3 local.get $3 call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -9142,9 +8158,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -9174,9 +8188,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -9213,9 +8225,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -9230,20 +8240,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -9258,9 +8258,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -9293,76 +8291,32 @@ local.get $1 i32.load offset=20 if - i32.const 0 - i32.const 304 - i32.const 60 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 0 + i32.const 304 + i32.const 60 + i32.const 2 + call $~lib/builtins/abort + unreachable end + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#clear (; 75 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 91 ;) (param $0 i32) (local $1 i32) - (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -9374,15 +8328,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -9396,7 +8342,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 76 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 92 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -9462,7 +8408,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 77 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 93 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -9503,7 +8449,16 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 78 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#has (; 94 ;) (param $0 i32) (param $1 i64) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (; 95 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9598,14 +8553,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -9624,14 +8572,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -9644,25 +8585,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 79 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 96 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9752,7 +8679,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 80 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 97 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -9771,7 +8698,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -9809,7 +8736,19 @@ local.get $2 i64.store ) - (func $~lib/map/Map#keys (; 82 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#set:length (; 99 ;) (param $0 i32) (param $1 i32) + local.get $0 + i32.load offset=12 + drop + local.get $0 + local.get $1 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/map/Map#keys (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9822,12 +8761,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 21 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 3 @@ -9875,18 +8811,11 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 3 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#values (; 83 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9938,34 +8867,18 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 84 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 102 ;) (param $0 i32) (local $1 i32) - (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -9977,15 +8890,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -9999,7 +8904,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 103 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -10020,7 +8925,48 @@ i32.add i64.load ) - (func $~lib/map/Map#rehash (; 86 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 104 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + local.get $0 + i64.load + i64.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=16 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 105 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10115,14 +9061,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -10141,14 +9080,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -10161,71 +9093,21 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 87 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 106 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $3 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $3 - if - local.get $3 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - local.get $3 - i64.load - i64.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $3 - i32.load offset=16 - i32.const -2 - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - local.set $3 - end - local.get $3 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if local.get $3 local.get $2 @@ -10305,7 +9187,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 88 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 107 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -10365,7 +9247,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 89 ;) + (func $std/map/testNumeric (; 108 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10374,14 +9256,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i64) - (local $9 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 20 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -10410,9 +9287,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -10428,20 +9303,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10495,9 +9360,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10530,20 +9393,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10594,12 +9447,9 @@ local.get $1 call $~lib/map/Map#values local.set $7 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 22 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -10639,9 +9489,7 @@ local.set $4 local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10656,10 +9504,7 @@ i32.const 20 i32.sub i64.extend_i32_s - local.tee $8 - local.get $8 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10673,15 +9518,7 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $9 - i32.const 556 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 local.get $4 i32.const 20 @@ -10689,15 +9526,7 @@ local.tee $4 local.get $4 call $~lib/map/Map#set - local.tee $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -10738,9 +9567,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10771,9 +9598,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -10810,9 +9635,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -10828,20 +9651,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -10856,9 +9669,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -10899,52 +9710,17 @@ unreachable end local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 556 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 90 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10957,12 +9733,9 @@ local.get $0 i32.load offset=16 local.set $2 - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 24 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.get $2 i32.const 3 @@ -11010,18 +9783,11 @@ end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 3 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 91 ;) + (func $std/map/testNumeric (; 110 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -11030,14 +9796,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i64) - (local $9 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 23 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -11066,9 +9827,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -11084,20 +9843,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11151,9 +9900,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11186,20 +9933,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11250,12 +9987,9 @@ local.get $1 call $~lib/map/Map#values local.set $7 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 25 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -11295,9 +10029,7 @@ local.set $4 local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11312,10 +10044,7 @@ i32.const 20 i32.sub i64.extend_i32_s - local.tee $8 - local.get $8 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11329,15 +10058,7 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $9 - i32.const 556 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 local.get $4 i32.const 20 @@ -11345,15 +10066,7 @@ local.tee $4 local.get $4 call $~lib/map/Map#set - local.tee $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -11394,9 +10107,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11427,9 +10138,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -11466,9 +10175,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -11484,20 +10191,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -11512,9 +10209,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -11555,52 +10250,17 @@ unreachable end local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 556 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 92 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 111 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11641,7 +10301,17 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#has (; 112 ;) (param $0 i32) (param $1 f32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (; 113 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11737,14 +10407,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -11763,14 +10426,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -11783,25 +10439,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 114 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11892,7 +10534,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 95 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 115 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -11912,45 +10554,79 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 96 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 116 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $~lib/map/Map#keys (; 117 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize + local.set $2 i32.const 16 i32.const 27 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 12 i32.mul i32.add @@ -11961,69 +10637,29 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $1 + local.get $6 local.get $5 f32.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $7 - f32.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end local.get $1 - i32.load offset=12 - drop - local.get $1 - local.get $0 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 local.get $0 - i32.store offset=12 + call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 97 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 118 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12119,14 +10755,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -12145,14 +10774,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -12165,25 +10787,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 98 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 119 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12274,7 +10882,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 99 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 120 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -12335,7 +10943,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 100 ;) + (func $std/map/testNumeric (; 121 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -12344,14 +10952,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 26 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -12380,10 +10983,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -12399,21 +10999,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12467,10 +11056,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12503,21 +11089,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12564,16 +11139,13 @@ end local.get $1 call $~lib/map/Map#keys - local.set $5 + local.set $4 local.get $1 call $~lib/map/Map#values local.set $7 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 28 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -12599,12 +11171,12 @@ local.set $6 loop $for-loop|2 local.get $3 - local.get $5 + local.get $4 i32.load offset=12 i32.lt_s if local.get $3 - local.get $5 + local.get $4 i32.load offset=12 i32.ge_u if @@ -12615,7 +11187,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=4 local.get $3 i32.const 2 @@ -12626,13 +11198,10 @@ local.get $7 local.get $3 call $~lib/array/Array#__get - local.set $4 + local.set $5 local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12643,15 +11212,11 @@ unreachable end local.get $1 - local.get $4 + local.get $5 i32.const 20 i32.sub f32.convert_i32_s - local.tee $8 - local.get $8 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12665,31 +11230,15 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $9 - i32.const 556 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - local.get $4 + local.get $5 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 call $~lib/map/Map#set - local.tee $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -12730,10 +11279,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12764,10 +11310,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -12804,10 +11347,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -12823,21 +11363,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -12852,10 +11381,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -12895,53 +11421,18 @@ call $~lib/builtins/abort unreachable end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__release local.get $7 - i32.const 556 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 101 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 122 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -12982,7 +11473,17 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 102 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#has (; 123 ;) (param $0 i32) (param $1 f64) (result i32) + local.get $0 + local.get $1 + local.get $1 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#rehash (; 124 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13078,14 +11579,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -13104,14 +11598,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -13124,25 +11611,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 103 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 125 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13233,7 +11706,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 104 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 126 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -13253,45 +11726,79 @@ local.get $0 i32.load offset=8 ) - (func $~lib/map/Map#keys (; 105 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 127 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/map/Map#keys (; 128 ;) (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.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize + local.set $2 i32.const 16 i32.const 30 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 4 i32.shl i32.add @@ -13302,69 +11809,70 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $1 + local.get $6 local.get $5 f64.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 3 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end local.get $1 - i32.load offset=12 - drop - local.get $1 local.get $0 - i32.const 3 - call $~lib/array/ensureSize + call $~lib/array/Array#set:length local.get $1 + ) + (func $~lib/map/Map#find (; 129 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 - i32.store offset=12 - local.get $1 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + f64.load + local.get $1 + f64.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=16 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 ) - (func $~lib/map/Map#rehash (; 106 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 130 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -13460,14 +11968,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -13486,14 +11987,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -13506,72 +12000,22 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 107 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 131 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $3 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $3 - if - local.get $3 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $3 - f64.load - local.get $1 - f64.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $3 - i32.load offset=16 - i32.const -2 - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - local.set $3 - end - local.get $3 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if local.get $3 local.get $2 @@ -13651,7 +12095,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 108 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 132 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -13712,7 +12156,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 109 ;) + (func $std/map/testNumeric (; 133 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -13721,14 +12165,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f64) - (local $9 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 29 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -13757,10 +12196,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -13776,21 +12212,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -13844,10 +12269,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -13880,21 +12302,10 @@ i32.const 20 i32.add call $~lib/map/Map#set - local.tee $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -13941,16 +12352,13 @@ end local.get $1 call $~lib/map/Map#keys - local.set $5 + local.set $4 local.get $1 call $~lib/map/Map#values local.set $7 - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 31 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 i32.const 0 @@ -13976,12 +12384,12 @@ local.set $6 loop $for-loop|2 local.get $3 - local.get $5 + local.get $4 i32.load offset=12 i32.lt_s if local.get $3 - local.get $5 + local.get $4 i32.load offset=12 i32.ge_u if @@ -13992,7 +12400,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=4 local.get $3 i32.const 3 @@ -14003,13 +12411,10 @@ local.get $7 local.get $3 call $~lib/array/Array#__get - local.set $4 + local.set $5 local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -14020,15 +12425,11 @@ unreachable end local.get $1 - local.get $4 + local.get $5 i32.const 20 i32.sub f64.convert_i32_s - local.tee $8 - local.get $8 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -14042,31 +12443,15 @@ local.get $0 local.get $0 call $~lib/map/Map#set - local.tee $9 - i32.const 556 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - local.get $4 + local.get $5 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 call $~lib/map/Map#set - local.tee $4 - i32.const 556 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 i32.const 1 i32.add @@ -14107,10 +12492,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -14141,10 +12523,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -14181,10 +12560,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -14200,21 +12576,10 @@ i32.const 10 i32.add call $~lib/map/Map#set - local.tee $3 - i32.const 556 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has i32.eqz if i32.const 0 @@ -14229,10 +12594,7 @@ call $~lib/map/Map#delete local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/map/Map#find + call $~lib/map/Map#has if i32.const 0 i32.const 304 @@ -14272,53 +12634,18 @@ call $~lib/builtins/abort unreachable end - local.get $5 - i32.const 556 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__release local.get $7 - i32.const 556 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 556 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 556 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 556 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 110 ;) + (func $~start (; 134 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -14330,10 +12657,9 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 111 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 135 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -14378,39 +12704,16 @@ local.tee $1 if local.get $1 - i32.const 556 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end br $__inlined_func$~lib/rt/__visit_members end local.get $1 i32.load - local.tee $3 - i32.const 556 - i32.ge_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit local.get $1 i32.load offset=8 - local.tee $1 - i32.const 556 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end local.get $2 i32.const -2147483648 @@ -14423,17 +12726,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 @@ -14457,4 +12752,16 @@ i32.store offset=4 end ) + (func $~lib/rt/pure/__visit (; 136 ;) (param $0 i32) + local.get $0 + i32.const 556 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 8f2da46949..fc0fe34bf8 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1,13 +1,17 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) - (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) - (type $none_=>_none (func)) + (type $f32_f32_f32_f32_=>_i32 (func (param f32 f32 f32 f32) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) + (type $none_=>_none (func)) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) + (type $none_=>_f64 (func (result f64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_none (func (param i64))) @@ -15,11 +19,13 @@ (type $f64_=>_none (func (param f64))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $f32_i32_f32_=>_i32 (func (param f32 i32 f32) (result i32))) + (type $f64_=>_i32 (func (param f64) (result i32))) + (type $f64_i32_f64_=>_i32 (func (param f64 i32 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) + (type $none_=>_f32 (func (result f32))) (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) - (type $none_=>_f64 (func (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)) @@ -474,7 +480,39 @@ end i32.const 1 ) - (func $~lib/math/R (; 38 ;) (param $0 f64) (result f64) + (func $std/math/test_scalbn (; 38 ;) (param $0 f64) (param $1 i32) (param $2 f64) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.scalbn + local.get $2 + f64.const 0 + call $std/math/check + ) + (func $std/math/test_scalbnf (; 39 ;) (param $0 f32) (param $1 i32) (param $2 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.scalbn + local.get $2 + f32.const 0 + call $std/math/check + ) + (func $std/math/test_abs (; 40 ;) (param $0 f64) (param $1 f64) (result i32) + local.get $0 + f64.abs + local.get $1 + f64.const 0 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/abs + local.get $1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/R (; 41 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 local.get $0 @@ -517,7 +555,7 @@ f64.add f64.div ) - (func $~lib/math/NativeMath.acos (; 39 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 42 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -641,7 +679,23 @@ f64.add f64.mul ) - (func $~lib/math/Rf (; 40 ;) (param $0 f32) (result f32) + (func $std/math/test_acos (; 43 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.acos + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/acos + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/Rf (; 44 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -660,7 +714,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 41 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 45 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -776,7 +830,7 @@ f32.add f32.mul ) - (func $~lib/math/NativeMath.log1p (; 42 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log1p (; 46 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -974,7 +1028,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 43 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 47 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 f64) @@ -1142,63 +1196,64 @@ f64.mul f64.add ) - (func $std/math/test_acosh (; 44 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) - (local $4 i64) - block $__inlined_func$~lib/math/NativeMath.acosh (result f64) + (func $~lib/math/NativeMath.acosh (; 48 ;) (param $0 f64) (result f64) + (local $1 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $1 + i64.const 1024 + i64.lt_u + if local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $4 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $3 - local.get $3 - local.get $3 - f64.mul - f64.const 2 - local.get $3 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - br $__inlined_func$~lib/math/NativeMath.acosh - end - local.get $4 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 - local.get $0 - local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub - call $~lib/math/NativeMath.log - br $__inlined_func$~lib/math/NativeMath.acosh - end + f64.const 1 + f64.sub + local.tee $0 local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 + local.get $0 + f64.mul + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.sqrt f64.add + call $~lib/math/NativeMath.log1p + return end local.get $1 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + return + end + local.get $0 + call $~lib/math/NativeMath.log + f64.const 0.6931471805599453 + f64.add + ) + (func $std/math/test_acosh (; 49 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.acosh + local.get $1 local.get $2 call $std/math/check if (result i32) @@ -1211,7 +1266,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (; 45 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 50 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -1381,7 +1436,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 46 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 51 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -1515,62 +1570,57 @@ f32.mul f32.add ) - (func $std/math/test_acoshf (; 47 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i32) - block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) + (func $~lib/math/NativeMathf.acosh (; 52 ;) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $3 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - br $__inlined_func$~lib/math/NativeMathf.acosh - end - local.get $3 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 - local.get $0 - local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub - call $~lib/math/NativeMathf.log - br $__inlined_func$~lib/math/NativeMathf.acosh - end + f32.const 1 + f32.sub + local.tee $0 local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 + local.get $0 + f32.const 2 f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + return end local.get $1 - local.get $2 - call $std/math/check + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + return + end + local.get $0 + call $~lib/math/NativeMathf.log + f32.const 0.6931471824645996 + f32.add ) - (func $~lib/math/NativeMath.asin (; 48 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 53 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1708,7 +1758,23 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.asin (; 49 ;) (param $0 f32) (result f32) + (func $std/math/test_asin (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.asin + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/asin + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.asin (; 55 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -1788,7 +1854,7 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.asinh (; 50 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 56 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -1858,58 +1924,71 @@ local.get $0 f64.copysign ) - (func $std/math/test_asinhf (; 51 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i32) - (local $4 f32) + (func $std/math/test_asinh (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.asinh + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/asinh + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.asinh (; 58 ;) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) local.get $0 - local.tee $4 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 + local.tee $2 f32.reinterpret_i32 - local.set $0 - local.get $3 + local.set $1 + local.get $2 i32.const 1166016512 i32.ge_u - if - local.get $0 + if (result f32) + local.get $1 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add - local.set $0 else - local.get $3 + local.get $2 i32.const 1073741824 i32.ge_u - if + if (result f32) f32.const 2 - local.get $0 + local.get $1 f32.mul f32.const 1 - local.get $0 - local.get $0 + local.get $1 + local.get $1 f32.mul f32.const 1 f32.add f32.sqrt - local.get $0 + local.get $1 f32.add f32.div f32.add call $~lib/math/NativeMathf.log - local.set $0 else - local.get $3 + local.get $2 i32.const 964689920 i32.ge_u - if - local.get $0 - local.get $0 - local.get $0 + if (result f32) + local.get $1 + local.get $1 + local.get $1 f32.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 f32.const 1 f32.add f32.sqrt @@ -1918,18 +1997,15 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - local.set $0 + else + local.get $1 end end end local.get $0 - local.get $4 f32.copysign - local.get $1 - local.get $2 - call $std/math/check ) - (func $~lib/math/NativeMath.atan (; 52 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 59 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2152,7 +2228,23 @@ local.get $3 f64.copysign ) - (func $~lib/math/NativeMathf.atan (; 53 ;) (param $0 f32) (result f32) + (func $std/math/test_atan (; 60 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.atan + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/atan + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.atan (; 61 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2348,66 +2440,68 @@ local.get $4 f32.copysign ) - (func $std/math/test_atanh (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/math/NativeMath.atanh (; 62 ;) (param $0 f64) (result f64) + (local $1 f64) + (local $2 i64) (local $3 f64) - (local $4 i64) - (local $5 f64) local.get $0 - local.tee $3 f64.abs - local.set $0 - local.get $3 + local.set $1 + local.get $0 i64.reinterpret_f64 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $4 + local.tee $2 i64.const 1022 i64.lt_u - if - local.get $4 + if (result f64) + local.get $2 i64.const 991 i64.ge_u - if + if (result f64) f64.const 0.5 f64.const 2 - local.get $0 + local.get $1 f64.mul - local.tee $5 - local.get $5 - local.get $0 + local.tee $3 + local.get $3 + local.get $1 f64.mul f64.const 1 - local.get $0 + local.get $1 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - local.set $0 + else + local.get $1 end else f64.const 0.5 f64.const 2 - local.get $0 + local.get $1 f64.const 1 - local.get $0 + local.get $1 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul - local.set $0 end local.get $0 - local.get $3 f64.copysign + ) + (func $std/math/test_atanh (; 63 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.atanh local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $3 + local.get $0 call $~lib/bindings/Math/atanh local.get $1 local.get $2 @@ -2416,60 +2510,55 @@ i32.const 0 end ) - (func $std/math/test_atanhf (; 55 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 f32) - (local $4 i32) + (func $~lib/math/NativeMathf.atanh (; 64 ;) (param $0 f32) (result f32) + (local $1 f32) + (local $2 i32) local.get $0 - local.tee $3 f32.abs - local.set $0 - local.get $3 + local.set $1 + local.get $0 i32.reinterpret_f32 - local.tee $4 + local.tee $2 i32.const 1056964608 i32.lt_u - if - local.get $4 + if (result f32) + local.get $2 i32.const 796917760 i32.ge_u - if + if (result f32) f32.const 0.5 f32.const 2 - local.get $0 + local.get $1 f32.mul f32.const 1 - local.get $0 + local.get $1 f32.const 1 - local.get $0 + local.get $1 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 + else + local.get $1 end else f32.const 0.5 f32.const 2 - local.get $0 + local.get $1 f32.const 1 - local.get $0 + local.get $1 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul - local.set $0 end local.get $0 - local.get $3 f32.copysign - local.get $1 - local.get $2 - call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (; 56 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 65 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2679,7 +2768,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2697,7 +2786,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 58 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 67 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2890,7 +2979,15 @@ i32.and select ) - (func $~lib/math/NativeMath.cbrt (; 59 ;) (param $0 f64) (result f64) + (func $std/math/test_atan2f (; 68 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.atan2 + local.get $2 + local.get $3 + call $std/math/check + ) + (func $~lib/math/NativeMath.cbrt (; 69 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3012,7 +3109,23 @@ f64.mul f64.add ) - (func $~lib/math/NativeMathf.cbrt (; 60 ;) (param $0 f32) (result f32) + (func $std/math/test_cbrt (; 70 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.cbrt + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/cbrt + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.cbrt (; 71 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3111,7 +3224,23 @@ f64.div f32.demote_f64 ) - (func $~lib/math/pio2_large_quot (; 61 ;) (param $0 i64) (result i32) + (func $std/math/test_ceil (; 72 ;) (param $0 f64) (param $1 f64) (result i32) + local.get $0 + f64.ceil + local.get $1 + f64.const 0 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/ceil + local.get $1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/pio2_large_quot (; 73 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3397,7 +3526,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 62 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 74 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3735,7 +3864,23 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cos (; 63 ;) (param $0 f32) (result f32) + (func $std/math/test_cos (; 75 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.cos + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/cos + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4004,7 +4149,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.expm1 (; 64 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 77 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4275,7 +4420,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 65 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 78 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4427,71 +4572,73 @@ end local.get $0 ) - (func $std/math/test_cosh (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 f64) - (local $4 i32) - (local $5 i64) - block $__inlined_func$~lib/math/NativeMath.cosh (result f64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $5 - f64.reinterpret_i64 - local.set $3 - local.get $5 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $4 - i32.const 1072049730 - i32.lt_u - if - f64.const 1 - local.get $4 - i32.const 1045430272 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMath.cosh - drop - f64.const 1 - local.get $3 - call $~lib/math/NativeMath.expm1 - local.tee $3 - local.get $3 - f64.mul - f64.const 2 - f64.const 2 - local.get $3 - f64.mul - f64.add - f64.div - f64.add - br $__inlined_func$~lib/math/NativeMath.cosh - end - local.get $4 - i32.const 1082535490 + (func $~lib/math/NativeMath.cosh (; 79 ;) (param $0 f64) (result f64) + (local $1 i32) + (local $2 i64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + f64.reinterpret_i64 + local.set $0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1072049730 + i32.lt_u + if + local.get $1 + i32.const 1045430272 i32.lt_u if - f64.const 0.5 - local.get $3 - call $~lib/math/NativeMath.exp - local.tee $3 f64.const 1 - local.get $3 - f64.div - f64.add - f64.mul - br $__inlined_func$~lib/math/NativeMath.cosh + return end - local.get $3 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 + f64.const 1 + local.get $0 + call $~lib/math/NativeMath.expm1 + local.tee $0 + local.get $0 + f64.mul + f64.const 2 + f64.const 2 + local.get $0 f64.mul - f64.const 2247116418577894884661631e283 + f64.add + f64.div + f64.add + return + end + local.get $1 + i32.const 1082535490 + i32.lt_u + if + f64.const 0.5 + local.get $0 + call $~lib/math/NativeMath.exp + local.tee $0 + f64.const 1 + local.get $0 + f64.div + f64.add f64.mul + return end + local.get $0 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + ) + (func $std/math/test_cosh (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.cosh local.get $1 local.get $2 call $std/math/check @@ -4505,7 +4652,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 67 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 81 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4755,7 +4902,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 68 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 82 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -4889,70 +5036,98 @@ end local.get $0 ) - (func $std/math/test_coshf (; 69 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i32) - block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $3 - f32.reinterpret_i32 - local.set $0 - local.get $3 - i32.const 1060205079 + (func $~lib/math/NativeMathf.cosh (; 83 ;) (param $0 f32) (result f32) + (local $1 i32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 + local.get $1 + i32.const 1060205079 + i32.lt_u + if + local.get $1 + i32.const 964689920 i32.lt_u if f32.const 1 - local.get $3 - i32.const 964689920 - i32.lt_u - br_if $__inlined_func$~lib/math/NativeMathf.cosh - drop - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh - end - local.get $3 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 - local.get $0 - call $~lib/math/NativeMathf.exp - local.tee $0 - f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - br $__inlined_func$~lib/math/NativeMathf.cosh + return end + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 f32.mul - f32.const 1661534994731144841129758e11 + f32.add + f32.div + f32.add + return + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + return end + local.get $0 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + ) + (func $std/math/test_exp (; 84 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.exp local.get $1 local.get $2 - call $std/math/check + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/exp + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $std/math/test_expm1 (; 85 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.expm1 + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/expm1 + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end ) - (func $~lib/math/NativeMath.exp2 (; 70 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp2 (; 86 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5158,7 +5333,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 71 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 87 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5175,7 +5350,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 72 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 88 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5270,7 +5445,23 @@ f32.demote_f64 end ) - (func $~lib/math/NativeMath.hypot (; 73 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_floor (; 89 ;) (param $0 f64) (param $1 f64) (result i32) + local.get $0 + f64.floor + local.get $1 + f64.const 0 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/floor + local.get $1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMath.hypot (; 90 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5439,7 +5630,15 @@ f64.sqrt f64.mul ) - (func $~lib/math/NativeMathf.hypot (; 74 ;) (param $0 f32) (param $1 f32) (result f32) + (func $std/math/test_hypot (; 91 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.hypot + local.get $2 + local.get $3 + call $std/math/check + ) + (func $~lib/math/NativeMathf.hypot (; 92 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5544,7 +5743,31 @@ f32.sqrt f32.mul ) - (func $~lib/math/NativeMath.log10 (; 75 ;) (param $0 f64) (result f64) + (func $std/math/test_hypotf (; 93 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.hypot + local.get $2 + local.get $3 + call $std/math/check + ) + (func $std/math/test_log (; 94 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.log + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/log + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMath.log10 (; 95 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5746,7 +5969,23 @@ local.get $1 f64.add ) - (func $~lib/math/NativeMathf.log10 (; 76 ;) (param $0 f32) (result f32) + (func $std/math/test_log10 (; 96 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.log10 + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/log10 + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.log10 (; 97 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5904,7 +6143,23 @@ f32.mul f32.add ) - (func $~lib/math/NativeMath.log2 (; 77 ;) (param $0 f64) (result f64) + (func $std/math/test_log1p (; 98 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.log1p + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/log1p + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMath.log2 (; 99 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6099,7 +6354,23 @@ local.get $1 f64.add ) - (func $~lib/math/NativeMathf.log2 (; 78 ;) (param $0 f32) (result f32) + (func $std/math/test_log2 (; 100 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.log2 + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/log2 + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.log2 (; 101 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6249,7 +6520,7 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_max (; 79 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_max (; 102 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6267,7 +6538,15 @@ i32.const 0 end ) - (func $std/math/test_min (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_maxf (; 103 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + local.get $1 + f32.max + local.get $2 + f32.const 0 + call $std/math/check + ) + (func $std/math/test_min (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6285,7 +6564,15 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.mod (; 81 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_minf (; 105 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + local.get $1 + f32.min + local.get $2 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.mod (; 106 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6488,7 +6775,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 82 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 107 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6506,7 +6793,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 83 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 108 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6698,7 +6985,15 @@ local.get $0 f32.mul ) - (func $~lib/math/NativeMath.pow (; 84 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_modf (; 109 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.mod + local.get $2 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.pow (; 110 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -7654,7 +7949,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 85 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 111 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -7672,7 +7967,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 86 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 112 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8130,7 +8425,15 @@ end local.get $0 ) - (func $~lib/math/murmurHash3 (; 87 ;) (param $0 i64) (result i64) + (func $std/math/test_powf (; 113 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.pow + local.get $2 + local.get $3 + call $std/math/check + ) + (func $~lib/math/murmurHash3 (; 114 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8151,7 +8454,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 88 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 115 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8183,7 +8486,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 89 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 116 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8227,7 +8530,119 @@ unreachable end ) - (func $std/math/test_sign (; 90 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/math/NativeMath.random (; 117 ;) (result f64) + (local $0 i64) + (local $1 i64) + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 1413 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_64 + local.set $0 + global.get $~lib/math/random_state1_64 + local.tee $1 + global.set $~lib/math/random_state0_64 + local.get $1 + local.get $0 + local.get $0 + i64.const 23 + i64.shl + i64.xor + local.tee $0 + local.get $0 + i64.const 17 + i64.shr_u + i64.xor + i64.xor + local.get $1 + i64.const 26 + i64.shr_u + i64.xor + global.set $~lib/math/random_state1_64 + local.get $1 + i64.const 12 + i64.shr_u + i64.const 4607182418800017408 + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + ) + (func $~lib/math/NativeMathf.random (; 118 ;) (result f32) + (local $0 i32) + (local $1 i32) + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 2606 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_32 + local.tee $0 + global.get $~lib/math/random_state1_32 + i32.xor + local.tee $1 + local.get $0 + i32.const 26 + i32.rotl + i32.xor + local.get $1 + i32.const 9 + i32.shl + i32.xor + global.set $~lib/math/random_state0_32 + local.get $1 + i32.const 13 + i32.rotl + global.set $~lib/math/random_state1_32 + local.get $0 + i32.const -1640531525 + i32.mul + i32.const 5 + i32.rotl + i32.const 5 + i32.mul + i32.const 9 + i32.shr_u + i32.const 1065353216 + i32.or + f32.reinterpret_i32 + f32.const 1 + f32.sub + ) + (func $std/math/test_round (; 119 ;) (param $0 f64) (param $1 f64) (result i32) + local.get $0 + f64.const 0.5 + f64.add + f64.floor + local.get $0 + f64.copysign + local.get $1 + f64.const 0 + call $std/math/check + ) + (func $std/math/test_roundf (; 120 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + f32.const 0.5 + f32.add + f32.floor + local.get $0 + f32.copysign + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $std/math/test_sign (; 121 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8250,7 +8665,21 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.rem (; 91 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_signf (; 122 ;) (param $0 f32) (param $1 f32) (result i32) + f32.const 1 + local.get $0 + f32.copysign + local.get $0 + local.get $0 + f32.abs + f32.const 0 + f32.gt + select + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.rem (; 123 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -8499,7 +8928,15 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.rem (; 92 ;) (param $0 f32) (param $1 f32) (result f32) + (func $std/math/test_rem (; 124 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.rem + local.get $2 + f64.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMathf.rem (; 125 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8740,7 +9177,15 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 93 ;) (param $0 f64) (result f64) + (func $std/math/test_remf (; 126 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMathf.rem + local.get $2 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.sin (; 127 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9060,7 +9505,23 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 94 ;) (param $0 f32) (result f32) + (func $std/math/test_sin (; 128 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.sin + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/sin + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.sin (; 129 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9330,7 +9791,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sinh (; 95 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 130 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -9407,7 +9868,23 @@ f64.mul f64.mul ) - (func $~lib/math/NativeMathf.sinh (; 96 ;) (param $0 f32) (result f32) + (func $std/math/test_sinh (; 131 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.sinh + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/sinh + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.sinh (; 132 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -9479,7 +9956,23 @@ f32.mul f32.mul ) - (func $~lib/math/tan_kern (; 97 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $std/math/test_sqrt (; 133 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + f64.sqrt + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/sqrt + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/tan_kern (; 134 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -9661,7 +10154,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 98 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 135 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9838,7 +10331,23 @@ i32.sub call $~lib/math/tan_kern ) - (func $~lib/math/NativeMathf.tan (; 99 ;) (param $0 f32) (result f32) + (func $std/math/test_tan (; 136 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + call $~lib/math/NativeMath.tan + local.get $1 + local.get $2 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/tan + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.tan (; 137 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10092,7 +10601,7 @@ local.get $1 f32.demote_f64 ) - (func $~lib/math/NativeMath.tanh (; 100 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 138 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10171,7 +10680,23 @@ local.get $0 f64.copysign ) - (func $~lib/math/NativeMathf.tanh (; 101 ;) (param $0 f32) (result f32) + (func $std/math/test_tanh (; 139 ;) (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 + if (result i32) + local.get $0 + call $~lib/bindings/Math/tanh + local.get $1 + local.get $2 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.tanh (; 140 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -10245,7 +10770,23 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.sincos (; 102 ;) (param $0 f64) + (func $std/math/test_trunc (; 141 ;) (param $0 f64) (param $1 f64) (result i32) + local.get $0 + f64.trunc + local.get $1 + f64.const 0 + call $std/math/check + if (result i32) + local.get $0 + call $~lib/bindings/Math/trunc + local.get $1 + f64.const 0 + call $std/math/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMath.sincos (; 142 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -10640,7 +11181,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 103 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 143 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -10666,7 +11207,19 @@ drop end ) - (func $~lib/math/NativeMath.imul (; 104 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/dtoi32 (; 144 ;) (param $0 f64) (result i32) + local.get $0 + f64.const 4294967296 + local.get $0 + f64.const 2.3283064365386963e-10 + f64.mul + f64.floor + f64.mul + f64.sub + i64.trunc_f64_s + i32.wrap_i64 + ) + (func $~lib/math/NativeMath.imul (; 145 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -10681,29 +11234,13 @@ return end local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 local.get $1 - f64.const 4294967296 - local.get $1 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 105 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 146 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -10714,19 +11251,11 @@ return end local.get $0 - f64.const 4294967296 - local.get $0 - f64.const 2.3283064365386963e-10 - f64.mul - f64.floor - f64.mul - f64.sub - i64.trunc_f64_s - i32.wrap_i64 + call $~lib/math/dtoi32 i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 106 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 147 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -10757,7 +11286,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 107 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 148 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -10803,7 +11332,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 108 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 149 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -10849,14 +11378,10 @@ end local.get $2 ) - (func $start:std/math (; 109 ;) + (func $start:std/math (; 150 ;) (local $0 f64) (local $1 f32) (local $2 i32) - (local $3 i64) - (local $4 i64) - (local $5 i32) - (local $6 i32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -11048,10 +11573,8 @@ end f64.const -8.06684839057968 i32.const -2 - call $~lib/math/NativeMath.scalbn f64.const -2.01671209764492 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11063,10 +11586,8 @@ end f64.const 4.345239849338305 i32.const -1 - call $~lib/math/NativeMath.scalbn f64.const 2.1726199246691524 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11078,10 +11599,8 @@ end f64.const -8.38143342755525 i32.const 0 - call $~lib/math/NativeMath.scalbn f64.const -8.38143342755525 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11093,10 +11612,8 @@ end f64.const -6.531673581913484 i32.const 1 - call $~lib/math/NativeMath.scalbn f64.const -13.063347163826968 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11108,10 +11625,8 @@ end f64.const 9.267056966972586 i32.const 2 - call $~lib/math/NativeMath.scalbn f64.const 37.06822786789034 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11123,10 +11638,8 @@ end f64.const 0.6619858980995045 i32.const 3 - call $~lib/math/NativeMath.scalbn f64.const 5.295887184796036 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11138,10 +11651,8 @@ end f64.const -0.4066039223853553 i32.const 4 - call $~lib/math/NativeMath.scalbn f64.const -6.505662758165685 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11153,10 +11664,8 @@ end f64.const 0.5617597462207241 i32.const 5 - call $~lib/math/NativeMath.scalbn f64.const 17.97631187906317 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11168,10 +11677,8 @@ end f64.const 0.7741522965913037 i32.const 6 - call $~lib/math/NativeMath.scalbn f64.const 49.545746981843436 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11183,10 +11690,8 @@ end f64.const -0.6787637026394024 i32.const 7 - call $~lib/math/NativeMath.scalbn f64.const -86.88175393784351 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11198,10 +11703,8 @@ end f64.const 0 i32.const 2147483647 - call $~lib/math/NativeMath.scalbn - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11213,10 +11716,8 @@ end f64.const 0 i32.const -2147483647 - call $~lib/math/NativeMath.scalbn - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11228,10 +11729,8 @@ end f64.const -0 i32.const 2147483647 - call $~lib/math/NativeMath.scalbn f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11243,10 +11742,8 @@ end f64.const nan:0x8000000000000 i32.const 0 - call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11258,10 +11755,8 @@ end f64.const inf i32.const 0 - call $~lib/math/NativeMath.scalbn f64.const inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11273,10 +11768,8 @@ end f64.const -inf i32.const 0 - call $~lib/math/NativeMath.scalbn f64.const -inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11288,10 +11781,8 @@ end f64.const 1 i32.const 0 - call $~lib/math/NativeMath.scalbn f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11303,10 +11794,8 @@ end f64.const 1 i32.const 1 - call $~lib/math/NativeMath.scalbn f64.const 2 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11318,10 +11807,8 @@ end f64.const 1 i32.const -1 - call $~lib/math/NativeMath.scalbn f64.const 0.5 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11333,10 +11820,8 @@ end f64.const 1 i32.const 2147483647 - call $~lib/math/NativeMath.scalbn f64.const inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11348,10 +11833,8 @@ end f64.const nan:0x8000000000000 i32.const 1 - call $~lib/math/NativeMath.scalbn f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11363,10 +11846,8 @@ end f64.const inf i32.const 2147483647 - call $~lib/math/NativeMath.scalbn f64.const inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11378,10 +11859,8 @@ end f64.const inf i32.const -2147483647 - call $~lib/math/NativeMath.scalbn f64.const inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11393,10 +11872,8 @@ end f64.const -inf i32.const 2147483647 - call $~lib/math/NativeMath.scalbn f64.const -inf - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11408,10 +11885,8 @@ end f64.const 8988465674311579538646525e283 i32.const -2097 - call $~lib/math/NativeMath.scalbn f64.const 5e-324 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11423,10 +11898,8 @@ end f64.const 5e-324 i32.const 2097 - call $~lib/math/NativeMath.scalbn f64.const 8988465674311579538646525e283 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11438,10 +11911,8 @@ end f64.const 1.000244140625 i32.const -1074 - call $~lib/math/NativeMath.scalbn f64.const 5e-324 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11453,10 +11924,8 @@ end f64.const 0.7499999999999999 i32.const -1073 - call $~lib/math/NativeMath.scalbn f64.const 5e-324 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11468,10 +11937,8 @@ end f64.const 0.5000000000000012 i32.const -1024 - call $~lib/math/NativeMath.scalbn f64.const 2.781342323134007e-309 - f64.const 0 - call $std/math/check + call $std/math/test_scalbn i32.eqz if i32.const 0 @@ -11483,10 +11950,8 @@ end f32.const -8.066848754882812 i32.const -2 - call $~lib/math/NativeMathf.scalbn f32.const -2.016712188720703 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11498,10 +11963,8 @@ end f32.const 4.345239639282227 i32.const -1 - call $~lib/math/NativeMathf.scalbn f32.const 2.1726198196411133 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11513,10 +11976,8 @@ end f32.const -8.381433486938477 i32.const 0 - call $~lib/math/NativeMathf.scalbn f32.const -8.381433486938477 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11528,10 +11989,8 @@ end f32.const -6.531673431396484 i32.const 1 - call $~lib/math/NativeMathf.scalbn f32.const -13.063346862792969 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11543,10 +12002,8 @@ end f32.const 9.267057418823242 i32.const 2 - call $~lib/math/NativeMathf.scalbn f32.const 37.06822967529297 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11558,10 +12015,8 @@ end f32.const 0.6619858741760254 i32.const 3 - call $~lib/math/NativeMathf.scalbn f32.const 5.295886993408203 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11573,10 +12028,8 @@ end f32.const -0.40660393238067627 i32.const 4 - call $~lib/math/NativeMathf.scalbn f32.const -6.50566291809082 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11588,10 +12041,8 @@ end f32.const 0.5617597699165344 i32.const 5 - call $~lib/math/NativeMathf.scalbn f32.const 17.9763126373291 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11603,10 +12054,8 @@ end f32.const 0.7741522789001465 i32.const 6 - call $~lib/math/NativeMathf.scalbn f32.const 49.545745849609375 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11618,10 +12067,8 @@ end f32.const -0.6787636876106262 i32.const 7 - call $~lib/math/NativeMathf.scalbn f32.const -86.88175201416016 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11633,10 +12080,8 @@ end f32.const 0 i32.const 2147483647 - call $~lib/math/NativeMathf.scalbn - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11648,10 +12093,8 @@ end f32.const 0 i32.const -2147483647 - call $~lib/math/NativeMathf.scalbn f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11663,10 +12106,8 @@ end f32.const -0 i32.const 2147483647 - call $~lib/math/NativeMathf.scalbn f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11678,10 +12119,8 @@ end f32.const nan:0x400000 i32.const 0 - call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11693,10 +12132,8 @@ end f32.const inf i32.const 0 - call $~lib/math/NativeMathf.scalbn f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11708,10 +12145,8 @@ end f32.const -inf i32.const 0 - call $~lib/math/NativeMathf.scalbn f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11723,10 +12158,8 @@ end f32.const 1 i32.const 0 - call $~lib/math/NativeMathf.scalbn f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11738,10 +12171,8 @@ end f32.const 1 i32.const 1 - call $~lib/math/NativeMathf.scalbn f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11753,10 +12184,8 @@ end f32.const 1 i32.const -1 - call $~lib/math/NativeMathf.scalbn f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11768,10 +12197,8 @@ end f32.const 1 i32.const 2147483647 - call $~lib/math/NativeMathf.scalbn f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11783,10 +12210,8 @@ end f32.const nan:0x400000 i32.const 1 - call $~lib/math/NativeMathf.scalbn f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11798,10 +12223,8 @@ end f32.const inf i32.const 2147483647 - call $~lib/math/NativeMathf.scalbn f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11813,10 +12236,8 @@ end f32.const inf i32.const -2147483647 - call $~lib/math/NativeMathf.scalbn f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11828,10 +12249,8 @@ end f32.const -inf i32.const 2147483647 - call $~lib/math/NativeMathf.scalbn f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11843,10 +12262,8 @@ end f32.const 1701411834604692317316873e14 i32.const -276 - call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11858,10 +12275,8 @@ end f32.const 1.401298464324817e-45 i32.const 276 - call $~lib/math/NativeMathf.scalbn f32.const 1701411834604692317316873e14 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11873,10 +12288,8 @@ end f32.const 1.000244140625 i32.const -149 - call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11888,10 +12301,8 @@ end f32.const 0.7499999403953552 i32.const -148 - call $~lib/math/NativeMathf.scalbn f32.const 1.401298464324817e-45 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11903,10 +12314,8 @@ end f32.const 0.5000006556510925 i32.const -128 - call $~lib/math/NativeMathf.scalbn f32.const 1.4693693398263237e-39 - f32.const 0 - call $std/math/check + call $std/math/test_scalbnf i32.eqz if i32.const 0 @@ -11916,19 +12325,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.06684839057968 f64.const 8.06684839057968 - f64.const 8.06684839057968 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/abs - f64.const 8.06684839057968 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -11940,17 +12339,7 @@ end f64.const 4.345239849338305 f64.const 4.345239849338305 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/abs - f64.const 4.345239849338305 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -11960,19 +12349,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.38143342755525 f64.const 8.38143342755525 - f64.const 8.38143342755525 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/abs - f64.const 8.38143342755525 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -11982,19 +12361,9 @@ call $~lib/builtins/abort unreachable end + f64.const -6.531673581913484 f64.const 6.531673581913484 - f64.const 6.531673581913484 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/abs - f64.const 6.531673581913484 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12006,17 +12375,7 @@ end f64.const 9.267056966972586 f64.const 9.267056966972586 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/abs - f64.const 9.267056966972586 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12028,17 +12387,7 @@ end f64.const 0.6619858980995045 f64.const 0.6619858980995045 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/abs - f64.const 0.6619858980995045 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12048,19 +12397,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.4066039223853553 f64.const 0.4066039223853553 - f64.const 0.4066039223853553 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/abs - f64.const 0.4066039223853553 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12072,17 +12411,7 @@ end f64.const 0.5617597462207241 f64.const 0.5617597462207241 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/abs - f64.const 0.5617597462207241 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12094,17 +12423,7 @@ end f64.const 0.7741522965913037 f64.const 0.7741522965913037 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/abs - f64.const 0.7741522965913037 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12114,19 +12433,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.6787637026394024 f64.const 0.6787637026394024 - f64.const 0.6787637026394024 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/abs - f64.const 0.6787637026394024 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12138,17 +12447,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/abs - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12158,19 +12457,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/abs - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12182,17 +12471,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/abs - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12202,19 +12481,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/abs - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12226,17 +12495,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/abs - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12246,19 +12505,9 @@ call $~lib/builtins/abort unreachable end + f64.const -inf f64.const inf - f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/abs - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12270,17 +12519,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/abs - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_abs i32.eqz if i32.const 0 @@ -12512,19 +12751,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12535,19 +12764,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12558,19 +12777,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12581,19 +12790,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12604,19 +12803,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12627,19 +12816,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.acos f64.const 0.8473310828433507 f64.const -0.41553276777267456 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/acos - f64.const 0.8473310828433507 - f64.const -0.41553276777267456 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12650,19 +12829,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.acos f64.const 1.989530071088669 f64.const 0.4973946213722229 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/acos - f64.const 1.989530071088669 - f64.const 0.4973946213722229 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12673,19 +12842,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.acos f64.const 0.9742849645674904 f64.const -0.4428897500038147 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/acos - f64.const 0.9742849645674904 - f64.const -0.4428897500038147 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12696,19 +12855,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.acos f64.const 0.6854215158636222 f64.const -0.12589527666568756 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/acos - f64.const 0.6854215158636222 - f64.const -0.12589527666568756 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12719,19 +12868,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.acos f64.const 2.316874138205964 f64.const -0.17284949123859406 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/acos - f64.const 2.316874138205964 - f64.const -0.17284949123859406 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12742,19 +12881,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.acos f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/acos - f64.const 1.5707963267948966 - f64.const -0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12765,19 +12894,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.acos f64.const 3.141592653589793 f64.const -0.27576595544815063 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/acos - f64.const 3.141592653589793 - f64.const -0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12788,19 +12907,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.acos f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/acos - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12811,19 +12920,9 @@ unreachable end f64.const 1.0000000000000002 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000000000000002 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12834,19 +12933,9 @@ unreachable end f64.const -1.0000000000000002 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000000000000002 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12857,19 +12946,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12880,19 +12959,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12903,19 +12972,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.acos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/acos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12926,19 +12985,9 @@ unreachable end f64.const -0.5309227209592985 - call $~lib/math/NativeMath.acos f64.const 2.1304853799705463 f64.const 0.1391008496284485 - call $std/math/check - if (result i32) - f64.const -0.5309227209592985 - call $~lib/bindings/Math/acos - f64.const 2.1304853799705463 - f64.const 0.1391008496284485 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -12949,19 +12998,9 @@ unreachable end f64.const 0.4939556746399746 - call $~lib/math/NativeMath.acos f64.const 1.0541629875851946 f64.const 0.22054767608642578 - call $std/math/check - if (result i32) - f64.const 0.4939556746399746 - call $~lib/bindings/Math/acos - f64.const 1.0541629875851946 - f64.const 0.22054767608642578 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_acos i32.eqz if i32.const 0 @@ -13526,9 +13565,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13539,9 +13579,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.acosh f32.const 2.148716449737549 f32.const 0.4251045286655426 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13552,9 +13593,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13565,9 +13607,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13578,9 +13621,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.acosh f32.const 2.916689157485962 f32.const -0.1369788944721222 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13591,9 +13635,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13604,9 +13649,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13617,9 +13663,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13630,9 +13677,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13643,9 +13691,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13656,9 +13705,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13669,9 +13719,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.acosh f32.const inf f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13682,9 +13733,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.acosh f32.const 0 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13695,9 +13747,10 @@ unreachable end f32.const 0.9999923706054688 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13708,9 +13761,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13721,9 +13775,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13734,9 +13789,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13747,9 +13803,10 @@ unreachable end f32.const -1125899906842624 + call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_acoshf + call $std/math/check i32.eqz if i32.const 0 @@ -13760,19 +13817,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13783,19 +13830,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13806,19 +13843,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13829,19 +13856,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13852,19 +13869,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13875,19 +13882,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.asin f64.const 0.7234652439515459 f64.const -0.13599912822246552 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/asin - f64.const 0.7234652439515459 - f64.const -0.13599912822246552 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13898,19 +13895,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.asin f64.const -0.41873374429377225 f64.const -0.09264230728149414 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/asin - f64.const -0.41873374429377225 - f64.const -0.09264230728149414 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13921,19 +13908,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.asin f64.const 0.5965113622274062 f64.const -0.10864213854074478 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/asin - f64.const 0.5965113622274062 - f64.const -0.10864213854074478 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13944,19 +13921,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.asin f64.const 0.8853748109312743 f64.const -0.4256366193294525 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/asin - f64.const 0.8853748109312743 - f64.const -0.4256366193294525 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13967,19 +13934,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.asin f64.const -0.7460778114110673 f64.const 0.13986606895923615 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/asin - f64.const -0.7460778114110673 - f64.const 0.13986606895923615 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -13990,19 +13947,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.asin f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/asin - f64.const 1.5707963267948966 - f64.const -0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14013,19 +13960,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.asin f64.const -1.5707963267948966 f64.const 0.27576595544815063 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/asin - f64.const -1.5707963267948966 - f64.const 0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14036,19 +13973,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.asin f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/asin - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14059,19 +13986,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.asin f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/asin - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14082,19 +13999,9 @@ unreachable end f64.const 1.0000000000000002 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000000000000002 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14105,19 +14012,9 @@ unreachable end f64.const -1.0000000000000002 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000000000000002 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14128,19 +14025,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14151,19 +14038,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14174,19 +14051,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.asin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/asin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14197,19 +14064,9 @@ unreachable end f64.const 0.5073043929119148 - call $~lib/math/NativeMath.asin f64.const 0.5320538997772349 f64.const -0.16157317161560059 - call $std/math/check - if (result i32) - f64.const 0.5073043929119148 - call $~lib/bindings/Math/asin - f64.const 0.5320538997772349 - f64.const -0.16157317161560059 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asin i32.eqz if i32.const 0 @@ -14500,19 +14357,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.asinh f64.const -2.784729878387861 f64.const -0.4762189984321594 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/asinh - f64.const -2.784729878387861 - f64.const -0.4762189984321594 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14523,19 +14370,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.asinh f64.const 2.175213389013164 f64.const -0.02728751301765442 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/asinh - f64.const 2.175213389013164 - f64.const -0.02728751301765442 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14546,19 +14383,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.asinh f64.const -2.822706083697696 f64.const 0.20985257625579834 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/asinh - f64.const -2.822706083697696 - f64.const 0.20985257625579834 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14569,19 +14396,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.asinh f64.const -2.575619446591922 f64.const 0.3113134205341339 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/asinh - f64.const -2.575619446591922 - f64.const 0.3113134205341339 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14592,19 +14409,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.asinh f64.const 2.9225114951048674 f64.const 0.4991756081581116 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/asinh - f64.const 2.9225114951048674 - f64.const 0.4991756081581116 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14615,19 +14422,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.asinh f64.const 0.6212462762707166 f64.const -0.4697347581386566 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/asinh - f64.const 0.6212462762707166 - f64.const -0.4697347581386566 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14638,19 +14435,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.asinh f64.const -0.39615990393192035 f64.const -0.40814438462257385 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/asinh - f64.const -0.39615990393192035 - f64.const -0.40814438462257385 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14661,19 +14448,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.asinh f64.const 0.5357588870255474 f64.const 0.3520713150501251 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/asinh - f64.const 0.5357588870255474 - f64.const 0.3520713150501251 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14684,19 +14461,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.asinh f64.const 0.7123571263197349 f64.const 0.13371451199054718 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/asinh - f64.const 0.7123571263197349 - f64.const 0.13371451199054718 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14707,19 +14474,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.asinh f64.const -0.635182348903198 f64.const 0.04749670997262001 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/asinh - f64.const -0.635182348903198 - f64.const 0.04749670997262001 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14730,19 +14487,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.asinh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/asinh - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14753,19 +14500,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.asinh f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/asinh - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14776,19 +14513,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.asinh f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/asinh - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14799,19 +14526,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.asinh f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/asinh - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14822,19 +14539,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.asinh f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/asinh - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_asinh i32.eqz if i32.const 0 @@ -14845,9 +14552,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.asinh f32.const -2.7847299575805664 f32.const -0.14418013393878937 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14858,9 +14566,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.asinh f32.const 2.17521333694458 f32.const -0.020796965807676315 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14871,9 +14580,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.asinh f32.const -2.8227059841156006 f32.const 0.44718533754348755 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14884,9 +14594,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.asinh f32.const -2.5756194591522217 f32.const -0.14822272956371307 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14897,9 +14608,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.asinh f32.const 2.922511577606201 f32.const 0.14270681142807007 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14910,9 +14622,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.asinh f32.const 0.6212462782859802 f32.const 0.3684912919998169 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14923,9 +14636,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.asinh f32.const -0.39615991711616516 f32.const -0.13170306384563446 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14936,9 +14650,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.asinh f32.const 0.535758912563324 f32.const 0.08184859901666641 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14949,9 +14664,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.asinh f32.const 0.7123571038246155 f32.const -0.14270737767219543 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14962,9 +14678,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.asinh f32.const -0.6351823210716248 f32.const 0.2583143711090088 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14975,9 +14692,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.asinh f32.const nan:0x400000 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -14988,9 +14706,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.asinh f32.const inf f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -15001,9 +14720,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.asinh f32.const -inf f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -15014,9 +14734,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.asinh f32.const 0 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -15027,9 +14748,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.asinh f32.const -0 f32.const 0 - call $std/math/test_asinhf + call $std/math/check i32.eqz if i32.const 0 @@ -15040,19 +14762,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.atan f64.const -1.4474613762633468 f64.const 0.14857111871242523 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/atan - f64.const -1.4474613762633468 - f64.const 0.14857111871242523 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15063,19 +14775,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.atan f64.const 1.344597927114538 f64.const -0.08170335739850998 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/atan - f64.const 1.344597927114538 - f64.const -0.08170335739850998 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15086,19 +14788,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.atan f64.const -1.4520463463295539 f64.const -0.07505480200052261 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/atan - f64.const -1.4520463463295539 - f64.const -0.07505480200052261 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15109,19 +14801,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.atan f64.const -1.4188758658752532 f64.const -0.057633496820926666 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/atan - f64.const -1.4188758658752532 - f64.const -0.057633496820926666 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15132,19 +14814,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.atan f64.const 1.463303145448706 f64.const 0.1606956422328949 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/atan - f64.const 1.463303145448706 - f64.const 0.1606956422328949 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15155,19 +14827,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.atan f64.const 0.5847550670238325 f64.const 0.4582556486129761 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/atan - f64.const 0.5847550670238325 - f64.const 0.4582556486129761 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15178,19 +14840,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.atan f64.const -0.3861864177552131 f64.const -0.2574281692504883 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/atan - f64.const -0.3861864177552131 - f64.const -0.2574281692504883 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15201,19 +14853,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.atan f64.const 0.5118269531628881 f64.const -0.11444277316331863 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/atan - f64.const 0.5118269531628881 - f64.const -0.11444277316331863 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15224,19 +14866,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.atan f64.const 0.6587802431653822 f64.const -0.11286488175392151 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/atan - f64.const 0.6587802431653822 - f64.const -0.11286488175392151 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15247,19 +14879,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.atan f64.const -0.5963307826973472 f64.const -0.2182842344045639 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/atan - f64.const -0.5963307826973472 - f64.const -0.2182842344045639 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15270,19 +14892,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.atan f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/atan - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15293,19 +14905,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.atan f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/atan - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15316,19 +14918,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.atan f64.const 0.7853981633974483 f64.const -0.27576595544815063 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/atan - f64.const 0.7853981633974483 - f64.const -0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15339,19 +14931,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.atan f64.const -0.7853981633974483 f64.const 0.27576595544815063 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/atan - f64.const -0.7853981633974483 - f64.const 0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15362,19 +14944,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.atan f64.const 1.5707963267948966 f64.const -0.27576595544815063 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/atan - f64.const 1.5707963267948966 - f64.const -0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15385,19 +14957,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.atan f64.const -1.5707963267948966 f64.const 0.27576595544815063 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/atan - f64.const -1.5707963267948966 - f64.const 0.27576595544815063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15408,19 +14970,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.atan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/atan - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -15431,19 +14983,9 @@ unreachable end f64.const 0.6929821535674624 - call $~lib/math/NativeMath.atan f64.const 0.6060004555152562 f64.const -0.17075790464878082 - call $std/math/check - if (result i32) - f64.const 0.6929821535674624 - call $~lib/bindings/Math/atan - f64.const 0.6060004555152562 - f64.const -0.17075790464878082 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_atan i32.eqz if i32.const 0 @@ -16004,9 +15546,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16017,9 +15560,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16030,9 +15574,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16043,9 +15588,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16056,9 +15602,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16069,9 +15616,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.atanh f32.const 0.7963404059410095 f32.const 0.19112196564674377 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16082,9 +15630,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.atanh f32.const -0.4315357208251953 f32.const -0.05180925130844116 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16095,9 +15644,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.atanh f32.const 0.635400652885437 f32.const 0.11911056190729141 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16108,9 +15658,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.atanh f32.const 1.0306085348129272 f32.const 0.1798270344734192 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16121,9 +15672,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.atanh f32.const -0.8268179297447205 f32.const 0.11588983237743378 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16134,9 +15686,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16147,9 +15700,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16160,9 +15714,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16173,9 +15728,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.atanh f32.const 0 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16186,9 +15742,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.atanh f32.const -0 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16199,9 +15756,10 @@ unreachable end f32.const 1 + call $~lib/math/NativeMathf.atanh f32.const inf f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16212,9 +15770,10 @@ unreachable end f32.const -1 + call $~lib/math/NativeMathf.atanh f32.const -inf f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16225,9 +15784,10 @@ unreachable end f32.const 1.0000152587890625 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16238,9 +15798,10 @@ unreachable end f32.const -1.0000152587890625 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16251,9 +15812,10 @@ unreachable end f32.const 1.3552527156068805e-20 + call $~lib/math/NativeMathf.atanh f32.const 1.3552527156068805e-20 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16264,9 +15826,10 @@ unreachable end f32.const 7.888609052210118e-31 + call $~lib/math/NativeMathf.atanh f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16277,9 +15840,10 @@ unreachable end f32.const 2.938735877055719e-39 + call $~lib/math/NativeMathf.atanh f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16290,9 +15854,10 @@ unreachable end f32.const -2.938735877055719e-39 + call $~lib/math/NativeMathf.atanh f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16303,9 +15868,10 @@ unreachable end f32.const 1701411834604692317316873e14 + call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/test_atanhf + call $std/math/check i32.eqz if i32.const 0 @@ -16877,10 +16443,9 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 - call $~lib/math/NativeMathf.atan2 f32.const -1.0585895776748657 f32.const -0.22352588176727295 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16892,10 +16457,9 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 - call $~lib/math/NativeMathf.atan2 f32.const 2.686873435974121 f32.const 0.09464472532272339 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16907,10 +16471,9 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 - call $~lib/math/NativeMathf.atan2 f32.const -1.8893001079559326 f32.const -0.21941901743412018 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16922,10 +16485,9 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 - call $~lib/math/NativeMathf.atan2 f32.const -0.9605468511581421 f32.const 0.46015575528144836 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16937,10 +16499,9 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 - call $~lib/math/NativeMathf.atan2 f32.const 1.0919123888015747 f32.const -0.05708503723144531 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16952,10 +16513,9 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 - call $~lib/math/NativeMathf.atan2 f32.const -1.4685084819793701 f32.const 0.19611206650733948 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16967,10 +16527,9 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 - call $~lib/math/NativeMathf.atan2 f32.const 1.5641601085662842 f32.const 0.48143187165260315 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16982,10 +16541,9 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 - call $~lib/math/NativeMathf.atan2 f32.const -0.10281659662723541 f32.const -0.4216274917125702 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -16997,10 +16555,9 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 - call $~lib/math/NativeMathf.atan2 f32.const 0.29697975516319275 f32.const 0.2322007566690445 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17012,10 +16569,9 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 - call $~lib/math/NativeMathf.atan2 f32.const -1.5131611824035645 f32.const 0.16620726883411407 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17027,10 +16583,9 @@ end f32.const 0 f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17042,10 +16597,9 @@ end f32.const 0 f32.const -0 - call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17057,10 +16611,9 @@ end f32.const 0 f32.const -1 - call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17072,10 +16625,9 @@ end f32.const 0 f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17087,10 +16639,9 @@ end f32.const 0 f32.const 1 - call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17102,10 +16653,9 @@ end f32.const 0 f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17117,10 +16667,9 @@ end f32.const -0 f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17132,10 +16681,9 @@ end f32.const -0 f32.const -0 - call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17147,10 +16695,9 @@ end f32.const -0 f32.const -1 - call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17162,10 +16709,9 @@ end f32.const -0 f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17177,10 +16723,9 @@ end f32.const -0 f32.const 1 - call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17192,10 +16737,9 @@ end f32.const -0 f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17207,10 +16751,9 @@ end f32.const -1 f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17222,10 +16765,9 @@ end f32.const -1 f32.const -0 - call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17237,10 +16779,9 @@ end f32.const 1 f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17252,10 +16793,9 @@ end f32.const 1 f32.const -0 - call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17267,10 +16807,9 @@ end f32.const -1 f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17282,10 +16821,9 @@ end f32.const 1 f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17297,10 +16835,9 @@ end f32.const -1 f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const -3.1415927410125732 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17312,10 +16849,9 @@ end f32.const 1 f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17327,10 +16863,9 @@ end f32.const inf f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17342,10 +16877,9 @@ end f32.const -inf f32.const 0 - call $~lib/math/NativeMathf.atan2 f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17357,10 +16891,9 @@ end f32.const inf f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17372,10 +16905,9 @@ end f32.const inf f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const 2.356194496154785 f32.const 0.02500828728079796 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17387,10 +16919,9 @@ end f32.const -inf f32.const inf - call $~lib/math/NativeMathf.atan2 f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17402,10 +16933,9 @@ end f32.const -inf f32.const -inf - call $~lib/math/NativeMathf.atan2 f32.const -2.356194496154785 f32.const -0.02500828728079796 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17417,10 +16947,9 @@ end f32.const 5.877471754111438e-39 f32.const 1 - call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17432,10 +16961,9 @@ end f32.const 1 f32.const 1701411834604692317316873e14 - call $~lib/math/NativeMathf.atan2 f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_atan2f i32.eqz if i32.const 0 @@ -17446,19 +16974,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.cbrt f64.const -2.0055552545020245 f64.const 0.46667951345443726 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/cbrt - f64.const -2.0055552545020245 - f64.const 0.46667951345443726 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17469,19 +16987,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.cbrt f64.const 1.6318162410515635 f64.const -0.08160271495580673 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/cbrt - f64.const 1.6318162410515635 - f64.const -0.08160271495580673 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17492,19 +17000,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.cbrt f64.const -2.031293910673361 f64.const -0.048101816326379776 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/cbrt - f64.const -2.031293910673361 - f64.const -0.048101816326379776 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17515,19 +17013,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.cbrt f64.const -1.8692820012204925 f64.const 0.08624018728733063 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/cbrt - f64.const -1.8692820012204925 - f64.const 0.08624018728733063 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17538,19 +17026,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.cbrt f64.const 2.100457720859702 f64.const -0.2722989022731781 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/cbrt - f64.const 2.100457720859702 - f64.const -0.2722989022731781 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17561,19 +17039,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.cbrt f64.const 0.8715311470455973 f64.const 0.4414918124675751 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/cbrt - f64.const 0.8715311470455973 - f64.const 0.4414918124675751 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17584,19 +17052,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.cbrt f64.const -0.740839030300223 f64.const 0.016453813761472702 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/cbrt - f64.const -0.740839030300223 - f64.const 0.016453813761472702 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17607,19 +17065,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.cbrt f64.const 0.8251195400559286 f64.const 0.30680638551712036 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/cbrt - f64.const 0.8251195400559286 - f64.const 0.30680638551712036 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17630,19 +17078,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.cbrt f64.const 0.9182102478959914 f64.const 0.06543998420238495 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/cbrt - f64.const 0.9182102478959914 - f64.const 0.06543998420238495 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17653,19 +17091,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.cbrt f64.const -0.8788326906580094 f64.const -0.2016713172197342 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/cbrt - f64.const -0.8788326906580094 - f64.const -0.2016713172197342 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17676,19 +17104,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.cbrt f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/cbrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17699,19 +17117,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.cbrt f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/cbrt - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17722,19 +17130,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.cbrt f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/cbrt - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17745,19 +17143,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.cbrt f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/cbrt - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17768,19 +17156,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.cbrt f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/cbrt - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17791,19 +17169,9 @@ unreachable end f64.const 9.313225746154785e-10 - call $~lib/math/NativeMath.cbrt f64.const 0.0009765625 f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/cbrt - f64.const 0.0009765625 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17814,19 +17182,9 @@ unreachable end f64.const -9.313225746154785e-10 - call $~lib/math/NativeMath.cbrt f64.const -0.0009765625 f64.const 0 - call $std/math/check - if (result i32) - f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/cbrt - f64.const -0.0009765625 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17837,19 +17195,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.cbrt f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/cbrt - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17860,19 +17208,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.cbrt f64.const -1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/cbrt - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -17883,19 +17221,9 @@ unreachable end f64.const 8 - call $~lib/math/NativeMath.cbrt f64.const 2 f64.const 0 - call $std/math/check - if (result i32) - f64.const 8 - call $~lib/bindings/Math/cbrt - f64.const 2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cbrt i32.eqz if i32.const 0 @@ -18185,19 +17513,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.06684839057968 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/ceil - f64.const -8 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18207,19 +17525,9 @@ call $~lib/builtins/abort unreachable end + f64.const 4.345239849338305 f64.const 5 - f64.const 5 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/ceil - f64.const 5 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18229,19 +17537,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.38143342755525 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/ceil - f64.const -8 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18251,19 +17549,9 @@ call $~lib/builtins/abort unreachable end + f64.const -6.531673581913484 f64.const -6 - f64.const -6 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/ceil - f64.const -6 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18273,19 +17561,9 @@ call $~lib/builtins/abort unreachable end + f64.const 9.267056966972586 f64.const 10 - f64.const 10 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/ceil - f64.const 10 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18295,19 +17573,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.6619858980995045 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18317,19 +17585,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.4066039223853553 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18339,19 +17597,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5617597462207241 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18361,19 +17609,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.7741522965913037 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18383,19 +17621,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.6787637026394024 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18407,17 +17635,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18429,17 +17647,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/ceil - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18451,17 +17659,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/ceil - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18473,17 +17671,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/ceil - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18495,17 +17683,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18517,17 +17695,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18539,17 +17707,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18559,19 +17717,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18581,19 +17729,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.5 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18603,19 +17741,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 2 - f64.const 2 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const 2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18625,19 +17753,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18647,19 +17765,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18669,19 +17777,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18691,19 +17789,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18713,19 +17801,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18737,17 +17815,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18759,17 +17827,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/ceil - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18781,17 +17839,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/ceil - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18803,17 +17851,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/ceil - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18825,17 +17863,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18847,17 +17875,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18869,17 +17887,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18889,19 +17897,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18911,19 +17909,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.5 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18933,19 +17921,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 2 - f64.const 2 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const 2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18955,19 +17933,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18977,19 +17945,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -18999,19 +17957,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19021,19 +17969,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19043,19 +17981,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19067,17 +17995,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/ceil - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19089,17 +18007,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/ceil - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19111,17 +18019,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/ceil - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19133,17 +18031,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/ceil - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19155,17 +18043,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19177,17 +18055,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19199,17 +18067,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19219,19 +18077,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19241,19 +18089,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.5 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19263,19 +18101,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 2 - f64.const 2 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const 2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19285,19 +18113,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000152587890625 - call $~lib/bindings/Math/ceil - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19307,19 +18125,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19329,19 +18137,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.9999923706054688 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19351,19 +18149,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -19373,19 +18161,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/ceil - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_ceil i32.eqz if i32.const 0 @@ -20111,19 +18889,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.cos f64.const -0.21126281599887137 f64.const -0.10962469130754471 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/cos - f64.const -0.21126281599887137 - f64.const -0.10962469130754471 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20134,19 +18902,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.cos f64.const -0.35895602297578955 f64.const -0.10759828239679337 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/cos - f64.const -0.35895602297578955 - f64.const -0.10759828239679337 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20157,19 +18915,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.cos f64.const -0.503333091765516 f64.const -0.021430473774671555 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/cos - f64.const -0.503333091765516 - f64.const -0.021430473774671555 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20180,19 +18928,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.cos f64.const 0.9692853212503283 f64.const -0.4787876307964325 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/cos - f64.const 0.9692853212503283 - f64.const -0.4787876307964325 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20203,19 +18941,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.cos f64.const -0.9875878064788627 f64.const 0.4880668818950653 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/cos - f64.const -0.9875878064788627 - f64.const 0.4880668818950653 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20226,19 +18954,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.cos f64.const 0.7887730869248576 f64.const 0.12708666920661926 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/cos - f64.const 0.7887730869248576 - f64.const 0.12708666920661926 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20249,19 +18967,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.cos f64.const 0.9184692397007294 f64.const -0.26120713353157043 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/cos - f64.const 0.9184692397007294 - f64.const -0.26120713353157043 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20272,19 +18980,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.cos f64.const 0.8463190467415896 f64.const -0.302586168050766 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/cos - f64.const 0.8463190467415896 - f64.const -0.302586168050766 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20295,19 +18993,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.cos f64.const 0.7150139289952383 f64.const -0.08537746220827103 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/cos - f64.const 0.7150139289952383 - f64.const -0.08537746220827103 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20318,19 +19006,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.cos f64.const 0.7783494994757447 f64.const 0.30890750885009766 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/cos - f64.const 0.7783494994757447 - f64.const 0.30890750885009766 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20341,19 +19019,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20364,19 +19032,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20387,19 +19045,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.cos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/cos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20410,19 +19058,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.cos f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/cos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20430,22 +19068,12 @@ i32.const 991 i32.const 0 call $~lib/builtins/abort - unreachable - end - f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.cos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/cos - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 + unreachable end + f64.const nan:0x8000000000000 + f64.const nan:0x8000000000000 + f64.const 0 + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20456,19 +19084,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.cos f64.const 0.5403023058681398 f64.const 0.4288286566734314 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/cos - f64.const 0.5403023058681398 - f64.const 0.4288286566734314 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20479,19 +19097,9 @@ unreachable end f64.const 2 - call $~lib/math/NativeMath.cos f64.const -0.4161468365471424 f64.const -0.35859397053718567 - call $std/math/check - if (result i32) - f64.const 2 - call $~lib/bindings/Math/cos - f64.const -0.4161468365471424 - f64.const -0.35859397053718567 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20502,19 +19110,9 @@ unreachable end f64.const 3 - call $~lib/math/NativeMath.cos f64.const -0.9899924966004454 f64.const 0.3788451552391052 - call $std/math/check - if (result i32) - f64.const 3 - call $~lib/bindings/Math/cos - f64.const -0.9899924966004454 - f64.const 0.3788451552391052 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20525,19 +19123,9 @@ unreachable end f64.const 4 - call $~lib/math/NativeMath.cos f64.const -0.6536436208636119 f64.const -0.23280560970306396 - call $std/math/check - if (result i32) - f64.const 4 - call $~lib/bindings/Math/cos - f64.const -0.6536436208636119 - f64.const -0.23280560970306396 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20548,19 +19136,9 @@ unreachable end f64.const 5 - call $~lib/math/NativeMath.cos f64.const 0.28366218546322625 f64.const -0.3277357816696167 - call $std/math/check - if (result i32) - f64.const 5 - call $~lib/bindings/Math/cos - f64.const 0.28366218546322625 - f64.const -0.3277357816696167 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20571,19 +19149,9 @@ unreachable end f64.const 0.1 - call $~lib/math/NativeMath.cos f64.const 0.9950041652780258 f64.const 0.49558526277542114 - call $std/math/check - if (result i32) - f64.const 0.1 - call $~lib/bindings/Math/cos - f64.const 0.9950041652780258 - f64.const 0.49558526277542114 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20594,19 +19162,9 @@ unreachable end f64.const 0.2 - call $~lib/math/NativeMath.cos f64.const 0.9800665778412416 f64.const -0.02407640963792801 - call $std/math/check - if (result i32) - f64.const 0.2 - call $~lib/bindings/Math/cos - f64.const 0.9800665778412416 - f64.const -0.02407640963792801 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20617,19 +19175,9 @@ unreachable end f64.const 0.3 - call $~lib/math/NativeMath.cos f64.const 0.955336489125606 f64.const -0.37772229313850403 - call $std/math/check - if (result i32) - f64.const 0.3 - call $~lib/bindings/Math/cos - f64.const 0.955336489125606 - f64.const -0.37772229313850403 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20640,19 +19188,9 @@ unreachable end f64.const 0.4 - call $~lib/math/NativeMath.cos f64.const 0.9210609940028851 f64.const 0.25818485021591187 - call $std/math/check - if (result i32) - f64.const 0.4 - call $~lib/bindings/Math/cos - f64.const 0.9210609940028851 - f64.const 0.25818485021591187 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20663,19 +19201,9 @@ unreachable end f64.const 0.5 - call $~lib/math/NativeMath.cos f64.const 0.8775825618903728 f64.const 0.3839152157306671 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/cos - f64.const 0.8775825618903728 - f64.const 0.3839152157306671 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20686,19 +19214,9 @@ unreachable end f64.const 2.3641409746639015e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.3641409746639015e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20709,19 +19227,9 @@ unreachable end f64.const 1.1820704873319507e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.1820704873319507e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20732,19 +19240,9 @@ unreachable end f64.const 5e-324 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20755,19 +19253,9 @@ unreachable end f64.const -5e-324 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20778,19 +19266,9 @@ unreachable end f64.const -3.14 - call $~lib/math/NativeMath.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 - call $std/math/check - if (result i32) - f64.const -3.14 - call $~lib/bindings/Math/cos - f64.const -0.9999987317275395 - f64.const 0.3855516016483307 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20801,19 +19279,9 @@ unreachable end f64.const 8988465674311579538646525e283 - call $~lib/math/NativeMath.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 - call $std/math/check - if (result i32) - f64.const 8988465674311579538646525e283 - call $~lib/bindings/Math/cos - f64.const -0.826369834614148 - f64.const -0.3695965111255646 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20824,19 +19292,9 @@ unreachable end f64.const 1797693134862315708145274e284 - call $~lib/math/NativeMath.cos f64.const -0.9999876894265599 f64.const 0.23448343575000763 - call $std/math/check - if (result i32) - f64.const 1797693134862315708145274e284 - call $~lib/bindings/Math/cos - f64.const -0.9999876894265599 - f64.const 0.23448343575000763 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20847,19 +19305,9 @@ unreachable end f64.const -8988465674311579538646525e283 - call $~lib/math/NativeMath.cos f64.const -0.826369834614148 f64.const -0.3695965111255646 - call $std/math/check - if (result i32) - f64.const -8988465674311579538646525e283 - call $~lib/bindings/Math/cos - f64.const -0.826369834614148 - f64.const -0.3695965111255646 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20870,19 +19318,9 @@ unreachable end f64.const 3.14 - call $~lib/math/NativeMath.cos f64.const -0.9999987317275395 f64.const 0.3855516016483307 - call $std/math/check - if (result i32) - f64.const 3.14 - call $~lib/bindings/Math/cos - f64.const -0.9999987317275395 - f64.const 0.3855516016483307 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20893,19 +19331,9 @@ unreachable end f64.const 3.1415 - call $~lib/math/NativeMath.cos f64.const -0.9999999957076562 f64.const -0.30608975887298584 - call $std/math/check - if (result i32) - f64.const 3.1415 - call $~lib/bindings/Math/cos - f64.const -0.9999999957076562 - f64.const -0.30608975887298584 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20916,19 +19344,9 @@ unreachable end f64.const 3.141592 - call $~lib/math/NativeMath.cos f64.const -0.9999999999997864 f64.const 0.15403328835964203 - call $std/math/check - if (result i32) - f64.const 3.141592 - call $~lib/bindings/Math/cos - f64.const -0.9999999999997864 - f64.const 0.15403328835964203 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20939,19 +19357,9 @@ unreachable end f64.const 3.14159265 - call $~lib/math/NativeMath.cos f64.const -1 f64.const -0.02901807427406311 - call $std/math/check - if (result i32) - f64.const 3.14159265 - call $~lib/bindings/Math/cos - f64.const -1 - f64.const -0.02901807427406311 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20962,19 +19370,9 @@ unreachable end f64.const 3.1415926535 - call $~lib/math/NativeMath.cos f64.const -1 f64.const -1.8155848010792397e-05 - call $std/math/check - if (result i32) - f64.const 3.1415926535 - call $~lib/bindings/Math/cos - f64.const -1 - f64.const -1.8155848010792397e-05 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -20985,19 +19383,9 @@ unreachable end f64.const 3.141592653589 - call $~lib/math/NativeMath.cos f64.const -1 f64.const -1.4169914130945926e-09 - call $std/math/check - if (result i32) - f64.const 3.141592653589 - call $~lib/bindings/Math/cos - f64.const -1 - f64.const -1.4169914130945926e-09 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21008,19 +19396,9 @@ unreachable end f64.const 3.14159265358979 - call $~lib/math/NativeMath.cos f64.const -1 f64.const -2.350864897985184e-14 - call $std/math/check - if (result i32) - f64.const 3.14159265358979 - call $~lib/bindings/Math/cos - f64.const -1 - f64.const -2.350864897985184e-14 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21031,19 +19409,9 @@ unreachable end f64.const 3.141592653589793 - call $~lib/math/NativeMath.cos f64.const -1 f64.const -3.377158741883318e-17 - call $std/math/check - if (result i32) - f64.const 3.141592653589793 - call $~lib/bindings/Math/cos - f64.const -1 - f64.const -3.377158741883318e-17 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21054,19 +19422,9 @@ unreachable end f64.const 1.57 - call $~lib/math/NativeMath.cos f64.const 7.963267107332633e-04 f64.const 0.2968159317970276 - call $std/math/check - if (result i32) - f64.const 1.57 - call $~lib/bindings/Math/cos - f64.const 7.963267107332633e-04 - f64.const 0.2968159317970276 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21077,19 +19435,9 @@ unreachable end f64.const 1.570796 - call $~lib/math/NativeMath.cos f64.const 3.2679489653813835e-07 f64.const -0.32570895552635193 - call $std/math/check - if (result i32) - f64.const 1.570796 - call $~lib/bindings/Math/cos - f64.const 3.2679489653813835e-07 - f64.const -0.32570895552635193 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21100,19 +19448,9 @@ unreachable end f64.const 1.5707963267 - call $~lib/math/NativeMath.cos f64.const 9.489659630678013e-11 f64.const -0.27245646715164185 - call $std/math/check - if (result i32) - f64.const 1.5707963267 - call $~lib/bindings/Math/cos - f64.const 9.489659630678013e-11 - f64.const -0.27245646715164185 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21123,19 +19461,9 @@ unreachable end f64.const 1.57079632679489 - call $~lib/math/NativeMath.cos f64.const 6.722570487708307e-15 f64.const -0.10747683793306351 - call $std/math/check - if (result i32) - f64.const 1.57079632679489 - call $~lib/bindings/Math/cos - f64.const 6.722570487708307e-15 - f64.const -0.10747683793306351 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21146,19 +19474,9 @@ unreachable end f64.const 1.5707963267948966 - call $~lib/math/NativeMath.cos f64.const 6.123233995736766e-17 f64.const 0.12148229777812958 - call $std/math/check - if (result i32) - f64.const 1.5707963267948966 - call $~lib/bindings/Math/cos - f64.const 6.123233995736766e-17 - f64.const 0.12148229777812958 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21169,19 +19487,9 @@ unreachable end f64.const 0.6700635199486106 - call $~lib/math/NativeMath.cos f64.const 0.7837822193016158 f64.const -0.07278502732515335 - call $std/math/check - if (result i32) - f64.const 0.6700635199486106 - call $~lib/bindings/Math/cos - f64.const 0.7837822193016158 - f64.const -0.07278502732515335 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21192,19 +19500,9 @@ unreachable end f64.const 0.5343890189437553 - call $~lib/math/NativeMath.cos f64.const 0.8605799719039517 f64.const -0.48434028029441833 - call $std/math/check - if (result i32) - f64.const 0.5343890189437553 - call $~lib/bindings/Math/cos - f64.const 0.8605799719039517 - f64.const -0.48434028029441833 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21215,19 +19513,9 @@ unreachable end f64.const 0.43999702754890085 - call $~lib/math/NativeMath.cos f64.const 0.9047529293001976 f64.const 0.029777472838759422 - call $std/math/check - if (result i32) - f64.const 0.43999702754890085 - call $~lib/bindings/Math/cos - f64.const 0.9047529293001976 - f64.const 0.029777472838759422 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21238,19 +19526,9 @@ unreachable end f64.const 0.9902840844687313 - call $~lib/math/NativeMath.cos f64.const 0.5484523364480768 f64.const 0.19765280187129974 - call $std/math/check - if (result i32) - f64.const 0.9902840844687313 - call $~lib/bindings/Math/cos - f64.const 0.5484523364480768 - f64.const 0.19765280187129974 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21261,19 +19539,9 @@ unreachable end f64.const 0.45381447534338915 - call $~lib/math/NativeMath.cos f64.const 0.8987813902263783 f64.const -0.017724866047501564 - call $std/math/check - if (result i32) - f64.const 0.45381447534338915 - call $~lib/bindings/Math/cos - f64.const 0.8987813902263783 - f64.const -0.017724866047501564 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21284,19 +19552,9 @@ unreachable end f64.const 0.4609888813583589 - call $~lib/math/NativeMath.cos f64.const 0.8956130474713057 f64.const 0.36449819803237915 - call $std/math/check - if (result i32) - f64.const 0.4609888813583589 - call $~lib/bindings/Math/cos - f64.const 0.8956130474713057 - f64.const 0.36449819803237915 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21307,19 +19565,9 @@ unreachable end f64.const 0.9285434097956422 - call $~lib/math/NativeMath.cos f64.const 0.5990009794292984 f64.const -0.2899416387081146 - call $std/math/check - if (result i32) - f64.const 0.9285434097956422 - call $~lib/bindings/Math/cos - f64.const 0.5990009794292984 - f64.const -0.2899416387081146 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21330,19 +19578,9 @@ unreachable end f64.const 0.9109092124488352 - call $~lib/math/NativeMath.cos f64.const 0.6130276692774378 f64.const -0.49353134632110596 - call $std/math/check - if (result i32) - f64.const 0.9109092124488352 - call $~lib/bindings/Math/cos - f64.const 0.6130276692774378 - f64.const -0.49353134632110596 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21353,19 +19591,9 @@ unreachable end f64.const 0.8328600650359556 - call $~lib/math/NativeMath.cos f64.const 0.6727624710046357 f64.const -0.36606088280677795 - call $std/math/check - if (result i32) - f64.const 0.8328600650359556 - call $~lib/bindings/Math/cos - f64.const 0.6727624710046357 - f64.const -0.36606088280677795 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21376,19 +19604,9 @@ unreachable end f64.const 0.9536201252203433 - call $~lib/math/NativeMath.cos f64.const 0.5787346183487084 f64.const -0.17089833319187164 - call $std/math/check - if (result i32) - f64.const 0.9536201252203433 - call $~lib/bindings/Math/cos - f64.const 0.5787346183487084 - f64.const -0.17089833319187164 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21399,19 +19617,9 @@ unreachable end f64.const 0.8726590065457699 - call $~lib/math/NativeMath.cos f64.const 0.6427919144259047 f64.const -0.2744986116886139 - call $std/math/check - if (result i32) - f64.const 0.8726590065457699 - call $~lib/bindings/Math/cos - f64.const 0.6427919144259047 - f64.const -0.2744986116886139 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21422,19 +19630,9 @@ unreachable end f64.const 0.18100447535968447 - call $~lib/math/NativeMath.cos f64.const 0.9836633656884893 f64.const 3.0195272993296385e-03 - call $std/math/check - if (result i32) - f64.const 0.18100447535968447 - call $~lib/bindings/Math/cos - f64.const 0.9836633656884893 - f64.const 3.0195272993296385e-03 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21445,19 +19643,9 @@ unreachable end f64.const 2.356194490349839 - call $~lib/math/NativeMath.cos f64.const -0.7071067812979126 f64.const -0.48278746008872986 - call $std/math/check - if (result i32) - f64.const 2.356194490349839 - call $~lib/bindings/Math/cos - f64.const -0.7071067812979126 - f64.const -0.48278746008872986 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21468,19 +19656,9 @@ unreachable end f64.const 2.356194490372272 - call $~lib/math/NativeMath.cos f64.const -0.7071067813137752 f64.const -0.4866050183773041 - call $std/math/check - if (result i32) - f64.const 2.356194490372272 - call $~lib/bindings/Math/cos - f64.const -0.7071067813137752 - f64.const -0.4866050183773041 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21491,19 +19669,9 @@ unreachable end f64.const 2.3561944902251115 - call $~lib/math/NativeMath.cos f64.const -0.707106781209717 f64.const -0.3533952236175537 - call $std/math/check - if (result i32) - f64.const 2.3561944902251115 - call $~lib/bindings/Math/cos - f64.const -0.707106781209717 - f64.const -0.3533952236175537 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21514,19 +19682,9 @@ unreachable end f64.const 2.3561944903149996 - call $~lib/math/NativeMath.cos f64.const -0.7071067812732775 f64.const -0.41911986470222473 - call $std/math/check - if (result i32) - f64.const 2.3561944903149996 - call $~lib/bindings/Math/cos - f64.const -0.7071067812732775 - f64.const -0.41911986470222473 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21537,19 +19695,9 @@ unreachable end f64.const 2.3561944903603527 - call $~lib/math/NativeMath.cos f64.const -0.707106781305347 f64.const -0.4706200063228607 - call $std/math/check - if (result i32) - f64.const 2.3561944903603527 - call $~lib/bindings/Math/cos - f64.const -0.707106781305347 - f64.const -0.4706200063228607 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21560,19 +19708,9 @@ unreachable end f64.const 2.3561944903826197 - call $~lib/math/NativeMath.cos f64.const -0.7071067813210922 f64.const -0.30618351697921753 - call $std/math/check - if (result i32) - f64.const 2.3561944903826197 - call $~lib/bindings/Math/cos - f64.const -0.7071067813210922 - f64.const -0.30618351697921753 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21583,19 +19721,9 @@ unreachable end f64.const 2.356194490371803 - call $~lib/math/NativeMath.cos f64.const -0.7071067813134436 f64.const -0.30564820766448975 - call $std/math/check - if (result i32) - f64.const 2.356194490371803 - call $~lib/bindings/Math/cos - f64.const -0.7071067813134436 - f64.const -0.30564820766448975 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21606,19 +19734,9 @@ unreachable end f64.const 2.356194490399931 - call $~lib/math/NativeMath.cos f64.const -0.7071067813333329 f64.const -0.38845571875572205 - call $std/math/check - if (result i32) - f64.const 2.356194490399931 - call $~lib/bindings/Math/cos - f64.const -0.7071067813333329 - f64.const -0.38845571875572205 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21629,19 +19747,9 @@ unreachable end f64.const 2.356194490260191 - call $~lib/math/NativeMath.cos f64.const -0.707106781234522 f64.const -0.23796851933002472 - call $std/math/check - if (result i32) - f64.const 2.356194490260191 - call $~lib/bindings/Math/cos - f64.const -0.707106781234522 - f64.const -0.23796851933002472 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21652,19 +19760,9 @@ unreachable end f64.const 2.3561944904043153 - call $~lib/math/NativeMath.cos f64.const -0.7071067813364332 f64.const -0.3274589478969574 - call $std/math/check - if (result i32) - f64.const 2.3561944904043153 - call $~lib/bindings/Math/cos - f64.const -0.7071067813364332 - f64.const -0.3274589478969574 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21675,19 +19773,9 @@ unreachable end f64.const 2.0943951024759446 - call $~lib/math/NativeMath.cos f64.const -0.5000000000716629 f64.const -0.41711342334747314 - call $std/math/check - if (result i32) - f64.const 2.0943951024759446 - call $~lib/bindings/Math/cos - f64.const -0.5000000000716629 - f64.const -0.41711342334747314 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21698,19 +19786,9 @@ unreachable end f64.const 2.09439510243324 - call $~lib/math/NativeMath.cos f64.const -0.5000000000346797 f64.const -0.3566164970397949 - call $std/math/check - if (result i32) - f64.const 2.09439510243324 - call $~lib/bindings/Math/cos - f64.const -0.5000000000346797 - f64.const -0.3566164970397949 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21721,19 +19799,9 @@ unreachable end f64.const 2.0943951025133885 - call $~lib/math/NativeMath.cos f64.const -0.5000000001040902 f64.const -0.2253485918045044 - call $std/math/check - if (result i32) - f64.const 2.0943951025133885 - call $~lib/bindings/Math/cos - f64.const -0.5000000001040902 - f64.const -0.2253485918045044 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21744,19 +19812,9 @@ unreachable end f64.const 2.0943951025466707 - call $~lib/math/NativeMath.cos f64.const -0.5000000001329135 f64.const -0.12982259690761566 - call $std/math/check - if (result i32) - f64.const 2.0943951025466707 - call $~lib/bindings/Math/cos - f64.const -0.5000000001329135 - f64.const -0.12982259690761566 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21767,19 +19825,9 @@ unreachable end f64.const 2.094395102413896 - call $~lib/math/NativeMath.cos f64.const -0.5000000000179272 f64.const -0.15886764228343964 - call $std/math/check - if (result i32) - f64.const 2.094395102413896 - call $~lib/bindings/Math/cos - f64.const -0.5000000000179272 - f64.const -0.15886764228343964 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21790,19 +19838,9 @@ unreachable end f64.const 2.0943951024223404 - call $~lib/math/NativeMath.cos f64.const -0.5000000000252403 f64.const -0.266656756401062 - call $std/math/check - if (result i32) - f64.const 2.0943951024223404 - call $~lib/bindings/Math/cos - f64.const -0.5000000000252403 - f64.const -0.266656756401062 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21813,19 +19851,9 @@ unreachable end f64.const 2.0943951024960477 - call $~lib/math/NativeMath.cos f64.const -0.5000000000890726 f64.const -0.4652077853679657 - call $std/math/check - if (result i32) - f64.const 2.0943951024960477 - call $~lib/bindings/Math/cos - f64.const -0.5000000000890726 - f64.const -0.4652077853679657 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21836,19 +19864,9 @@ unreachable end f64.const 2.0943951025173315 - call $~lib/math/NativeMath.cos f64.const -0.500000000107505 f64.const -0.46710994839668274 - call $std/math/check - if (result i32) - f64.const 2.0943951025173315 - call $~lib/bindings/Math/cos - f64.const -0.500000000107505 - f64.const -0.46710994839668274 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21859,19 +19877,9 @@ unreachable end f64.const 2.094395102405924 - call $~lib/math/NativeMath.cos f64.const -0.5000000000110234 f64.const -0.2469603717327118 - call $std/math/check - if (result i32) - f64.const 2.094395102405924 - call $~lib/bindings/Math/cos - f64.const -0.5000000000110234 - f64.const -0.2469603717327118 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21882,19 +19890,9 @@ unreachable end f64.const 2.094395102428558 - call $~lib/math/NativeMath.cos f64.const -0.500000000030625 f64.const -0.3799441158771515 - call $std/math/check - if (result i32) - f64.const 2.094395102428558 - call $~lib/bindings/Math/cos - f64.const -0.500000000030625 - f64.const -0.3799441158771515 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21905,19 +19903,9 @@ unreachable end f64.const 8.513210770864056 - call $~lib/math/NativeMath.cos f64.const -0.6125076939987759 f64.const 0.4989966154098511 - call $std/math/check - if (result i32) - f64.const 8.513210770864056 - call $~lib/bindings/Math/cos - f64.const -0.6125076939987759 - f64.const 0.4989966154098511 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21928,19 +19916,9 @@ unreachable end f64.const 6.802886129801017 - call $~lib/math/NativeMath.cos f64.const 0.8679677961345452 f64.const 0.4972165524959564 - call $std/math/check - if (result i32) - f64.const 6.802886129801017 - call $~lib/bindings/Math/cos - f64.const 0.8679677961345452 - f64.const 0.4972165524959564 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21951,19 +19929,9 @@ unreachable end f64.const 9.171925393086408 - call $~lib/math/NativeMath.cos f64.const -0.9682027440424544 f64.const -0.49827584624290466 - call $std/math/check - if (result i32) - f64.const 9.171925393086408 - call $~lib/bindings/Math/cos - f64.const -0.9682027440424544 - f64.const -0.49827584624290466 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21974,19 +19942,9 @@ unreachable end f64.const 8.854690112888573 - call $~lib/math/NativeMath.cos f64.const -0.8418535663818527 f64.const 0.4974979758262634 - call $std/math/check - if (result i32) - f64.const 8.854690112888573 - call $~lib/bindings/Math/cos - f64.const -0.8418535663818527 - f64.const 0.4974979758262634 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -21997,19 +19955,9 @@ unreachable end f64.const 9.213510813859608 - call $~lib/math/NativeMath.cos f64.const -0.9777659802838506 f64.const -0.4995604455471039 - call $std/math/check - if (result i32) - f64.const 9.213510813859608 - call $~lib/bindings/Math/cos - f64.const -0.9777659802838506 - f64.const -0.4995604455471039 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22020,19 +19968,9 @@ unreachable end f64.const 7.782449081542151 - call $~lib/math/NativeMath.cos f64.const 0.07147156381293339 f64.const 0.49858126044273376 - call $std/math/check - if (result i32) - f64.const 7.782449081542151 - call $~lib/bindings/Math/cos - f64.const 0.07147156381293339 - f64.const 0.49858126044273376 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22043,19 +19981,9 @@ unreachable end f64.const 7.500261332273616 - call $~lib/math/NativeMath.cos f64.const 0.34639017633458113 f64.const -0.4996210038661957 - call $std/math/check - if (result i32) - f64.const 7.500261332273616 - call $~lib/bindings/Math/cos - f64.const 0.34639017633458113 - f64.const -0.4996210038661957 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22066,19 +19994,9 @@ unreachable end f64.const 9.121739418731588 - call $~lib/math/NativeMath.cos f64.const -0.9544341297541811 f64.const 0.4982815086841583 - call $std/math/check - if (result i32) - f64.const 9.121739418731588 - call $~lib/bindings/Math/cos - f64.const -0.9544341297541811 - f64.const 0.4982815086841583 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22089,19 +20007,9 @@ unreachable end f64.const 6.784954020476316 - call $~lib/math/NativeMath.cos f64.const 0.8767332233166646 f64.const -0.4988083839416504 - call $std/math/check - if (result i32) - f64.const 6.784954020476316 - call $~lib/bindings/Math/cos - f64.const 0.8767332233166646 - f64.const -0.4988083839416504 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22112,19 +20020,9 @@ unreachable end f64.const 8.770846542666664 - call $~lib/math/NativeMath.cos f64.const -0.7936984117400705 f64.const 0.4999682903289795 - call $std/math/check - if (result i32) - f64.const 8.770846542666664 - call $~lib/bindings/Math/cos - f64.const -0.7936984117400705 - f64.const 0.4999682903289795 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22135,19 +20033,9 @@ unreachable end f64.const 9.313225746154785e-10 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.001953125 - call $std/math/check - if (result i32) - f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0.001953125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22158,19 +20046,9 @@ unreachable end f64.const -9.313225746154785e-10 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.001953125 - call $std/math/check - if (result i32) - f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0.001953125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22181,19 +20059,9 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22204,19 +20072,9 @@ unreachable end f64.const -2.2250738585072014e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22227,19 +20085,9 @@ unreachable end f64.const 5e-324 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22250,19 +20098,9 @@ unreachable end f64.const -5e-324 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22273,19 +20111,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22296,19 +20124,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22319,19 +20137,9 @@ unreachable end f64.const 1e-323 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1e-323 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22342,19 +20150,9 @@ unreachable end f64.const 4.4e-323 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4e-323 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22365,19 +20163,9 @@ unreachable end f64.const 5.562684646268003e-309 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22388,19 +20176,9 @@ unreachable end f64.const 1.1125369292536007e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22411,19 +20189,9 @@ unreachable end f64.const 2.2250738585072004e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22434,19 +20202,9 @@ unreachable end f64.const 2.225073858507201e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22457,19 +20215,9 @@ unreachable end f64.const 2.225073858507202e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22480,19 +20228,9 @@ unreachable end f64.const 2.2250738585072024e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22503,19 +20241,9 @@ unreachable end f64.const 4.4501477170144003e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22526,19 +20254,9 @@ unreachable end f64.const 4.450147717014403e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22549,19 +20267,9 @@ unreachable end f64.const 4.450147717014406e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22572,19 +20280,9 @@ unreachable end f64.const 8.900295434028806e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22595,19 +20293,9 @@ unreachable end f64.const 7.450580596923828e-09 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.125 - call $std/math/check - if (result i32) - f64.const 7.450580596923828e-09 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0.125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22618,19 +20306,9 @@ unreachable end f64.const 1.4901161193847656e-08 - call $~lib/math/NativeMath.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 - call $std/math/check - if (result i32) - f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/cos - f64.const 0.9999999999999999 - f64.const -1.850372590034581e-17 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22641,19 +20319,9 @@ unreachable end f64.const 4.470348358154297e-08 - call $~lib/math/NativeMath.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 - call $std/math/check - if (result i32) - f64.const 4.470348358154297e-08 - call $~lib/bindings/Math/cos - f64.const 0.999999999999999 - f64.const -1.4988010832439613e-15 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22664,19 +20332,9 @@ unreachable end f64.const -1e-323 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1e-323 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22687,19 +20345,9 @@ unreachable end f64.const -4.4e-323 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4e-323 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22710,19 +20358,9 @@ unreachable end f64.const -5.562684646268003e-309 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22733,19 +20371,9 @@ unreachable end f64.const -1.1125369292536007e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22756,19 +20384,9 @@ unreachable end f64.const -2.2250738585072004e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22779,19 +20397,9 @@ unreachable end f64.const -2.225073858507201e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22802,19 +20410,9 @@ unreachable end f64.const -2.225073858507202e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22825,19 +20423,9 @@ unreachable end f64.const -2.2250738585072024e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22848,19 +20436,9 @@ unreachable end f64.const -4.4501477170144003e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22871,19 +20449,9 @@ unreachable end f64.const -4.450147717014403e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22894,19 +20462,9 @@ unreachable end f64.const -4.450147717014406e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22917,19 +20475,9 @@ unreachable end f64.const -8.900295434028806e-308 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22940,19 +20488,9 @@ unreachable end f64.const -7.450580596923828e-09 - call $~lib/math/NativeMath.cos f64.const 1 f64.const 0.125 - call $std/math/check - if (result i32) - f64.const -7.450580596923828e-09 - call $~lib/bindings/Math/cos - f64.const 1 - f64.const 0.125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22963,19 +20501,9 @@ unreachable end f64.const -1.4901161193847656e-08 - call $~lib/math/NativeMath.cos f64.const 0.9999999999999999 f64.const -1.850372590034581e-17 - call $std/math/check - if (result i32) - f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/cos - f64.const 0.9999999999999999 - f64.const -1.850372590034581e-17 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -22986,19 +20514,9 @@ unreachable end f64.const -4.470348358154297e-08 - call $~lib/math/NativeMath.cos f64.const 0.999999999999999 f64.const -1.4988010832439613e-15 - call $std/math/check - if (result i32) - f64.const -4.470348358154297e-08 - call $~lib/bindings/Math/cos - f64.const 0.999999999999999 - f64.const -1.4988010832439613e-15 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_cos i32.eqz if i32.const 0 @@ -24397,9 +21915,10 @@ unreachable end f32.const -8.066848754882812 + call $~lib/math/NativeMathf.cosh f32.const 1593.5216064453125 f32.const 0.26242581009864807 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24410,9 +21929,10 @@ unreachable end f32.const 4.345239639282227 + call $~lib/math/NativeMathf.cosh f32.const 38.56174087524414 f32.const -0.08168885856866837 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24423,9 +21943,10 @@ unreachable end f32.const -8.381433486938477 + call $~lib/math/NativeMathf.cosh f32.const 2182.631103515625 f32.const -0.02331414446234703 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24436,9 +21957,10 @@ unreachable end f32.const -6.531673431396484 + call $~lib/math/NativeMathf.cosh f32.const 343.2738037109375 f32.const 0.20081493258476257 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24449,9 +21971,10 @@ unreachable end f32.const 9.267057418823242 + call $~lib/math/NativeMathf.cosh f32.const 5291.78173828125 f32.const 0.36286723613739014 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24462,9 +21985,10 @@ unreachable end f32.const 0.6619858741760254 + call $~lib/math/NativeMathf.cosh f32.const 1.2272322177886963 f32.const 0.32777416706085205 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24475,9 +21999,10 @@ unreachable end f32.const -0.40660393238067627 + call $~lib/math/NativeMathf.cosh f32.const 1.0838085412979126 f32.const -0.039848703891038895 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24488,9 +22013,10 @@ unreachable end f32.const 0.5617597699165344 + call $~lib/math/NativeMathf.cosh f32.const 1.161980390548706 f32.const 0.15274477005004883 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24501,9 +22027,10 @@ unreachable end f32.const 0.7741522789001465 + call $~lib/math/NativeMathf.cosh f32.const 1.314923644065857 f32.const -0.2387111485004425 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24514,9 +22041,10 @@ unreachable end f32.const -0.6787636876106262 + call $~lib/math/NativeMathf.cosh f32.const 1.2393412590026855 f32.const -0.45791932940483093 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24527,9 +22055,10 @@ unreachable end f32.const 0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24540,9 +22069,10 @@ unreachable end f32.const -0 + call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24553,9 +22083,10 @@ unreachable end f32.const inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24566,9 +22097,10 @@ unreachable end f32.const -inf + call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24579,9 +22111,10 @@ unreachable end f32.const nan:0x400000 + call $~lib/math/NativeMathf.cosh f32.const nan:0x400000 f32.const 0 - call $std/math/test_coshf + call $std/math/check i32.eqz if i32.const 0 @@ -24592,19 +22125,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.exp f64.const 3.137706068161745e-04 f64.const -0.2599197328090668 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/exp - f64.const 3.137706068161745e-04 - f64.const -0.2599197328090668 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24615,19 +22138,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.exp f64.const 77.11053017112141 f64.const -0.02792675793170929 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/exp - f64.const 77.11053017112141 - f64.const -0.02792675793170929 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24638,19 +22151,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.exp f64.const 2.290813384916323e-04 f64.const -0.24974334239959717 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/exp - f64.const 2.290813384916323e-04 - f64.const -0.24974334239959717 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24661,19 +22164,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.exp f64.const 1.4565661260931588e-03 f64.const -0.4816822409629822 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/exp - f64.const 1.4565661260931588e-03 - f64.const -0.4816822409629822 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24684,19 +22177,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.exp f64.const 10583.558245524993 f64.const 0.17696762084960938 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/exp - f64.const 10583.558245524993 - f64.const 0.17696762084960938 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24707,19 +22190,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.exp f64.const 1.9386384525571998 f64.const -0.4964246451854706 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/exp - f64.const 1.9386384525571998 - f64.const -0.4964246451854706 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24730,19 +22203,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.exp f64.const 0.6659078892838025 f64.const -0.10608318448066711 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/exp - f64.const 0.6659078892838025 - f64.const -0.10608318448066711 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24753,19 +22216,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.exp f64.const 1.7537559518626311 f64.const -0.39162111282348633 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/exp - f64.const 1.7537559518626311 - f64.const -0.39162111282348633 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24776,19 +22229,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.exp f64.const 2.1687528885129246 f64.const -0.2996125817298889 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/exp - f64.const 2.1687528885129246 - f64.const -0.2996125817298889 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24799,19 +22242,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.exp f64.const 0.5072437089402843 f64.const 0.47261738777160645 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/exp - f64.const 0.5072437089402843 - f64.const 0.47261738777160645 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24822,19 +22255,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/exp - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24845,19 +22268,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/exp - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24868,19 +22281,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.exp f64.const 2.718281828459045 f64.const -0.3255307376384735 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/exp - f64.const 2.718281828459045 - f64.const -0.3255307376384735 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24891,19 +22294,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.exp f64.const 0.36787944117144233 f64.const 0.22389651834964752 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/exp - f64.const 0.36787944117144233 - f64.const 0.22389651834964752 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24914,19 +22307,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.exp f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/exp - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24937,19 +22320,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.exp f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/exp - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24960,19 +22333,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.exp f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/exp - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -24983,19 +22346,9 @@ unreachable end f64.const 1.0397214889526365 - call $~lib/math/NativeMath.exp f64.const 2.828429155876411 f64.const 0.18803080916404724 - call $std/math/check - if (result i32) - f64.const 1.0397214889526365 - call $~lib/bindings/Math/exp - f64.const 2.828429155876411 - f64.const 0.18803080916404724 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25006,19 +22359,9 @@ unreachable end f64.const -1.0397214889526365 - call $~lib/math/NativeMath.exp f64.const 0.35355313670217847 f64.const 0.2527272403240204 - call $std/math/check - if (result i32) - f64.const -1.0397214889526365 - call $~lib/bindings/Math/exp - f64.const 0.35355313670217847 - f64.const 0.2527272403240204 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25029,19 +22372,9 @@ unreachable end f64.const 1.0397210121154785 - call $~lib/math/NativeMath.exp f64.const 2.8284278071766122 f64.const -0.4184139370918274 - call $std/math/check - if (result i32) - f64.const 1.0397210121154785 - call $~lib/bindings/Math/exp - f64.const 2.8284278071766122 - f64.const -0.4184139370918274 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25052,19 +22385,9 @@ unreachable end f64.const 1.0397214889526367 - call $~lib/math/NativeMath.exp f64.const 2.8284291558764116 f64.const -0.22618377208709717 - call $std/math/check - if (result i32) - f64.const 1.0397214889526367 - call $~lib/bindings/Math/exp - f64.const 2.8284291558764116 - f64.const -0.22618377208709717 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25075,19 +22398,9 @@ unreachable end f64.const 5e-324 - call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/exp - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25098,19 +22411,9 @@ unreachable end f64.const -5e-324 - call $~lib/math/NativeMath.exp f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/exp - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25121,19 +22424,9 @@ unreachable end f64.const 709.782712893384 - call $~lib/math/NativeMath.exp f64.const 1797693134862273196746681e284 f64.const -0.10568465292453766 - call $std/math/check - if (result i32) - f64.const 709.782712893384 - call $~lib/bindings/Math/exp - f64.const 1797693134862273196746681e284 - f64.const -0.10568465292453766 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25144,19 +22437,9 @@ unreachable end f64.const 709.7827128933841 - call $~lib/math/NativeMath.exp f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const 709.7827128933841 - call $~lib/bindings/Math/exp - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25167,19 +22450,9 @@ unreachable end f64.const -745.1332191019411 - call $~lib/math/NativeMath.exp f64.const 5e-324 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const -745.1332191019411 - call $~lib/bindings/Math/exp - f64.const 5e-324 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25190,19 +22463,9 @@ unreachable end f64.const -745.1332191019412 - call $~lib/math/NativeMath.exp f64.const 0 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const -745.1332191019412 - call $~lib/bindings/Math/exp - f64.const 0 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25213,19 +22476,9 @@ unreachable end f64.const -708.3964185322641 - call $~lib/math/NativeMath.exp f64.const 2.2250738585072626e-308 f64.const 0.26172348856925964 - call $std/math/check - if (result i32) - f64.const -708.3964185322641 - call $~lib/bindings/Math/exp - f64.const 2.2250738585072626e-308 - f64.const 0.26172348856925964 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25236,19 +22489,9 @@ unreachable end f64.const -708.3964185322642 - call $~lib/math/NativeMath.exp f64.const 2.2250738585070097e-308 f64.const 2.2250738585070097e-308 - call $std/math/check - if (result i32) - f64.const -708.3964185322642 - call $~lib/bindings/Math/exp - f64.const 2.2250738585070097e-308 - f64.const 2.2250738585070097e-308 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25259,19 +22502,9 @@ unreachable end f64.const 0.5006933289508785 - call $~lib/math/NativeMath.exp f64.const 1.6498647732549399 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 0.5006933289508785 - call $~lib/bindings/Math/exp - f64.const 1.6498647732549399 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25282,19 +22515,9 @@ unreachable end f64.const 0.628493326460252 - call $~lib/math/NativeMath.exp f64.const 1.8747837631658781 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 0.628493326460252 - call $~lib/bindings/Math/exp - f64.const 1.8747837631658781 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25305,19 +22528,9 @@ unreachable end f64.const 0.837522455340574 - call $~lib/math/NativeMath.exp f64.const 2.3106351774748006 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 0.837522455340574 - call $~lib/bindings/Math/exp - f64.const 2.3106351774748006 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25328,19 +22541,9 @@ unreachable end f64.const 0.8504909932810999 - call $~lib/math/NativeMath.exp f64.const 2.3407958848710777 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 0.8504909932810999 - call $~lib/bindings/Math/exp - f64.const 2.3407958848710777 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25351,19 +22554,9 @@ unreachable end f64.const 1.6270060846924657 - call $~lib/math/NativeMath.exp f64.const 5.088617001442459 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 1.6270060846924657 - call $~lib/bindings/Math/exp - f64.const 5.088617001442459 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25374,19 +22567,9 @@ unreachable end f64.const 1.6744336219614115 - call $~lib/math/NativeMath.exp f64.const 5.335772228886831 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 1.6744336219614115 - call $~lib/bindings/Math/exp - f64.const 5.335772228886831 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25397,19 +22580,9 @@ unreachable end f64.const 6.657914718791208 - call $~lib/math/NativeMath.exp f64.const 778.924964819056 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 6.657914718791208 - call $~lib/bindings/Math/exp - f64.const 778.924964819056 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25420,19 +22593,9 @@ unreachable end f64.const 11.022872793631722 - call $~lib/math/NativeMath.exp f64.const 61259.41271820104 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 11.022872793631722 - call $~lib/bindings/Math/exp - f64.const 61259.41271820104 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25443,19 +22606,9 @@ unreachable end f64.const 11.411195701885317 - call $~lib/math/NativeMath.exp f64.const 90327.36165653409 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 11.411195701885317 - call $~lib/bindings/Math/exp - f64.const 90327.36165653409 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25466,19 +22619,9 @@ unreachable end f64.const 11.794490387560606 - call $~lib/math/NativeMath.exp f64.const 132520.20290772576 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 11.794490387560606 - call $~lib/bindings/Math/exp - f64.const 132520.20290772576 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25489,19 +22632,9 @@ unreachable end f64.const 412.83872756953286 - call $~lib/math/NativeMath.exp f64.const 1965989977109266413433084e155 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const 412.83872756953286 - call $~lib/bindings/Math/exp - f64.const 1965989977109266413433084e155 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25512,19 +22645,9 @@ unreachable end f64.const 510.87569028483415 - call $~lib/math/NativeMath.exp f64.const 7421526272656495968225491e197 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 510.87569028483415 - call $~lib/bindings/Math/exp - f64.const 7421526272656495968225491e197 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25535,19 +22658,9 @@ unreachable end f64.const -2.6589841439772853e-14 - call $~lib/math/NativeMath.exp f64.const 0.9999999999999735 f64.const 0.5 - call $std/math/check - if (result i32) - f64.const -2.6589841439772853e-14 - call $~lib/bindings/Math/exp - f64.const 0.9999999999999735 - f64.const 0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25558,19 +22671,9 @@ unreachable end f64.const -2.7144952952085447e-14 - call $~lib/math/NativeMath.exp f64.const 0.9999999999999728 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const -2.7144952952085447e-14 - call $~lib/bindings/Math/exp - f64.const 0.9999999999999728 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_exp i32.eqz if i32.const 0 @@ -25917,19 +23020,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.expm1 f64.const -0.9996862293931839 f64.const -0.2760058343410492 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/expm1 - f64.const -0.9996862293931839 - f64.const -0.2760058343410492 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -25940,19 +23033,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.expm1 f64.const 76.11053017112141 f64.const -0.02792675793170929 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/expm1 - f64.const 76.11053017112141 - f64.const -0.02792675793170929 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -25963,19 +23046,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.expm1 f64.const -0.9997709186615084 f64.const 0.10052496194839478 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/expm1 - f64.const -0.9997709186615084 - f64.const 0.10052496194839478 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -25986,19 +23059,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.expm1 f64.const -0.9985434338739069 f64.const -0.27437829971313477 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/expm1 - f64.const -0.9985434338739069 - f64.const -0.27437829971313477 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26009,19 +23072,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.expm1 f64.const 10582.558245524993 f64.const 0.17696762084960938 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/expm1 - f64.const 10582.558245524993 - f64.const 0.17696762084960938 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26032,19 +23085,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.expm1 f64.const 0.9386384525571999 f64.const 0.007150684483349323 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/expm1 - f64.const 0.9386384525571999 - f64.const 0.007150684483349323 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26055,19 +23098,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.expm1 f64.const -0.3340921107161975 f64.const -0.21216636896133423 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/expm1 - f64.const -0.3340921107161975 - f64.const -0.21216636896133423 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26078,19 +23111,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.expm1 f64.const 0.7537559518626312 f64.const 0.21675777435302734 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/expm1 - f64.const 0.7537559518626312 - f64.const 0.21675777435302734 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26101,19 +23124,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.expm1 f64.const 1.1687528885129248 f64.const 0.4007748067378998 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/expm1 - f64.const 1.1687528885129248 - f64.const 0.4007748067378998 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26124,19 +23137,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.expm1 f64.const -0.4927562910597158 f64.const -0.05476519837975502 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/expm1 - f64.const -0.4927562910597158 - f64.const -0.05476519837975502 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26147,19 +23150,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.expm1 f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/expm1 - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26170,19 +23163,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.expm1 f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/expm1 - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26193,19 +23176,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.expm1 f64.const 1.7182818284590453 f64.const 0.348938524723053 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/expm1 - f64.const 1.7182818284590453 - f64.const 0.348938524723053 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26216,19 +23189,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.expm1 f64.const -0.6321205588285577 f64.const 0.11194825917482376 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/expm1 - f64.const -0.6321205588285577 - f64.const 0.11194825917482376 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26239,19 +23202,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.expm1 f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/expm1 - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26262,19 +23215,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.expm1 f64.const -1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/expm1 - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26285,19 +23228,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.expm1 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/expm1 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26308,19 +23241,9 @@ unreachable end f64.const 2.225073858507201e-308 - call $~lib/math/NativeMath.expm1 f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/expm1 - f64.const 2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -26331,19 +23254,9 @@ unreachable end f64.const -2.225073858507201e-308 - call $~lib/math/NativeMath.expm1 f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/expm1 - f64.const -2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_expm1 i32.eqz if i32.const 0 @@ -27186,19 +24099,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.06684839057968 f64.const -9 - f64.const -9 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/floor - f64.const -9 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27208,19 +24111,9 @@ call $~lib/builtins/abort unreachable end + f64.const 4.345239849338305 f64.const 4 - f64.const 4 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/floor - f64.const 4 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27230,19 +24123,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.38143342755525 f64.const -9 - f64.const -9 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/floor - f64.const -9 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27252,19 +24135,9 @@ call $~lib/builtins/abort unreachable end + f64.const -6.531673581913484 f64.const -7 - f64.const -7 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/floor - f64.const -7 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27274,19 +24147,9 @@ call $~lib/builtins/abort unreachable end + f64.const 9.267056966972586 f64.const 9 - f64.const 9 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/floor - f64.const 9 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27296,19 +24159,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.6619858980995045 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27318,19 +24171,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.4066039223853553 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27340,19 +24183,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5617597462207241 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27362,19 +24195,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.7741522965913037 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27384,19 +24207,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.6787637026394024 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27408,17 +24221,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/floor - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27430,17 +24233,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/floor - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27452,17 +24245,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/floor - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27474,17 +24257,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27496,17 +24269,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/floor - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27518,17 +24281,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/floor - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27540,17 +24293,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27560,19 +24303,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27582,19 +24315,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.5 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27604,19 +24327,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000152587890625 - call $~lib/bindings/Math/floor - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27626,19 +24339,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -2 - f64.const -2 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000152587890625 - call $~lib/bindings/Math/floor - f64.const -2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27648,19 +24351,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.9999923706054688 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27670,19 +24363,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.9999923706054688 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27692,19 +24375,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/floor - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -27714,19 +24387,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/floor - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_floor i32.eqz if i32.const 0 @@ -28063,10 +24726,9 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 - call $~lib/math/NativeMath.hypot f64.const 9.25452742288464 f64.const -0.31188681721687317 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28078,10 +24740,9 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 - call $~lib/math/NativeMath.hypot f64.const 9.893305808328252 f64.const 0.4593673348426819 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28093,10 +24754,9 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 - call $~lib/math/NativeMath.hypot f64.const 8.825301797432132 f64.const -0.1701754331588745 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28108,10 +24768,9 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 - call $~lib/math/NativeMath.hypot f64.const 7.970265885519092 f64.const -0.3176782727241516 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28123,10 +24782,9 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 - call $~lib/math/NativeMath.hypot f64.const 10.441639651824575 f64.const -0.2693633437156677 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28138,10 +24796,9 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 - call $~lib/math/NativeMath.hypot f64.const 6.483936052542593 f64.const 0.35618898272514343 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28153,10 +24810,9 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 - call $~lib/math/NativeMath.hypot f64.const 7.859063309581766 f64.const 0.08044655621051788 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28168,10 +24824,9 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 - call $~lib/math/NativeMath.hypot f64.const 7.717156764899584 f64.const 0.05178084969520569 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28183,10 +24838,9 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 - call $~lib/math/NativeMath.hypot f64.const 2.104006123874314 f64.const -0.0918039008975029 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28198,10 +24852,9 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 - call $~lib/math/NativeMath.hypot f64.const 0.5596880129062913 f64.const 0.1383407711982727 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28213,10 +24866,9 @@ end f64.const 3 f64.const 4 - call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28228,10 +24880,9 @@ end f64.const -3 f64.const 4 - call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28243,10 +24894,9 @@ end f64.const 4 f64.const 3 - call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28258,10 +24908,9 @@ end f64.const 4 f64.const -3 - call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28273,10 +24922,9 @@ end f64.const -3 f64.const -4 - call $~lib/math/NativeMath.hypot f64.const 5 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28288,10 +24936,9 @@ end f64.const 1797693134862315708145274e284 f64.const 0 - call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28303,10 +24950,9 @@ end f64.const 1797693134862315708145274e284 f64.const -0 - call $~lib/math/NativeMath.hypot f64.const 1797693134862315708145274e284 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28318,10 +24964,9 @@ end f64.const 5e-324 f64.const 0 - call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28333,10 +24978,9 @@ end f64.const 5e-324 f64.const -0 - call $~lib/math/NativeMath.hypot f64.const 5e-324 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28348,10 +24992,9 @@ end f64.const inf f64.const 1 - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28363,10 +25006,9 @@ end f64.const 1 f64.const inf - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28378,10 +25020,9 @@ end f64.const inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28393,10 +25034,9 @@ end f64.const nan:0x8000000000000 f64.const inf - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28408,10 +25048,9 @@ end f64.const -inf f64.const 1 - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28423,10 +25062,9 @@ end f64.const 1 f64.const -inf - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28438,10 +25076,9 @@ end f64.const -inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28453,10 +25090,9 @@ end f64.const nan:0x8000000000000 f64.const -inf - call $~lib/math/NativeMath.hypot f64.const inf f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28468,10 +25104,9 @@ end f64.const nan:0x8000000000000 f64.const 1 - call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28483,10 +25118,9 @@ end f64.const 1 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28498,10 +25132,9 @@ end f64.const nan:0x8000000000000 f64.const 0 - call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28513,10 +25146,9 @@ end f64.const 0 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.hypot f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check + call $std/math/test_hypot i32.eqz if i32.const 0 @@ -28528,10 +25160,9 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 - call $~lib/math/NativeMathf.hypot f32.const 9.254528045654297 f32.const 0.2735958993434906 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28543,10 +25174,9 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 - call $~lib/math/NativeMathf.hypot f32.const 9.893305778503418 f32.const 0.4530770778656006 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28558,10 +25188,9 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 - call $~lib/math/NativeMathf.hypot f32.const 8.825302124023438 f32.const 0.30755728483200073 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28573,10 +25202,9 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 - call $~lib/math/NativeMathf.hypot f32.const 7.970265865325928 f32.const 0.06785223633050919 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28588,10 +25216,9 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 - call $~lib/math/NativeMathf.hypot f32.const 10.44163990020752 f32.const -0.26776307821273804 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28603,10 +25230,9 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 - call $~lib/math/NativeMathf.hypot f32.const 6.483936309814453 f32.const 0.48381292819976807 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28618,10 +25244,9 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 - call $~lib/math/NativeMathf.hypot f32.const 7.859063148498535 f32.const 0.07413065433502197 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28633,10 +25258,9 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 - call $~lib/math/NativeMathf.hypot f32.const 7.717156887054443 f32.const 0.4940592646598816 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28648,10 +25272,9 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 - call $~lib/math/NativeMathf.hypot f32.const 2.104006052017212 f32.const -0.287089467048645 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28663,10 +25286,9 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 - call $~lib/math/NativeMathf.hypot f32.const 0.5596880316734314 f32.const 0.4191940724849701 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28678,10 +25300,9 @@ end f32.const 3 f32.const 4 - call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28693,10 +25314,9 @@ end f32.const -3 f32.const 4 - call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28708,10 +25328,9 @@ end f32.const 4 f32.const 3 - call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28723,10 +25342,9 @@ end f32.const 4 f32.const -3 - call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28738,10 +25356,9 @@ end f32.const -3 f32.const -4 - call $~lib/math/NativeMathf.hypot f32.const 5 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28753,10 +25370,9 @@ end f32.const 3402823466385288598117041e14 f32.const 0 - call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28768,10 +25384,9 @@ end f32.const 3402823466385288598117041e14 f32.const -0 - call $~lib/math/NativeMathf.hypot f32.const 3402823466385288598117041e14 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28783,10 +25398,9 @@ end f32.const 1.401298464324817e-45 f32.const 0 - call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28798,10 +25412,9 @@ end f32.const 1.401298464324817e-45 f32.const -0 - call $~lib/math/NativeMathf.hypot f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28813,10 +25426,9 @@ end f32.const inf f32.const 1 - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28828,10 +25440,9 @@ end f32.const 1 f32.const inf - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28843,10 +25454,9 @@ end f32.const inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28858,10 +25468,9 @@ end f32.const nan:0x400000 f32.const inf - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28873,10 +25482,9 @@ end f32.const -inf f32.const 1 - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28888,10 +25496,9 @@ end f32.const 1 f32.const -inf - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28903,10 +25510,9 @@ end f32.const -inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28918,10 +25524,9 @@ end f32.const nan:0x400000 f32.const -inf - call $~lib/math/NativeMathf.hypot f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28933,10 +25538,9 @@ end f32.const nan:0x400000 f32.const 1 - call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28948,10 +25552,9 @@ end f32.const 1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.hypot f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_hypotf i32.eqz if i32.const 0 @@ -28962,19 +25565,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -28985,19 +25578,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.log f64.const 1.4690809584224322 f64.const -0.3412533402442932 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/log - f64.const 1.4690809584224322 - f64.const -0.3412533402442932 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29008,19 +25591,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29031,19 +25604,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29054,19 +25617,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.log f64.const 2.2264658498795615 f64.const 0.3638114035129547 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/log - f64.const 2.2264658498795615 - f64.const 0.3638114035129547 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29077,19 +25630,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.log f64.const -0.4125110252365137 f64.const -0.29108747839927673 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/log - f64.const -0.4125110252365137 - f64.const -0.29108747839927673 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29100,19 +25643,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29123,19 +25656,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.log f64.const -0.5766810183195862 f64.const -0.10983199626207352 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/log - f64.const -0.5766810183195862 - f64.const -0.10983199626207352 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29146,19 +25669,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.log f64.const -0.2559866591263865 f64.const -0.057990044355392456 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/log - f64.const -0.2559866591263865 - f64.const -0.057990044355392456 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29169,19 +25682,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29192,19 +25695,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.log f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/log - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29215,19 +25708,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.log f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/log - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29238,19 +25721,9 @@ unreachable end f64.const -7.888609052210118e-31 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29261,19 +25734,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.log f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/log - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29284,19 +25747,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29307,19 +25760,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.log f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/log - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29330,19 +25773,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29353,19 +25786,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.log f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log i32.eqz if i32.const 0 @@ -29600,19 +26023,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29623,19 +26036,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.log10 f64.const 0.6380137537120029 f64.const -0.2088824063539505 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/log10 - f64.const 0.6380137537120029 - f64.const -0.2088824063539505 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29646,19 +26049,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29669,19 +26062,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29692,19 +26075,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.log10 f64.const 0.9669418327487274 f64.const -0.06120431795716286 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/log10 - f64.const 0.9669418327487274 - f64.const -0.06120431795716286 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29715,19 +26088,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.log10 f64.const -0.17915126198447093 f64.const 0.39090874791145325 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/log10 - f64.const -0.17915126198447093 - f64.const 0.39090874791145325 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29738,19 +26101,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29761,19 +26114,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.log10 f64.const -0.25044938407454437 f64.const -0.3046841621398926 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/log10 - f64.const -0.25044938407454437 - f64.const -0.3046841621398926 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29784,19 +26127,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.log10 f64.const -0.11117359349943837 f64.const -0.31503361463546753 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/log10 - f64.const -0.11117359349943837 - f64.const -0.31503361463546753 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29807,19 +26140,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29830,19 +26153,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.log10 f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/log10 - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29853,19 +26166,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.log10 f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/log10 - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29876,19 +26179,9 @@ unreachable end f64.const -7.888609052210118e-31 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29899,19 +26192,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.log10 f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/log10 - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29922,19 +26205,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29945,19 +26218,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.log10 f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/log10 - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29968,19 +26231,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -29991,19 +26244,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.log10 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log10 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log10 i32.eqz if i32.const 0 @@ -30266,19 +26509,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/log1p - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30289,19 +26522,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.log1p f64.const 1.6762064170601734 f64.const 0.46188199520111084 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/log1p - f64.const 1.6762064170601734 - f64.const 0.46188199520111084 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30312,19 +26535,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/log1p - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30335,19 +26548,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/log1p - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30358,19 +26561,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.log1p f64.const 2.3289404168523826 f64.const -0.411114901304245 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/log1p - f64.const 2.3289404168523826 - f64.const -0.411114901304245 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30381,19 +26574,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.log1p f64.const 0.5080132114992477 f64.const -0.29306045174598694 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/log1p - f64.const 0.5080132114992477 - f64.const -0.29306045174598694 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30404,19 +26587,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.log1p f64.const -0.5218931811663979 f64.const -0.25825726985931396 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/log1p - f64.const -0.5218931811663979 - f64.const -0.25825726985931396 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30427,19 +26600,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.log1p f64.const 0.4458132279488102 f64.const -0.13274887204170227 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/log1p - f64.const 0.4458132279488102 - f64.const -0.13274887204170227 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30450,19 +26613,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.log1p f64.const 0.5733227294648414 f64.const 0.02716583013534546 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/log1p - f64.const 0.5733227294648414 - f64.const 0.02716583013534546 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30473,19 +26626,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.log1p f64.const -1.1355782978128564 f64.const 0.2713092863559723 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/log1p - f64.const -1.1355782978128564 - f64.const 0.2713092863559723 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30496,19 +26639,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.log1p f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/log1p - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30519,19 +26652,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.log1p f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/log1p - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30542,19 +26665,9 @@ unreachable end f64.const -7.888609052210118e-31 - call $~lib/math/NativeMath.log1p f64.const -7.888609052210118e-31 f64.const 1.7763568394002505e-15 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log1p - f64.const -7.888609052210118e-31 - f64.const 1.7763568394002505e-15 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30565,19 +26678,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.log1p f64.const 0.6931471805599453 f64.const -0.2088811695575714 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/log1p - f64.const 0.6931471805599453 - f64.const -0.2088811695575714 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30588,19 +26691,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.log1p f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/log1p - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30611,19 +26704,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.log1p f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/log1p - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30634,19 +26717,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/log1p - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30657,19 +26730,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.log1p f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log1p - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log1p i32.eqz if i32.const 0 @@ -30946,19 +27009,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -30969,19 +27022,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.log2 f64.const 2.1194358133804485 f64.const -0.10164877772331238 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/log2 - f64.const 2.1194358133804485 - f64.const -0.10164877772331238 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -30992,19 +27035,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31015,19 +27048,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31038,19 +27061,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.log2 f64.const 3.2121112403298744 f64.const -0.15739446878433228 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/log2 - f64.const 3.2121112403298744 - f64.const -0.15739446878433228 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31061,19 +27074,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.log2 f64.const -0.5951276104207402 f64.const 0.3321485221385956 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/log2 - f64.const -0.5951276104207402 - f64.const 0.3321485221385956 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31084,19 +27087,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31107,19 +27100,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.log2 f64.const -0.8319748453044644 f64.const 0.057555437088012695 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/log2 - f64.const -0.8319748453044644 - f64.const 0.057555437088012695 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31130,19 +27113,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.log2 f64.const -0.36931068365537134 f64.const -0.19838279485702515 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/log2 - f64.const -0.36931068365537134 - f64.const -0.19838279485702515 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31153,19 +27126,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31176,19 +27139,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.log2 f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/log2 - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31199,19 +27152,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.log2 f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/log2 - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31222,19 +27165,9 @@ unreachable end f64.const -7.888609052210118e-31 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31245,19 +27178,9 @@ unreachable end f64.const 1 - call $~lib/math/NativeMath.log2 f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/log2 - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31268,19 +27191,9 @@ unreachable end f64.const -1 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31291,19 +27204,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.log2 f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/log2 - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31314,19 +27217,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -31337,19 +27230,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.log2 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/log2 - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_log2 i32.eqz if i32.const 0 @@ -32495,10 +28378,10 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const 4.535662651062012 f32.const 4.535662651062012 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32509,9 +28392,9 @@ unreachable end f32.const 4.345239639282227 + f32.const -8.887990951538086 f32.const 4.345239639282227 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32521,10 +28404,10 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const -2.7636072635650635 f32.const -2.7636072635650635 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32534,10 +28417,10 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const 4.567535400390625 f32.const 4.567535400390625 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32548,9 +28431,9 @@ unreachable end f32.const 9.267057418823242 + f32.const 4.811392307281494 f32.const 9.267057418823242 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32560,10 +28443,10 @@ call $~lib/builtins/abort unreachable end + f32.const -6.450045585632324 f32.const 0.6620717644691467 f32.const 0.6620717644691467 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32574,9 +28457,9 @@ unreachable end f32.const 7.858890056610107 + f32.const 0.052154526114463806 f32.const 7.858890056610107 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32586,10 +28469,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0.7920545339584351 f32.const 7.676402568817139 f32.const 7.676402568817139 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32599,10 +28482,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0.6157026886940002 f32.const 2.0119025707244873 f32.const 2.0119025707244873 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32612,10 +28495,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5587586760520935 f32.const 0.03223983198404312 f32.const 0.03223983198404312 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32625,10 +28508,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32638,10 +28521,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32651,10 +28534,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32664,10 +28547,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32679,8 +28562,8 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + f32.const 1 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32690,10 +28573,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32704,9 +28587,9 @@ unreachable end f32.const inf + f32.const 1 f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32716,10 +28599,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32730,9 +28613,9 @@ unreachable end f32.const nan:0x400000 + f32.const 1 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32743,9 +28626,9 @@ unreachable end f32.const 0 + f32.const -1 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32756,9 +28639,9 @@ unreachable end f32.const -0 + f32.const -1 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32769,9 +28652,9 @@ unreachable end f32.const 0.5 + f32.const -1 f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32782,9 +28665,9 @@ unreachable end f32.const -0.5 + f32.const -1 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32795,9 +28678,9 @@ unreachable end f32.const 1 + f32.const -1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32809,8 +28692,8 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + f32.const -1 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32821,9 +28704,9 @@ unreachable end f32.const inf + f32.const -1 f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32833,10 +28716,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32847,9 +28730,9 @@ unreachable end f32.const nan:0x400000 + f32.const -1 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32862,7 +28745,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32873,9 +28756,9 @@ unreachable end f32.const 0 + f32.const -0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32885,10 +28768,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32899,9 +28782,9 @@ unreachable end f32.const 0 + f32.const -inf f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32911,10 +28794,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32924,10 +28807,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32939,8 +28822,8 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + f32.const -0 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32950,10 +28833,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32964,9 +28847,9 @@ unreachable end f32.const -0 + f32.const -inf f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32976,10 +28859,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -32990,9 +28873,9 @@ unreachable end f32.const 1 - f32.const 1 f32.const 0 - call $std/math/check + f32.const 1 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33002,10 +28885,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33016,9 +28899,9 @@ unreachable end f32.const inf - f32.const inf f32.const 0 - call $std/math/check + f32.const inf + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33028,10 +28911,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33042,9 +28925,9 @@ unreachable end f32.const nan:0x400000 - f32.const nan:0x400000 f32.const 0 - call $std/math/check + f32.const nan:0x400000 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33054,10 +28937,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33068,9 +28951,9 @@ unreachable end f32.const inf + f32.const -0 f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33080,10 +28963,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33094,9 +28977,9 @@ unreachable end f32.const nan:0x400000 + f32.const -0 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33107,9 +28990,9 @@ unreachable end f32.const inf + f32.const 2 f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33120,9 +29003,9 @@ unreachable end f32.const inf + f32.const -0.5 f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33132,10 +29015,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33145,10 +29028,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const 2 f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33158,10 +29041,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const -0.5 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33171,10 +29054,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33186,8 +29069,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + f32.const nan:0x400000 + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33197,10 +29080,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33210,10 +29093,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33223,10 +29106,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33236,10 +29119,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33251,8 +29134,8 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + f32.const inf + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33262,10 +29145,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33276,9 +29159,9 @@ unreachable end f32.const 1 + f32.const -inf f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33289,9 +29172,9 @@ unreachable end f32.const -1 + f32.const -inf f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33302,9 +29185,9 @@ unreachable end f32.const inf + f32.const -inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33316,8 +29199,8 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + f32.const -inf + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33328,9 +29211,9 @@ unreachable end f32.const 1.75 + f32.const 0.5 f32.const 1.75 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33340,10 +29223,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1.75 f32.const 0.5 f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33354,9 +29237,9 @@ unreachable end f32.const 1.75 + f32.const -0.5 f32.const 1.75 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -33366,10 +29249,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1.75 f32.const -0.5 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_maxf i32.eqz if i32.const 0 @@ -34264,9 +30147,9 @@ unreachable end f32.const -8.066848754882812 + f32.const 4.535662651062012 f32.const -8.066848754882812 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34276,10 +30159,10 @@ call $~lib/builtins/abort unreachable end + f32.const 4.345239639282227 f32.const -8.887990951538086 f32.const -8.887990951538086 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34290,9 +30173,9 @@ unreachable end f32.const -8.381433486938477 + f32.const -2.7636072635650635 f32.const -8.381433486938477 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34303,9 +30186,9 @@ unreachable end f32.const -6.531673431396484 + f32.const 4.567535400390625 f32.const -6.531673431396484 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34315,10 +30198,10 @@ call $~lib/builtins/abort unreachable end + f32.const 9.267057418823242 f32.const 4.811392307281494 f32.const 4.811392307281494 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34329,9 +30212,9 @@ unreachable end f32.const -6.450045585632324 + f32.const 0.6620717644691467 f32.const -6.450045585632324 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34341,10 +30224,10 @@ call $~lib/builtins/abort unreachable end + f32.const 7.858890056610107 f32.const 0.052154526114463806 f32.const 0.052154526114463806 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34355,9 +30238,9 @@ unreachable end f32.const -0.7920545339584351 + f32.const 7.676402568817139 f32.const -0.7920545339584351 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34368,9 +30251,9 @@ unreachable end f32.const 0.6157026886940002 + f32.const 2.0119025707244873 f32.const 0.6157026886940002 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34381,9 +30264,9 @@ unreachable end f32.const -0.5587586760520935 + f32.const 0.03223983198404312 f32.const -0.5587586760520935 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34394,9 +30277,9 @@ unreachable end f32.const 0 + f32.const 1 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34407,9 +30290,9 @@ unreachable end f32.const -0 + f32.const 1 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34420,9 +30303,9 @@ unreachable end f32.const 0.5 + f32.const 1 f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34433,9 +30316,9 @@ unreachable end f32.const -0.5 + f32.const 1 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34447,8 +30330,8 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + f32.const 1 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34459,9 +30342,9 @@ unreachable end f32.const -1 + f32.const 1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34471,10 +30354,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34485,9 +30368,9 @@ unreachable end f32.const -inf + f32.const 1 f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34498,9 +30381,9 @@ unreachable end f32.const nan:0x400000 + f32.const 1 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34510,10 +30393,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34523,10 +30406,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34536,10 +30419,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34549,10 +30432,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34562,10 +30445,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34577,8 +30460,8 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + f32.const -1 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34588,10 +30471,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34602,9 +30485,9 @@ unreachable end f32.const -inf + f32.const -1 f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34615,9 +30498,9 @@ unreachable end f32.const nan:0x400000 + f32.const -1 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34630,7 +30513,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34640,10 +30523,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34654,9 +30537,9 @@ unreachable end f32.const 0 + f32.const inf f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34666,10 +30549,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34679,10 +30562,10 @@ call $~lib/builtins/abort unreachable end + f32.const 0 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34693,9 +30576,9 @@ unreachable end f32.const -0 - f32.const -0 f32.const 0 - call $std/math/check + f32.const -0 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34707,8 +30590,8 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + f32.const -0 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34719,9 +30602,9 @@ unreachable end f32.const -0 + f32.const inf f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34731,10 +30614,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34744,10 +30627,10 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34757,10 +30640,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34771,9 +30654,9 @@ unreachable end f32.const -1 - f32.const -1 f32.const 0 - call $std/math/check + f32.const -1 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34783,10 +30666,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34797,9 +30680,9 @@ unreachable end f32.const -inf - f32.const -inf f32.const 0 - call $std/math/check + f32.const -inf + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34810,9 +30693,9 @@ unreachable end f32.const nan:0x400000 - f32.const nan:0x400000 f32.const 0 - call $std/math/check + f32.const nan:0x400000 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34823,9 +30706,9 @@ unreachable end f32.const -1 + f32.const -0 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34835,10 +30718,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34849,9 +30732,9 @@ unreachable end f32.const -inf + f32.const -0 f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34862,9 +30745,9 @@ unreachable end f32.const nan:0x400000 + f32.const -0 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34874,10 +30757,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const 2 f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34887,10 +30770,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const -0.5 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34900,10 +30783,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34914,9 +30797,9 @@ unreachable end f32.const -inf + f32.const 2 f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34927,9 +30810,9 @@ unreachable end f32.const -inf + f32.const -0.5 f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34939,10 +30822,10 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34954,8 +30837,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + f32.const nan:0x400000 + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34965,10 +30848,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34978,10 +30861,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -34992,9 +30875,9 @@ unreachable end f32.const 1 + f32.const inf f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35005,9 +30888,9 @@ unreachable end f32.const -1 + f32.const inf f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35019,8 +30902,8 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + f32.const inf + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35031,9 +30914,9 @@ unreachable end f32.const -inf + f32.const inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35043,10 +30926,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1 f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35056,10 +30939,10 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35069,10 +30952,10 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35084,8 +30967,8 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + f32.const -inf + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35095,10 +30978,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1.75 f32.const 0.5 f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35109,9 +30992,9 @@ unreachable end f32.const -1.75 + f32.const 0.5 f32.const -1.75 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35121,10 +31004,10 @@ call $~lib/builtins/abort unreachable end + f32.const 1.75 f32.const -0.5 f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -35135,9 +31018,9 @@ unreachable end f32.const -1.75 + f32.const -0.5 f32.const -1.75 - f32.const 0 - call $std/math/check + call $std/math/test_minf i32.eqz if i32.const 0 @@ -36943,10 +32826,8 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 - call $~lib/math/NativeMathf.mod f32.const -3.531186103820801 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -36958,10 +32839,8 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 - call $~lib/math/NativeMathf.mod f32.const 4.345239639282227 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -36973,10 +32852,8 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 - call $~lib/math/NativeMathf.mod f32.const -0.09061169624328613 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -36988,10 +32865,8 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 - call $~lib/math/NativeMathf.mod f32.const -1.9641380310058594 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37003,10 +32878,8 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 - call $~lib/math/NativeMathf.mod f32.const 4.455665111541748 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37018,10 +32891,8 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 - call $~lib/math/NativeMathf.mod f32.const -0.49139970541000366 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37033,10 +32904,8 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 - call $~lib/math/NativeMathf.mod f32.const 0.0357111394405365 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37048,10 +32917,8 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 - call $~lib/math/NativeMathf.mod f32.const -0.7920545339584351 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37063,10 +32930,8 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 - call $~lib/math/NativeMathf.mod f32.const 0.6157026886940002 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37078,10 +32943,8 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 - call $~lib/math/NativeMathf.mod f32.const -0.010681532323360443 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37093,10 +32956,8 @@ end f32.const 0 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37108,10 +32969,8 @@ end f32.const -0 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37123,10 +32982,8 @@ end f32.const 0.5 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37138,10 +32995,8 @@ end f32.const -0.5 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37153,10 +33008,8 @@ end f32.const 1 f32.const 1 - call $~lib/math/NativeMathf.mod - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37168,10 +33021,8 @@ end f32.const -1 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37183,10 +33034,8 @@ end f32.const 1.5 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37198,10 +33047,8 @@ end f32.const -1.5 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37213,10 +33060,8 @@ end f32.const 2 f32.const 1 - call $~lib/math/NativeMathf.mod - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37228,10 +33073,8 @@ end f32.const -2 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37243,10 +33086,8 @@ end f32.const inf f32.const 1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37258,10 +33099,8 @@ end f32.const -inf f32.const 1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37273,10 +33112,8 @@ end f32.const nan:0x400000 f32.const 1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37288,10 +33125,8 @@ end f32.const 0 f32.const -1 - call $~lib/math/NativeMathf.mod - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37303,10 +33138,8 @@ end f32.const -0 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37318,10 +33151,8 @@ end f32.const 0.5 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37333,10 +33164,8 @@ end f32.const -0.5 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37348,10 +33177,8 @@ end f32.const 1 f32.const -1 - call $~lib/math/NativeMathf.mod - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37363,10 +33190,8 @@ end f32.const -1 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37378,10 +33203,8 @@ end f32.const 1.5 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37393,10 +33216,8 @@ end f32.const -1.5 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37408,10 +33229,8 @@ end f32.const 2 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37423,10 +33242,8 @@ end f32.const -2 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37438,10 +33255,8 @@ end f32.const inf f32.const -1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37453,10 +33268,8 @@ end f32.const -inf f32.const -1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37468,10 +33281,8 @@ end f32.const nan:0x400000 f32.const -1 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37483,10 +33294,8 @@ end f32.const 0 f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37498,10 +33307,8 @@ end f32.const 0 f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37513,10 +33320,8 @@ end f32.const 0 f32.const inf - call $~lib/math/NativeMathf.mod f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37528,10 +33333,8 @@ end f32.const 0 f32.const -inf - call $~lib/math/NativeMathf.mod f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37543,10 +33346,8 @@ end f32.const 0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37558,10 +33359,8 @@ end f32.const -0 f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37573,10 +33372,8 @@ end f32.const -0 f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37588,10 +33385,8 @@ end f32.const -0 f32.const inf - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37603,10 +33398,8 @@ end f32.const -0 f32.const -inf - call $~lib/math/NativeMathf.mod f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37618,10 +33411,8 @@ end f32.const -0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37633,10 +33424,8 @@ end f32.const 1 f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37648,10 +33437,8 @@ end f32.const -1 f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37663,10 +33450,8 @@ end f32.const inf f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37678,10 +33463,8 @@ end f32.const -inf f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37693,10 +33476,8 @@ end f32.const nan:0x400000 f32.const 0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37708,10 +33489,8 @@ end f32.const -1 f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37723,10 +33502,8 @@ end f32.const inf f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37738,10 +33515,8 @@ end f32.const -inf f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37753,10 +33528,8 @@ end f32.const nan:0x400000 f32.const -0 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37768,10 +33541,8 @@ end f32.const inf f32.const 2 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37783,10 +33554,8 @@ end f32.const inf f32.const -0.5 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37798,10 +33567,8 @@ end f32.const inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37813,10 +33580,8 @@ end f32.const -inf f32.const 2 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37828,10 +33593,8 @@ end f32.const -inf f32.const -0.5 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37843,10 +33606,8 @@ end f32.const -inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37858,10 +33619,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37873,10 +33632,8 @@ end f32.const 1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37888,10 +33645,8 @@ end f32.const -1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37903,10 +33658,8 @@ end f32.const 1 f32.const inf - call $~lib/math/NativeMathf.mod f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37918,10 +33671,8 @@ end f32.const -1 f32.const inf - call $~lib/math/NativeMathf.mod f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37933,10 +33684,8 @@ end f32.const inf f32.const inf - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37948,10 +33697,8 @@ end f32.const -inf f32.const inf - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37963,10 +33710,8 @@ end f32.const 1 f32.const -inf - call $~lib/math/NativeMathf.mod f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37978,10 +33723,8 @@ end f32.const -1 f32.const -inf - call $~lib/math/NativeMathf.mod f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -37993,10 +33736,8 @@ end f32.const inf f32.const -inf - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -38008,10 +33749,8 @@ end f32.const -inf f32.const -inf - call $~lib/math/NativeMathf.mod f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -38023,10 +33762,8 @@ end f32.const 1.75 f32.const 0.5 - call $~lib/math/NativeMathf.mod f32.const 0.25 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -38038,10 +33775,8 @@ end f32.const -1.75 f32.const 0.5 - call $~lib/math/NativeMathf.mod f32.const -0.25 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -38053,10 +33788,8 @@ end f32.const 1.75 f32.const -0.5 - call $~lib/math/NativeMathf.mod f32.const 0.25 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -38068,10 +33801,8 @@ end f32.const -1.75 f32.const -0.5 - call $~lib/math/NativeMathf.mod f32.const -0.25 - f32.const 0 - call $std/math/check + call $std/math/test_modf i32.eqz if i32.const 0 @@ -40010,10 +35741,9 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40025,10 +35755,9 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 - call $~lib/math/NativeMathf.pow f32.const 2.134714122803416e-06 f32.const 0.1436440795660019 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40040,10 +35769,9 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40055,10 +35783,9 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40070,10 +35797,9 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 - call $~lib/math/NativeMathf.pow f32.const 44909.33203125 f32.const -0.05356409028172493 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40085,10 +35811,9 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40100,10 +35825,9 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 - call $~lib/math/NativeMathf.pow f32.const 1.1135177612304688 f32.const 0.19122089445590973 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40115,10 +35839,9 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40130,10 +35853,9 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 - call $~lib/math/NativeMathf.pow f32.const 0.3769077658653259 f32.const 0.337149053812027 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40145,10 +35867,9 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40160,10 +35881,9 @@ end f32.const 0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40175,10 +35895,9 @@ end f32.const 0 f32.const inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40190,10 +35909,9 @@ end f32.const 0 f32.const 3 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40205,10 +35923,9 @@ end f32.const 0 f32.const 2 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40220,10 +35937,9 @@ end f32.const 0 f32.const 1 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40235,10 +35951,9 @@ end f32.const 0 f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40250,10 +35965,9 @@ end f32.const 0 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40265,10 +35979,9 @@ end f32.const 0 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40280,10 +35993,9 @@ end f32.const 0 f32.const -0.5 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40295,10 +36007,9 @@ end f32.const 0 f32.const -1 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40310,10 +36021,9 @@ end f32.const 0 f32.const -2 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40325,10 +36035,9 @@ end f32.const 0 f32.const -3 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40340,10 +36049,9 @@ end f32.const 0 f32.const -4 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40355,10 +36063,9 @@ end f32.const 0 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40370,10 +36077,9 @@ end f32.const -0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40385,10 +36091,9 @@ end f32.const -0 f32.const inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40400,10 +36105,9 @@ end f32.const -0 f32.const 3 - call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40415,10 +36119,9 @@ end f32.const -0 f32.const 2 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40430,10 +36133,9 @@ end f32.const -0 f32.const 1 - call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40445,10 +36147,9 @@ end f32.const -0 f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40460,10 +36161,9 @@ end f32.const -0 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40475,10 +36175,9 @@ end f32.const -0 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40490,10 +36189,9 @@ end f32.const -0 f32.const -0.5 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40505,10 +36203,9 @@ end f32.const -0 f32.const -1 - call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40520,10 +36217,9 @@ end f32.const -0 f32.const -2 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40535,10 +36231,9 @@ end f32.const -0 f32.const -3 - call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40550,10 +36245,9 @@ end f32.const -0 f32.const -4 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40565,10 +36259,9 @@ end f32.const -0 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40580,10 +36273,9 @@ end f32.const nan:0x400000 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40595,10 +36287,9 @@ end f32.const inf f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40610,10 +36301,9 @@ end f32.const -inf f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40625,10 +36315,9 @@ end f32.const 1 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40640,10 +36329,9 @@ end f32.const -1 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40655,10 +36343,9 @@ end f32.const -0.5 f32.const 0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40670,10 +36357,9 @@ end f32.const nan:0x400000 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40685,10 +36371,9 @@ end f32.const inf f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40700,10 +36385,9 @@ end f32.const -inf f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40715,10 +36399,9 @@ end f32.const 1 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40730,10 +36413,9 @@ end f32.const -1 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40745,10 +36427,9 @@ end f32.const -0.5 f32.const -0 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40760,10 +36441,9 @@ end f32.const -1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40775,10 +36455,9 @@ end f32.const -1 f32.const inf - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40790,10 +36469,9 @@ end f32.const -1 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40805,10 +36483,9 @@ end f32.const -1 f32.const 2 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40820,10 +36497,9 @@ end f32.const -1 f32.const -1 - call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40835,10 +36511,9 @@ end f32.const -1 f32.const -2 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40850,10 +36525,9 @@ end f32.const -1 f32.const -3 - call $~lib/math/NativeMathf.pow f32.const -1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40865,10 +36539,9 @@ end f32.const -1 f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40880,10 +36553,9 @@ end f32.const 1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40895,10 +36567,9 @@ end f32.const 1 f32.const inf - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40910,10 +36581,9 @@ end f32.const 1 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40925,10 +36595,9 @@ end f32.const 1 f32.const 3 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40940,10 +36609,9 @@ end f32.const 1 f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40955,10 +36623,9 @@ end f32.const 1 f32.const -0.5 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40970,10 +36637,9 @@ end f32.const 1 f32.const -3 - call $~lib/math/NativeMathf.pow f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -40985,10 +36651,9 @@ end f32.const -0.5 f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41000,10 +36665,9 @@ end f32.const -0.5 f32.const 1.5 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41015,10 +36679,9 @@ end f32.const -0.5 f32.const 2 - call $~lib/math/NativeMathf.pow f32.const 0.25 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41030,10 +36693,9 @@ end f32.const -0.5 f32.const 3 - call $~lib/math/NativeMathf.pow f32.const -0.125 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41045,10 +36707,9 @@ end f32.const -0.5 f32.const inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41060,10 +36721,9 @@ end f32.const -0.5 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41075,10 +36735,9 @@ end f32.const -0.5 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41090,10 +36749,9 @@ end f32.const 0.5 f32.const inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41105,10 +36763,9 @@ end f32.const 0.5 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41120,10 +36777,9 @@ end f32.const 0.5 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41135,10 +36791,9 @@ end f32.const 1.5 f32.const inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41150,10 +36805,9 @@ end f32.const 1.5 f32.const -inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41165,10 +36819,9 @@ end f32.const 1.5 f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41180,10 +36833,9 @@ end f32.const inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41195,10 +36847,9 @@ end f32.const inf f32.const inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41210,10 +36861,9 @@ end f32.const inf f32.const -inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41225,10 +36875,9 @@ end f32.const inf f32.const 3 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41240,10 +36889,9 @@ end f32.const inf f32.const 2 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41255,10 +36903,9 @@ end f32.const inf f32.const 1 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41270,10 +36917,9 @@ end f32.const inf f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41285,10 +36931,9 @@ end f32.const inf f32.const -0.5 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41300,10 +36945,9 @@ end f32.const inf f32.const -1 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41315,10 +36959,9 @@ end f32.const inf f32.const -2 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41330,10 +36973,9 @@ end f32.const -inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41345,10 +36987,9 @@ end f32.const -inf f32.const inf - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41360,10 +37001,9 @@ end f32.const -inf f32.const -inf - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41375,10 +37015,9 @@ end f32.const -inf f32.const 3 - call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41390,10 +37029,9 @@ end f32.const -inf f32.const 2 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41405,10 +37043,9 @@ end f32.const -inf f32.const 1 - call $~lib/math/NativeMathf.pow f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41420,10 +37057,9 @@ end f32.const -inf f32.const 0.5 - call $~lib/math/NativeMathf.pow f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41435,10 +37071,9 @@ end f32.const -inf f32.const -0.5 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41450,10 +37085,9 @@ end f32.const -inf f32.const -1 - call $~lib/math/NativeMathf.pow f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41465,10 +37099,9 @@ end f32.const -inf f32.const -2 - call $~lib/math/NativeMathf.pow f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41480,10 +37113,9 @@ end f32.const nan:0x400000 f32.const 1 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41495,10 +37127,9 @@ end f32.const nan:0x400000 f32.const -1 - call $~lib/math/NativeMathf.pow f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41510,10 +37141,9 @@ end f32.const -2 f32.const 1 - call $~lib/math/NativeMathf.pow f32.const -2 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41525,10 +37155,9 @@ end f32.const -2 f32.const -1 - call $~lib/math/NativeMathf.pow f32.const -0.5 f32.const 0 - call $std/math/check + call $std/math/test_powf i32.eqz if i32.const 0 @@ -41547,54 +37176,17 @@ f64.const 1e6 f64.lt if - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 1413 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_64 - local.set $3 - global.get $~lib/math/random_state1_64 - local.tee $4 - global.set $~lib/math/random_state0_64 - local.get $4 - local.get $3 - local.get $3 - i64.const 23 - i64.shl - i64.xor - local.tee $3 - local.get $3 - i64.const 17 - i64.shr_u - i64.xor - i64.xor - local.get $4 - i64.const 26 - i64.shr_u - i64.xor - global.set $~lib/math/random_state1_64 - local.get $4 - i64.const 12 - i64.shr_u - i64.const 4607182418800017408 - i64.or - f64.reinterpret_i64 - f64.const 1 - f64.sub + call $~lib/math/NativeMath.random local.tee $0 - f64.const 1 - f64.lt - i32.const 0 - local.get $0 f64.const 0 f64.ge - select + if (result i32) + local.get $0 + f64.const 1 + f64.lt + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41622,56 +37214,17 @@ f64.const 1e6 f64.lt if - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 2606 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_32 - local.tee $5 - global.get $~lib/math/random_state1_32 - i32.xor - local.tee $6 - local.get $5 - i32.const 26 - i32.rotl - i32.xor - local.get $6 - i32.const 9 - i32.shl - i32.xor - global.set $~lib/math/random_state0_32 - local.get $6 - i32.const 13 - i32.rotl - global.set $~lib/math/random_state1_32 - local.get $5 - i32.const -1640531525 - i32.mul - i32.const 5 - i32.rotl - i32.const 5 - i32.mul - i32.const 9 - i32.shr_u - i32.const 1065353216 - i32.or - f32.reinterpret_i32 - f32.const 1 - f32.sub + call $~lib/math/NativeMathf.random local.tee $1 - f32.const 1 - f32.lt - i32.const 0 - local.get $1 f32.const 0 f32.ge - select + if (result i32) + local.get $1 + f32.const 1 + f32.lt + else + i32.const 0 + end i32.eqz if i32.const 0 @@ -41688,10 +37241,9 @@ br $for-loop|1 end end + f64.const -8.06684839057968 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41701,10 +37253,9 @@ call $~lib/builtins/abort unreachable end + f64.const 4.345239849338305 f64.const 4 - f64.const 4 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41714,10 +37265,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.38143342755525 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41727,10 +37277,9 @@ call $~lib/builtins/abort unreachable end + f64.const -6.531673581913484 f64.const -7 - f64.const -7 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41740,10 +37289,9 @@ call $~lib/builtins/abort unreachable end + f64.const 9.267056966972586 f64.const 9 - f64.const 9 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41753,10 +37301,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.6619858980995045 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41766,10 +37313,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.4066039223853553 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41779,10 +37325,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5617597462207241 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41792,10 +37337,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.7741522965913037 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41805,10 +37349,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.6787637026394024 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41820,8 +37363,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41833,8 +37375,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41846,8 +37387,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41859,8 +37399,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41872,8 +37411,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41885,8 +37423,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41898,8 +37435,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41909,10 +37445,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41922,10 +37457,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41935,10 +37469,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.5 f64.const 2 - f64.const 2 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41948,10 +37481,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.5 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41961,10 +37493,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41974,10 +37505,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -41987,10 +37517,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42000,10 +37529,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42013,10 +37541,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42026,10 +37553,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42039,10 +37565,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42052,10 +37577,9 @@ call $~lib/builtins/abort unreachable end + f32.const 4.345239639282227 f32.const 4 - f32.const 4 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42065,10 +37589,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42078,10 +37601,9 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const -7 - f32.const -7 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42091,10 +37613,9 @@ call $~lib/builtins/abort unreachable end + f32.const 9.267057418823242 f32.const 9 - f32.const 9 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42104,10 +37625,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.6619858741760254 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42117,10 +37637,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.40660393238067627 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42130,10 +37649,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5617597699165344 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42143,10 +37661,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.7741522789001465 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42156,10 +37673,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.6787636876106262 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42171,8 +37687,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42184,8 +37699,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42197,8 +37711,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42210,8 +37723,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42223,8 +37735,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42236,8 +37747,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42249,8 +37759,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42260,10 +37769,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42273,10 +37781,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42286,10 +37793,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.5 f64.const 2 - f64.const 2 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42299,10 +37805,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.5 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_round i32.eqz if i32.const 0 @@ -42312,10 +37817,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42325,10 +37829,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42338,10 +37841,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42351,10 +37853,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42364,10 +37865,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42377,10 +37877,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_roundf i32.eqz if i32.const 0 @@ -42500,8 +37999,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42513,8 +38011,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42526,8 +38023,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42537,10 +38033,9 @@ call $~lib/builtins/abort unreachable end + f32.const 2 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42552,8 +38047,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42563,10 +38057,9 @@ call $~lib/builtins/abort unreachable end + f32.const -2 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42576,10 +38069,9 @@ call $~lib/builtins/abort unreachable end + f32.const inf f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42589,10 +38081,9 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42604,8 +38095,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_signf i32.eqz if i32.const 0 @@ -42617,10 +38107,8 @@ end f64.const -8.06684839057968 f64.const 4.535662560676869 - call $~lib/math/NativeMath.rem f64.const 1.0044767307740567 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42632,10 +38120,8 @@ end f64.const 4.345239849338305 f64.const -8.88799136300345 - call $~lib/math/NativeMath.rem f64.const 4.345239849338305 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42647,10 +38133,8 @@ end f64.const -8.38143342755525 f64.const -2.763607337379588 - call $~lib/math/NativeMath.rem f64.const -0.09061141541648476 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42662,10 +38146,8 @@ end f64.const -6.531673581913484 f64.const 4.567535276842744 - call $~lib/math/NativeMath.rem f64.const -1.9641383050707404 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42677,10 +38159,8 @@ end f64.const 9.267056966972586 f64.const 4.811392084359796 - call $~lib/math/NativeMath.rem f64.const -0.35572720174700656 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42692,10 +38172,8 @@ end f64.const -6.450045556060236 f64.const 0.6620717923376739 - call $~lib/math/NativeMath.rem f64.const 0.17067236731650248 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42707,10 +38185,8 @@ end f64.const 7.858890253041697 f64.const 0.05215452675006225 - call $~lib/math/NativeMath.rem f64.const -0.016443286217702822 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42722,10 +38198,8 @@ end f64.const -0.792054511984896 f64.const 7.67640268511754 - call $~lib/math/NativeMath.rem f64.const -0.792054511984896 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42737,10 +38211,8 @@ end f64.const 0.615702673197924 f64.const 2.0119025790324803 - call $~lib/math/NativeMath.rem f64.const 0.615702673197924 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42752,10 +38224,8 @@ end f64.const -0.5587586823609152 f64.const 0.03223983060263804 - call $~lib/math/NativeMath.rem f64.const -0.0106815621160685 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42767,10 +38237,8 @@ end f64.const 0 f64.const 1 - call $~lib/math/NativeMath.rem - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42782,10 +38250,8 @@ end f64.const -0 f64.const 1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42797,10 +38263,8 @@ end f64.const 0.5 f64.const 1 - call $~lib/math/NativeMath.rem f64.const 0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42812,10 +38276,8 @@ end f64.const -0.5 f64.const 1 - call $~lib/math/NativeMath.rem f64.const -0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42827,10 +38289,8 @@ end f64.const 1 f64.const 1 - call $~lib/math/NativeMath.rem - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42842,10 +38302,8 @@ end f64.const -1 f64.const 1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42857,10 +38315,8 @@ end f64.const 1.5 f64.const 1 - call $~lib/math/NativeMath.rem f64.const -0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42872,10 +38328,8 @@ end f64.const -1.5 f64.const 1 - call $~lib/math/NativeMath.rem f64.const 0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42887,10 +38341,8 @@ end f64.const 2 f64.const 1 - call $~lib/math/NativeMath.rem f64.const 0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42902,10 +38354,8 @@ end f64.const -2 f64.const 1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42917,10 +38367,8 @@ end f64.const inf f64.const 1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42932,10 +38380,8 @@ end f64.const -inf f64.const 1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42947,10 +38393,8 @@ end f64.const nan:0x8000000000000 f64.const 1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42962,10 +38406,8 @@ end f64.const 0 f64.const -1 - call $~lib/math/NativeMath.rem - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42977,10 +38419,8 @@ end f64.const -0 f64.const -1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -42992,10 +38432,8 @@ end f64.const 0.5 f64.const -1 - call $~lib/math/NativeMath.rem f64.const 0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43007,10 +38445,8 @@ end f64.const -0.5 f64.const -1 - call $~lib/math/NativeMath.rem f64.const -0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43022,10 +38458,8 @@ end f64.const 1 f64.const -1 - call $~lib/math/NativeMath.rem f64.const 0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43037,10 +38471,8 @@ end f64.const -1 f64.const -1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43052,10 +38484,8 @@ end f64.const 1.5 f64.const -1 - call $~lib/math/NativeMath.rem f64.const -0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43067,10 +38497,8 @@ end f64.const -1.5 f64.const -1 - call $~lib/math/NativeMath.rem f64.const 0.5 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43082,10 +38510,8 @@ end f64.const 2 f64.const -1 - call $~lib/math/NativeMath.rem - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43097,10 +38523,8 @@ end f64.const -2 f64.const -1 - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43112,10 +38536,8 @@ end f64.const inf f64.const -1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43127,10 +38549,8 @@ end f64.const -inf f64.const -1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43142,10 +38562,8 @@ end f64.const nan:0x8000000000000 f64.const -1 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43157,10 +38575,8 @@ end f64.const 0 f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43172,10 +38588,8 @@ end f64.const 0 f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43187,10 +38601,8 @@ end f64.const 0 f64.const inf - call $~lib/math/NativeMath.rem - f64.const 0 f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43202,10 +38614,8 @@ end f64.const 0 f64.const -inf - call $~lib/math/NativeMath.rem f64.const 0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43217,10 +38627,8 @@ end f64.const 0 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43232,10 +38640,8 @@ end f64.const -0 f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43247,10 +38653,8 @@ end f64.const -0 f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43262,10 +38666,8 @@ end f64.const -0 f64.const inf - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43277,10 +38679,8 @@ end f64.const -0 f64.const -inf - call $~lib/math/NativeMath.rem f64.const -0 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43292,10 +38692,8 @@ end f64.const -0 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43307,10 +38705,8 @@ end f64.const 1 f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43322,10 +38718,8 @@ end f64.const -1 f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43337,10 +38731,8 @@ end f64.const inf f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43352,10 +38744,8 @@ end f64.const -inf f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43367,10 +38757,8 @@ end f64.const nan:0x8000000000000 f64.const 0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43382,10 +38770,8 @@ end f64.const -1 f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43397,10 +38783,8 @@ end f64.const inf f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43412,10 +38796,8 @@ end f64.const -inf f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43427,10 +38809,8 @@ end f64.const nan:0x8000000000000 f64.const -0 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43442,10 +38822,8 @@ end f64.const inf f64.const 2 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43457,10 +38835,8 @@ end f64.const inf f64.const -0.5 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43472,10 +38848,8 @@ end f64.const inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43487,10 +38861,8 @@ end f64.const -inf f64.const 2 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43502,10 +38874,8 @@ end f64.const -inf f64.const -0.5 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43517,10 +38887,8 @@ end f64.const -inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43532,10 +38900,8 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43547,10 +38913,8 @@ end f64.const 1 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43562,10 +38926,8 @@ end f64.const -1 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43577,10 +38939,8 @@ end f64.const 1 f64.const inf - call $~lib/math/NativeMath.rem f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43592,10 +38952,8 @@ end f64.const -1 f64.const inf - call $~lib/math/NativeMath.rem f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43607,10 +38965,8 @@ end f64.const inf f64.const inf - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43622,10 +38978,8 @@ end f64.const -inf f64.const inf - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43637,10 +38991,8 @@ end f64.const 1 f64.const -inf - call $~lib/math/NativeMath.rem f64.const 1 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43652,10 +39004,8 @@ end f64.const -1 f64.const -inf - call $~lib/math/NativeMath.rem f64.const -1 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43667,10 +39017,8 @@ end f64.const inf f64.const -inf - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43682,10 +39030,8 @@ end f64.const -inf f64.const -inf - call $~lib/math/NativeMath.rem f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43697,10 +39043,8 @@ end f64.const 1.75 f64.const 0.5 - call $~lib/math/NativeMath.rem f64.const -0.25 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43712,10 +39056,8 @@ end f64.const -1.75 f64.const 0.5 - call $~lib/math/NativeMath.rem f64.const 0.25 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43727,10 +39069,8 @@ end f64.const 1.75 f64.const -0.5 - call $~lib/math/NativeMath.rem f64.const -0.25 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43742,10 +39082,8 @@ end f64.const -1.75 f64.const -0.5 - call $~lib/math/NativeMath.rem f64.const 0.25 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43757,10 +39095,8 @@ end f64.const 8e-323 f64.const inf - call $~lib/math/NativeMath.rem f64.const 8e-323 - f64.const 0 - call $std/math/check + call $std/math/test_rem i32.eqz if i32.const 0 @@ -43772,10 +39108,8 @@ end f32.const -8.066848754882812 f32.const 4.535662651062012 - call $~lib/math/NativeMathf.rem f32.const 1.004476547241211 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43787,10 +39121,8 @@ end f32.const 4.345239639282227 f32.const -8.887990951538086 - call $~lib/math/NativeMathf.rem f32.const 4.345239639282227 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43802,10 +39134,8 @@ end f32.const -8.381433486938477 f32.const -2.7636072635650635 - call $~lib/math/NativeMathf.rem f32.const -0.09061169624328613 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43817,10 +39147,8 @@ end f32.const -6.531673431396484 f32.const 4.567535400390625 - call $~lib/math/NativeMathf.rem f32.const -1.9641380310058594 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43832,10 +39160,8 @@ end f32.const 9.267057418823242 f32.const 4.811392307281494 - call $~lib/math/NativeMathf.rem f32.const -0.3557271957397461 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43847,10 +39173,8 @@ end f32.const -6.450045585632324 f32.const 0.6620717644691467 - call $~lib/math/NativeMathf.rem f32.const 0.17067205905914307 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43862,10 +39186,8 @@ end f32.const 7.858890056610107 f32.const 0.052154526114463806 - call $~lib/math/NativeMathf.rem f32.const -0.016443386673927307 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43877,10 +39199,8 @@ end f32.const -0.7920545339584351 f32.const 7.676402568817139 - call $~lib/math/NativeMathf.rem f32.const -0.7920545339584351 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43892,10 +39212,8 @@ end f32.const 0.6157026886940002 f32.const 2.0119025707244873 - call $~lib/math/NativeMathf.rem f32.const 0.6157026886940002 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43907,10 +39225,8 @@ end f32.const -0.5587586760520935 f32.const 0.03223983198404312 - call $~lib/math/NativeMathf.rem f32.const -0.010681532323360443 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43922,10 +39238,8 @@ end f32.const 0 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43937,10 +39251,8 @@ end f32.const -0 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43952,10 +39264,8 @@ end f32.const 0.5 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43967,10 +39277,8 @@ end f32.const -0.5 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43982,10 +39290,8 @@ end f32.const 1 f32.const 1 - call $~lib/math/NativeMathf.rem - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -43997,10 +39303,8 @@ end f32.const -1 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44012,10 +39316,8 @@ end f32.const 1.5 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44027,10 +39329,8 @@ end f32.const -1.5 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44042,10 +39342,8 @@ end f32.const 2 f32.const 1 - call $~lib/math/NativeMathf.rem - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44057,10 +39355,8 @@ end f32.const -2 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44072,10 +39368,8 @@ end f32.const inf f32.const 1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44087,10 +39381,8 @@ end f32.const -inf f32.const 1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44102,10 +39394,8 @@ end f32.const nan:0x400000 f32.const 1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44117,10 +39407,8 @@ end f32.const 0 f32.const -1 - call $~lib/math/NativeMathf.rem - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44132,10 +39420,8 @@ end f32.const -0 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44147,10 +39433,8 @@ end f32.const 0.5 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44162,10 +39446,8 @@ end f32.const -0.5 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44177,10 +39459,8 @@ end f32.const 1 f32.const -1 - call $~lib/math/NativeMathf.rem - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44192,10 +39472,8 @@ end f32.const -1 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44207,10 +39485,8 @@ end f32.const 1.5 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const -0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44222,10 +39498,8 @@ end f32.const -1.5 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const 0.5 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44237,10 +39511,8 @@ end f32.const 2 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44252,10 +39524,8 @@ end f32.const -2 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44267,10 +39537,8 @@ end f32.const inf f32.const -1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44282,10 +39550,8 @@ end f32.const -inf f32.const -1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44297,10 +39563,8 @@ end f32.const nan:0x400000 f32.const -1 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44312,10 +39576,8 @@ end f32.const 0 f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44327,10 +39589,8 @@ end f32.const 0 f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44342,10 +39602,8 @@ end f32.const 0 f32.const inf - call $~lib/math/NativeMathf.rem f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44357,10 +39615,8 @@ end f32.const 0 f32.const -inf - call $~lib/math/NativeMathf.rem f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44372,10 +39628,8 @@ end f32.const 0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44387,10 +39641,8 @@ end f32.const -0 f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44402,10 +39654,8 @@ end f32.const -0 f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44417,10 +39667,8 @@ end f32.const -0 f32.const inf - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44432,10 +39680,8 @@ end f32.const -0 f32.const -inf - call $~lib/math/NativeMathf.rem f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44447,10 +39693,8 @@ end f32.const -0 f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44462,10 +39706,8 @@ end f32.const 1 f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44477,10 +39719,8 @@ end f32.const -1 f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44492,10 +39732,8 @@ end f32.const inf f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44507,10 +39745,8 @@ end f32.const -inf f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44522,10 +39758,8 @@ end f32.const nan:0x400000 f32.const 0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44537,10 +39771,8 @@ end f32.const -1 f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44552,10 +39784,8 @@ end f32.const inf f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44567,10 +39797,8 @@ end f32.const -inf f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44582,10 +39810,8 @@ end f32.const nan:0x400000 f32.const -0 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44597,10 +39823,8 @@ end f32.const inf f32.const 2 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44612,10 +39836,8 @@ end f32.const inf f32.const -0.5 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44627,10 +39849,8 @@ end f32.const inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44642,10 +39862,8 @@ end f32.const -inf f32.const 2 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44657,10 +39875,8 @@ end f32.const -inf f32.const -0.5 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44672,10 +39888,8 @@ end f32.const -inf f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44687,10 +39901,8 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44702,10 +39914,8 @@ end f32.const 1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44717,10 +39927,8 @@ end f32.const -1 f32.const nan:0x400000 - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44732,10 +39940,8 @@ end f32.const 1 f32.const inf - call $~lib/math/NativeMathf.rem f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44747,10 +39953,8 @@ end f32.const -1 f32.const inf - call $~lib/math/NativeMathf.rem f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44762,10 +39966,8 @@ end f32.const inf f32.const inf - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44777,10 +39979,8 @@ end f32.const -inf f32.const inf - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44792,10 +39992,8 @@ end f32.const 1 f32.const -inf - call $~lib/math/NativeMathf.rem f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44807,10 +40005,8 @@ end f32.const -1 f32.const -inf - call $~lib/math/NativeMathf.rem f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44822,10 +40018,8 @@ end f32.const inf f32.const -inf - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44837,10 +40031,8 @@ end f32.const -inf f32.const -inf - call $~lib/math/NativeMathf.rem f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44852,10 +40044,8 @@ end f32.const 1.75 f32.const 0.5 - call $~lib/math/NativeMathf.rem f32.const -0.25 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44867,10 +40057,8 @@ end f32.const -1.75 f32.const 0.5 - call $~lib/math/NativeMathf.rem f32.const 0.25 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44882,10 +40070,8 @@ end f32.const 1.75 f32.const -0.5 - call $~lib/math/NativeMathf.rem f32.const -0.25 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44897,10 +40083,8 @@ end f32.const -1.75 f32.const -0.5 - call $~lib/math/NativeMathf.rem f32.const 0.25 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44912,10 +40096,8 @@ end f32.const 5.877471754111438e-39 f32.const inf - call $~lib/math/NativeMathf.rem f32.const 5.877471754111438e-39 - f32.const 0 - call $std/math/check + call $std/math/test_remf i32.eqz if i32.const 0 @@ -44926,19 +40108,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.sin f64.const -0.9774292928781227 f64.const -0.14564912021160126 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/sin - f64.const -0.9774292928781227 - f64.const -0.14564912021160126 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -44949,19 +40121,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.sin f64.const -0.9333544736965718 f64.const -0.08813747018575668 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/sin - f64.const -0.9333544736965718 - f64.const -0.08813747018575668 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -44972,19 +40134,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.sin f64.const -0.8640924711706304 f64.const -0.11743883043527603 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/sin - f64.const -0.8640924711706304 - f64.const -0.11743883043527603 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -44995,19 +40147,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.sin f64.const -0.24593894772615374 f64.const -0.12697851657867432 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/sin - f64.const -0.24593894772615374 - f64.const -0.12697851657867432 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45018,19 +40160,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.sin f64.const 0.15706789772028007 f64.const -0.029550159350037575 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/sin - f64.const 0.15706789772028007 - f64.const -0.029550159350037575 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45041,19 +40173,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.sin f64.const 0.6146844860113447 f64.const -0.09976737946271896 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/sin - f64.const 0.6146844860113447 - f64.const -0.09976737946271896 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45064,19 +40186,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.sin f64.const -0.39549242182823696 f64.const -0.3668774962425232 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/sin - f64.const -0.39549242182823696 - f64.const -0.3668774962425232 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45087,19 +40199,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.sin f64.const 0.5326763286672376 f64.const -0.3550407588481903 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/sin - f64.const 0.5326763286672376 - f64.const -0.3550407588481903 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45110,19 +40212,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.sin f64.const 0.6991102068649779 f64.const -0.427672415971756 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/sin - f64.const 0.6991102068649779 - f64.const -0.427672415971756 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45133,19 +40225,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.sin f64.const -0.6278312326301215 f64.const -0.3828115463256836 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/sin - f64.const -0.6278312326301215 - f64.const -0.3828115463256836 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45156,19 +40238,9 @@ unreachable end f64.const 9.313225746154785e-10 - call $~lib/math/NativeMath.sin f64.const 9.313225746154785e-10 f64.const 6.510416860692203e-04 - call $std/math/check - if (result i32) - f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/sin - f64.const 9.313225746154785e-10 - f64.const 6.510416860692203e-04 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45179,19 +40251,9 @@ unreachable end f64.const -9.313225746154785e-10 - call $~lib/math/NativeMath.sin f64.const -9.313225746154785e-10 f64.const -6.510416860692203e-04 - call $std/math/check - if (result i32) - f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/sin - f64.const -9.313225746154785e-10 - f64.const -6.510416860692203e-04 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45202,19 +40264,9 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/math/NativeMath.sin f64.const 2.2250738585072014e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/sin - f64.const 2.2250738585072014e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45225,19 +40277,9 @@ unreachable end f64.const -2.2250738585072014e-308 - call $~lib/math/NativeMath.sin f64.const -2.2250738585072014e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/sin - f64.const -2.2250738585072014e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45248,19 +40290,9 @@ unreachable end f64.const 5e-324 - call $~lib/math/NativeMath.sin f64.const 5e-324 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/sin - f64.const 5e-324 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45271,19 +40303,9 @@ unreachable end f64.const -5e-324 - call $~lib/math/NativeMath.sin f64.const -5e-324 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/sin - f64.const -5e-324 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45294,19 +40316,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.sin f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/sin - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45317,19 +40329,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.sin f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/sin - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45340,19 +40342,9 @@ unreachable end f64.const 2.225073858507202e-308 - call $~lib/math/NativeMath.sin f64.const 2.225073858507202e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/sin - f64.const 2.225073858507202e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45363,19 +40355,9 @@ unreachable end f64.const 2.2250738585072024e-308 - call $~lib/math/NativeMath.sin f64.const 2.2250738585072024e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/sin - f64.const 2.2250738585072024e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45386,19 +40368,9 @@ unreachable end f64.const 4.4501477170144003e-308 - call $~lib/math/NativeMath.sin f64.const 4.4501477170144003e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/sin - f64.const 4.4501477170144003e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45409,19 +40381,9 @@ unreachable end f64.const 4.450147717014403e-308 - call $~lib/math/NativeMath.sin f64.const 4.450147717014403e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/sin - f64.const 4.450147717014403e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45432,19 +40394,9 @@ unreachable end f64.const 4.450147717014406e-308 - call $~lib/math/NativeMath.sin f64.const 4.450147717014406e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/sin - f64.const 4.450147717014406e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45455,19 +40407,9 @@ unreachable end f64.const 8.900295434028806e-308 - call $~lib/math/NativeMath.sin f64.const 8.900295434028806e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/sin - f64.const 8.900295434028806e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45478,19 +40420,9 @@ unreachable end f64.const 1.1175870895385742e-08 - call $~lib/math/NativeMath.sin f64.const 1.1175870895385742e-08 f64.const 0.140625 - call $std/math/check - if (result i32) - f64.const 1.1175870895385742e-08 - call $~lib/bindings/Math/sin - f64.const 1.1175870895385742e-08 - f64.const 0.140625 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45501,19 +40433,9 @@ unreachable end f64.const 1.4901161193847656e-08 - call $~lib/math/NativeMath.sin f64.const 1.4901161193847656e-08 f64.const 0.1666666716337204 - call $std/math/check - if (result i32) - f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/sin - f64.const 1.4901161193847656e-08 - f64.const 0.1666666716337204 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45524,19 +40446,9 @@ unreachable end f64.const -2.225073858507202e-308 - call $~lib/math/NativeMath.sin f64.const -2.225073858507202e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/sin - f64.const -2.225073858507202e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45547,19 +40459,9 @@ unreachable end f64.const -2.2250738585072024e-308 - call $~lib/math/NativeMath.sin f64.const -2.2250738585072024e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/sin - f64.const -2.2250738585072024e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45570,19 +40472,9 @@ unreachable end f64.const -4.4501477170144003e-308 - call $~lib/math/NativeMath.sin f64.const -4.4501477170144003e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/sin - f64.const -4.4501477170144003e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45593,19 +40485,9 @@ unreachable end f64.const -4.450147717014403e-308 - call $~lib/math/NativeMath.sin f64.const -4.450147717014403e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/sin - f64.const -4.450147717014403e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45616,19 +40498,9 @@ unreachable end f64.const -4.450147717014406e-308 - call $~lib/math/NativeMath.sin f64.const -4.450147717014406e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/sin - f64.const -4.450147717014406e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45639,19 +40511,9 @@ unreachable end f64.const -8.900295434028806e-308 - call $~lib/math/NativeMath.sin f64.const -8.900295434028806e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/sin - f64.const -8.900295434028806e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45662,19 +40524,9 @@ unreachable end f64.const -1.1175870895385742e-08 - call $~lib/math/NativeMath.sin f64.const -1.1175870895385742e-08 f64.const -0.140625 - call $std/math/check - if (result i32) - f64.const -1.1175870895385742e-08 - call $~lib/bindings/Math/sin - f64.const -1.1175870895385742e-08 - f64.const -0.140625 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45685,19 +40537,9 @@ unreachable end f64.const -1.4901161193847656e-08 - call $~lib/math/NativeMath.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 - call $std/math/check - if (result i32) - f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/sin - f64.const -1.4901161193847656e-08 - f64.const -0.1666666716337204 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45708,19 +40550,9 @@ unreachable end f64.const -1.4901161193847656e-08 - call $~lib/math/NativeMath.sin f64.const -1.4901161193847656e-08 f64.const -0.1666666716337204 - call $std/math/check - if (result i32) - f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/sin - f64.const -1.4901161193847656e-08 - f64.const -0.1666666716337204 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45731,19 +40563,9 @@ unreachable end f64.const 1e-323 - call $~lib/math/NativeMath.sin f64.const 1e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1e-323 - call $~lib/bindings/Math/sin - f64.const 1e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45754,19 +40576,9 @@ unreachable end f64.const 4.4e-323 - call $~lib/math/NativeMath.sin f64.const 4.4e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4e-323 - call $~lib/bindings/Math/sin - f64.const 4.4e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45777,19 +40589,9 @@ unreachable end f64.const 5.562684646268003e-309 - call $~lib/math/NativeMath.sin f64.const 5.562684646268003e-309 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/sin - f64.const 5.562684646268003e-309 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45800,19 +40602,9 @@ unreachable end f64.const 1.1125369292536007e-308 - call $~lib/math/NativeMath.sin f64.const 1.1125369292536007e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/sin - f64.const 1.1125369292536007e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45823,19 +40615,9 @@ unreachable end f64.const 2.2250738585072004e-308 - call $~lib/math/NativeMath.sin f64.const 2.2250738585072004e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/sin - f64.const 2.2250738585072004e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45846,19 +40628,9 @@ unreachable end f64.const 2.225073858507201e-308 - call $~lib/math/NativeMath.sin f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/sin - f64.const 2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45869,19 +40641,9 @@ unreachable end f64.const -1e-323 - call $~lib/math/NativeMath.sin f64.const -1e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1e-323 - call $~lib/bindings/Math/sin - f64.const -1e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45892,19 +40654,9 @@ unreachable end f64.const -4.4e-323 - call $~lib/math/NativeMath.sin f64.const -4.4e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4e-323 - call $~lib/bindings/Math/sin - f64.const -4.4e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45915,19 +40667,9 @@ unreachable end f64.const -5.562684646268003e-309 - call $~lib/math/NativeMath.sin f64.const -5.562684646268003e-309 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/sin - f64.const -5.562684646268003e-309 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45938,19 +40680,9 @@ unreachable end f64.const -1.1125369292536007e-308 - call $~lib/math/NativeMath.sin f64.const -1.1125369292536007e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/sin - f64.const -1.1125369292536007e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45961,19 +40693,9 @@ unreachable end f64.const -2.2250738585072004e-308 - call $~lib/math/NativeMath.sin f64.const -2.2250738585072004e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/sin - f64.const -2.2250738585072004e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -45984,19 +40706,9 @@ unreachable end f64.const -2.225073858507201e-308 - call $~lib/math/NativeMath.sin f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/sin - f64.const -2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -46007,19 +40719,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.sin f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/sin - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -46030,19 +40732,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.sin f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/sin - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -46053,19 +40745,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/sin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -46076,19 +40758,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/sin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -46099,19 +40771,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.sin f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/sin - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sin i32.eqz if i32.const 0 @@ -47290,19 +41952,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.sinh f64.const -1593.5206801156262 f64.const -0.2138727605342865 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/sinh - f64.const -1593.5206801156262 - f64.const -0.2138727605342865 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47313,19 +41965,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.sinh f64.const 38.54878088685412 f64.const 0.21537430584430695 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/sinh - f64.const 38.54878088685412 - f64.const 0.21537430584430695 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47336,19 +41978,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.sinh f64.const -2182.6307505145546 f64.const 0.16213826835155487 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/sinh - f64.const -2182.6307505145546 - f64.const 0.16213826835155487 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47359,19 +41991,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.sinh f64.const -343.2723926847529 f64.const 0.20479513704776764 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/sinh - f64.const -343.2723926847529 - f64.const 0.20479513704776764 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47382,19 +42004,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.sinh f64.const 5291.7790755194055 f64.const -0.48676517605781555 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/sinh - f64.const 5291.7790755194055 - f64.const -0.48676517605781555 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47405,19 +42017,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.sinh f64.const 0.7114062568229157 f64.const -0.4584641456604004 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/sinh - f64.const 0.7114062568229157 - f64.const -0.4584641456604004 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47428,19 +42030,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.sinh f64.const -0.41790065258739445 f64.const 0.37220045924186707 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/sinh - f64.const -0.41790065258739445 - f64.const 0.37220045924186707 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47451,19 +42043,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.sinh f64.const 0.5917755935451237 f64.const 0.46178996562957764 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/sinh - f64.const 0.5917755935451237 - f64.const 0.46178996562957764 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47474,19 +42056,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.sinh f64.const 0.8538292008852542 f64.const -0.07019051909446716 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/sinh - f64.const 0.8538292008852542 - f64.const -0.07019051909446716 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47497,19 +42069,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.sinh f64.const -0.732097615653169 f64.const 0.26858529448509216 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/sinh - f64.const -0.732097615653169 - f64.const 0.26858529448509216 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47520,19 +42082,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.sinh f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/sinh - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47543,19 +42095,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.sinh f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/sinh - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47566,19 +42108,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.sinh f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/sinh - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47589,19 +42121,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.sinh f64.const -inf f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/sinh - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47612,19 +42134,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.sinh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/sinh - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sinh i32.eqz if i32.const 0 @@ -47844,19 +42356,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -8.06684839057968 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47866,19 +42369,10 @@ call $~lib/builtins/abort unreachable end - f64.const 2.0845238903256313 + f64.const 4.345239849338305 f64.const 2.0845238903256313 f64.const -0.07180261611938477 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/sqrt - f64.const 2.0845238903256313 - f64.const -0.07180261611938477 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47888,19 +42382,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -8.38143342755525 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47910,19 +42395,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -6.531673581913484 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47932,19 +42408,10 @@ call $~lib/builtins/abort unreachable end - f64.const 3.0441841217266385 + f64.const 9.267056966972586 f64.const 3.0441841217266385 f64.const -0.01546262577176094 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/sqrt - f64.const 3.0441841217266385 - f64.const -0.01546262577176094 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47954,19 +42421,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.8136251582267503 + f64.const 0.6619858980995045 f64.const 0.8136251582267503 f64.const -0.08618157356977463 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/sqrt - f64.const 0.8136251582267503 - f64.const -0.08618157356977463 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47976,19 +42434,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -0.4066039223853553 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -47998,19 +42447,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.7495063350104014 + f64.const 0.5617597462207241 f64.const 0.7495063350104014 f64.const -0.0981396734714508 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/sqrt - f64.const 0.7495063350104014 - f64.const -0.0981396734714508 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48020,19 +42460,10 @@ call $~lib/builtins/abort unreachable end - f64.const 0.879859248170583 + f64.const 0.7741522965913037 f64.const 0.879859248170583 f64.const -0.37124353647232056 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/sqrt - f64.const 0.879859248170583 - f64.const -0.37124353647232056 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48042,19 +42473,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -0.6787637026394024 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48067,16 +42489,7 @@ f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48089,16 +42502,7 @@ f64.const inf f64.const inf f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/sqrt - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48108,19 +42512,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -inf f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48133,16 +42528,7 @@ f64.const 0 f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/sqrt - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48155,16 +42541,7 @@ f64.const -0 f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/sqrt - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48177,16 +42554,7 @@ f64.const 1 f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/sqrt - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48196,19 +42564,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -1 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48218,19 +42577,10 @@ call $~lib/builtins/abort unreachable end - f64.const 2 + f64.const 4 f64.const 2 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4 - call $~lib/bindings/Math/sqrt - f64.const 2 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48240,19 +42590,10 @@ call $~lib/builtins/abort unreachable end - f64.const 3.1434555694052576e-162 + f64.const 1e-323 f64.const 3.1434555694052576e-162 f64.const 0.43537619709968567 - call $std/math/check - if (result i32) - f64.const 1e-323 - call $~lib/bindings/Math/sqrt - f64.const 3.1434555694052576e-162 - f64.const 0.43537619709968567 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48262,19 +42603,10 @@ call $~lib/builtins/abort unreachable end - f64.const 3.849931087076416e-162 + f64.const 1.5e-323 f64.const 3.849931087076416e-162 f64.const -0.45194002985954285 - call $std/math/check - if (result i32) - f64.const 1.5e-323 - call $~lib/bindings/Math/sqrt - f64.const 3.849931087076416e-162 - f64.const -0.45194002985954285 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48284,19 +42616,10 @@ call $~lib/builtins/abort unreachable end - f64.const 2.2227587494850775e-162 - f64.const 2.2227587494850775e-162 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/sqrt - f64.const 2.2227587494850775e-162 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + f64.const 5e-324 + f64.const 2.2227587494850775e-162 + f64.const 0 + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48306,19 +42629,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -5e-324 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48331,16 +42645,7 @@ f64.const 0.9999999999999999 f64.const 0.9999999999999999 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 0.9999999999999999 - call $~lib/bindings/Math/sqrt - f64.const 0.9999999999999999 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48350,19 +42655,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.414213562373095 + f64.const 1.9999999999999998 f64.const 1.414213562373095 f64.const -0.21107041835784912 - call $std/math/check - if (result i32) - f64.const 1.9999999999999998 - call $~lib/bindings/Math/sqrt - f64.const 1.414213562373095 - f64.const -0.21107041835784912 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48372,19 +42668,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1 + f64.const 1.0000000000000002 f64.const 1 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1.0000000000000002 - call $~lib/bindings/Math/sqrt - f64.const 1 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48394,19 +42681,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4142135623730951 + f64.const 2.0000000000000004 f64.const 1.4142135623730951 f64.const -0.27173060178756714 - call $std/math/check - if (result i32) - f64.const 2.0000000000000004 - call $~lib/bindings/Math/sqrt - f64.const 1.4142135623730951 - f64.const -0.27173060178756714 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48416,19 +42694,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1 + f64.const 1.0000000000000002 f64.const 1 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1.0000000000000002 - call $~lib/bindings/Math/sqrt - f64.const 1 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48441,16 +42710,7 @@ f64.const 0.9999999999999999 f64.const 0.9999999999999999 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 0.9999999999999999 - call $~lib/bindings/Math/sqrt - f64.const 0.9999999999999999 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48460,19 +42720,10 @@ call $~lib/builtins/abort unreachable end - f64.const -nan:0x8000000000000 + f64.const -1797693134862315708145274e284 f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1797693134862315708145274e284 - call $~lib/bindings/Math/sqrt - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48482,19 +42733,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994259561100831e130 + f64.const 1797693134862315708145274e284 f64.const 1340780792994259561100831e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862315708145274e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994259561100831e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48504,19 +42746,10 @@ call $~lib/builtins/abort unreachable end - f64.const 134078079299425926338769e131 + f64.const 179769313486231490980915e285 f64.const 134078079299425926338769e131 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 179769313486231490980915e285 - call $~lib/bindings/Math/sqrt - f64.const 134078079299425926338769e131 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48526,19 +42759,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994258965674548e130 + f64.const 1797693134862314111473026e284 f64.const 1340780792994258965674548e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862314111473026e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994258965674548e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48548,19 +42772,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994258667961407e130 + f64.const 1797693134862313313136902e284 f64.const 1340780792994258667961407e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862313313136902e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994258667961407e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48570,19 +42785,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994258370248265e130 + f64.const 1797693134862312514800778e284 f64.const 1340780792994258370248265e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862312514800778e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994258370248265e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48592,19 +42798,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994258072535124e130 + f64.const 1797693134862311716464655e284 f64.const 1340780792994258072535124e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862311716464655e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994258072535124e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48614,19 +42811,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994257774821982e130 + f64.const 1797693134862310918128531e284 f64.const 1340780792994257774821982e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862310918128531e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994257774821982e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48636,19 +42824,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994257477108841e130 + f64.const 1797693134862310119792407e284 f64.const 1340780792994257477108841e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862310119792407e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994257477108841e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48658,19 +42837,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994257179395699e130 + f64.const 1797693134862309321456283e284 f64.const 1340780792994257179395699e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862309321456283e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994257179395699e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48680,19 +42850,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994256881682558e130 + f64.const 1797693134862308523120159e284 f64.const 1340780792994256881682558e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862308523120159e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994256881682558e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48702,19 +42863,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1340780792994256583969417e130 + f64.const 1797693134862307724784036e284 f64.const 1340780792994256583969417e130 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 1797693134862307724784036e284 - call $~lib/bindings/Math/sqrt - f64.const 1340780792994256583969417e130 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48724,19 +42876,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400417e-154 + f64.const 2.225073858507203e-308 f64.const 1.4916681462400417e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.225073858507203e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400417e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48746,19 +42889,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400423e-154 + f64.const 2.225073858507205e-308 f64.const 1.4916681462400423e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.225073858507205e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400423e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48768,19 +42902,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.491668146240043e-154 + f64.const 2.225073858507207e-308 f64.const 1.491668146240043e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.225073858507207e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.491668146240043e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48790,19 +42915,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400437e-154 + f64.const 2.225073858507209e-308 f64.const 1.4916681462400437e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.225073858507209e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400437e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48812,19 +42928,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400443e-154 + f64.const 2.225073858507211e-308 f64.const 1.4916681462400443e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.225073858507211e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400443e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48834,19 +42941,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.491668146240045e-154 + f64.const 2.2250738585072127e-308 f64.const 1.491668146240045e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072127e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.491668146240045e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48856,19 +42954,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400457e-154 + f64.const 2.2250738585072147e-308 f64.const 1.4916681462400457e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072147e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400457e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48878,19 +42967,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400463e-154 + f64.const 2.2250738585072167e-308 f64.const 1.4916681462400463e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072167e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400463e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48900,19 +42980,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.491668146240047e-154 + f64.const 2.2250738585072187e-308 f64.const 1.491668146240047e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072187e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.491668146240047e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48922,19 +42993,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400476e-154 + f64.const 2.2250738585072207e-308 f64.const 1.4916681462400476e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072207e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400476e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48944,19 +43006,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400483e-154 + f64.const 2.2250738585072226e-308 f64.const 1.4916681462400483e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072226e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400483e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48966,19 +43019,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.491668146240049e-154 + f64.const 2.2250738585072246e-308 f64.const 1.491668146240049e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072246e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.491668146240049e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -48988,19 +43032,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400496e-154 + f64.const 2.2250738585072266e-308 f64.const 1.4916681462400496e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072266e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400496e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49010,19 +43045,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4916681462400503e-154 + f64.const 2.2250738585072286e-308 f64.const 1.4916681462400503e-154 f64.const -0.5 - call $std/math/check - if (result i32) - f64.const 2.2250738585072286e-308 - call $~lib/bindings/Math/sqrt - f64.const 1.4916681462400503e-154 - f64.const -0.5 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49032,19 +43058,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.609958580499006 + f64.const 92.35130391890645 f64.const 9.609958580499006 f64.const 0.4998137056827545 - call $std/math/check - if (result i32) - f64.const 92.35130391890645 - call $~lib/bindings/Math/sqrt - f64.const 9.609958580499006 - f64.const 0.4998137056827545 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49054,19 +43071,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.662295774757238 + f64.const 93.3599596388916 f64.const 9.662295774757238 f64.const -0.49979978799819946 - call $std/math/check - if (result i32) - f64.const 93.3599596388916 - call $~lib/bindings/Math/sqrt - f64.const 9.662295774757238 - f64.const -0.49979978799819946 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49076,19 +43084,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.76834153215689 + f64.const 95.42049628886124 f64.const 9.76834153215689 f64.const -0.49997270107269287 - call $std/math/check - if (result i32) - f64.const 95.42049628886124 - call $~lib/bindings/Math/sqrt - f64.const 9.76834153215689 - f64.const -0.49997270107269287 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49098,19 +43097,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.791790919890728 + f64.const 95.87916941885449 f64.const 9.791790919890728 f64.const 0.4998766779899597 - call $std/math/check - if (result i32) - f64.const 95.87916941885449 - call $~lib/bindings/Math/sqrt - f64.const 9.791790919890728 - f64.const 0.4998766779899597 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49120,19 +43110,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.841140266698785 + f64.const 96.84804174884022 f64.const 9.841140266698785 f64.const 0.499801903963089 - call $std/math/check - if (result i32) - f64.const 96.84804174884022 - call $~lib/bindings/Math/sqrt - f64.const 9.841140266698785 - f64.const 0.499801903963089 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49142,19 +43123,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.87098731175517 + f64.const 97.43639050883155 f64.const 9.87098731175517 f64.const 0.4997696280479431 - call $std/math/check - if (result i32) - f64.const 97.43639050883155 - call $~lib/bindings/Math/sqrt - f64.const 9.87098731175517 - f64.const 0.4997696280479431 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49164,19 +43136,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.874693909120955 + f64.const 97.50957979883047 f64.const 9.874693909120955 f64.const 0.49999818205833435 - call $std/math/check - if (result i32) - f64.const 97.50957979883047 - call $~lib/bindings/Math/sqrt - f64.const 9.874693909120955 - f64.const 0.49999818205833435 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49186,19 +43149,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.88963947466368 + f64.const 97.80496893882612 f64.const 9.88963947466368 f64.const -0.4999580681324005 - call $std/math/check - if (result i32) - f64.const 97.80496893882612 - call $~lib/bindings/Math/sqrt - f64.const 9.88963947466368 - f64.const -0.4999580681324005 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49208,19 +43162,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.913383997849534 + f64.const 98.2751822888192 f64.const 9.913383997849534 f64.const 0.49979931116104126 - call $std/math/check - if (result i32) - f64.const 98.2751822888192 - call $~lib/bindings/Math/sqrt - f64.const 9.913383997849534 - f64.const 0.49979931116104126 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49230,19 +43175,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.973611966023219 + f64.const 99.47293564880155 f64.const 9.973611966023219 f64.const -0.4999540448188782 - call $std/math/check - if (result i32) - f64.const 99.47293564880155 - call $~lib/bindings/Math/sqrt - f64.const 9.973611966023219 - f64.const -0.4999540448188782 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49252,19 +43188,10 @@ call $~lib/builtins/abort unreachable end - f64.const 10.028483001370914 + f64.const 100.57047130878539 f64.const 10.028483001370914 f64.const -0.49996453523635864 - call $std/math/check - if (result i32) - f64.const 100.57047130878539 - call $~lib/bindings/Math/sqrt - f64.const 10.028483001370914 - f64.const -0.49996453523635864 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49274,19 +43201,10 @@ call $~lib/builtins/abort unreachable end - f64.const 10.030431002144665 + f64.const 100.60954608878481 f64.const 10.030431002144665 f64.const 0.49975672364234924 - call $std/math/check - if (result i32) - f64.const 100.60954608878481 - call $~lib/bindings/Math/sqrt - f64.const 10.030431002144665 - f64.const 0.49975672364234924 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49296,19 +43214,10 @@ call $~lib/builtins/abort unreachable end - f64.const 10.033897104255344 + f64.const 100.67909109878379 f64.const 10.033897104255344 f64.const -0.4997771382331848 - call $std/math/check - if (result i32) - f64.const 100.67909109878379 - call $~lib/bindings/Math/sqrt - f64.const 10.033897104255344 - f64.const -0.4997771382331848 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49318,19 +43227,10 @@ call $~lib/builtins/abort unreachable end - f64.const 10.055977374615422 + f64.const 101.12268095877725 f64.const 10.055977374615422 f64.const 0.49988678097724915 - call $std/math/check - if (result i32) - f64.const 101.12268095877725 - call $~lib/bindings/Math/sqrt - f64.const 10.055977374615422 - f64.const 0.49988678097724915 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49340,19 +43240,10 @@ call $~lib/builtins/abort unreachable end - f64.const 10.064927676281366 + f64.const 101.3027691287746 f64.const 10.064927676281366 f64.const 0.4999105632305145 - call $std/math/check - if (result i32) - f64.const 101.3027691287746 - call $~lib/bindings/Math/sqrt - f64.const 10.064927676281366 - f64.const 0.4999105632305145 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49362,19 +43253,10 @@ call $~lib/builtins/abort unreachable end - f64.const 4.9591563149945874e-154 + f64.const 2.45932313565507e-307 f64.const 4.9591563149945874e-154 f64.const -0.4998999834060669 - call $std/math/check - if (result i32) - f64.const 2.45932313565507e-307 - call $~lib/bindings/Math/sqrt - f64.const 4.9591563149945874e-154 - f64.const -0.4998999834060669 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49384,19 +43266,10 @@ call $~lib/builtins/abort unreachable end - f64.const 7.490632353266584e-154 + f64.const 5.610957305180409e-307 f64.const 7.490632353266584e-154 f64.const -0.4999343752861023 - call $std/math/check - if (result i32) - f64.const 5.610957305180409e-307 - call $~lib/bindings/Math/sqrt - f64.const 7.490632353266584e-154 - f64.const -0.4999343752861023 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49406,19 +43279,10 @@ call $~lib/builtins/abort unreachable end - f64.const 7.62062254526548e-154 + f64.const 5.8073887977408524e-307 f64.const 7.62062254526548e-154 f64.const -0.49989569187164307 - call $std/math/check - if (result i32) - f64.const 5.8073887977408524e-307 - call $~lib/bindings/Math/sqrt - f64.const 7.62062254526548e-154 - f64.const -0.49989569187164307 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49428,19 +43292,10 @@ call $~lib/builtins/abort unreachable end - f64.const 8.382205605013174e-154 + f64.const 7.026137080471427e-307 f64.const 8.382205605013174e-154 f64.const 0.49980640411376953 - call $std/math/check - if (result i32) - f64.const 7.026137080471427e-307 - call $~lib/bindings/Math/sqrt - f64.const 8.382205605013174e-154 - f64.const 0.49980640411376953 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49450,19 +43305,10 @@ call $~lib/builtins/abort unreachable end - f64.const 9.186238495268328e-154 + f64.const 8.438697769194972e-307 f64.const 9.186238495268328e-154 f64.const -0.4999065697193146 - call $std/math/check - if (result i32) - f64.const 8.438697769194972e-307 - call $~lib/bindings/Math/sqrt - f64.const 9.186238495268328e-154 - f64.const -0.4999065697193146 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49472,19 +43318,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.0773946591586944e-153 + f64.const 1.1607792515836795e-306 f64.const 1.0773946591586944e-153 f64.const -0.49997684359550476 - call $std/math/check - if (result i32) - f64.const 1.1607792515836795e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.0773946591586944e-153 - f64.const -0.49997684359550476 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49494,19 +43331,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.1325817333606962e-153 + f64.const 1.2827413827423193e-306 f64.const 1.1325817333606962e-153 f64.const -0.4999513030052185 - call $std/math/check - if (result i32) - f64.const 1.2827413827423193e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.1325817333606962e-153 - f64.const -0.4999513030052185 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49516,19 +43344,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.3083044216117078e-153 + f64.const 1.7116604596087457e-306 f64.const 1.3083044216117078e-153 f64.const -0.49986395239830017 - call $std/math/check - if (result i32) - f64.const 1.7116604596087457e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.3083044216117078e-153 - f64.const -0.49986395239830017 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49538,19 +43357,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4276460526639628e-153 + f64.const 2.038173251686994e-306 f64.const 1.4276460526639628e-153 f64.const 0.4998403787612915 - call $std/math/check - if (result i32) - f64.const 2.038173251686994e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.4276460526639628e-153 - f64.const 0.4998403787612915 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49560,19 +43370,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.4736254818836879e-153 + f64.const 2.171572060856931e-306 f64.const 1.4736254818836879e-153 f64.const 0.4999290406703949 - call $std/math/check - if (result i32) - f64.const 2.171572060856931e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.4736254818836879e-153 - f64.const 0.4999290406703949 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49582,19 +43383,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5710314965589996e-153 + f64.const 2.4681399631804094e-306 f64.const 1.5710314965589996e-153 f64.const 0.49989044666290283 - call $std/math/check - if (result i32) - f64.const 2.4681399631804094e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.5710314965589996e-153 - f64.const 0.49989044666290283 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49604,19 +43396,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.5866799918131124e-153 + f64.const 2.5175533964200588e-306 f64.const 1.5866799918131124e-153 f64.const -0.4997701048851013 - call $std/math/check - if (result i32) - f64.const 2.5175533964200588e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.5866799918131124e-153 - f64.const -0.4997701048851013 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49626,19 +43409,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.6266992797941982e-153 + f64.const 2.6461505468829625e-306 f64.const 1.6266992797941982e-153 f64.const 0.4998672902584076 - call $std/math/check - if (result i32) - f64.const 2.6461505468829625e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.6266992797941982e-153 - f64.const 0.4998672902584076 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49648,19 +43422,10 @@ call $~lib/builtins/abort unreachable end - f64.const 1.9536395872248397e-153 + f64.const 3.8167076367720413e-306 f64.const 1.9536395872248397e-153 f64.const 0.49983471632003784 - call $std/math/check - if (result i32) - f64.const 3.8167076367720413e-306 - call $~lib/bindings/Math/sqrt - f64.const 1.9536395872248397e-153 - f64.const 0.49983471632003784 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -49670,19 +43435,10 @@ call $~lib/builtins/abort unreachable end - f64.const 2.1387664851161936e-153 + f64.const 4.5743220778562766e-306 f64.const 2.1387664851161936e-153 f64.const 0.49985939264297485 - call $std/math/check - if (result i32) - f64.const 4.5743220778562766e-306 - call $~lib/bindings/Math/sqrt - f64.const 2.1387664851161936e-153 - f64.const 0.49985939264297485 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_sqrt i32.eqz if i32.const 0 @@ -50109,19 +43865,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.tan f64.const 4.626603542401633 f64.const -0.2727603316307068 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/tan - f64.const 4.626603542401633 - f64.const -0.2727603316307068 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50132,19 +43878,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.tan f64.const 2.600191705822202 f64.const 0.2651003301143646 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/tan - f64.const 2.600191705822202 - f64.const 0.2651003301143646 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50155,19 +43891,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.tan f64.const 1.7167408328741052 f64.const -0.24687519669532776 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/tan - f64.const 1.7167408328741052 - f64.const -0.24687519669532776 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50178,19 +43904,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.tan f64.const -0.2537322523453725 f64.const -0.4679703712463379 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/tan - f64.const -0.2537322523453725 - f64.const -0.4679703712463379 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50201,19 +43917,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.tan f64.const -0.15904195727191958 f64.const -0.06704077869653702 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/tan - f64.const -0.15904195727191958 - f64.const -0.06704077869653702 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50224,19 +43930,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.tan f64.const 0.7792919106910434 f64.const -0.038056135177612305 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/tan - f64.const 0.7792919106910434 - f64.const -0.038056135177612305 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50247,19 +43943,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.tan f64.const -0.43059952879543656 f64.const -0.09242714196443558 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/tan - f64.const -0.43059952879543656 - f64.const -0.09242714196443558 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50270,19 +43956,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.tan f64.const 0.62940368731874 f64.const -0.321913480758667 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/tan - f64.const 0.62940368731874 - f64.const -0.321913480758667 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50293,19 +43969,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.tan f64.const 0.9777574652949645 f64.const -0.1966651827096939 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/tan - f64.const 0.9777574652949645 - f64.const -0.1966651827096939 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50316,19 +43982,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.tan f64.const -0.8066186630209123 f64.const -0.067665696144104 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/tan - f64.const -0.8066186630209123 - f64.const -0.067665696144104 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50339,19 +43995,9 @@ unreachable end f64.const 9.313225746154785e-10 - call $~lib/math/NativeMath.tan f64.const 9.313225746154785e-10 f64.const -1.3020833721384406e-03 - call $std/math/check - if (result i32) - f64.const 9.313225746154785e-10 - call $~lib/bindings/Math/tan - f64.const 9.313225746154785e-10 - f64.const -1.3020833721384406e-03 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50362,19 +44008,9 @@ unreachable end f64.const -9.313225746154785e-10 - call $~lib/math/NativeMath.tan f64.const -9.313225746154785e-10 f64.const 1.3020833721384406e-03 - call $std/math/check - if (result i32) - f64.const -9.313225746154785e-10 - call $~lib/bindings/Math/tan - f64.const -9.313225746154785e-10 - f64.const 1.3020833721384406e-03 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50385,19 +44021,9 @@ unreachable end f64.const 2.2250738585072014e-308 - call $~lib/math/NativeMath.tan f64.const 2.2250738585072014e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072014e-308 - call $~lib/bindings/Math/tan - f64.const 2.2250738585072014e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50408,19 +44034,9 @@ unreachable end f64.const -2.2250738585072014e-308 - call $~lib/math/NativeMath.tan f64.const -2.2250738585072014e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072014e-308 - call $~lib/bindings/Math/tan - f64.const -2.2250738585072014e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50431,19 +44047,9 @@ unreachable end f64.const 5e-324 - call $~lib/math/NativeMath.tan f64.const 5e-324 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5e-324 - call $~lib/bindings/Math/tan - f64.const 5e-324 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50454,19 +44060,9 @@ unreachable end f64.const -5e-324 - call $~lib/math/NativeMath.tan f64.const -5e-324 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5e-324 - call $~lib/bindings/Math/tan - f64.const -5e-324 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50477,19 +44073,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.tan f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/tan - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50500,19 +44086,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.tan f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/tan - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50523,19 +44099,9 @@ unreachable end f64.const 0.7853981633974483 - call $~lib/math/NativeMath.tan f64.const 0.9999999999999999 f64.const -0.4484681189060211 - call $std/math/check - if (result i32) - f64.const 0.7853981633974483 - call $~lib/bindings/Math/tan - f64.const 0.9999999999999999 - f64.const -0.4484681189060211 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50546,19 +44112,9 @@ unreachable end f64.const -0.7853981633974483 - call $~lib/math/NativeMath.tan f64.const -0.9999999999999999 f64.const 0.4484681189060211 - call $std/math/check - if (result i32) - f64.const -0.7853981633974483 - call $~lib/bindings/Math/tan - f64.const -0.9999999999999999 - f64.const 0.4484681189060211 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50569,19 +44125,9 @@ unreachable end f64.const 2.225073858507202e-308 - call $~lib/math/NativeMath.tan f64.const 2.225073858507202e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507202e-308 - call $~lib/bindings/Math/tan - f64.const 2.225073858507202e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50592,19 +44138,9 @@ unreachable end f64.const 2.2250738585072024e-308 - call $~lib/math/NativeMath.tan f64.const 2.2250738585072024e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072024e-308 - call $~lib/bindings/Math/tan - f64.const 2.2250738585072024e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50615,19 +44151,9 @@ unreachable end f64.const 4.4501477170144003e-308 - call $~lib/math/NativeMath.tan f64.const 4.4501477170144003e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4501477170144003e-308 - call $~lib/bindings/Math/tan - f64.const 4.4501477170144003e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50638,19 +44164,9 @@ unreachable end f64.const 4.450147717014403e-308 - call $~lib/math/NativeMath.tan f64.const 4.450147717014403e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014403e-308 - call $~lib/bindings/Math/tan - f64.const 4.450147717014403e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50661,19 +44177,9 @@ unreachable end f64.const 4.450147717014406e-308 - call $~lib/math/NativeMath.tan f64.const 4.450147717014406e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.450147717014406e-308 - call $~lib/bindings/Math/tan - f64.const 4.450147717014406e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50684,19 +44190,9 @@ unreachable end f64.const 8.900295434028806e-308 - call $~lib/math/NativeMath.tan f64.const 8.900295434028806e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 8.900295434028806e-308 - call $~lib/bindings/Math/tan - f64.const 8.900295434028806e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50707,19 +44203,9 @@ unreachable end f64.const 1.1175870895385742e-08 - call $~lib/math/NativeMath.tan f64.const 1.1175870895385742e-08 f64.const -0.28125 - call $std/math/check - if (result i32) - f64.const 1.1175870895385742e-08 - call $~lib/bindings/Math/tan - f64.const 1.1175870895385742e-08 - f64.const -0.28125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50730,19 +44216,9 @@ unreachable end f64.const 1.4901161193847656e-08 - call $~lib/math/NativeMath.tan f64.const 1.4901161193847656e-08 f64.const -0.3333333432674408 - call $std/math/check - if (result i32) - f64.const 1.4901161193847656e-08 - call $~lib/bindings/Math/tan - f64.const 1.4901161193847656e-08 - f64.const -0.3333333432674408 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50753,19 +44229,9 @@ unreachable end f64.const -2.225073858507202e-308 - call $~lib/math/NativeMath.tan f64.const -2.225073858507202e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507202e-308 - call $~lib/bindings/Math/tan - f64.const -2.225073858507202e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50776,19 +44242,9 @@ unreachable end f64.const -2.2250738585072024e-308 - call $~lib/math/NativeMath.tan f64.const -2.2250738585072024e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072024e-308 - call $~lib/bindings/Math/tan - f64.const -2.2250738585072024e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50799,19 +44255,9 @@ unreachable end f64.const -4.4501477170144003e-308 - call $~lib/math/NativeMath.tan f64.const -4.4501477170144003e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4501477170144003e-308 - call $~lib/bindings/Math/tan - f64.const -4.4501477170144003e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50822,19 +44268,9 @@ unreachable end f64.const -4.450147717014403e-308 - call $~lib/math/NativeMath.tan f64.const -4.450147717014403e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014403e-308 - call $~lib/bindings/Math/tan - f64.const -4.450147717014403e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50845,19 +44281,9 @@ unreachable end f64.const -4.450147717014406e-308 - call $~lib/math/NativeMath.tan f64.const -4.450147717014406e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.450147717014406e-308 - call $~lib/bindings/Math/tan - f64.const -4.450147717014406e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50868,19 +44294,9 @@ unreachable end f64.const -8.900295434028806e-308 - call $~lib/math/NativeMath.tan f64.const -8.900295434028806e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.900295434028806e-308 - call $~lib/bindings/Math/tan - f64.const -8.900295434028806e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50891,19 +44307,9 @@ unreachable end f64.const -1.1175870895385742e-08 - call $~lib/math/NativeMath.tan f64.const -1.1175870895385742e-08 f64.const 0.28125 - call $std/math/check - if (result i32) - f64.const -1.1175870895385742e-08 - call $~lib/bindings/Math/tan - f64.const -1.1175870895385742e-08 - f64.const 0.28125 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50914,19 +44320,9 @@ unreachable end f64.const -1.4901161193847656e-08 - call $~lib/math/NativeMath.tan f64.const -1.4901161193847656e-08 f64.const 0.3333333432674408 - call $std/math/check - if (result i32) - f64.const -1.4901161193847656e-08 - call $~lib/bindings/Math/tan - f64.const -1.4901161193847656e-08 - f64.const 0.3333333432674408 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50937,19 +44333,9 @@ unreachable end f64.const 1e-323 - call $~lib/math/NativeMath.tan f64.const 1e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1e-323 - call $~lib/bindings/Math/tan - f64.const 1e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50960,19 +44346,9 @@ unreachable end f64.const 4.4e-323 - call $~lib/math/NativeMath.tan f64.const 4.4e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.4e-323 - call $~lib/bindings/Math/tan - f64.const 4.4e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -50983,19 +44359,9 @@ unreachable end f64.const 5.562684646268003e-309 - call $~lib/math/NativeMath.tan f64.const 5.562684646268003e-309 f64.const 0 - call $std/math/check - if (result i32) - f64.const 5.562684646268003e-309 - call $~lib/bindings/Math/tan - f64.const 5.562684646268003e-309 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51006,19 +44372,9 @@ unreachable end f64.const 1.1125369292536007e-308 - call $~lib/math/NativeMath.tan f64.const 1.1125369292536007e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.1125369292536007e-308 - call $~lib/bindings/Math/tan - f64.const 1.1125369292536007e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51029,19 +44385,9 @@ unreachable end f64.const 2.2250738585072004e-308 - call $~lib/math/NativeMath.tan f64.const 2.2250738585072004e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.2250738585072004e-308 - call $~lib/bindings/Math/tan - f64.const 2.2250738585072004e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51052,19 +44398,9 @@ unreachable end f64.const 2.225073858507201e-308 - call $~lib/math/NativeMath.tan f64.const 2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const 2.225073858507201e-308 - call $~lib/bindings/Math/tan - f64.const 2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51075,19 +44411,9 @@ unreachable end f64.const -1e-323 - call $~lib/math/NativeMath.tan f64.const -1e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1e-323 - call $~lib/bindings/Math/tan - f64.const -1e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51098,19 +44424,9 @@ unreachable end f64.const -4.4e-323 - call $~lib/math/NativeMath.tan f64.const -4.4e-323 f64.const 0 - call $std/math/check - if (result i32) - f64.const -4.4e-323 - call $~lib/bindings/Math/tan - f64.const -4.4e-323 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51121,19 +44437,9 @@ unreachable end f64.const -5.562684646268003e-309 - call $~lib/math/NativeMath.tan f64.const -5.562684646268003e-309 f64.const 0 - call $std/math/check - if (result i32) - f64.const -5.562684646268003e-309 - call $~lib/bindings/Math/tan - f64.const -5.562684646268003e-309 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51144,19 +44450,9 @@ unreachable end f64.const -1.1125369292536007e-308 - call $~lib/math/NativeMath.tan f64.const -1.1125369292536007e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.1125369292536007e-308 - call $~lib/bindings/Math/tan - f64.const -1.1125369292536007e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51167,19 +44463,9 @@ unreachable end f64.const -2.2250738585072004e-308 - call $~lib/math/NativeMath.tan f64.const -2.2250738585072004e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.2250738585072004e-308 - call $~lib/bindings/Math/tan - f64.const -2.2250738585072004e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51190,19 +44476,9 @@ unreachable end f64.const -2.225073858507201e-308 - call $~lib/math/NativeMath.tan f64.const -2.225073858507201e-308 f64.const 0 - call $std/math/check - if (result i32) - f64.const -2.225073858507201e-308 - call $~lib/bindings/Math/tan - f64.const -2.225073858507201e-308 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51421,19 +44697,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.tan f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/tan - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51444,19 +44710,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.tan f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/tan - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51467,19 +44723,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/tan - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51490,19 +44736,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/tan - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -51513,19 +44749,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.tan f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/tan - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tan i32.eqz if i32.const 0 @@ -52250,19 +45476,9 @@ unreachable end f64.const -8.06684839057968 - call $~lib/math/NativeMath.tanh f64.const -0.999999803096032 f64.const 0.012793331407010555 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/tanh - f64.const -0.999999803096032 - f64.const 0.012793331407010555 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52273,19 +45489,9 @@ unreachable end f64.const 4.345239849338305 - call $~lib/math/NativeMath.tanh f64.const 0.9996636978961307 f64.const 0.1573508232831955 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/tanh - f64.const 0.9996636978961307 - f64.const 0.1573508232831955 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52296,19 +45502,9 @@ unreachable end f64.const -8.38143342755525 - call $~lib/math/NativeMath.tanh f64.const -0.9999998950434862 f64.const 0.27985066175460815 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/tanh - f64.const -0.9999998950434862 - f64.const 0.27985066175460815 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52319,19 +45515,9 @@ unreachable end f64.const -6.531673581913484 - call $~lib/math/NativeMath.tanh f64.const -0.9999957568392429 f64.const -0.44285574555397034 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/tanh - f64.const -0.9999957568392429 - f64.const -0.44285574555397034 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52342,19 +45528,9 @@ unreachable end f64.const 9.267056966972586 - call $~lib/math/NativeMath.tanh f64.const 0.9999999821447234 f64.const 0.4462755024433136 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/tanh - f64.const 0.9999999821447234 - f64.const 0.4462755024433136 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52365,19 +45541,9 @@ unreachable end f64.const 0.6619858980995045 - call $~lib/math/NativeMath.tanh f64.const 0.5796835018635275 f64.const 0.4892043173313141 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/tanh - f64.const 0.5796835018635275 - f64.const 0.4892043173313141 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52388,19 +45554,9 @@ unreachable end f64.const -0.4066039223853553 - call $~lib/math/NativeMath.tanh f64.const -0.3855853099901652 f64.const 0.35993871092796326 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/tanh - f64.const -0.3855853099901652 - f64.const 0.35993871092796326 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52411,19 +45567,9 @@ unreachable end f64.const 0.5617597462207241 - call $~lib/math/NativeMath.tanh f64.const 0.5092819248700439 f64.const -0.39436522126197815 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/tanh - f64.const 0.5092819248700439 - f64.const -0.39436522126197815 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52434,19 +45580,9 @@ unreachable end f64.const 0.7741522965913037 - call $~lib/math/NativeMath.tanh f64.const 0.6493374550318555 f64.const -0.4899396002292633 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/tanh - f64.const 0.6493374550318555 - f64.const -0.4899396002292633 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52457,19 +45593,9 @@ unreachable end f64.const -0.6787637026394024 - call $~lib/math/NativeMath.tanh f64.const -0.590715084799841 f64.const -0.0145387789234519 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/tanh - f64.const -0.590715084799841 - f64.const -0.0145387789234519 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52480,19 +45606,9 @@ unreachable end f64.const 0 - call $~lib/math/NativeMath.tanh f64.const 0 f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/tanh - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52503,19 +45619,9 @@ unreachable end f64.const -0 - call $~lib/math/NativeMath.tanh f64.const -0 f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/tanh - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52526,19 +45632,9 @@ unreachable end f64.const inf - call $~lib/math/NativeMath.tanh f64.const 1 f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/tanh - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52549,19 +45645,9 @@ unreachable end f64.const -inf - call $~lib/math/NativeMath.tanh f64.const -1 f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/tanh - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52572,19 +45658,9 @@ unreachable end f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.tanh f64.const nan:0x8000000000000 f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/tanh - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_tanh i32.eqz if i32.const 0 @@ -52804,19 +45880,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.06684839057968 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.06684839057968 - call $~lib/bindings/Math/trunc - f64.const -8 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52826,19 +45892,9 @@ call $~lib/builtins/abort unreachable end + f64.const 4.345239849338305 f64.const 4 - f64.const 4 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 4.345239849338305 - call $~lib/bindings/Math/trunc - f64.const 4 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52848,19 +45904,9 @@ call $~lib/builtins/abort unreachable end + f64.const -8.38143342755525 f64.const -8 - f64.const -8 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -8.38143342755525 - call $~lib/bindings/Math/trunc - f64.const -8 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52870,19 +45916,9 @@ call $~lib/builtins/abort unreachable end + f64.const -6.531673581913484 f64.const -6 - f64.const -6 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -6.531673581913484 - call $~lib/bindings/Math/trunc - f64.const -6 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52892,19 +45928,9 @@ call $~lib/builtins/abort unreachable end + f64.const 9.267056966972586 f64.const 9 - f64.const 9 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 9.267056966972586 - call $~lib/bindings/Math/trunc - f64.const 9 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52914,19 +45940,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.6619858980995045 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.6619858980995045 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52936,19 +45952,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.4066039223853553 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.4066039223853553 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52958,19 +45964,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5617597462207241 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5617597462207241 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -52980,19 +45976,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.7741522965913037 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.7741522965913037 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53002,19 +45988,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.6787637026394024 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.6787637026394024 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53026,17 +46002,7 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - if (result i32) - f64.const nan:0x8000000000000 - call $~lib/bindings/Math/trunc - f64.const nan:0x8000000000000 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53048,17 +46014,7 @@ end f64.const inf f64.const inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const inf - call $~lib/bindings/Math/trunc - f64.const inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53070,17 +46026,7 @@ end f64.const -inf f64.const -inf - f64.const 0 - call $std/math/check - if (result i32) - f64.const -inf - call $~lib/bindings/Math/trunc - f64.const -inf - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53092,17 +46038,7 @@ end f64.const 0 f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53114,17 +46050,7 @@ end f64.const -0 f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53136,17 +46062,7 @@ end f64.const 1 f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1 - call $~lib/bindings/Math/trunc - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53158,17 +46074,7 @@ end f64.const -1 f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1 - call $~lib/bindings/Math/trunc - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53178,19 +46084,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.5 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.5 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53200,19 +46096,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.5 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.5 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53222,19 +46108,9 @@ call $~lib/builtins/abort unreachable end + f64.const 1.0000152587890625 f64.const 1 - f64.const 1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 1.0000152587890625 - call $~lib/bindings/Math/trunc - f64.const 1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53244,19 +46120,9 @@ call $~lib/builtins/abort unreachable end + f64.const -1.0000152587890625 f64.const -1 - f64.const -1 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -1.0000152587890625 - call $~lib/bindings/Math/trunc - f64.const -1 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53266,19 +46132,9 @@ call $~lib/builtins/abort unreachable end + f64.const 0.9999923706054688 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 0.9999923706054688 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53288,19 +46144,9 @@ call $~lib/builtins/abort unreachable end + f64.const -0.9999923706054688 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -0.9999923706054688 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53310,19 +46156,9 @@ call $~lib/builtins/abort unreachable end + f64.const 7.888609052210118e-31 f64.const 0 - f64.const 0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const 7.888609052210118e-31 - call $~lib/bindings/Math/trunc - f64.const 0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -53332,19 +46168,9 @@ call $~lib/builtins/abort unreachable end + f64.const -7.888609052210118e-31 f64.const -0 - f64.const -0 - f64.const 0 - call $std/math/check - if (result i32) - f64.const -7.888609052210118e-31 - call $~lib/bindings/Math/trunc - f64.const -0 - f64.const 0 - call $std/math/check - else - i32.const 0 - end + call $std/math/test_trunc i32.eqz if i32.const 0 @@ -54878,7 +47704,7 @@ unreachable end ) - (func $~start (; 110 ;) + (func $~start (; 151 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 01e1bbba31..e599ba26f6 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -4,6 +4,7 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) + (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (import "mod" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -242,7 +243,23 @@ local.get $1 f64.eq ) - (func $~lib/math/NativeMathf.mod (; 4 ;) (param $0 f32) (param $1 f32) (result f32) + (func $std/mod/test_fmod (; 4 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + local.get $0 + local.get $1 + call $~lib/math/NativeMath.mod + local.get $2 + call $std/mod/check + if (result i32) + local.get $0 + local.get $1 + call $std/mod/mod + local.get $2 + call $std/mod/check + else + i32.const 0 + end + ) + (func $~lib/math/NativeMathf.mod (; 5 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -434,7 +451,7 @@ local.get $0 f32.mul ) - (func $std/mod/test_fmodf (; 5 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/mod/test_fmodf (; 6 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) block $__inlined_func$std/mod/check (result i32) local.get $0 local.get $1 @@ -464,21 +481,11 @@ f32.eq end ) - (func $start:std/mod (; 6 ;) + (func $start:std/mod (; 7 ;) f64.const 3 f64.const 2 - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 3 - f64.const 2 - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -490,18 +497,8 @@ end f64.const 3 f64.const -2 - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 3 - f64.const -2 - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -513,18 +510,8 @@ end f64.const -3 f64.const 2 - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -3 - f64.const 2 - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -536,18 +523,8 @@ end f64.const -3 f64.const -2 - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -3 - f64.const -2 - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -559,18 +536,8 @@ end f64.const 3.5 f64.const 2 - call $~lib/math/NativeMath.mod f64.const 1.5 - call $std/mod/check - if (result i32) - f64.const 3.5 - f64.const 2 - call $std/mod/mod - f64.const 1.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -582,18 +549,8 @@ end f64.const 3.5 f64.const -2 - call $~lib/math/NativeMath.mod f64.const 1.5 - call $std/mod/check - if (result i32) - f64.const 3.5 - f64.const -2 - call $std/mod/mod - f64.const 1.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -605,18 +562,8 @@ end f64.const -3.5 f64.const 2 - call $~lib/math/NativeMath.mod f64.const -1.5 - call $std/mod/check - if (result i32) - f64.const -3.5 - f64.const 2 - call $std/mod/mod - f64.const -1.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -628,18 +575,8 @@ end f64.const -3.5 f64.const -2 - call $~lib/math/NativeMath.mod f64.const -1.5 - call $std/mod/check - if (result i32) - f64.const -3.5 - f64.const -2 - call $std/mod/mod - f64.const -1.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -651,18 +588,8 @@ end f64.const 3 f64.const 2.5 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 3 - f64.const 2.5 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -674,18 +601,8 @@ end f64.const 3 f64.const -2.5 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 3 - f64.const -2.5 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -697,18 +614,8 @@ end f64.const -3 f64.const 2.5 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -3 - f64.const 2.5 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -720,18 +627,8 @@ end f64.const -3 f64.const -2.5 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -3 - f64.const -2.5 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -743,18 +640,8 @@ end f64.const 0.5 f64.const 1 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 0.5 - f64.const 1 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -766,18 +653,8 @@ end f64.const 0.5 f64.const -1 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 0.5 - f64.const -1 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -789,18 +666,8 @@ end f64.const -0.5 f64.const 1 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -0.5 - f64.const 1 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -812,18 +679,8 @@ end f64.const -0.5 f64.const -1 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -0.5 - f64.const -1 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -835,18 +692,8 @@ end f64.const 1.5 f64.const 1 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 1.5 - f64.const 1 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -858,18 +705,8 @@ end f64.const 1.5 f64.const -1 - call $~lib/math/NativeMath.mod f64.const 0.5 - call $std/mod/check - if (result i32) - f64.const 1.5 - f64.const -1 - call $std/mod/mod - f64.const 0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -881,18 +718,8 @@ end f64.const -1.5 f64.const 1 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -1.5 - f64.const 1 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -904,18 +731,8 @@ end f64.const -1.5 f64.const -1 - call $~lib/math/NativeMath.mod f64.const -0.5 - call $std/mod/check - if (result i32) - f64.const -1.5 - f64.const -1 - call $std/mod/mod - f64.const -0.5 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -927,18 +744,8 @@ end f64.const 1.25 f64.const 1 - call $~lib/math/NativeMath.mod f64.const 0.25 - call $std/mod/check - if (result i32) - f64.const 1.25 - f64.const 1 - call $std/mod/mod - f64.const 0.25 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -950,18 +757,8 @@ end f64.const 1.25 f64.const -1 - call $~lib/math/NativeMath.mod f64.const 0.25 - call $std/mod/check - if (result i32) - f64.const 1.25 - f64.const -1 - call $std/mod/mod - f64.const 0.25 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -973,18 +770,8 @@ end f64.const -1.25 f64.const 1 - call $~lib/math/NativeMath.mod f64.const -0.25 - call $std/mod/check - if (result i32) - f64.const -1.25 - f64.const 1 - call $std/mod/mod - f64.const -0.25 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -996,18 +783,8 @@ end f64.const -1.25 f64.const -1 - call $~lib/math/NativeMath.mod f64.const -0.25 - call $std/mod/check - if (result i32) - f64.const -1.25 - f64.const -1 - call $std/mod/mod - f64.const -0.25 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1019,18 +796,8 @@ end f64.const 1 f64.const 1.25 - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const 1.25 - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1042,18 +809,8 @@ end f64.const 1 f64.const -1.25 - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const -1.25 - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1065,18 +822,8 @@ end f64.const -1 f64.const 1.25 - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const 1.25 - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1088,18 +835,8 @@ end f64.const -1 f64.const -1.25 - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const -1.25 - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1111,18 +848,8 @@ end f64.const -13 f64.const 64 - call $~lib/math/NativeMath.mod f64.const -13 - call $std/mod/check - if (result i32) - f64.const -13 - f64.const 64 - call $std/mod/mod - f64.const -13 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1134,18 +861,8 @@ end f64.const 0 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1157,18 +874,8 @@ end f64.const -0 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1180,18 +887,8 @@ end f64.const 0 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1203,18 +900,8 @@ end f64.const -0 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1226,18 +913,8 @@ end f64.const 0 f64.const 1 - call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const 1 - call $std/mod/mod - f64.const 0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1249,18 +926,8 @@ end f64.const -0 f64.const 1 - call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const 1 - call $std/mod/mod - f64.const -0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1272,18 +939,8 @@ end f64.const 0 f64.const -1 - call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const -1 - call $std/mod/mod - f64.const 0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1295,18 +952,8 @@ end f64.const -0 f64.const -1 - call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const -1 - call $std/mod/mod - f64.const -0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1318,18 +965,8 @@ end f64.const 1 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1341,18 +978,8 @@ end f64.const -1 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1364,18 +991,8 @@ end f64.const 1 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1387,18 +1004,8 @@ end f64.const -1 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1410,18 +1017,8 @@ end f64.const nan:0x8000000000000 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1433,18 +1030,8 @@ end f64.const nan:0x8000000000000 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1456,18 +1043,8 @@ end f64.const nan:0x8000000000000 f64.const 1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const 1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1479,18 +1056,8 @@ end f64.const nan:0x8000000000000 f64.const -1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const -1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1502,18 +1069,8 @@ end f64.const nan:0x8000000000000 f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1525,18 +1082,8 @@ end f64.const nan:0x8000000000000 f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1548,18 +1095,8 @@ end f64.const nan:0x8000000000000 f64.const 1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const 1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1571,18 +1108,8 @@ end f64.const nan:0x8000000000000 f64.const -1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const -1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1594,18 +1121,8 @@ end f64.const nan:0x8000000000000 f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const nan:0x8000000000000 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1617,18 +1134,8 @@ end f64.const 0 f64.const inf - call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const inf - call $std/mod/mod - f64.const 0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1640,18 +1147,8 @@ end f64.const -0 f64.const inf - call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const inf - call $std/mod/mod - f64.const -0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1663,18 +1160,8 @@ end f64.const 0 f64.const -inf - call $~lib/math/NativeMath.mod f64.const 0 - call $std/mod/check - if (result i32) - f64.const 0 - f64.const -inf - call $std/mod/mod - f64.const 0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1686,18 +1173,8 @@ end f64.const -0 f64.const -inf - call $~lib/math/NativeMath.mod f64.const -0 - call $std/mod/check - if (result i32) - f64.const -0 - f64.const -inf - call $std/mod/mod - f64.const -0 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1709,18 +1186,8 @@ end f64.const 1 f64.const inf - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const inf - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1732,18 +1199,8 @@ end f64.const -1 f64.const inf - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const inf - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1755,18 +1212,8 @@ end f64.const 1 f64.const -inf - call $~lib/math/NativeMath.mod f64.const 1 - call $std/mod/check - if (result i32) - f64.const 1 - f64.const -inf - call $std/mod/mod - f64.const 1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1778,18 +1225,8 @@ end f64.const -1 f64.const -inf - call $~lib/math/NativeMath.mod f64.const -1 - call $std/mod/check - if (result i32) - f64.const -1 - f64.const -inf - call $std/mod/mod - f64.const -1 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1801,18 +1238,8 @@ end f64.const inf f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1824,18 +1251,8 @@ end f64.const inf f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1847,18 +1264,8 @@ end f64.const -inf f64.const 0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const 0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1870,18 +1277,8 @@ end f64.const -inf f64.const -0 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const -0 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1893,18 +1290,8 @@ end f64.const inf f64.const 1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const 1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1916,18 +1303,8 @@ end f64.const inf f64.const -1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const -1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1939,18 +1316,8 @@ end f64.const -inf f64.const 1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const 1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1962,18 +1329,8 @@ end f64.const -inf f64.const -1 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const -1 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -1985,18 +1342,8 @@ end f64.const inf f64.const inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2008,18 +1355,8 @@ end f64.const -inf f64.const inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2031,18 +1368,8 @@ end f64.const inf f64.const -inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const -inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2054,18 +1381,8 @@ end f64.const -inf f64.const -inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const -inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2077,18 +1394,8 @@ end f64.const inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const inf - f64.const nan:0x8000000000000 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2100,18 +1407,8 @@ end f64.const -inf f64.const nan:0x8000000000000 - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const -inf - f64.const nan:0x8000000000000 - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2123,18 +1420,8 @@ end f64.const nan:0x8000000000000 f64.const inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2146,18 +1433,8 @@ end f64.const nan:0x8000000000000 f64.const -inf - call $~lib/math/NativeMath.mod f64.const nan:0x8000000000000 - call $std/mod/check - if (result i32) - f64.const nan:0x8000000000000 - f64.const -inf - call $std/mod/mod - f64.const nan:0x8000000000000 - call $std/mod/check - else - i32.const 0 - end + call $std/mod/test_fmod i32.eqz if i32.const 0 @@ -2961,7 +2238,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 8 ;) call $start:std/mod ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index e54a929ddb..a8c58006df 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -7,28 +8,20 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $std/new/AClass#constructor (; 0 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - local.tee $2 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.tee $0 + local.tee $1 i32.gt_u if - local.get $3 local.get $2 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -36,16 +29,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 - local.get $3 - local.get $0 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $0 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -54,41 +47,52 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $1 + ) + (func $std/new/AClass#constructor (; 1 ;) (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/stub/offset i32.const 16 - i32.sub + i32.add local.tee $0 i32.const 16 - i32.store + i32.add + call $~lib/rt/stub/maybeGrowMemory local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.const 16 + i32.store + local.get $1 i32.const 1 i32.store offset=4 - local.get $0 + local.get $1 i32.const 3 i32.store offset=8 - local.get $0 + local.get $1 i32.const 8 i32.store offset=12 - local.get $1 + local.get $0 i32.const 1 i32.store - local.get $1 + local.get $0 f32.const 2 f32.store offset=4 i32.const 0 - local.get $1 + local.get $0 i32.load i32.const 1 i32.add i32.store - local.get $1 + local.get $0 f32.const 3 f32.store offset=4 - local.get $1 + local.get $0 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index af4871f594..385b2a670a 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,7 +1,9 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\16\00\00\00\01\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") @@ -10,46 +12,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,16 +33,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -75,13 +51,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -92,9 +97,17 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 + ) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) - (func $~lib/util/string/compareImpl (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -169,22 +182,8 @@ end i32.const 0 ) - (func $start:std/object-literal (; 3 ;) - (local $0 i32) + (func $std/object-literal/bar (; 5 ;) (param $0 i32) (local $1 i32) - i32.const 128 - global.set $~lib/rt/stub/startOffset - i32.const 128 - global.set $~lib/rt/stub/offset - i32.const 8 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - i32.const 1 - i32.store - local.get $0 - i32.const 32 - i32.store offset=4 local.get $0 i32.load i32.const 1 @@ -201,7 +200,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $1 + local.tee $0 i32.const 32 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -209,24 +208,18 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $1 + local.get $0 select br_if $folding-inner0 - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $0 - i32.const 28 - i32.load - i32.const 1 - i32.shr_u + local.get $0 + call $~lib/string/String#get:length + local.tee $1 + i32.const 32 + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 - local.get $1 local.get $0 + local.get $1 call $~lib/util/string/compareImpl i32.eqz br $__inlined_func$~lib/string/String.__eq @@ -242,6 +235,24 @@ call $~lib/builtins/abort unreachable end + ) + (func $start:std/object-literal (; 6 ;) + (local $0 i32) + i32.const 128 + global.set $~lib/rt/stub/startOffset + i32.const 128 + global.set $~lib/rt/stub/offset + i32.const 8 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const 32 + i32.store offset=4 + local.get $0 + call $std/object-literal/bar i32.const 4 i32.const 4 call $~lib/rt/stub/__alloc @@ -279,7 +290,7 @@ unreachable end ) - (func $~start (; 4 ;) + (func $~start (; 7 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 598fb0208e..bb2c0e12cb 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -1,7 +1,8 @@ (module (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_=>_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))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) @@ -54,7 +55,24 @@ f32.ne i32.and ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/object/Object.is (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + local.get $1 + i32.const 0 + i32.ne + i32.eq + ) + (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -130,7 +148,7 @@ end i32.const 0 ) - (func $~lib/object/Object.is<~lib/string/String> (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/object/Object.is<~lib/string/String> (; 6 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $__inlined_func$~lib/string/String.__eq (result i32) i32.const 1 @@ -147,18 +165,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -171,7 +181,7 @@ i32.const 0 end ) - (func $start:std/object (; 5 ;) + (func $start:std/object (; 7 ;) f64.const 0 f64.const 0 call $~lib/object/Object.is @@ -513,6 +523,43 @@ call $~lib/builtins/abort unreachable end + i32.const 1 + i32.const 1 + call $~lib/object/Object.is + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 41 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i32.const 0 + call $~lib/object/Object.is + if + i32.const 0 + i32.const 32 + i32.const 42 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 0 + call $~lib/object/Object.is + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 43 + i32.const 0 + call $~lib/builtins/abort + unreachable + end i32.const 80 i32.const 80 call $~lib/object/Object.is<~lib/string/String> @@ -584,7 +631,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 8 ;) call $start:std/object ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 9b7cf51477..46b6bcf27f 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,5 +1,7 @@ (module + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -77,28 +79,20 @@ (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -106,16 +100,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -124,9 +118,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -141,9 +146,21 @@ local.get $1 i32.const 8 i32.store offset=12 - local.get $3 + local.get $2 + ) + (func $std/operator-overloading/Tester#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 2 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 4 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -220,7 +237,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 3 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 5 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1176,34 +1193,76 @@ f64.const 1e-300 f64.mul ) - (func $start:std/operator-overloading (; 4 ;) + (func $std/operator-overloading/Tester.equals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load + local.get $1 + i32.load + i32.eq + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.eq + else + i32.const 0 + end + ) + (func $std/operator-overloading/Tester.notEquals (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load + local.get $1 + i32.load + i32.ne + if (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + i32.ne + else + i32.const 0 + end + ) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 4 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 5 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $start:std/operator-overloading (; 10 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) i32.const 96 global.set $~lib/rt/stub/startOffset i32.const 96 global.set $~lib/rt/stub/offset - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/a1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/a2 global.get $std/operator-overloading/a1 local.tee $0 @@ -1212,22 +1271,12 @@ local.tee $1 i32.load i32.add - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/a global.get $std/operator-overloading/a i32.load @@ -1250,25 +1299,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/s1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const -3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/s2 global.get $std/operator-overloading/s1 local.tee $0 @@ -1277,22 +1314,12 @@ local.tee $1 i32.load i32.sub - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.sub - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/s global.get $std/operator-overloading/s i32.load @@ -1313,25 +1340,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 5 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/m1 i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - i32.const 3 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/m2 global.get $std/operator-overloading/m1 local.tee $0 @@ -1340,22 +1355,12 @@ local.tee $1 i32.load i32.mul - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.mul - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/m global.get $std/operator-overloading/m i32.load @@ -1378,25 +1383,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 6 - i32.store - local.get $0 i32.const 50 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/d1 i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - i32.const 3 - i32.store - local.get $0 i32.const 10 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/d2 global.get $std/operator-overloading/d1 local.tee $0 @@ -1405,22 +1398,12 @@ local.tee $1 i32.load i32.div_s - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.div_s - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/d global.get $std/operator-overloading/d i32.load @@ -1443,25 +1426,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 10 - i32.store - local.get $0 i32.const 10 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/f1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 6 - i32.store - local.get $0 i32.const 10 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/f2 global.get $std/operator-overloading/f1 local.tee $0 @@ -1470,22 +1441,12 @@ local.tee $1 i32.load i32.rem_s - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.rem_s - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/f global.get $std/operator-overloading/f i32.load @@ -1507,25 +1468,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/p1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 4 - i32.store - local.get $0 i32.const 5 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/p2 global.get $std/operator-overloading/p1 local.tee $0 @@ -1537,7 +1486,6 @@ f64.convert_i32_s call $~lib/math/NativeMath.pow i32.trunc_f64_s - local.set $2 local.get $0 i32.load offset=4 f64.convert_i32_s @@ -1546,16 +1494,7 @@ f64.convert_i32_s call $~lib/math/NativeMath.pow i32.trunc_f64_s - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/p global.get $std/operator-overloading/p i32.load @@ -1578,25 +1517,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 255 - i32.store - local.get $0 i32.const 15 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/n1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 15 - i32.store - local.get $0 i32.const 255 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/n2 global.get $std/operator-overloading/n1 local.tee $0 @@ -1605,22 +1532,12 @@ local.tee $1 i32.load i32.and - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.and - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/n global.get $std/operator-overloading/n i32.load @@ -1643,25 +1560,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 3855 - i32.store - local.get $0 i32.const 255 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/o1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 61680 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/o2 global.get $std/operator-overloading/o1 local.tee $0 @@ -1670,22 +1575,12 @@ local.tee $1 i32.load i32.or - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.or - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/o global.get $std/operator-overloading/o i32.load @@ -1708,25 +1603,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 255 - i32.store - local.get $0 i32.const 255 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/x1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 65280 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/x2 global.get $std/operator-overloading/x1 local.tee $0 @@ -1735,22 +1618,12 @@ local.tee $1 i32.load i32.xor - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.xor - local.set $1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/x global.get $std/operator-overloading/x i32.load @@ -1773,42 +1646,17 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const -2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const -2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq2 global.get $std/operator-overloading/eq1 - local.tee $0 - i32.load global.get $std/operator-overloading/eq2 - local.tee $1 - i32.load - i32.eq - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.eq - else - i32.const 0 - end + call $std/operator-overloading/Tester.equals global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq i32.const 1 @@ -1821,42 +1669,17 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq3 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 0 - i32.store - local.get $0 i32.const 1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq4 global.get $std/operator-overloading/eq3 - local.tee $0 - i32.load global.get $std/operator-overloading/eq4 - local.tee $1 - i32.load - i32.eq - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.eq - else - i32.const 0 - end + call $std/operator-overloading/Tester.equals global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf if @@ -1868,21 +1691,8 @@ unreachable end global.get $std/operator-overloading/eq1 - local.tee $0 - i32.load global.get $std/operator-overloading/eq2 - local.tee $1 - i32.load - i32.ne - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.ne - else - i32.const 0 - end + call $std/operator-overloading/Tester.notEquals global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq if @@ -1894,21 +1704,8 @@ unreachable end global.get $std/operator-overloading/eq3 - local.tee $0 - i32.load global.get $std/operator-overloading/eq4 - local.tee $1 - i32.load - i32.ne - if (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.load offset=4 - i32.ne - else - i32.const 0 - end + call $std/operator-overloading/Tester.notEquals global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf i32.const 1 @@ -1921,25 +1718,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 2147483647 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gt1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gt2 global.get $std/operator-overloading/gt1 local.tee $0 @@ -1969,25 +1754,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gte1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gte2 global.get $std/operator-overloading/gte1 local.tee $0 @@ -2017,25 +1790,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 5 - i32.store - local.get $0 i32.const -1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/le1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 6 - i32.store - local.get $0 i32.const 6 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/le2 global.get $std/operator-overloading/le1 local.tee $0 @@ -2065,25 +1826,13 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 4 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/leq1 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 4 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/leq2 global.get $std/operator-overloading/leq1 local.tee $0 @@ -2113,36 +1862,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 8 - i32.store - local.get $0 i32.const 16 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/shr global.get $std/operator-overloading/shr local.tee $0 i32.load i32.const 3 i32.shr_s - local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shr_s - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres i32.load @@ -2165,36 +1898,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const -8 - i32.store - local.get $0 i32.const -16 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/shu global.get $std/operator-overloading/shu local.tee $0 i32.load i32.const 3 i32.shr_u - local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shr_u - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/ures global.get $std/operator-overloading/ures i32.load @@ -2217,36 +1934,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/shl global.get $std/operator-overloading/shl local.tee $0 i32.load i32.const 3 i32.shl - local.set $1 local.get $0 i32.load offset=4 i32.const 3 i32.shl - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/sres global.get $std/operator-overloading/sres i32.load @@ -2269,32 +1970,16 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const -2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/pos global.get $std/operator-overloading/pos local.tee $0 i32.load - local.set $1 local.get $0 i32.load offset=4 - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/pres global.get $std/operator-overloading/pres i32.load @@ -2319,36 +2004,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const -1 - i32.store - local.get $0 i32.const -2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/neg i32.const 0 global.get $std/operator-overloading/neg local.tee $0 i32.load i32.sub - local.set $1 i32.const 0 local.get $0 i32.load offset=4 i32.sub - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/nres global.get $std/operator-overloading/nres i32.load @@ -2377,36 +2046,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 255 - i32.store - local.get $0 i32.const 16 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/not global.get $std/operator-overloading/not local.tee $0 i32.load i32.const -1 i32.xor - local.set $1 local.get $0 i32.load offset=4 i32.const -1 i32.xor - local.set $2 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/res global.get $std/operator-overloading/res i32.load @@ -2435,15 +2088,9 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 0 - i32.store - local.get $0 i32.const 0 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl local.tee $0 @@ -2486,15 +2133,9 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 0 - i32.store - local.get $0 i32.const 1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 @@ -2566,36 +2207,20 @@ call $~lib/builtins/abort unreachable end - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 0 - i32.store - local.get $0 i32.const 1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec local.tee $0 i32.load i32.const 1 i32.add - local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.add - local.set $3 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $1 - local.get $2 - i32.store - local.get $1 - local.get $3 - i32.store offset=4 - local.get $1 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/incdec local.get $0 global.set $std/operator-overloading/tmp @@ -2644,21 +2269,11 @@ i32.load i32.const 1 i32.sub - local.set $2 local.get $0 i32.load offset=4 i32.const 1 i32.sub - local.set $3 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $1 - local.get $2 - i32.store - local.get $1 - local.get $3 - i32.store offset=4 - local.get $1 + call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/incdec local.get $0 global.set $std/operator-overloading/tmp @@ -2702,46 +2317,24 @@ call $~lib/builtins/abort unreachable end - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 global.get $std/operator-overloading/ais1 local.tee $0 i32.load i32.const 1 i32.add - local.set $1 local.get $0 i32.load offset=4 i32.const 1 i32.add - local.set $2 - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais2 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2750,22 +2343,12 @@ local.tee $1 i32.load i32.add - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - local.set $1 - i32.const 4 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais global.get $std/operator-overloading/ais i32.load @@ -2788,46 +2371,24 @@ call $~lib/builtins/abort unreachable end - i32.const 5 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 1 - i32.store - local.get $0 i32.const 2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 global.get $std/operator-overloading/aii1 local.tee $0 i32.load i32.const 1 i32.add - local.set $1 local.get $0 i32.load offset=4 i32.const 1 i32.add - local.set $2 - i32.const 5 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 - i32.const 5 - call $~lib/rt/stub/__alloc - local.tee $0 i32.const 2 - i32.store - local.get $0 i32.const 3 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii2 global.get $std/operator-overloading/aii1 local.tee $0 @@ -2836,22 +2397,12 @@ local.tee $1 i32.load i32.add - local.set $2 local.get $0 i32.load offset=4 local.get $1 i32.load offset=4 i32.add - local.set $1 - i32.const 5 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii global.get $std/operator-overloading/aii i32.load @@ -2875,7 +2426,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 11 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index bf666a1e01..6d695441d9 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param 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))) @@ -13,7 +14,51 @@ (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/memory/memory.copy (; 1 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 1 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + i32.const 8 + i32.add + local.tee $1 + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 4 + i32.sub + i32.const 0 + i32.store8 + ) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -187,7 +232,7 @@ end end ) - (func $start:std/pointer (; 2 ;) + (func $start:std/pointer (; 3 ;) (local $0 i32) (local $1 i32) i32.const 8 @@ -357,46 +402,7 @@ call $~lib/memory/memory.copy else local.get $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 + call $~lib/memory/memory.fill end global.get $std/pointer/one global.get $std/pointer/two @@ -590,7 +596,7 @@ unreachable end ) - (func $~start (; 3 ;) + (func $~start (; 4 ;) call $start:std/pointer ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index e6bca37e40..dff8a7f778 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,22 +1,24 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) + (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) - (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) - (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) @@ -846,7 +848,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -922,10 +986,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -953,65 +1016,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1061,9 +1068,56 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 444 i32.gt_u @@ -1071,48 +1125,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1323,7 +1340,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 16 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1336,35 +1353,34 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 call $~lib/memory/memory.fill local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#clear (; 17 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 - i32.load - local.tee $2 i32.const 444 i32.gt_u if - local.get $2 + local.get $0 i32.const 16 i32.sub call $~lib/rt/pure/decrement end + ) + (func $~lib/set/Set#clear (; 21 ;) (param $0 i32) + (local $1 i32) + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.load + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -1376,15 +1392,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -1398,14 +1406,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 18 ;) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -1429,7 +1434,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1472,7 +1477,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1488,7 +1493,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 21 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1582,14 +1587,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -1608,14 +1606,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1628,25 +1619,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1738,7 +1715,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1754,27 +1731,21 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1788,7 +1759,8 @@ i32.const 0 i32.store offset=8 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load local.tee $4 @@ -1798,14 +1770,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1818,7 +1783,49 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 28 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1991,7 +1998,20 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2047,10 +2067,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -2088,29 +2108,19 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/array/ensureSize (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 local.get $2 i32.shr_u i32.gt_u @@ -2130,67 +2140,26 @@ end local.get $0 i32.load - local.set $3 + local.set $4 + local.get $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $2 i32.shl local.tee $2 - local.set $5 - call $~lib/rt/tlsf/maybeInitialize - local.set $6 - local.get $3 - i32.const 16 - i32.sub - local.set $1 - local.get $3 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $3 - select - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - local.get $6 - local.get $1 - local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 i32.add local.get $2 - local.get $4 + local.get $3 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $3 + local.get $4 i32.ne if local.get $0 @@ -2205,7 +2174,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2241,7 +2210,71 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#__get (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#values (; 34 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2260,7 +2293,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2326,15 +2359,11 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 30 ;) + (func $std/set/testNumeric (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -2360,15 +2389,7 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/set/Set#has @@ -2426,15 +2447,7 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/set/Set#has @@ -2467,65 +2480,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 @@ -2548,20 +2506,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -2569,7 +2519,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -2663,15 +2613,7 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 call $~lib/set/Set#has @@ -2730,41 +2672,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 31 ;) (result i32) + (func $~lib/set/Set#constructor (; 38 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -2788,7 +2706,21 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#rehash (; 32 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 255 + i32.and + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2882,14 +2814,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -2908,14 +2833,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -2928,25 +2846,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 41 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3036,7 +2940,71 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#values (; 42 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3055,7 +3023,7 @@ i32.add i32.load8_u ) - (func $~lib/set/Set#delete (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3119,15 +3087,11 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 36 ;) + (func $std/set/testNumeric (; 45 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -3139,14 +3103,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -3158,25 +3115,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3216,14 +3158,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3236,25 +3171,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3284,65 +3204,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 @@ -3355,15 +3220,7 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3373,20 +3230,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -3394,7 +3243,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -3418,14 +3267,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3440,14 +3282,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -3486,14 +3321,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -3505,25 +3333,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -3538,14 +3351,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 255 - i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -3586,41 +3392,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 37 ;) (result i32) + (func $~lib/set/Set#constructor (; 46 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -3644,7 +3426,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 38 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 47 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3659,7 +3441,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3702,7 +3484,20 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 50 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3793,14 +3588,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -3819,14 +3607,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -3839,25 +3620,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 51 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3944,7 +3711,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3982,7 +3749,71 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#values (; 53 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 8 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4003,7 +3834,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 55 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4066,15 +3897,11 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 45 ;) + (func $std/set/testNumeric (; 56 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -4088,13 +3915,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -4106,24 +3927,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4165,13 +3972,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4184,24 +3985,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4231,65 +4018,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 @@ -4302,14 +4034,7 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4319,20 +4044,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -4340,7 +4057,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -4366,13 +4083,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4387,13 +4098,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -4434,13 +4139,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -4452,24 +4151,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -4484,13 +4169,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -4531,41 +4210,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 46 ;) (result i32) + (func $~lib/set/Set#constructor (; 57 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -4589,7 +4244,18 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#rehash (; 47 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4680,14 +4346,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -4706,14 +4365,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -4726,25 +4378,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 60 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4829,7 +4467,71 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#values (; 61 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 10 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 62 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4850,7 +4552,7 @@ i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 50 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 63 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4911,15 +4613,11 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 51 ;) + (func $std/set/testNumeric (; 64 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -4931,11 +4629,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -4947,22 +4641,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5002,11 +4684,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5019,22 +4697,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5064,65 +4730,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 @@ -5135,12 +4746,7 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5150,20 +4756,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -5171,7 +4769,7 @@ br $for-loop|4 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -5195,11 +4793,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5214,11 +4808,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -5257,11 +4847,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -5273,22 +4859,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5303,11 +4877,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.const 65535 - i32.and - call $~lib/util/hash/hash16 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -5348,41 +4918,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 52 ;) (result i32) + (func $~lib/set/Set#constructor (; 65 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -5406,7 +4952,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 53 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 66 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -5437,7 +4983,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5478,7 +5024,16 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 55 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 69 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5569,14 +5124,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -5595,14 +5143,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -5615,25 +5156,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 70 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5716,7 +5243,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5754,7 +5281,71 @@ local.get $2 i32.store ) - (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#values (; 72 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 73 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5775,7 +5366,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 59 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 74 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5834,15 +5425,11 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 60 ;) + (func $std/set/testNumeric (; 75 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -5852,9 +5439,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -5866,20 +5451,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5917,9 +5492,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5932,20 +5505,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -5975,65 +5538,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|05 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|2 @@ -6046,10 +5554,7 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6059,20 +5564,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -6080,7 +5577,7 @@ br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -6102,9 +5599,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6119,9 +5614,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6158,9 +5651,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6172,20 +5663,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6200,9 +5681,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6243,41 +5722,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 61 ;) (result i32) + (func $~lib/set/Set#constructor (; 76 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -6301,31 +5756,89 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 62 ;) - (local $0 i32) + (func $~lib/set/Set#values (; 77 ;) (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) - call $~lib/set/Set#constructor + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 local.set $1 - loop $for-loop|0 - local.get $0 - i32.const 100 - i32.lt_u - if - local.get $1 - local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find - if - i32.const 0 - i32.const 304 - i32.const 6 + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $std/set/testNumeric (; 78 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/set/Set#constructor + local.set $1 + loop $for-loop|0 + local.get $0 + i32.const 100 + i32.lt_u + if + local.get $1 + local.get $0 + call $~lib/set/Set#has + if + i32.const 0 + i32.const 304 + i32.const 6 i32.const 4 call $~lib/builtins/abort unreachable @@ -6333,20 +5846,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6384,9 +5887,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6399,20 +5900,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6442,65 +5933,10 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $6 - local.get $1 - i32.load offset=16 - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $3 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|05 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.tee $7 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $4 - local.get $7 - i32.load - call $~lib/array/Array#__set - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|2 @@ -6513,10 +5949,7 @@ local.get $2 local.get $0 call $~lib/array/Array#__get - local.tee $3 - local.get $3 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6526,20 +5959,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 local.get $2 local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -6547,7 +5972,7 @@ br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -6569,9 +5994,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6586,9 +6009,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6625,9 +6046,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6639,20 +6058,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -6667,9 +6076,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -6710,50 +6117,20 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#clear (; 63 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 79 ;) (param $0 i32) (local $1 i32) - (local $2 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $1 local.get $0 i32.load - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store @@ -6765,15 +6142,7 @@ local.set $1 local.get $0 i32.load offset=8 - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 i32.store offset=8 @@ -6787,14 +6156,11 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 64 ;) (result i32) + (func $~lib/set/Set#constructor (; 80 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 15 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -6818,7 +6184,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 65 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 81 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6884,7 +6250,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 82 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6925,7 +6291,16 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 67 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 83 ;) (param $0 i32) (param $1 i64) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 84 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7016,14 +6391,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -7042,14 +6410,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -7062,25 +6423,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 68 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 85 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7163,7 +6510,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -7201,18 +6548,82 @@ local.get $2 i64.store ) - (func $~lib/array/Array#__get (; 70 ;) (param $0 i32) (param $1 i32) (result i64) - local.get $1 + (func $~lib/set/Set#values (; 87 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 352 - i32.const 416 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $~lib/array/Array#__get (; 88 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 352 + i32.const 416 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable end local.get $0 i32.load offset=4 @@ -7222,7 +6633,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 71 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 89 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -7282,17 +6693,12 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 72 ;) + (func $std/set/testNumeric (; 90 ;) (local $0 i64) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7302,9 +6708,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -7316,20 +6720,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7367,9 +6761,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7382,20 +6774,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7425,77 +6807,21 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 - local.set $6 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $6 - i32.store offset=12 - loop $for-loop|05 - local.get $7 - local.get $6 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 4 - i32.shl - i32.add - local.tee $9 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.get $4 - local.get $9 - i64.load - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $5 + local.get $3 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get - local.tee $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7505,28 +6831,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7548,9 +6866,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7565,9 +6881,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -7604,9 +6918,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -7618,20 +6930,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7646,9 +6948,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -7689,41 +6989,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 73 ;) (result i32) + (func $~lib/set/Set#constructor (; 91 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 17 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -7747,17 +7023,76 @@ call $~lib/set/Set#clear local.get $0 ) - (func $std/set/testNumeric (; 74 ;) - (local $0 i64) + (func $~lib/set/Set#values (; 92 ;) (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) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + i64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 + ) + (func $std/set/testNumeric (; 93 ;) + (local $0 i64) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7767,9 +7102,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -7781,20 +7114,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7832,9 +7155,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7847,20 +7168,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7890,77 +7201,21 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $8 - local.get $1 - i32.load offset=16 - local.set $6 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $6 - i32.store offset=12 - loop $for-loop|05 - local.get $7 - local.get $6 - i32.lt_s - if - local.get $8 - local.get $7 - i32.const 4 - i32.shl - i32.add - local.tee $9 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $3 - local.tee $4 - i32.const 1 - i32.add - local.set $3 - local.get $2 - local.get $4 - local.get $9 - i64.load - call $~lib/array/Array#__set - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $5 + local.get $3 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get - local.tee $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -7970,28 +7225,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -8013,9 +7260,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8030,9 +7275,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8069,9 +7312,7 @@ if local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8083,20 +7324,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8111,9 +7342,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8154,41 +7383,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 75 ;) (result i32) + (func $~lib/set/Set#constructor (; 94 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 19 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -8212,7 +7417,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 76 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 95 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8253,7 +7458,17 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 77 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 96 ;) (param $0 i32) (param $1 f32) (result i32) + local.get $0 + local.get $1 + local.get $1 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 97 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8345,14 +7560,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -8371,14 +7579,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -8391,25 +7592,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 78 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#add (; 98 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8487,13 +7674,115 @@ i32.load i32.store offset=4 local.get $3 - local.get $2 - i32.store + local.get $2 + i32.store + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#__set (; 99 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $~lib/set/Set#values (; 100 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 20 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.tee $5 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + f32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end end - local.get $0 - call $~lib/rt/pure/__retain + local.get $2 ) - (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -8514,7 +7803,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 80 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 102 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -8575,17 +7864,12 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 81 ;) + (func $std/set/testNumeric (; 103 ;) (local $0 f32) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -8595,10 +7879,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8610,21 +7891,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8662,10 +7932,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8678,21 +7945,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8722,111 +7978,21 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $9 - local.get $1 - i32.load offset=16 - local.set $6 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 20 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $6 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $6 - i32.store offset=12 - loop $for-loop|05 - local.get $7 - local.get $6 - i32.lt_s - if - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.tee $8 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.tee $3 - i32.const 1 - i32.add - local.set $4 - local.get $8 - f32.load - local.set $0 - local.get $3 - local.get $2 - i32.load offset=12 - i32.ge_u - if - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.add - local.tee $8 - i32.const 2 - call $~lib/array/ensureSize - local.get $2 - local.get $8 - i32.store offset=12 - end - local.get $2 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $0 - f32.store - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $5 + local.get $3 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get - local.tee $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8836,28 +8002,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -8879,10 +8037,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8897,10 +8052,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8937,10 +8089,7 @@ if local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -8952,21 +8101,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -8981,10 +8119,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i32.reinterpret_f32 - call $~lib/util/hash/hash32 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -9025,41 +8160,17 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 82 ;) (result i32) + (func $~lib/set/Set#constructor (; 104 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 24 i32.const 21 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 i32.const 0 @@ -9083,7 +8194,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 83 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 105 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -9124,7 +8235,17 @@ end i32.const 0 ) - (func $~lib/set/Set#rehash (; 84 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#has (; 106 ;) (param $0 i32) (param $1 f64) (result i32) + local.get $0 + local.get $1 + local.get $1 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + call $~lib/set/Set#find + i32.const 0 + i32.ne + ) + (func $~lib/set/Set#rehash (; 107 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9216,14 +8337,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $2 @@ -9242,14 +8356,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -9262,25 +8369,11 @@ i32.load offset=20 i32.store offset=16 local.get $5 - i32.const 444 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 85 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 108 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9349,22 +8442,124 @@ i32.load local.get $3 local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $3 + i32.load + i32.store offset=8 + local.get $3 + local.get $2 + i32.store + end + local.get $0 + call $~lib/rt/pure/__retain + ) + (func $~lib/array/Array#__set (; 109 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 i32.add local.tee $3 - i32.load - i32.store offset=8 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 local.get $3 - local.get $2 - i32.store + i32.store offset=12 end local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/set/Set#values (; 110 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $0 + i32.load offset=8 + local.set $4 + local.get $0 + i32.load offset=16 + local.set $1 + i32.const 16 + i32.const 22 + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain + local.get $1 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $1 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $1 + i32.lt_s + if + local.get $4 + local.get $3 + i32.const 4 + i32.shl + i32.add + local.tee $5 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $6 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $6 + local.get $5 + f64.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|0 + end + end + local.get $2 ) - (func $~lib/array/Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 111 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -9385,7 +8580,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 87 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 112 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -9446,17 +8641,12 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 88 ;) + (func $std/set/testNumeric (; 113 ;) (local $0 f64) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -9466,10 +8656,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -9481,21 +8668,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9533,10 +8709,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9549,21 +8722,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9593,111 +8755,21 @@ unreachable end local.get $1 - i32.load offset=8 - local.set $9 - local.get $1 - i32.load offset=16 - local.set $6 - call $~lib/rt/tlsf/maybeInitialize - i32.const 16 - i32.const 22 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $6 - i32.store offset=12 - loop $for-loop|05 - local.get $7 - local.get $6 - i32.lt_s - if - local.get $9 - local.get $7 - i32.const 4 - i32.shl - i32.add - local.tee $8 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $4 - local.tee $3 - i32.const 1 - i32.add - local.set $4 - local.get $8 - f64.load - local.set $0 - local.get $3 - local.get $2 - i32.load offset=12 - i32.ge_u - if - local.get $3 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $3 - i32.const 1 - i32.add - local.tee $8 - i32.const 3 - call $~lib/array/ensureSize - local.get $2 - local.get $8 - i32.store offset=12 - end - local.get $2 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $0 - f64.store - end - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $for-loop|05 - end - end + call $~lib/set/Set#values + local.set $2 call $~lib/set/Set#constructor - local.set $3 + local.set $4 loop $for-loop|2 - local.get $5 + local.get $3 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get - local.tee $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9707,28 +8779,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 local.get $2 - local.get $5 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 + call $~lib/rt/pure/__release + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $for-loop|2 end end - local.get $3 + local.get $4 i32.load offset=20 local.get $1 i32.load offset=20 @@ -9750,10 +8814,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9768,10 +8829,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -9808,10 +8866,7 @@ if local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -9823,21 +8878,10 @@ local.get $1 local.get $0 call $~lib/set/Set#add - local.tee $4 - i32.const 444 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has i32.eqz if i32.const 0 @@ -9852,10 +8896,7 @@ call $~lib/set/Set#delete local.get $1 local.get $0 - local.get $0 - i64.reinterpret_f64 - call $~lib/util/hash/hash64 - call $~lib/set/Set#find + call $~lib/set/Set#has if i32.const 0 i32.const 304 @@ -9896,34 +8937,13 @@ unreachable end local.get $2 - i32.const 444 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 444 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $1 - i32.const 444 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 89 ;) + (func $~start (; 114 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -9935,10 +8955,9 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 90 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 115 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -9983,39 +9002,16 @@ local.tee $1 if local.get $1 - i32.const 444 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end br $__inlined_func$~lib/rt/__visit_members end local.get $1 i32.load - local.tee $3 - i32.const 444 - i32.ge_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit local.get $1 i32.load offset=8 - local.tee $1 - i32.const 444 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end local.get $2 i32.const -2147483648 @@ -10028,17 +9024,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 @@ -10062,4 +9050,16 @@ i32.store offset=4 end ) + (func $~lib/rt/pure/__visit (; 116 ;) (param $0 i32) + local.get $0 + i32.const 444 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) ) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index b16f11b7f6..deb88eaed6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -92,7 +92,52 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 + i32.const 16 + i32.sub + local.tee $2 + local.get $4 + i32.store + local.get $2 + i32.const 1 + i32.store offset=4 + local.get $2 + local.get $1 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + ) + (func $~lib/memory/memory.copy (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -265,13 +310,11 @@ end end ) - (func $~lib/rt/stub/__realloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__realloc (; 5 ;) (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.get $0 i32.const 15 i32.and @@ -291,10 +334,10 @@ local.get $0 i32.const 16 i32.sub - local.tee $4 + local.tee $3 i32.load - local.set $2 - local.get $4 + local.set $4 + local.get $3 i32.load offset=4 i32.const 1 i32.ne @@ -308,7 +351,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $2 + local.get $4 i32.add i32.eq local.set $5 @@ -317,9 +360,9 @@ i32.add i32.const -16 i32.and - local.set $3 + local.set $2 local.get $1 - local.get $2 + local.get $4 i32.gt_u if local.get $5 @@ -331,93 +374,54 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $4 local.get $3 + local.get $2 i32.store else - local.get $4 - i32.load offset=8 - local.set $6 - local.get $3 local.get $2 + local.get $4 i32.const 1 i32.shl - local.tee $2 - local.get $3 - local.get $2 - i32.gt_u - select - local.tee $5 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $5 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 + local.tee $4 local.get $2 - i32.const 16 + local.get $4 i32.gt_u select - local.tee $7 - i32.add - call $~lib/rt/stub/maybeGrowMemory local.get $3 - i32.const 16 - i32.sub + i32.load offset=8 + call $~lib/rt/stub/__alloc local.tee $2 - local.get $7 - i32.store - local.get $2 - i32.const 1 - i32.store offset=4 - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $5 - i32.store offset=12 - local.get $3 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 call $~lib/memory/memory.copy - local.get $3 + local.get $2 local.tee $0 i32.const 16 i32.sub - local.set $4 + local.set $3 end else local.get $5 if local.get $0 - local.get $3 + local.get $2 i32.add global.set $~lib/rt/stub/offset - local.get $4 local.get $3 + local.get $2 i32.store end end - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (; 5 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -628,7 +632,7 @@ end end ) - (func $~lib/array/ensureSize (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -684,7 +688,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result i64) local.get $0 i32.const 140 i32.load @@ -705,7 +709,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f32) local.get $0 i32.const 204 i32.load @@ -726,7 +730,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 10 ;) (param $0 i32) (result f64) local.get $0 i32.const 268 i32.load @@ -747,7 +751,7 @@ i32.add f64.load ) - (func $start:std/static-array (; 10 ;) + (func $start:std/static-array (; 11 ;) i32.const 76 i32.load i32.const 2 @@ -1009,7 +1013,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 12 ;) call $start:std/static-array ) ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index f84e286d0e..e3ea27b810 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -2,12 +2,12 @@ (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 $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result 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_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -30,14 +30,18 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/staticarray/StaticArray#__get (; 5 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 + (func $~lib/staticarray/StaticArray#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.const 2 i32.shr_u + ) + (func $~lib/staticarray/StaticArray#__get (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + call $~lib/staticarray/StaticArray#get:length i32.ge_u if i32.const 64 @@ -54,14 +58,10 @@ i32.add i32.load ) - (func $~lib/staticarray/StaticArray#__set (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/staticarray/StaticArray#__set (; 7 ;) (param $0 i32) (param $1 i32) i32.const 1 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_u + call $~lib/staticarray/StaticArray#get:length i32.ge_u if i32.const 64 @@ -77,7 +77,7 @@ local.get $1 i32.store ) - (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -243,7 +243,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -526,7 +526,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -640,7 +640,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -727,7 +727,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -858,7 +858,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -934,10 +996,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -985,65 +1046,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1093,7 +1098,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1266,13 +1279,10 @@ end end ) - (func $~lib/rt/__allocBuffer (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize + (func $~lib/rt/__allocBuffer (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 local.get $2 if @@ -1283,9 +1293,48 @@ end local.get $1 ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 432 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 432 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.const 464 i32.gt_u @@ -1293,48 +1342,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 432 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 432 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $start:std/staticarray (; 17 ;) + (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + local.get $0 + i32.const 464 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $start:std/staticarray (; 22 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1350,10 +1373,8 @@ call $~lib/builtins/abort unreachable end - i32.const 28 - i32.load - i32.const 2 - i32.shr_u + i32.const 32 + call $~lib/staticarray/StaticArray#get:length i32.const 3 i32.ne if @@ -1393,10 +1414,8 @@ call $~lib/builtins/abort unreachable end - i32.const 252 - i32.load - i32.const 2 - i32.shr_u + i32.const 256 + call $~lib/staticarray/StaticArray#get:length i32.const 3 i32.ne if @@ -1469,11 +1488,7 @@ unreachable end global.get $std/staticarray/arr3 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 2 - i32.shr_u + call $~lib/staticarray/StaticArray#get:length i32.const 3 i32.ne if @@ -1506,15 +1521,7 @@ call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain global.get $std/staticarray/arr3 - local.tee $0 - i32.const 464 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 1 @@ -1534,60 +1541,40 @@ i32.const 0 call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/rt/tlsf/maybeInitialize + local.tee $0 i32.const 0 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store - local.get $1 - call $~lib/rt/tlsf/maybeInitialize + local.get $0 i32.const 0 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $0 global.set $std/staticarray/arr4 i32.const 0 - local.set $1 + local.set $0 global.get $std/staticarray/arr3 - local.tee $0 + local.tee $1 if - local.get $0 - i32.const 464 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release end i32.const 0 global.set $std/staticarray/arr3 global.get $std/staticarray/arr4 - local.tee $0 + local.tee $1 if - local.get $0 - i32.const 464 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release end i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 18 ;) + (func $~start (; 23 ;) global.get $~started if return @@ -1597,7 +1584,7 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1644,14 +1631,7 @@ local.tee $1 if local.get $1 - i32.const 464 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end br $__inlined_func$~lib/rt/__visit_members end @@ -1661,25 +1641,18 @@ i32.sub i32.load offset=12 i32.add - local.set $4 + local.set $3 loop $while-continue|0 local.get $1 - local.get $4 + local.get $3 i32.lt_u if local.get $1 i32.load - local.tee $3 + local.tee $4 if - local.get $3 - i32.const 464 - i32.ge_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__visit end local.get $1 i32.const 4 @@ -1737,4 +1710,16 @@ i32.store offset=4 end ) + (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) + local.get $0 + i32.const 464 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) ) diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 66b2b13920..86aaa8ae44 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,7 +1,7 @@ (module + (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 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) @@ -297,9 +297,56 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 48 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 17376 i32.gt_u @@ -307,48 +354,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 48 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 48 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -514,7 +524,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -797,7 +807,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -911,7 +921,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -998,7 +1008,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1022,7 +1032,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1153,7 +1163,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1229,10 +1301,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1260,65 +1331,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1368,7 +1383,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/util/casemap/casemap (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/util/casemap/casemap (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1519,7 +1542,49 @@ i32.and i32.add ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1692,7 +1757,20 @@ end end ) - (func $~lib/rt/tlsf/reallocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1748,10 +1826,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -1789,69 +1867,22 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/rt/tlsf/__realloc (; 27 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - call $~lib/rt/tlsf/reallocateBlock + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 22 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 28 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1863,11 +1894,7 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $7 i32.eqz if @@ -1875,34 +1902,28 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $7 i32.const 3 i32.mul i32.const 1 i32.shl - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 - i32.const 204 - i32.load - i32.const 1 - i32.shr_u + i32.const 208 + call $~lib/string/String#get:length local.set $9 loop $for-loop|0 local.get $6 local.get $7 i32.lt_u if - local.get $0 local.get $6 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u - local.tee $3 + local.tee $1 i32.const 7 i32.shr_u if @@ -1913,17 +1934,17 @@ i32.sub i32.lt_u i32.const 0 - local.get $3 + local.get $1 i32.const 55295 i32.sub i32.const 1025 i32.lt_u select if - local.get $0 local.get $6 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u offset=2 local.tee $4 @@ -1939,8 +1960,8 @@ local.get $4 i32.const 1023 i32.and - local.get $3 - local.tee $1 + local.get $1 + local.tee $3 i32.const 1023 i32.and i32.const 10 @@ -1948,19 +1969,19 @@ i32.or i32.const 65536 i32.add - local.tee $3 + local.tee $1 i32.const 131072 i32.ge_u if - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add - local.get $1 local.get $4 i32.const 16 i32.shl + local.get $3 i32.or i32.store local.get $2 @@ -1971,25 +1992,25 @@ end end end - local.get $3 + local.get $1 i32.const 9424 i32.sub i32.const 25 i32.le_u if - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add - local.get $3 + local.get $1 i32.const 26 i32.sub i32.store16 else i32.const -1 - local.set $1 - local.get $3 + local.set $3 + local.get $1 i32.const 223 i32.sub i32.const 64056 @@ -1997,15 +2018,15 @@ if block $~lib/util/casemap/bsearch|inlined.0 (result i32) local.get $9 - local.set $1 + local.set $3 i32.const 0 local.set $8 loop $while-continue|1 local.get $8 - local.get $1 + local.get $3 i32.le_s if - local.get $1 + local.get $3 local.get $8 i32.add i32.const 3 @@ -2018,7 +2039,7 @@ i32.const 208 i32.add i32.load16_u - local.get $3 + local.get $1 i32.sub local.tee $10 if @@ -2034,7 +2055,7 @@ local.get $4 i32.const 4 i32.sub - local.set $1 + local.set $3 end else local.get $4 @@ -2045,42 +2066,44 @@ end i32.const -1 end - local.set $1 + local.set $3 end - local.get $1 + local.get $3 i32.const -1 i32.xor if - local.get $1 + local.get $3 i32.const 1 i32.shl i32.const 208 i32.add - local.tee $3 + local.tee $1 + i32.load offset=2 + local.set $3 + local.get $1 i32.load16_u offset=6 local.set $1 - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add local.tee $4 local.get $3 - i32.load offset=2 i32.store local.get $4 local.get $1 i32.store16 offset=4 - local.get $2 local.get $1 i32.const 0 i32.ne i32.const 1 i32.add + local.get $2 i32.add local.set $2 else - local.get $3 + local.get $1 i32.const 1 call $~lib/util/casemap/casemap i32.const 2097151 @@ -2089,18 +2112,18 @@ i32.const 65536 i32.lt_s if - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add local.get $1 i32.store16 else - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add local.get $1 i32.const 65536 @@ -2128,13 +2151,12 @@ end end else - local.get $5 local.get $2 i32.const 1 i32.shl + local.get $5 i32.add - local.get $3 - local.get $3 + local.get $1 i32.const 97 i32.sub i32.const 26 @@ -2145,6 +2167,7 @@ i32.shl i32.const -1 i32.xor + local.get $1 i32.and i32.store16 end @@ -2166,7 +2189,18 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/pure/__release (; 29 ;) (param $0 i32) + local.get $0 + i32.const 17376 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/util/string/compareImpl (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2242,7 +2276,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 31 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2261,18 +2295,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -2284,7 +2310,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 32 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2309,7 +2335,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 33 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2320,12 +2346,9 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $7 i32.eqz if @@ -2333,22 +2356,18 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $7 i32.const 2 i32.shl - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.set $5 + call $~lib/rt/tlsf/__alloc + local.set $4 loop $for-loop|0 - local.get $6 + local.get $5 local.get $7 i32.lt_u if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add @@ -2358,7 +2377,7 @@ i32.shr_u if block $for-continue|0 - local.get $6 + local.get $5 local.get $7 i32.const 1 i32.sub @@ -2372,26 +2391,26 @@ select if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $3 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 - local.get $4 + local.set $5 + local.get $3 i32.const 1023 i32.and local.get $1 - local.tee $3 + local.tee $8 i32.const 1023 i32.and i32.const 10 @@ -2403,13 +2422,13 @@ i32.const 131072 i32.ge_u if - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl i32.add + local.get $8 local.get $3 - local.get $4 i32.const 16 i32.shl i32.or @@ -2426,7 +2445,7 @@ i32.const 304 i32.eq if - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2442,7 +2461,7 @@ i32.const 931 i32.eq if - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2452,35 +2471,39 @@ i32.gt_u if (result i32) block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - i32.const 0 + local.get $0 local.set $8 i32.const 0 - local.get $6 + local.set $9 + i32.const 0 + local.get $5 local.tee $3 local.tee $1 i32.const 30 i32.sub - local.tee $4 + local.tee $6 i32.const 0 - local.get $4 + local.get $6 i32.gt_s select - local.set $9 + local.set $11 loop $while-continue|1 local.get $1 - local.get $9 + local.get $11 i32.gt_s if - block $~lib/util/string/codePointBefore|inlined.0 (result i32) - i32.const -1 + block $~lib/util/string/codePointBefore|inlined.0 local.get $1 - local.tee $4 + local.tee $6 i32.const 0 i32.le_s - br_if $~lib/util/string/codePointBefore|inlined.0 - drop - local.get $0 - local.get $4 + if + i32.const -1 + local.set $1 + br $~lib/util/string/codePointBefore|inlined.0 + end + local.get $8 + local.get $6 i32.const 1 i32.sub i32.const 1 @@ -2492,15 +2515,15 @@ i32.and i32.const 56320 i32.eq - local.get $4 + local.get $6 i32.const 2 i32.sub i32.const 0 i32.ge_s i32.and if - local.get $0 - local.get $4 + local.get $8 + local.get $6 i32.const 2 i32.sub i32.const 1 @@ -2524,31 +2547,34 @@ i32.add i32.const 65536 i32.add + local.set $1 br $~lib/util/string/codePointBefore|inlined.0 end end - i32.const 65533 - local.get $1 local.get $1 i32.const 63488 i32.and i32.const 55296 i32.eq - select + if + i32.const 65533 + local.set $1 + end end - local.tee $1 + local.get $1 + local.set $10 + local.get $1 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $1 + local.get $10 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if - i32.const 0 local.get $1 i32.const 127370 i32.lt_u @@ -2559,13 +2585,15 @@ else i32.const 0 end - i32.eqz - br_if $~lib/util/string/isFinalSigma|inlined.0 - drop - i32.const 1 - local.set $8 + if (result i32) + i32.const 1 + else + i32.const 0 + br $~lib/util/string/isFinalSigma|inlined.0 + end + local.set $9 end - local.get $4 + local.get $6 local.get $1 i32.const 65536 i32.ge_s @@ -2577,7 +2605,7 @@ end end i32.const 0 - local.get $8 + local.get $9 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop @@ -2593,13 +2621,13 @@ local.get $7 i32.lt_s select - local.set $8 + local.set $9 loop $while-continue|2 local.get $1 - local.get $8 + local.get $9 i32.lt_s if - local.get $0 + local.get $8 local.get $1 i32.const 1 i32.shl @@ -2617,22 +2645,22 @@ i32.ne i32.and if - local.get $0 + local.get $8 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $6 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $4 local.get $3 i32.const 10 i32.shl + local.get $6 i32.add i32.const -56613888 i32.add @@ -2693,7 +2721,7 @@ i32.const 25 i32.le_u if - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2712,7 +2740,7 @@ i32.const 65536 i32.lt_s if - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2720,7 +2748,7 @@ local.get $1 i32.store16 else - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2752,7 +2780,7 @@ end end else - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl @@ -2770,10 +2798,10 @@ i32.or i32.store16 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 local.get $2 i32.const 1 i32.add @@ -2781,14 +2809,14 @@ br $for-loop|0 end end - local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 27 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2802,17 +2830,13 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 i32.gt_s local.tee $2 i32.shl - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 local.get $2 if @@ -2842,19 +2866,13 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 35 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 - local.set $3 local.get $1 - local.get $2 + local.get $0 + call $~lib/string/String#get:length + local.tee $3 i32.ge_u if i32.const -1 @@ -2899,15 +2917,15 @@ local.get $2 return end - local.get $0 local.get $2 i32.const 10 i32.shl + local.get $0 i32.add i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 29 ;) + (func $start:std/string-casemapping (; 36 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -2915,8 +2933,8 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $7 i64) + (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) @@ -4154,10 +4172,10 @@ if local.get $0 call $~lib/string/String.fromCodePoint - local.tee $7 + local.tee $8 call $~lib/string/String#toLowerCase local.set $5 - local.get $7 + local.get $8 call $~lib/string/String#toUpperCase local.set $6 local.get $5 @@ -4274,12 +4292,12 @@ i32.const 1 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $8 + local.tee $7 i64.const 0 i64.ge_u if local.get $3 - local.get $8 + local.get $7 i64.const 16 i64.shl i64.add @@ -4289,12 +4307,12 @@ i32.const 2 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.tee $8 + local.tee $7 i64.const 0 i64.ge_u if local.get $3 - local.get $8 + local.get $7 i64.const 32 i64.shl i64.add @@ -4354,33 +4372,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - i32.const 17376 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $8 + call $~lib/rt/pure/__release local.get $5 - i32.const 17376 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 17376 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 1 i32.add @@ -4389,781 +4386,179 @@ end end local.get $9 - i32.const 17376 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $10 - i32.const 17376 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $11 - i32.const 17376 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $12 - i32.const 17376 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $13 - i32.const 17376 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $14 - i32.const 17376 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $15 - i32.const 17376 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $16 - i32.const 17376 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $17 - i32.const 17376 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $18 - i32.const 17376 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $19 - i32.const 17376 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $20 - i32.const 17376 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $21 - i32.const 17376 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $22 - i32.const 17376 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $23 - i32.const 17376 - i32.gt_u - if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $24 - i32.const 17376 - i32.gt_u - if - local.get $24 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $25 - i32.const 17376 - i32.gt_u - if - local.get $25 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $26 - i32.const 17376 - i32.gt_u - if - local.get $26 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $27 - i32.const 17376 - i32.gt_u - if - local.get $27 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $28 - i32.const 17376 - i32.gt_u - if - local.get $28 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $29 - i32.const 17376 - i32.gt_u - if - local.get $29 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $30 - i32.const 17376 - i32.gt_u - if - local.get $30 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $31 - i32.const 17376 - i32.gt_u - if - local.get $31 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $32 - i32.const 17376 - i32.gt_u - if - local.get $32 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $33 - i32.const 17376 - i32.gt_u - if - local.get $33 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $34 - i32.const 17376 - i32.gt_u - if - local.get $34 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $35 - i32.const 17376 - i32.gt_u - if - local.get $35 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $36 - i32.const 17376 - i32.gt_u - if - local.get $36 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $37 - i32.const 17376 - i32.gt_u - if - local.get $37 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $38 - i32.const 17376 - i32.gt_u - if - local.get $38 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $39 - i32.const 17376 - i32.gt_u - if - local.get $39 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $40 - i32.const 17376 - i32.gt_u - if - local.get $40 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $41 - i32.const 17376 - i32.gt_u - if - local.get $41 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $42 - i32.const 17376 - i32.gt_u - if - local.get $42 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $43 - i32.const 17376 - i32.gt_u - if - local.get $43 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $44 - i32.const 17376 - i32.gt_u - if - local.get $44 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $45 - i32.const 17376 - i32.gt_u - if - local.get $45 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $46 - i32.const 17376 - i32.gt_u - if - local.get $46 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $47 - i32.const 17376 - i32.gt_u - if - local.get $47 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $48 - i32.const 17376 - i32.gt_u - if - local.get $48 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $49 - i32.const 17376 - i32.gt_u - if - local.get $49 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $50 - i32.const 17376 - i32.gt_u - if - local.get $50 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $51 - i32.const 17376 - i32.gt_u - if - local.get $51 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $52 - i32.const 17376 - i32.gt_u - if - local.get $52 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $53 - i32.const 17376 - i32.gt_u - if - local.get $53 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $54 - i32.const 17376 - i32.gt_u - if - local.get $54 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $55 - i32.const 17376 - i32.gt_u - if - local.get $55 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $56 - i32.const 17376 - i32.gt_u - if - local.get $56 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $57 - i32.const 17376 - i32.gt_u - if - local.get $57 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $58 - i32.const 17376 - i32.gt_u - if - local.get $58 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $59 - i32.const 17376 - i32.gt_u - if - local.get $59 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release + local.get $58 + call $~lib/rt/pure/__release + local.get $59 + call $~lib/rt/pure/__release local.get $60 - i32.const 17376 - i32.gt_u - if - local.get $60 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $61 - i32.const 17376 - i32.gt_u - if - local.get $61 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $62 - i32.const 17376 - i32.gt_u - if - local.get $62 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $63 - i32.const 17376 - i32.gt_u - if - local.get $63 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $64 - i32.const 17376 - i32.gt_u - if - local.get $64 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $65 - i32.const 17376 - i32.gt_u - if - local.get $65 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $66 - i32.const 17376 - i32.gt_u - if - local.get $66 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $67 - i32.const 17376 - i32.gt_u - if - local.get $67 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $68 - i32.const 17376 - i32.gt_u - if - local.get $68 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $69 - i32.const 17376 - i32.gt_u - if - local.get $69 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $70 - i32.const 17376 - i32.gt_u - if - local.get $70 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $71 - i32.const 17376 - i32.gt_u - if - local.get $71 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $72 - i32.const 17376 - i32.gt_u - if - local.get $72 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $73 - i32.const 17376 - i32.gt_u - if - local.get $73 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $74 - i32.const 17376 - i32.gt_u - if - local.get $74 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $75 - i32.const 17376 - i32.gt_u - if - local.get $75 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $76 - i32.const 17376 - i32.gt_u - if - local.get $76 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $77 - i32.const 17376 - i32.gt_u - if - local.get $77 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $78 - i32.const 17376 - i32.gt_u - if - local.get $78 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $79 - i32.const 17376 - i32.gt_u - if - local.get $79 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $80 - i32.const 17376 - i32.gt_u - if - local.get $80 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $81 - i32.const 17376 - i32.gt_u - if - local.get $81 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $82 - i32.const 17376 - i32.gt_u - if - local.get $82 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $83 - i32.const 17376 - i32.gt_u - if - local.get $83 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $84 - i32.const 17376 - i32.gt_u - if - local.get $84 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $85 - i32.const 17376 - i32.gt_u - if - local.get $85 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $86 - i32.const 17376 - i32.gt_u - if - local.get $86 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $87 - i32.const 17376 - i32.gt_u - if - local.get $87 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $88 - i32.const 17376 - i32.gt_u - if - local.get $88 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $89 - i32.const 17376 - i32.gt_u - if - local.get $89 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $90 - i32.const 17376 - i32.gt_u - if - local.get $90 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $91 - i32.const 17376 - i32.gt_u - if - local.get $91 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $92 - i32.const 17376 - i32.gt_u - if - local.get $92 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $93 - i32.const 17376 - i32.gt_u - if - local.get $93 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $94 - i32.const 17376 - i32.gt_u - if - local.get $94 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~start (; 30 ;) + (func $~start (; 37 ;) global.get $~started if return @@ -5173,7 +4568,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 31 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5241,17 +4636,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index abf0466322..fd939998b9 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -2,10 +2,10 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param 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 $i32_i32_=>_none (func (param i32 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 (func (param i32) (result 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))) @@ -35,9 +35,48 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 64 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 21052 i32.gt_u @@ -45,48 +84,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + local.get $0 + i32.const 21052 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -252,7 +265,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -535,7 +548,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -649,7 +662,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -736,7 +749,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -760,7 +773,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -891,7 +904,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -967,10 +1042,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -998,65 +1072,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1106,7 +1124,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1279,20 +1305,16 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 16 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 20 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 + local.tee $1 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -1300,7 +1322,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 17 ;) + (func $std/string-encoding/testUTF16Encode (; 21 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1461,26 +1483,16 @@ unreachable end local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const -2 i32.and local.tee $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -1488,7 +1500,23 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/compareImpl (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF16.decode (; 23 ;) (param $0 i32) (result i32) + local.get $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + call $~lib/string/String.UTF16.decodeUnsafe + ) + (func $~lib/string/String#get:length (; 24 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1564,7 +1592,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1583,18 +1611,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -1606,7 +1626,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 21 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 27 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1617,15 +1637,14 @@ (local $7 i32) i32.const 32 call $~lib/string/String.UTF16.encode - local.set $2 + local.set $0 i32.const 28 i32.load local.set $1 - local.get $2 - local.tee $0 + local.get $0 i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $3 + local.tee $2 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1640,7 +1659,7 @@ local.get $0 local.get $1 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $1 + local.tee $3 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -1723,7 +1742,7 @@ i32.add i32.const 0 call $~lib/string/String.UTF16.decodeUnsafe - local.tee $0 + local.tee $1 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -1735,80 +1754,24 @@ call $~lib/builtins/abort unreachable end + local.get $2 + call $~lib/rt/pure/__release local.get $3 - i32.const 21052 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 21052 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 21052 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 21052 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 21052 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 21052 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF8.byteLength (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1899,7 +1862,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 29 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1913,25 +1876,23 @@ i32.sub i32.load offset=12 i32.add - local.set $5 + local.set $6 local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength local.tee $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $6 + call $~lib/rt/tlsf/__alloc + local.set $4 + local.get $0 + local.get $4 i32.add local.get $1 i32.const 0 i32.ne i32.sub local.set $7 - local.get $6 + local.get $4 local.set $0 loop $while-continue|0 local.get $0 @@ -1977,7 +1938,7 @@ local.get $3 i32.const 2 i32.add - local.get $5 + local.get $6 i32.lt_u i32.const 0 local.get $2 @@ -1989,7 +1950,7 @@ if local.get $3 i32.load16_u offset=2 - local.tee $4 + local.tee $5 i32.const 64512 i32.and i32.const 56320 @@ -2002,7 +1963,7 @@ i32.shl i32.const 65536 i32.add - local.get $4 + local.get $5 i32.const 1023 i32.and i32.or @@ -2011,14 +1972,14 @@ i32.and i32.const 128 i32.or - local.set $4 + local.set $5 local.get $0 local.get $2 i32.const 18 i32.shr_u i32.const 240 i32.or - local.get $4 + local.get $5 i32.const 24 i32.shl local.get $2 @@ -2092,7 +2053,7 @@ end end local.get $3 - local.get $5 + local.get $6 i32.gt_u if i32.const 0 @@ -2108,10 +2069,10 @@ i32.const 0 i32.store8 end - local.get $6 + local.get $4 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 24 ;) + (func $std/string-encoding/testUTF8Encode (; 30 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2253,16 +2214,9 @@ unreachable end local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 25 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 31 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2414,16 +2368,64 @@ unreachable end local.get $1 - i32.const 21052 - i32.gt_u - if + call $~lib/rt/pure/__release + ) + (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 end + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 ) - (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2479,10 +2481,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -2520,21 +2522,13 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2554,15 +2548,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $5 + call $~lib/rt/tlsf/__alloc + local.tee $6 local.set $1 loop $while-continue|0 local.get $0 @@ -2589,7 +2580,7 @@ i32.load8_u i32.const 63 i32.and - local.set $6 + local.set $5 local.get $0 i32.const 1 i32.add @@ -2601,7 +2592,7 @@ i32.eq if local.get $1 - local.get $6 + local.get $5 local.get $3 i32.const 31 i32.and @@ -2635,7 +2626,7 @@ i32.and i32.const 12 i32.shl - local.get $6 + local.get $5 i32.const 6 i32.shl i32.or @@ -2655,7 +2646,7 @@ i32.and i32.const 18 i32.shl - local.get $6 + local.get $5 i32.const 12 i32.shl i32.or @@ -2720,57 +2711,27 @@ end end end - local.get $1 - local.get $5 - i32.sub - local.set $2 call $~lib/rt/tlsf/maybeInitialize - local.get $5 - i32.const 16 + local.get $6 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + local.get $6 i32.sub - local.set $0 - local.get $5 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $5 - select - if (result i32) - local.get $0 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $0 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 28 ;) + (func $~lib/string/String.UTF8.decode (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.get $1 + call $~lib/string/String.UTF8.decodeUnsafe + ) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2781,13 +2742,9 @@ i32.const 1 call $~lib/string/String.UTF8.encode local.tee $1 - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + call $~lib/string/String.UTF8.decode + local.tee $2 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -2843,13 +2800,9 @@ unreachable end local.get $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 i32.const 1 - call $~lib/string/String.UTF8.decodeUnsafe - local.tee $4 + call $~lib/string/String.UTF8.decode + local.tee $3 i32.const 512 call $~lib/string/String.__eq i32.eqz @@ -2864,13 +2817,9 @@ i32.const 480 i32.const 0 call $~lib/string/String.UTF8.encode - local.tee $2 - local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 + local.tee $4 i32.const 1 - call $~lib/string/String.UTF8.decodeUnsafe + call $~lib/string/String.UTF8.decode local.tee $5 i32.const 512 call $~lib/string/String.__eq @@ -2883,62 +2832,20 @@ call $~lib/builtins/abort unreachable end + local.get $2 + call $~lib/rt/pure/__release local.get $3 - i32.const 21052 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 21052 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 21052 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 21052 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 29 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 38 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2952,16 +2859,17 @@ i32.const 32 i32.const 1 call $~lib/string/String.UTF8.encode - local.set $0 + local.set $2 i32.const 32 i32.const 0 call $~lib/string/String.UTF8.byteLength local.set $1 - local.get $0 + local.get $2 + local.tee $0 i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $2 + local.tee $3 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -2977,7 +2885,7 @@ local.get $1 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 + local.tee $4 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -2993,7 +2901,7 @@ i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + local.tee $5 i32.const 304 call $~lib/string/String.__eq i32.eqz @@ -3011,7 +2919,7 @@ i32.const 2 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $4 + local.tee $6 i32.const 368 call $~lib/string/String.__eq i32.eqz @@ -3029,7 +2937,7 @@ i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $5 + local.tee $7 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -3047,7 +2955,7 @@ i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $6 + local.tee $8 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -3065,7 +2973,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $7 + local.tee $9 i32.const 544 call $~lib/string/String.__eq i32.eqz @@ -3083,7 +2991,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $8 + local.tee $1 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -3101,7 +3009,7 @@ i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $9 + local.tee $0 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -3113,98 +3021,28 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 21052 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $3 - i32.const 21052 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 21052 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 21052 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 21052 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 21052 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $8 - i32.const 21052 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $9 - i32.const 21052 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/string-encoding/testLarge (; 30 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 39 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3213,13 +3051,9 @@ i32.const 0 call $~lib/string/String.UTF8.encode local.tee $1 - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 i32.const 0 - call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + call $~lib/string/String.UTF8.decode + local.tee $2 local.get $0 call $~lib/string/String.__eq i32.eqz @@ -3233,12 +3067,8 @@ end local.get $0 call $~lib/string/String.UTF16.encode - local.tee $2 - local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - call $~lib/string/String.UTF16.decodeUnsafe + local.tee $3 + call $~lib/string/String.UTF16.decode local.tee $4 local.get $0 call $~lib/string/String.__eq @@ -3251,44 +3081,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 21052 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release local.get $4 - i32.const 21052 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 21052 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) - (func $start:std/string-encoding (; 31 ;) + (func $start:std/string-encoding (; 40 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3307,11 +3109,7 @@ i32.const 32 call $~lib/string/String.UTF16.encode local.tee $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - call $~lib/string/String.UTF16.decodeUnsafe + call $~lib/string/String.UTF16.decode local.tee $1 i32.const 32 call $~lib/string/String.__eq @@ -3325,23 +3123,9 @@ unreachable end local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $std/string-encoding/testUTF16DecodeUnsafe i32.const 32 i32.const 0 @@ -3375,12 +3159,8 @@ i32.const 0 call $~lib/string/String.UTF8.encode local.tee $0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 i32.const 0 - call $~lib/string/String.UTF8.decodeUnsafe + call $~lib/string/String.UTF8.decode local.tee $1 i32.const 32 call $~lib/string/String.__eq @@ -3394,23 +3174,9 @@ unreachable end local.get $1 - i32.const 21052 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 21052 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $std/string-encoding/testUTF8DecodeNullTerminated call $std/string-encoding/testUTF8DecodeUnsafe i32.const 576 @@ -3418,10 +3184,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 32 ;) + (func $~start (; 41 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 42 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -3489,17 +3255,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index ad9807f0d6..4ac075b3f8 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -386,9 +386,48 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) - (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 17000 i32.gt_u @@ -396,48 +435,30 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment + end + local.get $0 + ) + (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + local.get $0 + i32.const 17000 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end + ) + (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 local.get $1 @@ -517,7 +538,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -536,18 +557,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -560,7 +573,17 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/string/String.__not (; 12 ;) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + call $~lib/string/String#get:length + i32.eqz + else + i32.const 1 + end + ) + (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -726,7 +749,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1009,7 +1032,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -1123,7 +1146,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1210,7 +1233,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1234,7 +1257,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1365,7 +1388,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 19 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1441,10 +1526,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1472,65 +1556,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1580,10 +1608,17 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/string/String.fromCharCode (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/string/String.fromCharCode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $1 i32.const 0 @@ -1591,9 +1626,7 @@ local.tee $3 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.store16 @@ -1606,7 +1639,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 18 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 24 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1625,11 +1658,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 19 ;) (param $0 i32) + (func $~setArgumentsLength (; 25 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 20 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1643,7 +1676,6 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 2 local.get $0 i32.const 65535 @@ -1651,9 +1683,7 @@ local.tee $2 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 local.get $2 if @@ -1683,7 +1713,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 21 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 27 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1694,72 +1724,46 @@ if i32.const 640 local.set $2 + i32.const 608 + call $~lib/rt/pure/__release i32.const 640 local.set $1 end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 - local.set $3 - local.get $2 i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 + call $~lib/string/String#get:length + local.tee $3 i32.const 0 - local.get $2 + local.get $3 i32.lt_s select local.tee $4 + local.get $1 + call $~lib/string/String#get:length + local.tee $2 i32.add - local.get $2 + local.get $3 i32.gt_s if local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 return end local.get $0 local.get $4 local.get $1 - local.get $3 + local.get $2 call $~lib/util/string/compareImpl i32.eqz local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/string/String#indexOf (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $4 i32.eqz if @@ -1767,11 +1771,7 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 i32.eqz if @@ -1819,7 +1819,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1992,7 +1992,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2017,38 +2017,32 @@ end end ) - (func $~lib/string/String#padStart (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 31 ;) (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 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + (local $7 i32) + local.get $0 + call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $3 - local.get $1 + local.set $5 + local.get $2 + call $~lib/string/String#get:length i32.const 1 i32.shl - local.tee $4 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.set $4 + local.get $1 i32.const 1 i32.shl - local.tee $5 + local.tee $3 + local.get $5 i32.lt_u if (result i32) i32.const 1 else - local.get $3 + local.get $4 i32.eqz end if @@ -2056,49 +2050,47 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $3 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - local.get $4 + local.get $3 local.get $5 i32.sub - local.tee $4 - local.get $3 + local.tee $3 + local.get $4 i32.gt_u if - local.get $1 - local.get $2 - local.get $3 local.get $4 + local.get $3 i32.const 2 i32.sub - local.get $3 + local.get $4 i32.div_u - local.tee $6 - call $~lib/memory/memory.repeat - local.get $3 - local.get $6 + local.tee $7 i32.mul - local.tee $3 + local.set $6 local.get $1 - i32.add local.get $2 local.get $4 + local.get $7 + call $~lib/memory/memory.repeat + local.get $1 + local.get $6 + i32.add + local.get $2 local.get $3 + local.get $6 i32.sub call $~lib/memory/memory.copy else local.get $1 local.get $2 - local.get $4 + local.get $3 call $~lib/memory/memory.copy end local.get $1 - local.get $4 + local.get $3 i32.add local.get $0 local.get $5 @@ -2106,37 +2098,31 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + (local $6 i32) + local.get $0 + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 - local.get $1 + local.get $2 + call $~lib/string/String#get:length i32.const 1 i32.shl - local.tee $4 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.set $4 + local.get $1 i32.const 1 i32.shl - local.tee $1 + local.tee $5 + local.get $3 i32.lt_u if (result i32) i32.const 1 else - local.get $3 + local.get $4 i32.eqz end if @@ -2144,88 +2130,71 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize - local.get $4 + local.get $5 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $5 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 - local.get $1 + local.get $3 call $~lib/memory/memory.copy - local.get $4 - local.get $1 + local.get $5 + local.get $3 i32.sub local.tee $0 - local.get $3 + local.get $4 i32.gt_u if - local.get $1 - local.get $5 - i32.add - local.tee $1 - local.get $2 - local.get $3 + local.get $4 local.get $0 i32.const 2 i32.sub - local.get $3 - i32.div_u - local.tee $4 - call $~lib/memory/memory.repeat - local.get $3 local.get $4 + i32.div_u + local.tee $6 i32.mul - local.tee $3 + local.set $5 local.get $1 + local.get $3 i32.add + local.tee $3 local.get $2 - local.get $0 + local.get $4 + local.get $6 + call $~lib/memory/memory.repeat local.get $3 + local.get $5 + i32.add + local.get $2 + local.get $0 + local.get $5 i32.sub call $~lib/memory/memory.copy else local.get $1 - local.get $5 + local.get $3 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 ) - (func $~lib/string/String#lastIndexOf (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $4 i32.eqz if local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 - local.set $5 - local.get $3 i32.eqz if i32.const -1 @@ -2238,7 +2207,7 @@ i32.gt_s select local.tee $2 - local.get $5 + local.get $3 local.get $4 i32.sub local.tee $3 @@ -2271,7 +2240,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 34 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2281,20 +2250,12 @@ i32.const 0 return end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 + local.get $1 + call $~lib/string/String#get:length + local.tee $2 i32.ne if i32.const 1 @@ -2317,7 +2278,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 29 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 35 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2381,16 +2342,12 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 30 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $2 @@ -2431,12 +2388,9 @@ i32.const 272 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -2446,15 +2400,11 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 31 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $2 @@ -2494,12 +2444,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -2507,19 +2454,13 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 32 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 38 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $1 - local.set $3 - local.get $1 + call $~lib/string/String#get:length + local.tee $3 i32.const 1 i32.shl local.set $1 @@ -2588,12 +2529,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $2 @@ -2603,18 +2541,14 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 33 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 39 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) (local $5 f64) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.eqz if @@ -2646,7 +2580,7 @@ local.get $1 i32.const 45 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -2663,11 +2597,12 @@ i32.add local.tee $0 i32.load16_u + local.set $1 else local.get $1 i32.const 43 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -2682,11 +2617,9 @@ i32.add local.tee $0 i32.load16_u - else - local.get $1 + local.set $1 end end - local.set $1 local.get $2 i32.const 2 i32.gt_s @@ -2825,7 +2758,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 34 ;) (result i32) + (func $~lib/util/string/strtol (; 40 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2834,10 +2767,8 @@ (local $5 i32) i32.const 1904 local.set $1 - i32.const 1900 - i32.load - i32.const 1 - i32.shr_u + i32.const 1904 + call $~lib/string/String#get:length local.tee $2 i32.eqz if @@ -2869,7 +2800,7 @@ local.get $0 i32.const 45 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -2886,11 +2817,12 @@ i32.add local.tee $1 i32.load16_u + local.set $0 else local.get $0 i32.const 43 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -2905,11 +2837,9 @@ i32.add local.tee $1 i32.load16_u - else - local.get $0 + local.set $0 end end - local.set $0 local.get $2 i32.const 2 i32.gt_s @@ -3046,7 +2976,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 35 ;) (result i64) + (func $~lib/util/string/strtol (; 41 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3055,10 +2985,8 @@ (local $5 i64) i32.const 1952 local.set $1 - i32.const 1948 - i32.load - i32.const 1 - i32.shr_u + i32.const 1952 + call $~lib/string/String#get:length local.tee $2 i32.eqz if @@ -3090,7 +3018,7 @@ local.get $0 i32.const 45 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -3107,11 +3035,12 @@ i32.add local.tee $1 i32.load16_u + local.set $0 else local.get $0 i32.const 43 i32.eq - if (result i32) + if local.get $2 i32.const 1 i32.sub @@ -3126,11 +3055,9 @@ i32.add local.tee $1 i32.load16_u - else - local.get $0 + local.set $0 end end - local.set $0 local.get $2 i32.const 2 i32.gt_s @@ -3269,7 +3196,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 36 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 42 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3303,7 +3230,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 37 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 43 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3380,7 +3307,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 38 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 44 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -3390,29 +3317,25 @@ (local $7 i64) (local $8 i64) (local $9 f64) - (local $10 f64) - (local $11 i32) - (local $12 i64) + (local $10 i64) + (local $11 f64) + (local $12 i32) (local $13 i64) block $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $1 i32.eqz br_if $folding-inner0 local.get $0 i32.load16_u - local.set $3 + local.set $6 f64.const 1 - local.set $10 + local.set $11 loop $while-continue|0 local.get $1 if (result i32) - local.get $3 + local.get $6 call $~lib/util/string/isSpace else i32.const 0 @@ -3423,7 +3346,7 @@ i32.add local.tee $0 i32.load16_u - local.set $3 + local.set $6 local.get $1 i32.const 1 i32.sub @@ -3434,10 +3357,10 @@ local.get $1 i32.eqz br_if $folding-inner0 - local.get $3 + local.get $6 i32.const 45 i32.eq - if + if (result i32) local.get $1 i32.const 1 i32.sub @@ -3445,18 +3368,17 @@ i32.eqz br_if $folding-inner0 f64.const -1 - local.set $10 + local.set $11 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u - local.set $3 else - local.get $3 + local.get $6 i32.const 43 i32.eq - if + if (result i32) local.get $1 i32.const 1 i32.sub @@ -3468,10 +3390,11 @@ i32.add local.tee $0 i32.load16_u - local.set $3 + else + local.get $6 end end - local.get $3 + local.tee $6 i32.const 73 i32.eq i32.const 0 @@ -3494,27 +3417,27 @@ end if f64.const inf - local.get $10 + local.get $11 f64.copysign return end br $folding-inner0 end - local.get $3 + local.get $6 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $3 + local.get $6 i32.const 46 i32.ne select br_if $folding-inner0 local.get $0 - local.set $4 + local.set $3 loop $while-continue|1 - local.get $3 + local.get $6 i32.const 48 i32.eq if @@ -3523,7 +3446,7 @@ i32.add local.tee $0 i32.load16_u - local.set $3 + local.set $6 local.get $1 i32.const 1 i32.sub @@ -3538,15 +3461,15 @@ f64.const 0 return end - local.get $3 + local.get $6 i32.const 46 i32.eq if - local.get $4 + local.get $3 local.get $0 i32.sub i32.eqz - local.set $4 + local.set $3 local.get $0 i32.const 2 i32.add @@ -3558,15 +3481,15 @@ if (result i32) i32.const 0 else - local.get $4 + local.get $3 end br_if $folding-inner0 i32.const 1 - local.set $11 + local.set $12 loop $for-loop|2 local.get $0 i32.load16_u - local.tee $3 + local.tee $6 i32.const 48 i32.eq if @@ -3592,68 +3515,70 @@ f64.const 0 return end - local.get $3 + local.get $5 + if + i32.const 0 + local.set $3 + end + local.get $6 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - i32.const 0 - local.get $4 - local.get $5 - select + local.get $3 select br_if $folding-inner0 end - local.get $3 + local.get $6 i32.const 48 i32.sub - local.set $4 + local.set $3 loop $for-loop|3 i32.const 1 - local.get $11 + local.get $12 i32.eqz i32.const 0 - local.get $3 + local.get $6 i32.const 46 i32.eq select - local.get $4 + local.get $3 i32.const 10 i32.lt_u select if block $for-break3 - local.get $4 + local.get $3 i32.const 10 i32.lt_u if - local.get $4 + local.get $3 i64.extend_i32_u local.get $2 i64.const 10 i64.mul i64.add local.get $2 - local.get $4 + local.get $3 i32.eqz i32.eqz i64.extend_i32_u i64.or - local.get $6 + local.get $4 i32.const 19 i32.lt_s select local.set $2 - local.get $6 + local.get $4 i32.const 1 i32.add - local.set $6 + local.set $4 else - local.get $6 + local.get $4 local.set $5 i32.const 1 - local.set $11 + local.set $12 end local.get $1 i32.const 1 @@ -3666,10 +3591,10 @@ i32.add local.tee $0 i32.load16_u - local.tee $3 + local.tee $6 i32.const 48 i32.sub - local.set $4 + local.set $3 br $for-loop|3 end end @@ -3677,25 +3602,25 @@ block $~lib/util/string/scientific|inlined.0 i32.const 1 local.get $5 - local.get $6 - local.get $11 + local.get $4 + local.get $12 select i32.const 19 - local.get $6 + local.get $4 i32.const 19 - local.get $6 + local.get $4 i32.lt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) local.get $0 - local.set $3 + local.set $5 i32.const 1 - local.set $6 + local.set $4 i32.const 0 local.set $0 i32.const 0 - local.get $3 + local.get $5 i32.load16_u i32.const 32 i32.or @@ -3703,15 +3628,15 @@ i32.ne br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $5 i32.const 2 i32.add - local.tee $4 + local.tee $3 i32.load16_u local.tee $5 i32.const 45 i32.eq - if + if (result i32) i32.const 0 local.get $1 i32.const 1 @@ -3721,18 +3646,17 @@ br_if $~lib/util/string/parseExp|inlined.0 drop i32.const -1 - local.set $6 - local.get $4 + local.set $4 + local.get $3 i32.const 2 i32.add - local.tee $4 + local.tee $3 i32.load16_u - local.set $5 else local.get $5 i32.const 43 i32.eq - if + if (result i32) i32.const 0 local.get $1 i32.const 1 @@ -3741,14 +3665,16 @@ i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $4 + local.get $3 i32.const 2 i32.add - local.tee $4 + local.tee $3 i32.load16_u - local.set $5 + else + local.get $5 end end + local.set $5 loop $while-continue|4 local.get $5 i32.const 48 @@ -3762,10 +3688,10 @@ i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $4 + local.get $3 i32.const 2 i32.add - local.tee $4 + local.tee $3 i32.load16_u local.set $5 br $while-continue|4 @@ -3783,7 +3709,7 @@ local.get $1 select if - local.get $6 + local.get $4 i32.const 3200 i32.mul local.get $0 @@ -3801,10 +3727,10 @@ i32.const 1 i32.sub local.set $1 - local.get $4 + local.get $3 i32.const 2 i32.add - local.tee $4 + local.tee $3 i32.load16_u i32.const 48 i32.sub @@ -3813,7 +3739,7 @@ end end local.get $0 - local.get $6 + local.get $4 i32.mul end i32.add @@ -3866,9 +3792,9 @@ local.get $0 i32.const 31 i32.shr_s - local.tee $3 + local.tee $4 local.get $0 - local.get $3 + local.get $4 i32.add i32.xor i32.const 22 @@ -3914,13 +3840,13 @@ i64.shl local.set $2 local.get $0 - local.tee $6 + local.tee $4 i64.extend_i32_s local.get $7 i64.sub local.set $7 loop $for-loop|6 - local.get $6 + local.get $4 i32.const -14 i32.le_s if @@ -3931,7 +3857,7 @@ local.get $2 i64.const 6103515625 i64.div_u - local.tee $2 + local.tee $10 i64.clz local.tee $8 i64.const 18 @@ -3941,7 +3867,7 @@ f64.mul f64.nearest i64.trunc_f64_u - local.get $2 + local.get $10 local.get $8 i64.shl i64.add @@ -3950,26 +3876,26 @@ local.get $8 i64.sub local.set $7 - local.get $6 + local.get $4 i32.const 14 i32.add - local.set $6 + local.set $4 br $for-loop|6 end end local.get $2 i32.const 0 - local.get $6 + local.get $4 i32.sub call $~lib/math/ipow32 i64.extend_i32_s - local.tee $12 + local.tee $10 i64.div_u local.tee $13 i64.clz local.set $8 local.get $2 - local.get $12 + local.get $10 i64.rem_u f64.convert_i64_u i64.reinterpret_f64 @@ -3978,7 +3904,7 @@ i64.shl i64.add f64.reinterpret_i64 - local.get $12 + local.get $10 f64.convert_i64_u f64.div i64.trunc_f64_u @@ -4029,7 +3955,7 @@ i64.shr_u i32.wrap_i64 i32.clz - local.tee $3 + local.tee $4 i64.extend_i32_u i64.sub local.tee $8 @@ -4037,7 +3963,7 @@ i64.add global.set $~lib/util/string/__fixmulShift local.get $2 - local.get $3 + local.get $4 i64.extend_i32_u i64.shl i64.const 31 @@ -4045,7 +3971,7 @@ i64.const 1 i64.and local.get $7 - local.get $3 + local.get $4 i64.extend_i32_u i64.shl local.get $2 @@ -4123,13 +4049,13 @@ local.set $9 end local.get $9 - local.get $10 + local.get $11 f64.copysign return end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4145,60 +4071,34 @@ i32.ne if local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 640 local.set $1 end - local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $4 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 + local.get $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 i32.add local.tee $2 i32.eqz if - i32.const 272 - local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 272 + local.tee $0 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $2 local.get $0 @@ -4211,17 +4111,18 @@ local.get $4 call $~lib/memory/memory.copy local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__gt (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 640 + local.get $0 + select + local.get $1 + call $~lib/string/String#concat + ) + (func $~lib/string/String.__gt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4240,11 +4141,7 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.eqz if @@ -4252,11 +4149,7 @@ return end local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 i32.eqz if @@ -4276,7 +4169,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 48 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4295,11 +4188,7 @@ return end local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.eqz if @@ -4307,11 +4196,7 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 i32.eqz if @@ -4331,16 +4216,12 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 42 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 49 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i64.extend_i32_s local.get $1 @@ -4377,16 +4258,13 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.mul i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $2 @@ -4397,25 +4275,17 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $4 i32.le_u if @@ -4445,11 +4315,7 @@ i32.xor if local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $5 local.get $3 local.get $4 @@ -4458,14 +4324,11 @@ i32.add local.tee $3 if - call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -4509,7 +4372,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 44 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 51 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4551,7 +4414,20 @@ end local.get $1 ) - (func $~lib/rt/tlsf/reallocateBlock (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/freeBlock (; 52 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $1 + call $~lib/rt/rtrace/onfree + ) + (func $~lib/rt/tlsf/reallocateBlock (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4607,10 +4483,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -4648,21 +4524,22 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc + local.get $0 local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/string/String#replaceAll (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) + (func $~lib/string/String#replaceAll (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4674,23 +4551,15 @@ local.get $2 local.set $8 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $5 + call $~lib/string/String#get:length + local.tee $4 local.get $1 local.tee $6 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $9 i32.le_u if - local.get $5 + local.get $4 local.get $9 i32.lt_u if (result i32) @@ -4708,11 +4577,7 @@ return end local.get $8 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.set $2 local.get $9 i32.eqz @@ -4724,10 +4589,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 local.get $2 - local.get $5 + local.get $4 i32.const 1 i32.add i32.mul @@ -4735,10 +4599,8 @@ i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $6 + call $~lib/rt/tlsf/__alloc + local.tee $3 local.get $8 local.get $2 i32.const 1 @@ -4746,24 +4608,26 @@ call $~lib/memory/memory.copy local.get $2 local.set $1 + i32.const 0 + local.set $6 loop $for-loop|0 - local.get $3 - local.get $5 + local.get $6 + local.get $4 i32.lt_u if - local.get $6 + local.get $3 local.get $1 i32.const 1 i32.shl i32.add local.get $0 - local.get $3 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $6 + local.get $3 local.get $1 i32.const 1 i32.add @@ -4780,14 +4644,14 @@ local.get $2 i32.add local.set $1 - local.get $3 + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $3 call $~lib/rt/pure/__retain return end @@ -4795,30 +4659,27 @@ local.get $9 i32.eq if - call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 i32.const 1 i32.shl - local.tee $3 + local.tee $4 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 - local.get $3 + local.get $4 call $~lib/memory/memory.copy loop $while-continue|1 local.get $0 local.get $6 - local.get $4 + local.get $5 call $~lib/string/String#indexOf - local.tee $3 + local.tee $4 i32.const -1 i32.xor if local.get $1 - local.get $3 + local.get $4 i32.const 1 i32.shl i32.add @@ -4827,10 +4688,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $3 + local.get $4 local.get $9 i32.add - local.set $4 + local.set $5 br $while-continue|1 end end @@ -4838,12 +4699,12 @@ call $~lib/rt/pure/__retain return end - local.get $5 + local.get $4 local.set $1 loop $while-continue|2 local.get $0 local.get $6 - local.get $4 + local.get $5 call $~lib/string/String#indexOf local.tee $10 i32.const -1 @@ -4852,32 +4713,25 @@ local.get $3 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $4 i32.const 1 i32.shl i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $3 end local.get $7 local.get $1 i32.gt_u if - call $~lib/rt/tlsf/maybeInitialize local.get $3 - call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.set $3 end local.get $3 @@ -4886,22 +4740,22 @@ i32.shl i32.add local.get $0 - local.get $4 + local.get $5 i32.const 1 i32.shl i32.add local.get $10 - local.get $4 + local.get $5 i32.sub - local.tee $4 + local.tee $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $3 - local.get $4 + local.get $5 local.get $7 i32.add - local.tee $4 + local.tee $5 i32.const 1 i32.shl i32.add @@ -4911,13 +4765,13 @@ i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $4 + local.get $5 i32.add local.set $7 local.get $9 local.get $10 i32.add - local.set $4 + local.set $5 br $while-continue|2 end end @@ -4927,22 +4781,18 @@ local.get $1 i32.gt_u if - call $~lib/rt/tlsf/maybeInitialize local.get $3 - call $~lib/rt/tlsf/checkUsedBlock local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 i32.shl - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.set $3 end - local.get $5 local.get $4 + local.get $5 i32.sub local.tee $2 if @@ -4952,7 +4802,7 @@ i32.shl i32.add local.get $0 - local.get $4 + local.get $5 i32.const 1 i32.shl i32.add @@ -4967,33 +4817,25 @@ i32.add local.tee $0 i32.gt_u - if - call $~lib/rt/tlsf/maybeInitialize + if (result i32) local.get $3 - call $~lib/rt/tlsf/checkUsedBlock local.get $0 i32.const 1 i32.shl - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - local.set $3 + call $~lib/rt/tlsf/__realloc + else + local.get $3 end - local.get $3 call $~lib/rt/pure/__retain return end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.set $3 local.get $1 i32.const 0 @@ -5047,15 +4889,12 @@ i32.const 272 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 i32.shl local.tee $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -5067,7 +4906,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -5077,11 +4916,7 @@ select local.tee $2 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $3 local.get $1 i32.const 0 @@ -5114,12 +4949,9 @@ i32.const 272 return end - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -5131,7 +4963,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5142,11 +4974,7 @@ select local.tee $3 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $1 local.get $3 local.get $1 @@ -5202,12 +5030,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 local.get $2 @@ -5217,26 +5042,20 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 50 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 59 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 - call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 2 i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 call $~lib/rt/pure/__retain i32.store @@ -5251,7 +5070,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5462,29 +5281,19 @@ end end ) - (func $~lib/array/Array<~lib/string/String>#push (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 61 ;) (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 $0 - i32.load offset=12 - local.tee $7 - i32.const 1 - i32.add - local.tee $3 - local.set $2 - local.get $3 + local.get $1 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 i32.const 2 i32.shr_u i32.gt_u if - local.get $2 + local.get $1 i32.const 268435452 i32.gt_u if @@ -5495,44 +5304,51 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load - local.set $5 - local.get $4 - call $~lib/rt/tlsf/maybeInitialize - local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - local.get $2 + local.tee $4 + local.get $1 i32.const 2 i32.shl - local.tee $6 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - local.tee $2 + local.tee $3 + call $~lib/rt/tlsf/__realloc + local.tee $1 i32.add - local.get $6 - local.get $4 + local.get $3 + local.get $2 i32.sub call $~lib/memory/memory.fill - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.ne if local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 end local.get $0 - local.get $6 + local.get $3 i32.store offset=8 end + ) + (func $~lib/array/Array<~lib/string/String>#push (; 62 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.add + local.tee $3 + call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $7 + local.get $2 i32.const 2 i32.shl i32.add @@ -5543,7 +5359,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5571,30 +5387,20 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.set $3 + call $~lib/string/String#get:length + local.set $5 i32.const 2147483647 local.get $2 local.get $2 i32.const 0 i32.lt_s select - local.set $5 + local.set $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $2 - local.set $8 - local.get $2 + call $~lib/string/String#get:length + local.tee $8 if - local.get $3 + local.get $5 i32.eqz if i32.const 1 @@ -5608,46 +5414,43 @@ return end else - local.get $3 + local.get $5 i32.eqz br_if $folding-inner0 - local.get $3 local.get $5 - local.get $3 + local.get $2 local.get $5 + local.get $2 i32.lt_s select - local.tee $4 + local.tee $3 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.load offset=4 local.set $5 i32.const 0 local.set $1 loop $for-loop|0 local.get $1 - local.get $4 + local.get $3 i32.lt_s if - call $~lib/rt/tlsf/maybeInitialize i32.const 2 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 - local.get $0 local.get $1 i32.const 1 i32.shl + local.get $0 i32.add i32.load16_u i32.store16 - local.get $5 local.get $1 i32.const 2 i32.shl + local.get $5 i32.add local.get $2 i32.store @@ -5661,13 +5464,13 @@ br $for-loop|0 end end - local.get $3 + local.get $4 return end i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $3 loop $while-continue|1 local.get $0 local.get $1 @@ -5684,28 +5487,25 @@ i32.const 0 i32.gt_s if - call $~lib/rt/tlsf/maybeInitialize local.get $6 i32.const 1 i32.shl local.tee $6 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $9 - local.get $0 local.get $4 i32.const 1 i32.shl + local.get $0 i32.add local.get $6 call $~lib/memory/memory.copy - local.get $2 + local.get $3 local.get $9 call $~lib/array/Array<~lib/string/String>#push else - local.get $2 + local.get $3 i32.const 272 call $~lib/array/Array<~lib/string/String>#push end @@ -5713,10 +5513,10 @@ i32.const 1 i32.add local.tee $10 - local.get $5 + local.get $2 i32.eq if - local.get $2 + local.get $3 return end local.get $7 @@ -5729,52 +5529,49 @@ local.get $4 i32.eqz if - local.get $2 + local.get $3 local.get $0 call $~lib/array/Array<~lib/string/String>#push - local.get $2 + local.get $3 return end - local.get $3 + local.get $5 local.get $4 i32.sub local.tee $1 i32.const 0 i32.gt_s if - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 1 i32.shl local.tee $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $3 - local.get $0 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $4 i32.const 1 i32.shl + local.get $0 i32.add local.get $1 call $~lib/memory/memory.copy - local.get $2 local.get $3 + local.get $2 call $~lib/array/Array<~lib/string/String>#push else - local.get $2 + local.get $3 i32.const 272 call $~lib/array/Array<~lib/string/String>#push end - local.get $2 + local.get $3 return end i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5799,14 +5596,7 @@ i32.eqz if local.get $0 - i32.const 17000 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 12272 i32.const 12160 i32.const 97 @@ -5816,7 +5606,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 55 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 65 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5864,7 +5654,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5888,7 +5678,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 57 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 67 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5901,7 +5691,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 @@ -5910,32 +5700,27 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $3 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $2 + local.get $1 if - local.get $1 + local.get $2 i32.const 45 i32.store16 end - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 58 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 68 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5946,24 +5731,19 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple local.get $1 + call $~lib/util/number/utoa_simple + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 59 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 69 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -6016,7 +5796,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 60 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -6043,7 +5823,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 61 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 71 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6059,44 +5839,34 @@ if local.get $0 i32.wrap_i64 - local.tee $2 + local.tee $1 call $~lib/util/number/decimalCount32 local.tee $3 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $2 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 local.get $3 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.tee $2 + local.tee $1 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $2 + local.get $1 call $~lib/util/number/utoa_simple end - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 62 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 72 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6110,7 +5880,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $2 + local.tee $1 if i64.const 0 local.get $0 @@ -6123,54 +5893,44 @@ if local.get $0 i32.wrap_i64 - local.tee $3 + local.tee $2 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $4 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $3 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $2 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $2 + local.get $1 i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $3 local.get $0 - local.get $3 + local.get $2 call $~lib/util/number/utoa_simple end - local.get $2 + local.get $1 if - local.get $1 + local.get $3 i32.const 45 i32.store16 end - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 63 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 73 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6560,7 +6320,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6805,7 +6565,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 65 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 75 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7114,10 +6874,9 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 66 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 76 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -7147,12 +6906,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 call $~lib/util/number/dtoa_core @@ -7171,18 +6927,9 @@ call $~lib/rt/tlsf/maybeInitialize local.get $1 call $~lib/rt/tlsf/checkUsedBlock - local.tee $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store - local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 67 ;) + (func $start:std/string (; 77 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7395,7 +7142,6 @@ (local $209 i32) (local $210 i32) (local $211 i32) - (local $212 i32) global.get $std/string/str i32.const 32 i32.ne @@ -7444,11 +7190,7 @@ unreachable end global.get $std/string/str - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 16 i32.ne if @@ -7463,16 +7205,12 @@ i32.const -1 i32.const 0 global.get $std/string/str - local.tee $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + local.tee $1 + call $~lib/string/String#get:length i32.ge_u br_if $__inlined_func$~lib/string/String#charCodeAt drop - local.get $2 + local.get $1 i32.load16_u end i32.const 104 @@ -7485,10 +7223,9 @@ call $~lib/builtins/abort unreachable end - i32.const 268 - i32.load - i32.const 1 - i32.shr_u + i32.const 272 + call $~lib/string/String.__not + i32.eqz if i32.const 0 i32.const 80 @@ -7497,11 +7234,8 @@ call $~lib/builtins/abort unreachable end - i32.const 284 - i32.load - i32.const 1 - i32.shr_u - i32.eqz + i32.const 288 + call $~lib/string/String.__not i32.eqz i32.const 1 i32.ne @@ -7513,11 +7247,8 @@ call $~lib/builtins/abort unreachable end - i32.const 316 - i32.load - i32.const 1 - i32.shr_u - i32.eqz + i32.const 320 + call $~lib/string/String.__not i32.eqz i32.const 1 i32.ne @@ -7533,7 +7264,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode|trampoline - local.tee $9 + local.tee $5 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7549,7 +7280,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode|trampoline - local.tee $10 + local.tee $6 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7565,7 +7296,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode|trampoline - local.tee $11 + local.tee $7 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7580,7 +7311,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $12 + local.tee $8 i32.const 496 call $~lib/string/String.__eq i32.eqz @@ -7594,7 +7325,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $13 + local.tee $9 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7608,7 +7339,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $14 + local.tee $10 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7622,7 +7353,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $15 + local.tee $11 i32.const 576 call $~lib/string/String.__eq i32.eqz @@ -7646,37 +7377,29 @@ unreachable end block $__inlined_func$~lib/string/String#endsWith (result i32) - i32.const 668 - i32.load - i32.const 1 - i32.shr_u - local.tee $2 - local.set $4 i32.const 0 i32.const 536870904 global.get $std/string/str - local.tee $5 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - local.tee $6 + local.tee $4 + call $~lib/string/String#get:length + local.tee $1 i32.const 536870904 - local.get $6 + local.get $1 i32.lt_s select - local.get $2 - i32.sub + i32.const 672 + call $~lib/string/String#get:length local.tee $2 + i32.sub + local.tee $1 i32.const 0 i32.lt_s br_if $__inlined_func$~lib/string/String#endsWith drop - local.get $5 - local.get $2 - i32.const 672 local.get $4 + local.get $1 + i32.const 672 + local.get $2 call $~lib/util/string/compareImpl i32.eqz end @@ -7707,7 +7430,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padStart - local.tee $16 + local.tee $12 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7723,7 +7446,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padStart - local.tee $17 + local.tee $13 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7739,7 +7462,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padStart - local.tee $18 + local.tee $14 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7755,7 +7478,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padStart - local.tee $19 + local.tee $15 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7771,7 +7494,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padStart - local.tee $20 + local.tee $16 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7787,7 +7510,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padStart - local.tee $21 + local.tee $17 i32.const 832 call $~lib/string/String.__eq i32.eqz @@ -7803,7 +7526,7 @@ i32.const 6 i32.const 864 call $~lib/string/String#padStart - local.tee $22 + local.tee $18 i32.const 896 call $~lib/string/String.__eq i32.eqz @@ -7819,7 +7542,7 @@ i32.const 8 i32.const 864 call $~lib/string/String#padStart - local.tee $23 + local.tee $19 i32.const 928 call $~lib/string/String.__eq i32.eqz @@ -7835,7 +7558,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padEnd - local.tee $24 + local.tee $20 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7851,7 +7574,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padEnd - local.tee $25 + local.tee $21 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7867,7 +7590,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padEnd - local.tee $26 + local.tee $22 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7883,7 +7606,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padEnd - local.tee $27 + local.tee $23 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7899,7 +7622,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padEnd - local.tee $28 + local.tee $24 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7915,7 +7638,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padEnd - local.tee $29 + local.tee $25 i32.const 960 call $~lib/string/String.__eq i32.eqz @@ -7931,7 +7654,7 @@ i32.const 6 i32.const 800 call $~lib/string/String#padEnd - local.tee $30 + local.tee $26 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -7947,7 +7670,7 @@ i32.const 8 i32.const 800 call $~lib/string/String#padEnd - local.tee $31 + local.tee $27 i32.const 1024 call $~lib/string/String.__eq i32.eqz @@ -8122,11 +7845,7 @@ i32.const 2147483647 call $~lib/string/String#lastIndexOf global.get $std/string/str - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -8374,7 +8093,7 @@ end i32.const 272 call $~lib/string/String#trimStart - local.tee $32 + local.tee $28 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8388,7 +8107,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $33 + local.tee $29 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8402,7 +8121,7 @@ end i32.const 1312 call $~lib/string/String#trimStart - local.tee $34 + local.tee $30 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8416,7 +8135,7 @@ end i32.const 272 call $~lib/string/String#trimEnd - local.tee $35 + local.tee $31 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8430,7 +8149,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $36 + local.tee $32 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8444,7 +8163,7 @@ end i32.const 1312 call $~lib/string/String#trimEnd - local.tee $37 + local.tee $33 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -8458,7 +8177,7 @@ end i32.const 272 call $~lib/string/String#trim - local.tee $38 + local.tee $34 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8472,7 +8191,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $39 + local.tee $35 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8486,7 +8205,7 @@ end i32.const 1312 call $~lib/string/String#trim - local.tee $40 + local.tee $36 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10162,26 +9881,17 @@ end i32.const 6864 i32.const 7024 - call $~lib/string/String#concat - local.tee $4 - i32.const 640 - local.get $4 - select + call $~lib/string/String.__concat + local.tee $37 i32.const 7184 - call $~lib/string/String#concat - local.tee $5 - i32.const 640 - local.get $5 - select + call $~lib/string/String.__concat + local.tee $38 i32.const 7344 - call $~lib/string/String#concat - local.tee $6 - i32.const 640 - local.get $6 - select + call $~lib/string/String.__concat + local.tee $39 i32.const 7504 - call $~lib/string/String#concat - local.tee $41 + call $~lib/string/String.__concat + local.tee $40 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10508,7 +10218,7 @@ end i32.const 320 i32.const 10416 - call $~lib/string/String#concat + call $~lib/string/String.__concat local.tee $2 local.get $2 i32.const 10448 @@ -10533,14 +10243,7 @@ unreachable end local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 272 i32.const 272 call $~lib/string/String.__eq @@ -10871,18 +10574,15 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $1 + local.tee $0 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $2 - i32.const 640 - local.get $2 - select + local.tee $4 i32.const 56322 call $~lib/string/String.fromCodePoint - local.tee $7 - call $~lib/string/String#concat - local.tee $8 + local.tee $2 + call $~lib/string/String.__concat + local.tee $1 call $~lib/string/String.__gt i32.eqz if @@ -10893,46 +10593,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 17000 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 17000 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 860 - i32.load - i32.const 1 - i32.shr_u + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 864 + call $~lib/string/String#get:length i32.const 3 i32.ne if @@ -10946,7 +10616,7 @@ i32.const 272 i32.const 100 call $~lib/string/String#repeat - local.tee $7 + local.tee $41 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10961,7 +10631,7 @@ i32.const 320 i32.const 0 call $~lib/string/String#repeat - local.tee $8 + local.tee $42 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10976,7 +10646,7 @@ i32.const 320 i32.const 1 call $~lib/string/String#repeat - local.tee $42 + local.tee $43 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -10991,7 +10661,7 @@ i32.const 320 i32.const 2 call $~lib/string/String#repeat - local.tee $43 + local.tee $44 i32.const 10864 call $~lib/string/String.__eq i32.eqz @@ -11006,7 +10676,7 @@ i32.const 320 i32.const 3 call $~lib/string/String#repeat - local.tee $44 + local.tee $45 i32.const 10944 call $~lib/string/String.__eq i32.eqz @@ -11021,7 +10691,7 @@ i32.const 10448 i32.const 4 call $~lib/string/String#repeat - local.tee $45 + local.tee $46 i32.const 10976 call $~lib/string/String.__eq i32.eqz @@ -11036,7 +10706,7 @@ i32.const 320 i32.const 5 call $~lib/string/String#repeat - local.tee $46 + local.tee $47 i32.const 11008 call $~lib/string/String.__eq i32.eqz @@ -11051,7 +10721,7 @@ i32.const 320 i32.const 6 call $~lib/string/String#repeat - local.tee $47 + local.tee $48 i32.const 11040 call $~lib/string/String.__eq i32.eqz @@ -11066,7 +10736,7 @@ i32.const 320 i32.const 7 call $~lib/string/String#repeat - local.tee $48 + local.tee $49 i32.const 11072 call $~lib/string/String.__eq i32.eqz @@ -11082,7 +10752,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $49 + local.tee $50 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11098,7 +10768,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $50 + local.tee $51 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11114,7 +10784,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replace - local.tee $51 + local.tee $52 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11130,7 +10800,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $52 + local.tee $53 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11146,7 +10816,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $53 + local.tee $54 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11162,7 +10832,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replace - local.tee $54 + local.tee $55 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11178,7 +10848,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replace - local.tee $55 + local.tee $56 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11194,7 +10864,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replace - local.tee $56 + local.tee $57 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11210,7 +10880,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $57 + local.tee $58 i32.const 11136 call $~lib/string/String.__eq i32.eqz @@ -11226,7 +10896,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $58 + local.tee $59 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -11242,7 +10912,7 @@ i32.const 11232 i32.const 4576 call $~lib/string/String#replace - local.tee $59 + local.tee $60 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -11258,7 +10928,7 @@ i32.const 11264 i32.const 11296 call $~lib/string/String#replace - local.tee $60 + local.tee $61 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -11274,7 +10944,7 @@ i32.const 11264 i32.const 272 call $~lib/string/String#replace - local.tee $61 + local.tee $62 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -11290,7 +10960,7 @@ i32.const 272 i32.const 800 call $~lib/string/String#replaceAll - local.tee $62 + local.tee $63 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11306,7 +10976,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $63 + local.tee $64 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11322,7 +10992,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $64 + local.tee $65 i32.const 11296 call $~lib/string/String.__eq i32.eqz @@ -11338,7 +11008,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $65 + local.tee $66 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -11354,7 +11024,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replaceAll - local.tee $66 + local.tee $67 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -11370,7 +11040,7 @@ i32.const 320 i32.const 11408 call $~lib/string/String#replaceAll - local.tee $67 + local.tee $68 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -11386,7 +11056,7 @@ i32.const 10448 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $68 + local.tee $69 i32.const 11520 call $~lib/string/String.__eq i32.eqz @@ -11402,7 +11072,7 @@ i32.const 11584 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $69 + local.tee $70 i32.const 11616 call $~lib/string/String.__eq i32.eqz @@ -11418,7 +11088,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $70 + local.tee $71 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11434,7 +11104,7 @@ i32.const 11648 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $71 + local.tee $72 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11450,7 +11120,7 @@ i32.const 11680 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $72 + local.tee $73 i32.const 11712 call $~lib/string/String.__eq i32.eqz @@ -11466,7 +11136,7 @@ i32.const 10448 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $73 + local.tee $74 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11482,7 +11152,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $74 + local.tee $75 i32.const 11744 call $~lib/string/String.__eq i32.eqz @@ -11498,7 +11168,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $75 + local.tee $76 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11514,7 +11184,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $76 + local.tee $77 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11530,7 +11200,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replaceAll - local.tee $77 + local.tee $78 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11546,7 +11216,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $78 + local.tee $79 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11562,7 +11232,7 @@ i32.const 800 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $79 + local.tee $80 i32.const 4608 call $~lib/string/String.__eq i32.eqz @@ -11578,7 +11248,7 @@ i32.const 1216 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $80 + local.tee $81 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11594,7 +11264,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $81 + local.tee $82 i32.const 11776 call $~lib/string/String.__eq i32.eqz @@ -11610,7 +11280,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $82 + local.tee $83 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11623,22 +11293,14 @@ unreachable end global.get $std/string/str - local.tee $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 11808 global.set $std/string/str i32.const 11808 i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $83 + local.tee $84 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11654,7 +11316,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $84 + local.tee $85 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11670,7 +11332,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $85 + local.tee $86 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11686,7 +11348,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $86 + local.tee $87 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11702,7 +11364,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - local.tee $87 + local.tee $88 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -11718,7 +11380,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $88 + local.tee $89 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11734,7 +11396,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $89 + local.tee $90 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -11750,7 +11412,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $90 + local.tee $91 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11766,7 +11428,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $91 + local.tee $92 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11782,7 +11444,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $92 + local.tee $93 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11798,7 +11460,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $93 + local.tee $94 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -11814,7 +11476,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $94 + local.tee $95 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11830,7 +11492,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $95 + local.tee $96 i32.const 12064 call $~lib/string/String.__eq i32.eqz @@ -11846,7 +11508,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $96 + local.tee $97 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11862,7 +11524,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $97 + local.tee $98 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11878,7 +11540,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $98 + local.tee $99 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -11894,7 +11556,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $99 + local.tee $100 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11910,7 +11572,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $100 + local.tee $101 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11926,7 +11588,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $101 + local.tee $102 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11942,7 +11604,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $102 + local.tee $103 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11958,7 +11620,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $103 + local.tee $104 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11974,7 +11636,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $104 + local.tee $105 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11990,7 +11652,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $105 + local.tee $106 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -12006,7 +11668,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $106 + local.tee $107 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -12022,7 +11684,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $107 + local.tee $108 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -12038,7 +11700,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $108 + local.tee $109 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -12054,7 +11716,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $109 + local.tee $110 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -12070,27 +11732,23 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#split - local.tee $1 + local.tee $4 i32.load offset=12 i32.const 1 i32.eq if - local.get $1 + local.get $4 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $1 i32.const 272 call $~lib/string/String.__eq local.set $0 - local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release + else + i32.const 0 + local.set $0 end local.get $0 i32.eqz @@ -12107,15 +11765,8 @@ i32.const 2147483647 call $~lib/string/String#split local.set $2 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__release local.get $2 i32.load offset=12 if @@ -12131,18 +11782,11 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.eq + call $~lib/rt/pure/__release + local.tee $2 + i32.load offset=12 + i32.const 1 + i32.eq if local.get $2 i32.const 0 @@ -12152,14 +11796,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12179,14 +11816,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 1 @@ -12200,14 +11830,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12227,14 +11850,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 3 @@ -12248,14 +11864,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12270,14 +11879,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12292,14 +11894,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12319,14 +11914,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 3 @@ -12340,14 +11928,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12362,14 +11943,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12384,14 +11958,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12411,14 +11978,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 4 @@ -12432,14 +11992,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12454,14 +12007,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12476,14 +12022,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12498,14 +12037,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12525,14 +12057,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 4 @@ -12546,14 +12071,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12568,14 +12086,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12590,14 +12101,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12612,14 +12116,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12639,14 +12136,7 @@ i32.const 2147483647 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 4 @@ -12660,14 +12150,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12682,14 +12165,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12704,14 +12180,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12726,14 +12195,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12752,80 +12214,53 @@ i32.const 272 i32.const 2147483647 call $~lib/string/String#split + local.set $1 local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $2 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 320 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 end local.get $0 if - local.get $2 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 10416 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 end local.get $0 if - local.get $2 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 11264 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12844,16 +12279,10 @@ i32.const 272 i32.const 0 call $~lib/string/String#split + local.set $2 + local.get $1 + call $~lib/rt/pure/__release local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $2 i32.load offset=12 if i32.const 0 @@ -12868,14 +12297,7 @@ i32.const 1 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 1 @@ -12889,14 +12311,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12916,18 +12331,11 @@ i32.const 1 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $2 - i32.load offset=12 - i32.const 1 - i32.eq + call $~lib/rt/pure/__release + local.tee $2 + i32.load offset=12 + i32.const 1 + i32.eq if local.get $2 i32.const 0 @@ -12937,14 +12345,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -12964,14 +12365,7 @@ i32.const 4 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 3 @@ -12985,14 +12379,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13007,14 +12394,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13029,14 +12409,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13056,14 +12429,7 @@ i32.const -1 call $~lib/string/String#split local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.tee $2 i32.load offset=12 i32.const 3 @@ -13077,14 +12443,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13099,14 +12458,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13121,14 +12473,7 @@ call $~lib/string/String.__eq local.set $0 local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13147,80 +12492,53 @@ i32.const 1056 i32.const -1 call $~lib/string/String#split + local.set $1 local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $2 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 320 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 end local.get $0 if - local.get $2 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 10416 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 end local.get $0 if - local.get $2 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $2 i32.const 11264 call $~lib/string/String.__eq local.set $0 - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release else i32.const 0 local.set $0 @@ -13235,18 +12553,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release i32.const 0 call $~lib/util/number/itoa32 - local.tee $2 + local.tee $111 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13260,7 +12571,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $0 + local.tee $112 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -13274,7 +12585,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $1 + local.tee $113 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -13288,7 +12599,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $110 + local.tee $114 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -13302,7 +12613,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $111 + local.tee $115 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -13316,7 +12627,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $112 + local.tee $116 i32.const 12640 call $~lib/string/String.__eq i32.eqz @@ -13330,7 +12641,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $113 + local.tee $117 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -13344,7 +12655,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $114 + local.tee $118 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -13358,7 +12669,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $115 + local.tee $119 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -13372,7 +12683,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $116 + local.tee $120 i32.const 12768 call $~lib/string/String.__eq i32.eqz @@ -13386,7 +12697,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $117 + local.tee $121 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -13400,7 +12711,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $118 + local.tee $122 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -13414,7 +12725,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $119 + local.tee $123 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -13428,7 +12739,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $120 + local.tee $124 i32.const 12912 call $~lib/string/String.__eq i32.eqz @@ -13442,7 +12753,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $121 + local.tee $125 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -13456,7 +12767,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $122 + local.tee $126 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -13470,7 +12781,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $123 + local.tee $127 i32.const 13056 call $~lib/string/String.__eq i32.eqz @@ -13484,7 +12795,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $124 + local.tee $128 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13498,7 +12809,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $125 + local.tee $129 i32.const 13088 call $~lib/string/String.__eq i32.eqz @@ -13512,7 +12823,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $126 + local.tee $130 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -13526,7 +12837,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $127 + local.tee $131 i32.const 13120 call $~lib/string/String.__eq i32.eqz @@ -13540,7 +12851,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $128 + local.tee $132 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13554,7 +12865,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $129 + local.tee $133 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13568,7 +12879,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $130 + local.tee $134 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -13582,7 +12893,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $131 + local.tee $135 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -13596,7 +12907,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $132 + local.tee $136 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -13610,7 +12921,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $133 + local.tee $137 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -13624,7 +12935,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $134 + local.tee $138 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -13638,7 +12949,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $135 + local.tee $139 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -13652,7 +12963,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $136 + local.tee $140 i32.const 13216 call $~lib/string/String.__eq i32.eqz @@ -13666,7 +12977,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $137 + local.tee $141 i32.const 13248 call $~lib/string/String.__eq i32.eqz @@ -13680,7 +12991,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $138 + local.tee $142 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13694,7 +13005,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $139 + local.tee $143 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13708,7 +13019,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $140 + local.tee $144 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13722,7 +13033,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $141 + local.tee $145 i32.const 13392 call $~lib/string/String.__eq i32.eqz @@ -13736,7 +13047,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $142 + local.tee $146 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -13750,7 +13061,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $143 + local.tee $147 i32.const 13488 call $~lib/string/String.__eq i32.eqz @@ -13764,7 +13075,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $144 + local.tee $148 i32.const 13536 call $~lib/string/String.__eq i32.eqz @@ -13778,7 +13089,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $145 + local.tee $149 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -13792,7 +13103,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $146 + local.tee $150 i32.const 13632 call $~lib/string/String.__eq i32.eqz @@ -13806,7 +13117,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $147 + local.tee $151 i32.const 13696 call $~lib/string/String.__eq i32.eqz @@ -13820,7 +13131,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $148 + local.tee $152 i32.const 13760 call $~lib/string/String.__eq i32.eqz @@ -13834,7 +13145,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $149 + local.tee $153 i32.const 13824 call $~lib/string/String.__eq i32.eqz @@ -13848,7 +13159,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $150 + local.tee $154 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13862,7 +13173,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $151 + local.tee $155 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -13876,7 +13187,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $152 + local.tee $156 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13890,7 +13201,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $153 + local.tee $157 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13904,7 +13215,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $154 + local.tee $158 i32.const 13920 call $~lib/string/String.__eq i32.eqz @@ -13918,7 +13229,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $155 + local.tee $159 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13932,7 +13243,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $156 + local.tee $160 i32.const 13968 call $~lib/string/String.__eq i32.eqz @@ -13946,7 +13257,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $157 + local.tee $161 i32.const 14016 call $~lib/string/String.__eq i32.eqz @@ -13960,7 +13271,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $158 + local.tee $162 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -13974,7 +13285,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $159 + local.tee $163 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -13988,7 +13299,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $160 + local.tee $164 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -14002,7 +13313,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $161 + local.tee $165 i32.const 14240 call $~lib/string/String.__eq i32.eqz @@ -14016,7 +13327,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $162 + local.tee $166 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -14030,7 +13341,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $163 + local.tee $167 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -14044,7 +13355,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $164 + local.tee $168 i32.const 4832 call $~lib/string/String.__eq i32.eqz @@ -14058,7 +13369,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $165 + local.tee $169 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -14072,7 +13383,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $166 + local.tee $170 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -14086,7 +13397,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $167 + local.tee $171 i32.const 5344 call $~lib/string/String.__eq i32.eqz @@ -14100,7 +13411,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $168 + local.tee $172 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -14114,7 +13425,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $169 + local.tee $173 i32.const 5408 call $~lib/string/String.__eq i32.eqz @@ -14128,7 +13439,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $170 + local.tee $174 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -14142,7 +13453,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $171 + local.tee $175 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -14156,7 +13467,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $172 + local.tee $176 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -14170,7 +13481,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $173 + local.tee $177 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -14184,7 +13495,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $174 + local.tee $178 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -14198,7 +13509,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $175 + local.tee $179 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -14212,7 +13523,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $176 + local.tee $180 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -14226,7 +13537,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $177 + local.tee $181 i32.const 5472 call $~lib/string/String.__eq i32.eqz @@ -14240,7 +13551,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $178 + local.tee $182 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -14254,7 +13565,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $179 + local.tee $183 i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -14268,7 +13579,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $180 + local.tee $184 i32.const 15872 call $~lib/string/String.__eq i32.eqz @@ -14282,7 +13593,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $181 + local.tee $185 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -14296,7 +13607,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $182 + local.tee $186 i32.const 15936 call $~lib/string/String.__eq i32.eqz @@ -14310,7 +13621,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $183 + local.tee $187 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -14324,7 +13635,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $184 + local.tee $188 i32.const 16016 call $~lib/string/String.__eq i32.eqz @@ -14338,7 +13649,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $185 + local.tee $189 i32.const 16064 call $~lib/string/String.__eq i32.eqz @@ -14352,7 +13663,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $186 + local.tee $190 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -14366,7 +13677,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $187 + local.tee $191 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -14380,7 +13691,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $188 + local.tee $192 i32.const 2704 call $~lib/string/String.__eq i32.eqz @@ -14394,7 +13705,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $189 + local.tee $193 i32.const 16192 call $~lib/string/String.__eq i32.eqz @@ -14408,7 +13719,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $190 + local.tee $194 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -14422,7 +13733,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $191 + local.tee $195 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -14436,7 +13747,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $192 + local.tee $196 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -14450,7 +13761,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $193 + local.tee $197 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -14464,7 +13775,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $194 + local.tee $198 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -14478,7 +13789,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $195 + local.tee $199 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -14492,7 +13803,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $196 + local.tee $200 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -14506,7 +13817,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $197 + local.tee $201 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -14520,7 +13831,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $198 + local.tee $202 i32.const 16400 call $~lib/string/String.__eq i32.eqz @@ -14534,7 +13845,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $199 + local.tee $203 i32.const 16464 call $~lib/string/String.__eq i32.eqz @@ -14548,7 +13859,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $200 + local.tee $204 i32.const 16528 call $~lib/string/String.__eq i32.eqz @@ -14562,7 +13873,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $201 + local.tee $205 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -14576,7 +13887,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $202 + local.tee $206 i32.const 16592 call $~lib/string/String.__eq i32.eqz @@ -14590,7 +13901,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $203 + local.tee $207 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -14604,7 +13915,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $204 + local.tee $208 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -14618,7 +13929,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $205 + local.tee $209 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -14632,7 +13943,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $206 + local.tee $210 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -14646,7 +13957,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $207 + local.tee $211 i32.const 16832 call $~lib/string/String.__eq i32.eqz @@ -14660,7 +13971,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - local.tee $208 + local.tee $0 i32.const 16880 call $~lib/string/String.__eq i32.eqz @@ -14674,7 +13985,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - local.tee $209 + local.tee $4 i32.const 16912 call $~lib/string/String.__eq i32.eqz @@ -14688,7 +13999,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - local.tee $210 + local.tee $2 i32.const 16944 call $~lib/string/String.__eq i32.eqz @@ -14702,7 +14013,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - local.tee $211 + local.tee $1 i32.const 16976 call $~lib/string/String.__eq i32.eqz @@ -14715,1920 +14026,435 @@ unreachable end global.get $std/string/str - local.tee $212 - i32.const 17000 - i32.gt_u - if - local.get $212 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + 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 $8 + call $~lib/rt/pure/__release local.get $9 - i32.const 17000 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $10 - i32.const 17000 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $11 - i32.const 17000 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $12 - i32.const 17000 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $13 - i32.const 17000 - i32.gt_u - if - local.get $13 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $14 - i32.const 17000 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $15 - i32.const 17000 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $16 - i32.const 17000 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $17 - i32.const 17000 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $18 - i32.const 17000 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $19 - i32.const 17000 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $20 - i32.const 17000 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $21 - i32.const 17000 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $22 - i32.const 17000 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $23 - i32.const 17000 - i32.gt_u - if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $24 - i32.const 17000 - i32.gt_u - if - local.get $24 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $25 - i32.const 17000 - i32.gt_u - if - local.get $25 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $26 - i32.const 17000 - i32.gt_u - if - local.get $26 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $27 - i32.const 17000 - i32.gt_u - if - local.get $27 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $28 - i32.const 17000 - i32.gt_u - if - local.get $28 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $29 - i32.const 17000 - i32.gt_u - if - local.get $29 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $30 - i32.const 17000 - i32.gt_u - if - local.get $30 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $31 - i32.const 17000 - i32.gt_u - if - local.get $31 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $32 - i32.const 17000 - i32.gt_u - if - local.get $32 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $33 - i32.const 17000 - i32.gt_u - if - local.get $33 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $34 - i32.const 17000 - i32.gt_u - if - local.get $34 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $35 - i32.const 17000 - i32.gt_u - if - local.get $35 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $36 - i32.const 17000 - i32.gt_u - if - local.get $36 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $37 - i32.const 17000 - i32.gt_u - if - local.get $37 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $38 - i32.const 17000 - i32.gt_u - if - local.get $38 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $39 - i32.const 17000 - i32.gt_u - if - local.get $39 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $40 - i32.const 17000 - i32.gt_u - if - local.get $40 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 17000 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 17000 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 17000 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $41 - i32.const 17000 - i32.gt_u - if - local.get $41 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $43 - i32.const 17000 - i32.gt_u - if - local.get $43 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $44 - i32.const 17000 - i32.gt_u - if - local.get $44 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $42 - i32.const 17000 - i32.gt_u - if - local.get $42 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 17000 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 17000 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $45 - i32.const 17000 - i32.gt_u - if - local.get $45 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $43 + call $~lib/rt/pure/__release + local.get $42 + call $~lib/rt/pure/__release + local.get $41 + call $~lib/rt/pure/__release local.get $46 - i32.const 17000 - i32.gt_u - if - local.get $46 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $47 - i32.const 17000 - i32.gt_u - if - local.get $47 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $48 - i32.const 17000 - i32.gt_u - if - local.get $48 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $49 - i32.const 17000 - i32.gt_u - if - local.get $49 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $50 - i32.const 17000 - i32.gt_u - if - local.get $50 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $51 - i32.const 17000 - i32.gt_u - if - local.get $51 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $52 - i32.const 17000 - i32.gt_u - if - local.get $52 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $53 - i32.const 17000 - i32.gt_u - if - local.get $53 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $54 - i32.const 17000 - i32.gt_u - if - local.get $54 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $55 - i32.const 17000 - i32.gt_u - if - local.get $55 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $56 - i32.const 17000 - i32.gt_u - if - local.get $56 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $57 - i32.const 17000 - i32.gt_u - if - local.get $57 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $58 - i32.const 17000 - i32.gt_u - if - local.get $58 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $59 - i32.const 17000 - i32.gt_u - if - local.get $59 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $60 - i32.const 17000 - i32.gt_u - if - local.get $60 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $61 - i32.const 17000 - i32.gt_u - if - local.get $61 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $62 - i32.const 17000 - i32.gt_u - if - local.get $62 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $63 - i32.const 17000 - i32.gt_u - if - local.get $63 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $64 - i32.const 17000 - i32.gt_u - if - local.get $64 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $65 - i32.const 17000 - i32.gt_u - if - local.get $65 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $66 - i32.const 17000 - i32.gt_u - if - local.get $66 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $67 - i32.const 17000 - i32.gt_u - if - local.get $67 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $68 - i32.const 17000 - i32.gt_u - if - local.get $68 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $69 - i32.const 17000 - i32.gt_u - if - local.get $69 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $70 - i32.const 17000 - i32.gt_u - if - local.get $70 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $71 - i32.const 17000 - i32.gt_u - if - local.get $71 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $72 - i32.const 17000 - i32.gt_u - if - local.get $72 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $73 - i32.const 17000 - i32.gt_u - if - local.get $73 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $74 - i32.const 17000 - i32.gt_u - if - local.get $74 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $75 - i32.const 17000 - i32.gt_u - if - local.get $75 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $76 - i32.const 17000 - i32.gt_u - if - local.get $76 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $77 - i32.const 17000 - i32.gt_u - if - local.get $77 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $78 - i32.const 17000 - i32.gt_u - if - local.get $78 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $77 + call $~lib/rt/pure/__release + local.get $78 + call $~lib/rt/pure/__release local.get $79 - i32.const 17000 - i32.gt_u - if - local.get $79 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $80 - i32.const 17000 - i32.gt_u - if - local.get $80 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $81 - i32.const 17000 - i32.gt_u - if - local.get $81 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $82 - i32.const 17000 - i32.gt_u - if - local.get $82 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $83 - i32.const 17000 - i32.gt_u - if - local.get $83 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $84 - i32.const 17000 - i32.gt_u - if - local.get $84 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $85 - i32.const 17000 - i32.gt_u - if - local.get $85 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $86 - i32.const 17000 - i32.gt_u - if - local.get $86 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $87 - i32.const 17000 - i32.gt_u - if - local.get $87 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $88 - i32.const 17000 - i32.gt_u - if - local.get $88 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $89 - i32.const 17000 - i32.gt_u - if - local.get $89 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $90 - i32.const 17000 - i32.gt_u - if - local.get $90 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $91 - i32.const 17000 - i32.gt_u - if - local.get $91 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $92 - i32.const 17000 - i32.gt_u - if - local.get $92 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $93 - i32.const 17000 - i32.gt_u - if - local.get $93 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $94 - i32.const 17000 - i32.gt_u - if - local.get $94 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $95 - i32.const 17000 - i32.gt_u - if - local.get $95 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $96 - i32.const 17000 - i32.gt_u - if - local.get $96 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $97 - i32.const 17000 - i32.gt_u - if - local.get $97 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $98 - i32.const 17000 - i32.gt_u - if - local.get $98 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $99 - i32.const 17000 - i32.gt_u - if - local.get $99 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $100 - i32.const 17000 - i32.gt_u - if - local.get $100 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $101 - i32.const 17000 - i32.gt_u - if - local.get $101 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $102 - i32.const 17000 - i32.gt_u - if - local.get $102 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $103 - i32.const 17000 - i32.gt_u - if - local.get $103 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $104 - i32.const 17000 - i32.gt_u - if - local.get $104 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $105 - i32.const 17000 - i32.gt_u - if - local.get $105 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $106 - i32.const 17000 - i32.gt_u - if - local.get $106 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $107 - i32.const 17000 - i32.gt_u - if - local.get $107 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $108 - i32.const 17000 - i32.gt_u - if - local.get $108 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $109 - i32.const 17000 - i32.gt_u - if - local.get $109 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 17000 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 17000 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 17000 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $110 - i32.const 17000 - i32.gt_u - if - local.get $110 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $108 + call $~lib/rt/pure/__release + local.get $109 + call $~lib/rt/pure/__release + local.get $110 + call $~lib/rt/pure/__release local.get $111 - i32.const 17000 - i32.gt_u - if - local.get $111 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $112 - i32.const 17000 - i32.gt_u - if - local.get $112 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $113 - i32.const 17000 - i32.gt_u - if - local.get $113 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $112 + call $~lib/rt/pure/__release local.get $114 - i32.const 17000 - i32.gt_u - if - local.get $114 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $115 - i32.const 17000 - i32.gt_u - if - local.get $115 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $116 - i32.const 17000 - i32.gt_u - if - local.get $116 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $117 - i32.const 17000 - i32.gt_u - if - local.get $117 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $118 - i32.const 17000 - i32.gt_u - if - local.get $118 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $119 - i32.const 17000 - i32.gt_u - if - local.get $119 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $120 - i32.const 17000 - i32.gt_u - if - local.get $120 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $121 - i32.const 17000 - i32.gt_u - if - local.get $121 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $122 - i32.const 17000 - i32.gt_u - if - local.get $122 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $123 - i32.const 17000 - i32.gt_u - if - local.get $123 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $124 - i32.const 17000 - i32.gt_u - if - local.get $124 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $125 - i32.const 17000 - i32.gt_u - if - local.get $125 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $126 - i32.const 17000 - i32.gt_u - if - local.get $126 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $127 - i32.const 17000 - i32.gt_u - if - local.get $127 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $128 - i32.const 17000 - i32.gt_u - if - local.get $128 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $129 - i32.const 17000 - i32.gt_u - if - local.get $129 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $130 - i32.const 17000 - i32.gt_u - if - local.get $130 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $131 - i32.const 17000 - i32.gt_u - if - local.get $131 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $132 - i32.const 17000 - i32.gt_u - if - local.get $132 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $133 - i32.const 17000 - i32.gt_u - if - local.get $133 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $134 - i32.const 17000 - i32.gt_u - if - local.get $134 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $135 - i32.const 17000 - i32.gt_u - if - local.get $135 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $136 - i32.const 17000 - i32.gt_u - if - local.get $136 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $137 - i32.const 17000 - i32.gt_u - if - local.get $137 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $138 - i32.const 17000 - i32.gt_u - if - local.get $138 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $139 - i32.const 17000 - i32.gt_u - if - local.get $139 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $140 - i32.const 17000 - i32.gt_u - if - local.get $140 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $141 - i32.const 17000 - i32.gt_u - if - local.get $141 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $142 - i32.const 17000 - i32.gt_u - if - local.get $142 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $143 - i32.const 17000 - i32.gt_u - if - local.get $143 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $144 - i32.const 17000 - i32.gt_u - if - local.get $144 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $145 - i32.const 17000 - i32.gt_u - if - local.get $145 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $140 + call $~lib/rt/pure/__release + local.get $141 + call $~lib/rt/pure/__release + local.get $142 + call $~lib/rt/pure/__release + local.get $143 + call $~lib/rt/pure/__release + local.get $144 + call $~lib/rt/pure/__release + local.get $145 + call $~lib/rt/pure/__release local.get $146 - i32.const 17000 - i32.gt_u - if - local.get $146 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $147 - i32.const 17000 - i32.gt_u - if - local.get $147 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $148 - i32.const 17000 - i32.gt_u - if - local.get $148 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $149 - i32.const 17000 - i32.gt_u - if - local.get $149 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $150 - i32.const 17000 - i32.gt_u - if - local.get $150 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $151 - i32.const 17000 - i32.gt_u - if - local.get $151 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $152 - i32.const 17000 - i32.gt_u - if - local.get $152 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $153 - i32.const 17000 - i32.gt_u - if - local.get $153 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $154 - i32.const 17000 - i32.gt_u - if - local.get $154 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $155 - i32.const 17000 - i32.gt_u - if - local.get $155 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $156 - i32.const 17000 - i32.gt_u - if - local.get $156 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $157 - i32.const 17000 - i32.gt_u - if - local.get $157 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $158 - i32.const 17000 - i32.gt_u - if - local.get $158 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $159 - i32.const 17000 - i32.gt_u - if - local.get $159 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $160 - i32.const 17000 - i32.gt_u - if - local.get $160 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $161 - i32.const 17000 - i32.gt_u - if - local.get $161 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $162 - i32.const 17000 - i32.gt_u - if - local.get $162 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $163 - i32.const 17000 - i32.gt_u - if - local.get $163 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $164 - i32.const 17000 - i32.gt_u - if - local.get $164 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $165 - i32.const 17000 - i32.gt_u - if - local.get $165 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $166 - i32.const 17000 - i32.gt_u - if - local.get $166 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $167 - i32.const 17000 - i32.gt_u - if - local.get $167 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $168 - i32.const 17000 - i32.gt_u - if - local.get $168 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $169 - i32.const 17000 - i32.gt_u - if - local.get $169 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $170 - i32.const 17000 - i32.gt_u - if - local.get $170 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $171 - i32.const 17000 - i32.gt_u - if - local.get $171 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $172 - i32.const 17000 - i32.gt_u - if - local.get $172 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $173 - i32.const 17000 - i32.gt_u - if - local.get $173 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $174 - i32.const 17000 - i32.gt_u - if - local.get $174 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $175 - i32.const 17000 - i32.gt_u - if - local.get $175 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $176 - i32.const 17000 - i32.gt_u - if - local.get $176 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $177 - i32.const 17000 - i32.gt_u - if - local.get $177 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $178 - i32.const 17000 - i32.gt_u - if - local.get $178 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $179 - i32.const 17000 - i32.gt_u - if - local.get $179 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $180 - i32.const 17000 - i32.gt_u - if - local.get $180 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $176 + call $~lib/rt/pure/__release + local.get $177 + call $~lib/rt/pure/__release + local.get $178 + call $~lib/rt/pure/__release + local.get $179 + call $~lib/rt/pure/__release + local.get $180 + call $~lib/rt/pure/__release local.get $181 - i32.const 17000 - i32.gt_u - if - local.get $181 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $182 - i32.const 17000 - i32.gt_u - if - local.get $182 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $183 - i32.const 17000 - i32.gt_u - if - local.get $183 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $184 - i32.const 17000 - i32.gt_u - if - local.get $184 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $185 - i32.const 17000 - i32.gt_u - if - local.get $185 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $186 - i32.const 17000 - i32.gt_u - if - local.get $186 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $187 - i32.const 17000 - i32.gt_u - if - local.get $187 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $188 - i32.const 17000 - i32.gt_u - if - local.get $188 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $189 - i32.const 17000 - i32.gt_u - if - local.get $189 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $190 - i32.const 17000 - i32.gt_u - if - local.get $190 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $191 - i32.const 17000 - i32.gt_u - if - local.get $191 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $192 - i32.const 17000 - i32.gt_u - if - local.get $192 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $193 - i32.const 17000 - i32.gt_u - if - local.get $193 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $194 - i32.const 17000 - i32.gt_u - if - local.get $194 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $195 - i32.const 17000 - i32.gt_u - if - local.get $195 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $196 - i32.const 17000 - i32.gt_u - if - local.get $196 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $197 - i32.const 17000 - i32.gt_u - if - local.get $197 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $198 - i32.const 17000 - i32.gt_u - if - local.get $198 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $199 - i32.const 17000 - i32.gt_u - if - local.get $199 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $200 - i32.const 17000 - i32.gt_u - if - local.get $200 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $201 - i32.const 17000 - i32.gt_u - if - local.get $201 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $202 - i32.const 17000 - i32.gt_u - if - local.get $202 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $203 - i32.const 17000 - i32.gt_u - if - local.get $203 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $204 - i32.const 17000 - i32.gt_u - if - local.get $204 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $205 - i32.const 17000 - i32.gt_u - if - local.get $205 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $206 - i32.const 17000 - i32.gt_u - if - local.get $206 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $207 - i32.const 17000 - i32.gt_u - if - local.get $207 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $208 - i32.const 17000 - i32.gt_u - if - local.get $208 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $209 - i32.const 17000 - i32.gt_u - if - local.get $209 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $210 - i32.const 17000 - i32.gt_u - if - local.get $210 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $211 - i32.const 17000 - i32.gt_u - if - local.get $211 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/string/getString (; 68 ;) (result i32) + (func $std/string/getString (; 78 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 69 ;) + (func $~start (; 79 ;) global.get $~started if return @@ -16638,7 +14464,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 70 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 80 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16689,25 +14515,18 @@ i32.const 2 i32.shl i32.add - local.set $5 + local.set $4 loop $while-continue|0 local.get $1 - local.get $5 + local.get $4 i32.lt_u if local.get $1 i32.load - local.tee $4 + local.tee $5 if - local.get $4 - i32.const 17000 - i32.ge_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $5 + call $~lib/rt/pure/__visit end local.get $1 i32.const 4 @@ -16725,14 +14544,7 @@ local.tee $1 if local.get $1 - i32.const 17000 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__visit end end local.get $3 @@ -16746,17 +14558,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 @@ -16780,4 +14584,16 @@ i32.store offset=4 end ) + (func $~lib/rt/pure/__visit (; 81 ;) (param $0 i32) + local.get $0 + i32.const 17000 + i32.lt_u + if + return + end + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + ) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 5df6ad2b1a..c858d7e0c5 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,13 +1,13 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (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 $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\06\00\00\00\01\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -52,46 +52,34 @@ (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/symbol/Symbol (; 1 ;) (result i32) + (local $0 i32) + global.get $~lib/symbol/nextId + local.tee $0 + i32.const 1 + i32.add + global.set $~lib/symbol/nextId local.get $0 - i32.const 1073741808 - i32.gt_u + i32.eqz if unreachable end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 + ) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -99,16 +87,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -117,13 +105,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -134,9 +151,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.fill (; 2 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -347,7 +364,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 3 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -368,7 +385,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 4 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -401,7 +418,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hashStr (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 7 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/hash/hashStr (; 8 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -413,11 +438,7 @@ i32.const 0 local.set $0 local.get $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 @@ -445,7 +466,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -521,7 +542,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -538,18 +559,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -561,7 +574,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 11 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -602,7 +615,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -715,7 +728,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -802,7 +815,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -833,7 +846,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -874,7 +887,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -987,7 +1000,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1081,7 +1094,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 15 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 18 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1178,7 +1191,16 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#get (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1197,14 +1219,12 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 17 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has else i32.const 0 end @@ -1216,7 +1236,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1389,62 +1409,55 @@ end end ) - (func $~lib/string/String.__concat (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat - local.get $1 - i32.const 832 - local.get $1 - select - local.tee $2 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $3 - local.get $0 - i32.const 832 - local.get $0 - select - local.tee $4 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - i32.const 1 - i32.shl - local.tee $1 - i32.add - local.tee $0 - i32.eqz - if - i32.const 336 - local.set $0 - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/memory/memory.copy - local.get $0 - local.get $1 - i32.add - local.get $2 - local.get $3 - call $~lib/memory/memory.copy + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $3 + local.get $1 + i32.const 832 + local.get $1 + select + local.tee $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add + local.tee $2 + i32.eqz + if + i32.const 336 + return end + local.get $2 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + local.get $2 + ) + (func $~lib/string/String.__concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 832 local.get $0 + select + local.get $1 + call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 20 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 25 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1504,9 +1517,7 @@ if (result i32) global.get $~lib/symbol/idToString local.get $0 - local.get $0 - call $~lib/util/hash/hash32 - call $~lib/map/Map#find + call $~lib/map/Map#has else i32.const 0 end @@ -1522,31 +1533,11 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 21 ;) + (func $start:std/symbol (; 26 ;) (local $0 i32) - global.get $~lib/symbol/nextId - local.tee $0 - i32.const 1 - i32.add - global.set $~lib/symbol/nextId - local.get $0 - i32.eqz - if - unreachable - end - local.get $0 + call $~lib/symbol/Symbol global.set $std/symbol/sym1 - global.get $~lib/symbol/nextId - local.tee $0 - i32.const 1 - i32.add - global.set $~lib/symbol/nextId - local.get $0 - i32.eqz - if - unreachable - end - local.get $0 + call $~lib/symbol/Symbol global.set $std/symbol/sym2 global.get $std/symbol/sym1 global.get $std/symbol/sym2 @@ -1654,17 +1645,7 @@ call $~lib/builtins/abort unreachable end - global.get $~lib/symbol/nextId - local.tee $0 - i32.const 1 - i32.add - global.set $~lib/symbol/nextId - local.get $0 - i32.eqz - if - unreachable - end - local.get $0 + call $~lib/symbol/Symbol call $~lib/symbol/_Symbol#toString i32.const 896 call $~lib/string/String.__eq @@ -1721,7 +1702,7 @@ unreachable end ) - (func $~start (; 22 ;) + (func $~start (; 27 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 131132a7da..dbe2b911a4 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,16 +1,17 @@ (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_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 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))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) @@ -19,7 +20,8 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_f32 (func (param i32) (result f32))) + (type $i32_=>_f64 (func (param i32) (result f64))) (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_f64_=>_none (func (param i32 i32 f64))) @@ -1012,7 +1014,69 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + memory.size + local.tee $2 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $1 + local.get $1 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1088,10 +1152,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1119,65 +1182,9 @@ local.tee $3 i32.eqz if - memory.size - local.tee $3 - i32.const 16 local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $5 - local.get $3 - local.get $5 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $5 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $3 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory + call $~lib/rt/tlsf/growMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1227,7 +1234,15 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + local.get $1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1452,9 +1467,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.const 7388 i32.gt_u @@ -1462,48 +1516,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + local.get $0 + i32.const 7388 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1519,15 +1547,12 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $1 local.get $2 i32.shl local.tee $3 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 i32.const 0 local.get $3 @@ -1535,12 +1560,9 @@ local.get $0 i32.eqz if - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $0 end @@ -1554,7 +1576,8 @@ i32.const 0 i32.store offset=8 local.get $2 - local.tee $1 + local.set $1 + local.get $2 local.get $0 i32.load local.tee $4 @@ -1564,14 +1587,7 @@ call $~lib/rt/pure/__retain local.set $1 local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $0 local.get $1 @@ -1584,7 +1600,106 @@ i32.store offset=8 local.get $0 ) - (func $std/typedarray/testInstantiate (; 18 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#constructor (; 22 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint8Array#constructor (; 23 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Int16Array#constructor (; 25 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint16Array#constructor (; 26 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Int32Array#constructor (; 27 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint32Array#constructor (; 28 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Int64Array#constructor (; 29 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (param $0 i32) (result i32) + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $0 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $std/typedarray/testInstantiate (; 33 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1596,16 +1711,8 @@ (local $9 i32) (local $10 i32) (local $11 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $1 i32.load offset=4 local.get $1 @@ -1643,16 +1750,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $2 i32.load offset=4 local.get $2 @@ -1690,16 +1789,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 i32.load offset=4 local.get $3 @@ -1737,16 +1828,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $4 i32.load offset=4 local.get $4 @@ -1788,16 +1871,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $5 i32.load offset=4 local.get $5 @@ -1839,16 +1914,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $6 i32.load offset=4 local.get $6 @@ -1890,16 +1957,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $7 i32.load offset=4 local.get $7 @@ -1941,16 +2000,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $8 i32.load offset=4 local.get $8 @@ -1992,16 +2043,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $9 i32.load offset=4 local.get $9 @@ -2043,16 +2086,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $10 i32.load offset=4 local.get $10 @@ -2094,16 +2129,8 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $0 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $11 i32.load offset=4 local.get $11 @@ -2146,106 +2173,29 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $9 - i32.const 7388 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $10 - i32.const 7388 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $11 - i32.const 7388 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2269,7 +2219,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2292,7 +2242,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2345,12 +2295,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $4 i32.load @@ -2379,7 +2326,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 22 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2403,7 +2350,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2456,12 +2403,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $4 i32.load @@ -2490,11 +2434,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 24 ;) (param $0 i32) + (func $~setArgumentsLength (; 39 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2572,7 +2516,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 26 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 41 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2614,30 +2558,26 @@ end local.get $1 ) - (func $~lib/rt/tlsf/__free (; 27 ;) (param $0 i32) - (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.tee $0 - local.get $0 + (func $~lib/rt/tlsf/freeBlock (; 42 ;) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 i32.load i32.const 1 i32.or i32.store local.get $0 + local.get $1 call $~lib/rt/tlsf/insertBlock - local.get $0 + local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/util/sort/weakHeapSort (; 28 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 43 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) (local $5 i32) (local $6 f64) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize local.get $1 i32.const 31 i32.add @@ -2647,9 +2587,7 @@ i32.shl local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $5 i32.const 0 local.get $2 @@ -2877,8 +2815,10 @@ br $for-loop|2 end end + call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock local.get $0 f64.load offset=8 local.set $4 @@ -2890,7 +2830,68 @@ local.get $4 f64.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 29 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 44 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $1 + i32.const 1 + i32.le_s + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.load offset=4 + local.set $0 + local.get $1 + i32.const 2 + i32.eq + if + local.get $0 + f64.load offset=8 + local.set $3 + local.get $0 + f64.load + local.set $4 + i32.const 2 + global.set $~argumentsLength + local.get $3 + local.get $4 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $0 + local.get $4 + f64.store offset=8 + local.get $0 + local.get $3 + f64.store + end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $1 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $1 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $1 + call $~lib/util/sort/weakHeapSort + end + end + local.get $2 + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 45 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2919,7 +2920,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 46 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2942,7 +2943,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2974,7 +2975,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2993,7 +2994,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3013,7 +3014,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3082,7 +3083,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3255,28 +3256,22 @@ end end ) - (func $~lib/rt/__allocArray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 16 local.get $2 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 i32.shl local.tee $4 local.set $6 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 local.get $3 if @@ -3299,7 +3294,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 37 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3318,7 +3313,7 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 38 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 54 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3373,7 +3368,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3424,12 +3419,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $4 i32.load @@ -3454,7 +3446,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3535,7 +3527,16 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3549,14 +3550,10 @@ unreachable end local.get $0 - i32.load offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 42 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3600,7 +3597,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3630,13 +3627,6 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $2 i32.const 0 i32.lt_s @@ -3666,10 +3656,9 @@ i32.const 0 i32.gt_s select - local.tee $3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $2 + call $~lib/typedarray/Int32Array#constructor + local.tee $3 call $~lib/rt/pure/__retain local.tee $4 i32.load offset=4 @@ -3679,22 +3668,15 @@ i32.const 2 i32.shl i32.add - local.get $3 + local.get $2 i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3802,28 +3784,20 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 46 ;) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 63 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + call $~lib/typedarray/Int8Array#constructor + local.tee $3 local.tee $0 i32.const 0 i32.const 1 @@ -3849,13 +3823,13 @@ if i32.const 4 global.set $~argumentsLength - local.get $3 + local.get $2 local.get $1 local.get $4 i32.add i32.load8_s i32.add - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -3863,7 +3837,7 @@ br $for-loop|0 end end - local.get $3 + local.get $2 i32.const 255 i32.and i32.const 6 @@ -3876,17 +3850,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $3 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#__set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3906,7 +3873,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 65 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3943,7 +3910,79 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 66 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + 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 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 67 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3967,38 +4006,13 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 50 ;) - (local $0 i32) + (func $~lib/typedarray/Int16Array#reduce (; 69 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - 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.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 @@ -4011,15 +4025,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $2 local.get $3 - local.get $4 local.get $1 i32.const 1 i32.shl i32.add i32.load16_s i32.add - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -4027,7 +4041,28 @@ br $for-loop|0 end end - local.get $3 + local.get $2 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 70 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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#reduce i32.const 65535 i32.and i32.const 6 @@ -4040,17 +4075,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4074,38 +4102,13 @@ local.get $2 i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 52 ;) - (local $0 i32) + (func $~lib/typedarray/Uint16Array#reduce (; 72 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - 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.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 @@ -4118,15 +4121,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $2 local.get $3 - local.get $4 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u i32.add - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -4134,7 +4137,28 @@ br $for-loop|0 end end - local.get $3 + local.get $2 + ) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 73 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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#reduce i32.const 65535 i32.and i32.const 6 @@ -4147,17 +4171,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reduce (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 74 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4198,7 +4215,41 @@ end local.get $3 ) - (func $~lib/typedarray/Uint32Array#__set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 75 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array#__set (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4222,7 +4273,41 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int64Array#__set (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 77 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#__set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4246,12 +4331,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 56 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 79 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 57 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 80 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4292,7 +4377,41 @@ end local.get $3 ) - (func $~lib/typedarray/Uint64Array#__set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 81 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#__set (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4316,7 +4435,41 @@ local.get $2 i64.store ) - (func $~lib/typedarray/Float32Array#__set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 83 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#__set (; 84 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4340,43 +4493,18 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 60 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 85 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 61 ;) - (local $0 i32) + (func $~lib/typedarray/Float32Array#reduce (; 86 ;) (param $0 i32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - 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 $2 f32) + (local $3 i32) local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 @@ -4389,15 +4517,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $2 local.get $3 - local.get $4 local.get $1 i32.const 2 i32.shl i32.add f32.load f32.add - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -4405,64 +4533,20 @@ br $for-loop|0 end end - local.get $3 - f32.const 6 - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 62 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 87 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 63 ;) - (local $0 i32) + (func $~lib/typedarray/Float64Array#reduce (; 88 ;) (param $0 i32) (result f64) (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - 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 $2 f64) + (local $3 i32) local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 @@ -4475,15 +4559,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $2 local.get $3 - local.get $4 local.get $1 i32.const 3 i32.shl i32.add f64.load f64.add - local.set $3 + local.set $2 local.get $1 i32.const 1 i32.add @@ -4491,43 +4575,16 @@ br $for-loop|0 end end - local.get $3 - f64.const 6 - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 64 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 89 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 local.tee $0 i32.const 0 i32.const 1 @@ -4555,13 +4612,13 @@ if i32.const 4 global.set $~argumentsLength - local.get $2 + local.get $1 local.get $0 local.get $3 i32.add i32.load8_s i32.add - local.set $2 + local.set $1 local.get $0 i32.const 1 i32.sub @@ -4569,7 +4626,7 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.const 255 i32.and i32.const 6 @@ -4582,17 +4639,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 65 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 90 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4630,37 +4680,84 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 66 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 91 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + local.tee $0 + i32.const 0 i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 92 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#reduceRight (; 93 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 i32.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 1 @@ -4675,15 +4772,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $1 local.get $2 - local.get $3 local.get $0 i32.const 1 i32.shl i32.add i32.load16_s i32.add - local.set $2 + local.set $1 local.get $0 i32.const 1 i32.sub @@ -4691,7 +4788,28 @@ br $for-loop|0 end end - local.get $2 + local.get $1 + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 94 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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#reduceRight i32.const 65535 i32.and i32.const 6 @@ -4705,46 +4823,14 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 67 ;) - (local $0 i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 95 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 1 @@ -4759,15 +4845,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $1 local.get $2 - local.get $3 local.get $0 i32.const 1 i32.shl i32.add i32.load16_u i32.add - local.set $2 + local.set $1 local.get $0 i32.const 1 i32.sub @@ -4775,7 +4861,28 @@ br $for-loop|0 end end - local.get $2 + local.get $1 + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 96 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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#reduceRight i32.const 65535 i32.and i32.const 6 @@ -4789,16 +4896,9 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reduceRight (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 97 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4840,7 +4940,75 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (; 69 ;) (param $0 i32) (param $1 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 98 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 99 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#reduceRight (; 100 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4882,60 +5050,103 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 70 ;) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 101 ;) (local $0 i32) (local $1 i32) - (local $2 f32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $1 local.tee $0 i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.load offset=4 - local.set $3 + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $0 + i32.const 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + if i32.const 0 - i32.ge_s + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 102 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#reduceRight (; 103 ;) (param $0 i32) (result f32) + (local $1 f32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|0 + local.get $0 + i32.const 0 + i32.ge_s if i32.const 4 global.set $~argumentsLength + local.get $1 local.get $2 - local.get $3 local.get $0 i32.const 2 i32.shl i32.add f32.load f32.add - local.set $2 + local.set $1 local.get $0 i32.const 1 i32.sub @@ -4943,58 +5154,14 @@ br $for-loop|0 end end - local.get $2 - f32.const 6 - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 71 ;) - (local $0 i32) - (local $1 i32) - (local $2 f64) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - 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 + (func $~lib/typedarray/Float64Array#reduceRight (; 104 ;) (param $0 i32) (result f64) + (local $1 f64) + (local $2 i32) local.get $0 i32.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 3 @@ -5009,15 +5176,15 @@ if i32.const 4 global.set $~argumentsLength + local.get $1 local.get $2 - local.get $3 local.get $0 i32.const 3 i32.shl i32.add f64.load f64.add - local.set $2 + local.set $1 local.get $0 i32.const 1 i32.sub @@ -5025,119 +5192,91 @@ br $for-loop|0 end end - local.get $2 - f64.const 6 - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 73 ;) - (local $0 i32) + (func $~lib/typedarray/Int8Array#map (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 - local.get $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - call $~lib/rt/tlsf/maybeInitialize + local.set $4 i32.const 12 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.get $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.set $4 + call $~lib/rt/tlsf/__alloc + local.set $3 loop $for-loop|0 + local.get $1 local.get $2 - local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.add - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add i32.load8_s - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 i32.mul i32.store8 - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end local.get $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $4 + local.get $3 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 107 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + 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 $0 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -5178,130 +5317,107 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/typedarray/Uint8Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 152 - i32.const 44 - call $~lib/builtins/abort - unreachable - end - local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.load offset=4 - i32.add - i32.load8_u + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 75 ;) - (local $0 i32) + (func $~lib/typedarray/Uint8Array#map (; 108 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 - local.get $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - call $~lib/rt/tlsf/maybeInitialize + local.set $4 i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.get $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.set $4 + call $~lib/rt/tlsf/__alloc + local.set $3 loop $for-loop|0 + local.get $1 local.get $2 - local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.add - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add i32.load8_u - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 i32.mul i32.store8 - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end local.get $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $4 + local.get $3 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint8Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 368 + i32.const 432 + i32.const 152 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 110 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + 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 $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get @@ -5342,111 +5458,88 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) - (local $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 111 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 - local.get $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $2 + local.get $0 i32.load offset=4 - local.set $5 - call $~lib/rt/tlsf/maybeInitialize + local.set $4 i32.const 12 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $3 + local.get $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.set $4 + call $~lib/rt/tlsf/__alloc + local.set $3 loop $for-loop|0 + local.get $1 local.get $2 - local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $4 + local.get $1 + local.get $3 i32.add - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add i32.load8_u - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 i32.mul i32.store8 - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end local.get $0 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $4 + local.get $3 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 112 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + 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 $0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get @@ -5487,25 +5580,11 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#map (; 77 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 113 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5521,22 +5600,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -5581,7 +5654,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#__get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 114 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5604,19 +5677,12 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 79 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 115 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor + local.tee $1 local.tee $0 i32.const 0 i32.const 1 @@ -5631,7 +5697,7 @@ call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Int16Array#__get i32.const 1 @@ -5644,7 +5710,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int16Array#__get i32.const 4 @@ -5657,7 +5723,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int16Array#__get i32.const 9 @@ -5670,26 +5736,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#map (; 80 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 116 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5705,22 +5757,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -5765,7 +5811,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 117 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5788,19 +5834,12 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 82 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 118 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 local.tee $0 i32.const 0 i32.const 1 @@ -5815,7 +5854,7 @@ call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Uint16Array#__get i32.const 1 @@ -5828,7 +5867,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint16Array#__get i32.const 4 @@ -5841,7 +5880,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint16Array#__get i32.const 9 @@ -5854,26 +5893,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#map (; 83 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 119 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5889,22 +5914,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -5949,19 +5968,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 84 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 120 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor + local.tee $1 local.tee $0 i32.const 0 i32.const 1 @@ -5976,7 +5988,7 @@ call $~lib/typedarray/Int32Array#__set local.get $0 call $~lib/typedarray/Int32Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 1 @@ -5989,7 +6001,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 4 @@ -6002,7 +6014,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 9 @@ -6015,26 +6027,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#map (; 85 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 121 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6050,22 +6048,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -6110,7 +6102,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 122 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6133,19 +6125,12 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 87 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 123 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 local.tee $0 i32.const 0 i32.const 1 @@ -6160,7 +6145,7 @@ call $~lib/typedarray/Uint32Array#__set local.get $0 call $~lib/typedarray/Uint32Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 1 @@ -6173,7 +6158,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 4 @@ -6186,7 +6171,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 9 @@ -6199,31 +6184,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 88 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 124 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 89 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 125 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6239,22 +6210,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -6299,7 +6264,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 126 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6322,19 +6287,12 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 91 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 127 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor + local.tee $1 local.tee $0 i32.const 0 i64.const 1 @@ -6349,7 +6307,7 @@ call $~lib/typedarray/Int64Array#__set local.get $0 call $~lib/typedarray/Int64Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Int64Array#__get i64.const 1 @@ -6362,7 +6320,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int64Array#__get i64.const 4 @@ -6375,7 +6333,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int64Array#__get i64.const 9 @@ -6388,26 +6346,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#map (; 92 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 128 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6423,22 +6367,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -6483,7 +6421,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 129 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6506,19 +6444,12 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 94 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 130 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 local.tee $0 i32.const 0 i64.const 1 @@ -6533,7 +6464,7 @@ call $~lib/typedarray/Uint64Array#__set local.get $0 call $~lib/typedarray/Uint64Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Uint64Array#__get i64.const 1 @@ -6546,7 +6477,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint64Array#__get i64.const 4 @@ -6559,7 +6490,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint64Array#__get i64.const 9 @@ -6572,31 +6503,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 95 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 131 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 96 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 132 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -6612,22 +6529,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -6672,7 +6583,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 133 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6695,19 +6606,12 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 98 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 134 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float32Array#constructor + local.tee $1 local.tee $0 i32.const 0 f32.const 1 @@ -6722,7 +6626,7 @@ call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Float32Array#__get f32.const 1 @@ -6735,7 +6639,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Float32Array#__get f32.const 4 @@ -6748,7 +6652,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Float32Array#__get f32.const 9 @@ -6761,31 +6665,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 99 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 135 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 100 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 136 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -6801,22 +6691,16 @@ local.get $0 i32.load offset=4 local.set $5 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $0 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl local.tee $6 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 loop $for-loop|0 local.get $2 @@ -6861,19 +6745,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 101 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 137 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float64Array#constructor + local.tee $1 local.tee $0 i32.const 0 f64.const 1 @@ -6888,7 +6765,7 @@ call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#map - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 1 @@ -6901,7 +6778,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 4 @@ -6914,7 +6791,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 9 @@ -6927,26 +6804,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 138 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -6955,7 +6818,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 103 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7011,10 +6874,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 - local.get $4 local.get $5 i32.const 3 i32.and + local.get $4 i32.or i32.store local.get $1 @@ -7052,21 +6915,22 @@ local.get $1 local.get $3 call $~lib/rt/rtrace/onrealloc - local.get $1 - local.get $1 - i32.load - i32.const 1 - i32.or - i32.store local.get $0 local.get $1 - call $~lib/rt/tlsf/insertBlock - local.get $1 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock end local.get $3 ) - (func $~lib/typedarray/Int8Array#filter (; 104 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 140 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) + (func $~lib/typedarray/Int8Array#filter (; 141 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7074,22 +6938,17 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -7107,16 +6966,17 @@ i32.const 3 global.set $~argumentsLength local.get $6 - i32.const 2 - i32.gt_s + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 if local.get $3 - local.tee $0 + local.tee $8 i32.const 1 i32.add local.set $3 - local.get $0 local.get $5 + local.get $8 i32.add local.get $6 i32.store8 @@ -7129,13 +6989,9 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7148,19 +7004,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 105 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 142 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7248,32 +7096,18 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 106 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 107 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 144 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7284,19 +7118,13 @@ local.get $0 i32.load offset=8 local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -7336,13 +7164,9 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7355,19 +7179,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 108 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 145 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7455,25 +7271,11 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 109 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 146 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7484,19 +7286,13 @@ local.get $0 i32.load offset=8 local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -7536,13 +7332,9 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $3 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store @@ -7555,19 +7347,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 110 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 147 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7655,25 +7439,11 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7682,7 +7452,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 112 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 149 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7690,37 +7460,32 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s if local.get $7 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add @@ -7729,65 +7494,54 @@ i32.const 3 global.set $~argumentsLength local.get $6 - i32.const 2 - i32.gt_s + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 if - local.get $2 - local.tee $0 + local.get $3 + local.tee $8 i32.const 1 i32.add - local.set $2 + local.set $3 local.get $5 - local.get $0 + local.get $8 i32.const 1 i32.shl i32.add local.get $6 i32.store16 end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock - local.get $2 + local.get $3 i32.const 1 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - local.tee $2 + call $~lib/rt/tlsf/__realloc + local.tee $3 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $2 + local.get $3 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 113 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 150 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -7877,32 +7631,18 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 115 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 152 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7915,21 +7655,15 @@ i32.const 1 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 1 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -7973,16 +7707,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 1 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -7995,19 +7725,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 116 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 153 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -8097,30 +7819,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 117 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 154 ;) (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 (; 118 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 155 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8133,21 +7841,15 @@ i32.const 2 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -8191,16 +7893,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -8213,19 +7911,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 119 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 156 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -8315,30 +8005,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 121 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 158 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8351,21 +8027,15 @@ i32.const 2 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -8409,16 +8079,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -8431,19 +8097,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 122 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 159 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -8533,30 +8191,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 123 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 160 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 124 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 161 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8569,21 +8213,15 @@ i32.const 3 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -8627,16 +8265,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -8649,19 +8283,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 125 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 162 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 1 @@ -8751,30 +8377,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 126 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 163 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 127 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 164 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8787,21 +8399,15 @@ i32.const 3 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -8845,16 +8451,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -8867,19 +8469,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 128 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 165 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 1 @@ -8969,30 +8563,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 129 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 166 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 130 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 167 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9005,21 +8585,15 @@ i32.const 2 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 2 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -9063,16 +8637,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 2 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -9085,19 +8655,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 131 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 168 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 1 @@ -9187,30 +8749,16 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 132 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 169 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 133 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 170 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9223,21 +8771,15 @@ i32.const 3 i32.shr_u local.set $4 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $4 i32.const 3 i32.shl i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 @@ -9281,16 +8823,12 @@ end end local.get $1 - call $~lib/rt/tlsf/maybeInitialize local.get $5 - call $~lib/rt/tlsf/checkUsedBlock local.get $2 i32.const 3 i32.shl local.tee $0 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $2 call $~lib/rt/pure/__retain i32.store @@ -9303,19 +8841,11 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 134 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 171 ;) (local $0 i32) (local $1 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 6 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 1 @@ -9405,32 +8935,18 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 135 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 136 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 173 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9469,13 +8985,57 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 137 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 175 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + 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 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 47 + call $~lib/typedarray/Int8Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#some (; 176 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9514,14 +9074,102 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 177 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + 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 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 178 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + 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 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 140 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 180 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9564,13 +9212,57 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 181 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $~lib/typedarray/Uint16Array#some (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 182 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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 52 + call $~lib/typedarray/Int16Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 53 + call $~lib/typedarray/Int16Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#some (; 183 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9613,12 +9305,56 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 184 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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 54 + call $~lib/typedarray/Uint16Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 185 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9661,16 +9397,104 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.eqz + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 188 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + 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 56 + call $~lib/typedarray/Int32Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 57 + call $~lib/typedarray/Int32Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 189 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + 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 58 + call $~lib/typedarray/Int32Array#some i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 59 + call $~lib/typedarray/Int32Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 146 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 190 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 147 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 191 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9713,16 +9537,104 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 148 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 192 ;) (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 (; 149 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 193 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + 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 60 + call $~lib/typedarray/Int64Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 61 + call $~lib/typedarray/Int64Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 194 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + 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 62 + call $~lib/typedarray/Int64Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 63 + call $~lib/typedarray/Int64Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 195 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 196 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9765,17 +9677,61 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 151 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 197 ;) (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 (; 152 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 198 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + 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 64 + call $~lib/typedarray/Float32Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 65 + call $~lib/typedarray/Float32Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 199 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 200 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9818,12 +9774,56 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 154 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 202 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + 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 66 + call $~lib/typedarray/Float64Array#some + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 67 + call $~lib/typedarray/Float64Array#some + if + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int8Array#findIndex (; 203 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9862,14 +9862,61 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 204 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 157 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 205 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + 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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8Array#findIndex (; 206 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9908,7 +9955,101 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#findIndex (; 158 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 207 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + 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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 208 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + 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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#findIndex (; 209 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9951,14 +10092,61 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 159 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 210 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 160 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 211 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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 74 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#findIndex (; 212 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10001,15 +10189,62 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#findIndex (; 161 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 213 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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 76 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array#findIndex (; 214 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u local.set $4 @@ -10044,12 +10279,106 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 216 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + 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 78 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 217 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + 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 80 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array#findIndex (; 218 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10092,12 +10421,106 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 164 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 219 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 165 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 220 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + 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 82 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 221 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + 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 84 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#findIndex (; 222 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10140,12 +10563,59 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 166 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 223 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 167 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 224 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + 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 86 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#findIndex (; 225 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10188,12 +10658,59 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 168 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 226 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 169 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 227 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + 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 88 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 440 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 228 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10203,7 +10720,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 170 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 229 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10243,13 +10760,57 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 171 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 230 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + 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 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 91 + call $~lib/typedarray/Int8Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 172 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 232 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10289,7 +10850,95 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 173 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 233 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + 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 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 234 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + 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 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 235 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10299,7 +10948,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 174 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 236 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10343,7 +10992,51 @@ i32.const 1 end ) - (func $~lib/typedarray/Uint16Array#every (; 175 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 237 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + 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 96 + call $~lib/typedarray/Int16Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 97 + call $~lib/typedarray/Int16Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#every (; 238 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10387,13 +11080,57 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 176 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 239 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + 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 98 + call $~lib/typedarray/Uint16Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 240 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 177 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 241 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10437,63 +11174,239 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 178 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 242 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set local.get $0 - i64.const 2 - i64.rem_s - i64.eqz - ) - (func $~lib/typedarray/Int64Array#every (; 179 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 180 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + 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 100 + call $~lib/typedarray/Int32Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 101 + call $~lib/typedarray/Int32Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 243 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + 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 102 + call $~lib/typedarray/Int32Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 103 + call $~lib/typedarray/Int32Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 244 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 2 + i64.rem_s + i64.eqz + ) + (func $~lib/typedarray/Int64Array#every (; 245 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 0 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 + end + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 246 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + 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 104 + call $~lib/typedarray/Int64Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 105 + call $~lib/typedarray/Int64Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 247 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $~lib/math/NativeMathf.mod (; 181 ;) (param $0 f32) (result f32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 248 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + 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 106 + call $~lib/typedarray/Int64Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 107 + call $~lib/typedarray/Int64Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/math/NativeMathf.mod (; 249 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10640,13 +11553,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 182 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 250 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 183 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 251 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10690,7 +11603,51 @@ i32.const 1 end ) - (func $~lib/math/NativeMath.mod (; 184 ;) (param $0 f64) (result f64) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 252 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + 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 108 + call $~lib/typedarray/Float32Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 109 + call $~lib/typedarray/Float32Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/math/NativeMath.mod (; 253 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -10844,13 +11801,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 185 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 254 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 255 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10894,7 +11851,51 @@ i32.const 1 end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 256 ;) + (local $0 i32) + (local $1 i32) + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + 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 110 + call $~lib/typedarray/Float64Array#every + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 461 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 111 + call $~lib/typedarray/Float64Array#every + if + i32.const 0 + i32.const 304 + i32.const 463 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -10939,7 +11940,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 188 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 258 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10947,16 +11948,8 @@ (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf @@ -11029,16 +12022,9 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#forEach (; 189 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 259 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11071,21 +12057,13 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 190 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 260 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -11128,30 +12106,15 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 191 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 261 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf @@ -11194,16 +12157,9 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 192 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 262 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -11248,25 +12204,50 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 193 ;) - (local $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 263 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 264 ;) + (local $0 i32) + (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -11300,26 +12281,46 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 + call $~lib/typedarray/Int16Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array#forEach (; 265 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 i32.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $3 loop $for-loop|0 local.get $1 - local.get $4 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $2 local.get $1 i32.const 1 i32.shl i32.add - i32.load16_s + i32.load16_u local.get $1 local.get $0 call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 @@ -11330,46 +12331,15 @@ br $for-loop|0 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 194 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 266 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -11397,36 +12367,7 @@ i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end + call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -11438,17 +12379,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 195 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 267 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -11489,7 +12423,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 196 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 268 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11526,7 +12460,97 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 197 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 269 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 117 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 270 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 118 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 271 ;) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11568,7 +12592,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 198 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 272 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11605,7 +12629,103 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 199 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 273 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 119 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 274 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 120 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 275 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11647,64 +12767,26 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 200 ;) - (local $0 i32) + (func $~lib/typedarray/Float32Array#forEach (; 276 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set local.get $0 i32.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 loop $for-loop|0 local.get $1 - local.get $4 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $2 local.get $1 i32.const 2 i32.shl @@ -11720,6 +12802,40 @@ br $for-loop|0 end end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 277 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + call $~lib/typedarray/Float32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -11731,17 +12847,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 278 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11783,64 +12892,26 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 202 ;) - (local $0 i32) + (func $~lib/typedarray/Float64Array#forEach (; 279 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set local.get $0 i32.load offset=4 - local.set $3 + local.set $2 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 loop $for-loop|0 local.get $1 - local.get $4 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $3 + local.get $2 local.get $1 i32.const 3 i32.shl @@ -11856,6 +12927,40 @@ br $for-loop|0 end end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 280 ;) + (local $0 i32) + (local $1 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + call $~lib/typedarray/Float64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -11867,17 +12972,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $1 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (; 203 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 281 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11929,7 +13027,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 204 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 282 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11938,31 +13036,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -11978,7 +13059,7 @@ i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -11997,15 +13078,7 @@ end local.get $2 call $~lib/typedarray/Int8Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -12043,7 +13116,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Int8Array#subarray @@ -12101,44 +13174,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 205 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 283 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12190,7 +13235,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 206 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 284 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12224,12 +13269,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -12254,7 +13296,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 207 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 285 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12263,31 +13305,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -12301,7 +13326,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -12318,15 +13343,7 @@ end local.get $2 call $~lib/typedarray/Uint8Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -12362,7 +13379,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Uint8Array#subarray local.tee $1 @@ -12419,44 +13436,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 208 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 286 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12490,12 +13479,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -12520,7 +13506,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 287 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12529,31 +13515,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -12567,7 +13536,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -12584,15 +13553,7 @@ end local.get $2 call $~lib/typedarray/Uint8Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -12628,7 +13589,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $1 @@ -12685,44 +13646,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 210 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 288 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12780,7 +13713,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 211 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 289 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12816,12 +13749,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -12850,7 +13780,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 212 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 290 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12859,31 +13789,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Int16Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -12899,7 +13812,7 @@ i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -12918,15 +13831,7 @@ end local.get $2 call $~lib/typedarray/Int16Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -12964,7 +13869,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Int16Array#subarray local.tee $1 @@ -13021,44 +13926,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 213 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 291 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13116,7 +13993,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 214 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 292 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13152,12 +14029,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -13186,7 +14060,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 215 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13195,31 +14069,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Uint16Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -13233,7 +14090,7 @@ i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -13250,15 +14107,7 @@ end local.get $2 call $~lib/typedarray/Uint16Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -13294,7 +14143,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Uint16Array#subarray local.tee $1 @@ -13351,44 +14200,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 216 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 294 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13446,7 +14267,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 217 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 295 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13455,31 +14276,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Int32Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Int32Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -13491,7 +14295,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -13506,15 +14310,7 @@ end local.get $2 call $~lib/typedarray/Int32Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -13548,7 +14344,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Int32Array#subarray @@ -13606,44 +14402,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 218 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 296 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13679,12 +14447,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -13713,7 +14478,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 219 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 297 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13722,31 +14487,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Uint32Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -13758,7 +14506,7 @@ local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -13773,15 +14521,7 @@ end local.get $2 call $~lib/typedarray/Int32Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -13815,7 +14555,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Uint32Array#subarray local.tee $1 @@ -13872,44 +14612,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 220 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 298 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13967,7 +14679,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 221 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 299 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14003,12 +14715,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -14037,7 +14746,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 222 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14046,31 +14755,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -14083,7 +14775,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -14099,15 +14791,7 @@ end local.get $2 call $~lib/typedarray/Int64Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -14142,7 +14826,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Int64Array#subarray local.tee $1 @@ -14199,44 +14883,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 223 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 301 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14272,12 +14928,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -14306,7 +14959,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 224 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 302 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14315,31 +14968,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Uint64Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -14352,7 +14988,7 @@ call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -14368,15 +15004,7 @@ end local.get $2 call $~lib/typedarray/Int64Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -14411,7 +15039,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Uint64Array#subarray local.tee $1 @@ -14468,44 +15096,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 225 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 303 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14563,7 +15163,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 226 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 304 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14599,12 +15199,9 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 i32.load @@ -14633,7 +15230,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 227 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 305 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14642,31 +15239,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Float32Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -14679,7 +15259,7 @@ call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -14695,15 +15275,7 @@ end local.get $2 call $~lib/typedarray/Float32Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -14738,7 +15310,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 8 call $~lib/typedarray/Float32Array#subarray local.tee $1 @@ -14795,44 +15367,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (; 228 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 306 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14890,7 +15434,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 229 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 307 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14899,31 +15443,14 @@ (local $5 i32) i32.const 1804 i32.load - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $1 + call $~lib/typedarray/Float64Array#constructor + local.tee $4 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 - local.set $5 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + local.set $3 loop $for-loop|0 local.get $0 local.get $1 @@ -14936,7 +15463,7 @@ call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $5 + local.get $3 local.get $0 i32.const 1792 local.get $0 @@ -14952,15 +15479,7 @@ end local.get $2 call $~lib/typedarray/Float64Array#reverse - local.tee $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release i32.const 0 local.set $0 loop $for-loop|1 @@ -14995,7 +15514,7 @@ br $for-loop|1 end end - local.get $5 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray @@ -15053,44 +15572,16 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (; 230 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 308 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15152,7 +15643,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 309 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15209,7 +15700,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 232 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 310 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15230,24 +15721,17 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 233 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 311 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Int8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15653,42 +16137,21 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 234 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 312 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Uint8Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16091,42 +16554,21 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 235 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 313 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16529,25 +16971,11 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 236 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 314 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -16613,7 +17041,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -16674,7 +17102,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 238 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 316 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -16697,24 +17125,17 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 239 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 317 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Int16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -17119,42 +17540,21 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 240 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 318 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Uint16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -17557,25 +17957,11 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 319 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -17639,7 +18025,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 242 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 320 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -17698,7 +18084,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 243 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 321 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -17721,24 +18107,17 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 244 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 322 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Int32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -18140,42 +18519,21 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 245 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 323 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Uint32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -18576,25 +18934,11 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 246 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 324 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -18658,7 +19002,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 247 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 325 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -18717,7 +19061,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 248 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 326 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -18740,24 +19084,17 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 249 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 327 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Int64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -19159,42 +19496,21 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 250 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 328 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Uint64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -19596,25 +19912,11 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 251 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 329 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -19678,7 +19980,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 252 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 330 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -19737,7 +20039,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 253 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 331 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19760,24 +20062,17 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 254 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 332 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Float32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -20179,25 +20474,11 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 255 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 333 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -20261,7 +20542,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 256 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 334 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -20320,7 +20601,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 257 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 335 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20343,24 +20624,17 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 258 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 336 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 i32.load + local.tee $0 local.set $2 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.get $0 + call $~lib/typedarray/Float64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -20763,25 +21037,125 @@ unreachable end local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#includes (; 337 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + i32.const 1 + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $3 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $3 + local.get $3 + f64.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + end + ) + (func $~lib/typedarray/Float32Array#includes (; 338 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f32) + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + i32.const 1 + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $3 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $3 + local.get $3 + f32.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 end ) - (func $~lib/util/number/decimalCount32 (; 259 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 339 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -20829,7 +21203,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 340 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -20853,7 +21227,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 261 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 341 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20866,7 +21240,7 @@ local.get $0 i32.const 0 i32.lt_s - local.tee $2 + local.tee $1 if i32.const 0 local.get $0 @@ -20875,32 +21249,35 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $3 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 local.get $3 call $~lib/util/number/utoa_simple - local.get $2 + local.get $1 if - local.get $1 + local.get $2 i32.const 45 i32.store16 end - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 262 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 342 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/number/itoa_stream (; 343 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -20955,17 +21332,13 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 263 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 344 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 i32.const 0 local.get $2 @@ -21021,12 +21394,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize local.get $3 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 local.get $1 @@ -21036,7 +21406,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 345 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21061,10 +21431,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 11 i32.add @@ -21074,13 +21442,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -21141,19 +21504,12 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $~lib/util/string/compareImpl (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -21229,7 +21585,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 266 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 347 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -21248,18 +21604,10 @@ return end local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -21271,20 +21619,13 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 267 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 348 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $0 local.set $1 local.get $0 @@ -21313,6 +21654,7 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $2 + local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21330,6 +21672,8 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $1 + local.set $2 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21341,35 +21685,13 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/utoa32 (; 268 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 349 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -21380,24 +21702,19 @@ end local.get $0 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple local.get $1 + call $~lib/util/number/utoa_simple + local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 269 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 350 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21427,7 +21744,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 270 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 351 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21452,10 +21769,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 10 i32.add @@ -21465,13 +21780,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -21532,32 +21842,18 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 271 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 352 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 local.set $1 local.get $0 @@ -21586,6 +21882,7 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $2 + local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21603,6 +21900,8 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $1 + local.set $2 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21614,48 +21913,19 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 272 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 353 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 local.set $1 local.get $0 @@ -21684,6 +21954,7 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $2 + local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21701,6 +21972,8 @@ i32.load offset=8 call $~lib/util/string/joinIntegerArray local.tee $1 + local.set $2 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21712,35 +21985,13 @@ call $~lib/builtins/abort unreachable end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 273 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 354 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -21795,7 +22046,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 274 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 355 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21820,10 +22071,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 11 i32.add @@ -21833,13 +22082,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -21904,34 +22148,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 275 ;) + (func $~lib/typedarray/Int16Array#join (; 356 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 357 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21953,12 +22191,7 @@ i32.const 5 call $~lib/typedarray/Int16Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int16Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21971,14 +22204,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int16Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21991,34 +22219,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 276 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 358 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22048,7 +22254,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 277 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 359 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22073,10 +22279,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 10 i32.add @@ -22086,13 +22290,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22157,34 +22356,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 278 ;) + (func $~lib/typedarray/Uint16Array#join (; 360 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 361 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22206,12 +22399,7 @@ i32.const 5 call $~lib/typedarray/Uint16Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint16Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22224,14 +22412,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint16Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22244,34 +22427,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 362 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22313,7 +22474,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 280 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 363 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22338,10 +22499,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 11 i32.add @@ -22351,13 +22510,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22422,34 +22576,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 281 ;) + (func $~lib/typedarray/Int32Array#join (; 364 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 365 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22471,12 +22619,7 @@ i32.const 5 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int32Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22489,14 +22632,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int32Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22509,34 +22647,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 282 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 366 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22560,7 +22676,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 283 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 367 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22585,10 +22701,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 10 i32.add @@ -22598,13 +22712,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -22669,34 +22778,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 284 ;) + (func $~lib/typedarray/Uint32Array#join (; 368 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 369 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -22718,12 +22821,7 @@ i32.const 5 call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint32Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -22736,14 +22834,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint32Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -22756,34 +22849,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount64 (; 285 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 370 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -22836,7 +22907,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 286 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 371 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -22863,7 +22934,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa64 (; 287 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 372 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22877,7 +22948,7 @@ local.get $0 i64.const 0 i64.lt_s - local.tee $2 + local.tee $1 if i64.const 0 local.get $0 @@ -22890,54 +22961,44 @@ if local.get $0 i32.wrap_i64 - local.tee $3 + local.tee $2 call $~lib/util/number/decimalCount32 - local.get $2 + local.get $1 i32.add local.tee $4 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 - local.get $3 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $2 local.get $4 call $~lib/util/number/utoa_simple else local.get $0 call $~lib/util/number/decimalCount64 - local.get $2 + local.get $1 i32.add - local.tee $3 + local.tee $2 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $1 + call $~lib/rt/tlsf/__alloc + local.tee $3 local.get $0 - local.get $3 + local.get $2 call $~lib/util/number/utoa_simple end - local.get $2 + local.get $1 if - local.get $1 + local.get $3 i32.const 45 i32.store16 end - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 288 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 373 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -22998,7 +23059,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 289 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 374 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23023,10 +23084,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 21 i32.add @@ -23036,13 +23095,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -23107,34 +23161,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 290 ;) + (func $~lib/typedarray/Int64Array#join (; 375 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 376 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i64.const 1 @@ -23156,12 +23204,7 @@ i64.const 5 call $~lib/typedarray/Int64Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int64Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -23174,14 +23217,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int64Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -23194,34 +23232,55 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/util/number/utoa64 (; 377 ;) (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i64.eqz if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 1936 + return end local.get $0 - i32.const 7388 - i32.gt_u + i64.const 4294967295 + i64.le_u if local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + local.get $1 + call $~lib/util/number/utoa_simple end + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -23261,13 +23320,12 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 292 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 379 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -23281,93 +23339,38 @@ local.get $3 i32.eqz if - block $__inlined_func$~lib/util/number/utoa64 (result i32) - i32.const 1936 - local.get $0 - i64.load - local.tee $4 - i64.eqz - br_if $__inlined_func$~lib/util/number/utoa64 - drop - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end + local.get $0 + i64.load + call $~lib/util/number/utoa64 return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u - local.tee $5 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 + local.get $5 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add @@ -23376,7 +23379,7 @@ local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -23384,23 +23387,23 @@ i32.shl i32.add i32.const 1968 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 @@ -23419,34 +23422,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 293 ;) + (func $~lib/typedarray/Uint64Array#join (; 380 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 381 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i64.const 1 @@ -23468,12 +23465,7 @@ i64.const 5 call $~lib/typedarray/Uint64Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint64Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -23486,14 +23478,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint64Array#join local.tee $1 + local.get $1 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -23506,34 +23493,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/number/genDigits (; 294 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 382 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -23923,7 +23888,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 295 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 383 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -24168,7 +24133,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 296 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 384 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -24477,7 +24442,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 297 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 385 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -24509,12 +24474,9 @@ call $~lib/rt/pure/__retain return end - call $~lib/rt/tlsf/maybeInitialize i32.const 56 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 call $~lib/util/number/dtoa_core @@ -24529,10 +24491,12 @@ local.get $1 local.get $2 call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize local.get $1 - call $~lib/rt/tlsf/__free + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 298 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 386 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -24603,7 +24567,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 299 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 387 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24629,10 +24593,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 28 i32.add @@ -24642,13 +24604,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -24715,34 +24672,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 300 ;) + (func $~lib/typedarray/Float32Array#join (; 388 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 389 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 f32.const 1 @@ -24764,12 +24715,7 @@ f32.const 5 call $~lib/typedarray/Float32Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray + call $~lib/typedarray/Float32Array#join local.tee $2 i32.const 3168 call $~lib/string/String.__eq @@ -24782,14 +24728,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray + call $~lib/typedarray/Float32Array#join local.tee $1 + local.get $1 i32.const 3168 call $~lib/string/String.__eq i32.eqz @@ -24802,34 +24743,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinFloatArray (; 301 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 390 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24854,10 +24773,8 @@ return end local.get $3 - i32.const 1964 - i32.load - i32.const 1 - i32.shr_u + i32.const 1968 + call $~lib/string/String#get:length local.tee $4 i32.const 28 i32.add @@ -24867,13 +24784,8 @@ local.tee $6 i32.const 1 i32.shl - local.set $1 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 i32.const 1 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.set $2 i32.const 0 @@ -24938,34 +24850,28 @@ local.get $0 call $~lib/string/String#substring local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release return end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 302 ;) + (func $~lib/typedarray/Float64Array#join (; 391 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 392 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + (local $3 i32) i32.const 5 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 f64.const 1 @@ -24987,12 +24893,7 @@ f64.const 5 call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray + call $~lib/typedarray/Float64Array#join local.tee $2 i32.const 3168 call $~lib/string/String.__eq @@ -25005,14 +24906,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray + call $~lib/typedarray/Float64Array#join local.tee $1 + local.get $1 i32.const 3168 call $~lib/string/String.__eq i32.eqz @@ -25025,34 +24921,12 @@ unreachable end local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 303 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 393 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -25065,12 +24939,9 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $1 i32.const 0 local.get $0 @@ -25078,7 +24949,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 local.get $0 @@ -25130,12 +25001,9 @@ unreachable end end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 call $~lib/rt/pure/__retain @@ -25151,7 +25019,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 305 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 395 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -25175,7 +25043,7 @@ local.get $2 call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 306 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 396 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -25204,7 +25072,6 @@ select end local.set $1 - call $~lib/rt/tlsf/maybeInitialize local.get $2 i32.const 0 i32.lt_s @@ -25236,9 +25103,7 @@ select local.tee $2 i32.const 0 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc local.tee $3 local.get $0 local.get $1 @@ -25248,114 +25113,107 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 307 ;) + (func $~lib/typedarray/Int8Array.wrap (; 397 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $2 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $2 + i32.store offset=8 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 398 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Int8Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $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 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + local.get $1 + call $~lib/typedarray/Int8Array.wrap + local.set $4 loop $for-loop|1 + local.get $2 local.get $3 - local.get $4 i32.lt_s if - local.get $1 - local.get $3 + local.get $0 + local.get $2 call $~lib/typedarray/Int8Array#__get + local.get $4 local.get $2 - local.get $3 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -25366,42 +25224,21 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 308 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 399 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25410,17 +25247,8 @@ (local $5 i32) i32.const 3308 i32.load - local.set $3 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $0 loop $for-loop|0 @@ -25494,139 +25322,111 @@ end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray.wrap (; 400 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $2 i32.gt_u if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable end + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $2 + i32.store offset=8 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 309 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 401 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + local.get $1 + call $~lib/typedarray/Uint8ClampedArray.wrap + local.set $4 loop $for-loop|1 + local.get $2 local.get $3 - local.get $4 i32.lt_s if - local.get $1 - local.get $3 + local.get $0 + local.get $2 call $~lib/typedarray/Uint8ClampedArray#__get + local.get $4 local.get $2 - local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -25637,111 +25437,165 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array.wrap (; 402 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 0 local.get $0 - i32.const 7388 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $2 i32.gt_u if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $2 - i32.const 7388 - i32.gt_u + i32.const 1 + i32.and if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable end + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $2 + i32.store offset=8 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 310 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 403 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Int16Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $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 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Int16Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int16Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Int16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint16Array.wrap (; 404 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -25751,7 +25605,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 1 i32.and if @@ -25762,148 +25616,120 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int16Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int16Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 311 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 405 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Uint16Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Uint16Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint16Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int32Array.wrap (; 406 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -25913,8 +25739,8 @@ call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 1 + local.get $2 + i32.const 3 i32.and if i32.const 32 @@ -25924,36 +25750,86 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 407 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3308 + i32.load + local.tee $3 + call $~lib/typedarray/Int32Array#constructor + local.tee $5 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if + local.get $0 local.get $1 - local.get $3 - call $~lib/typedarray/Uint16Array#__get + i32.const 3296 + local.get $1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + i32.load + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + local.get $0 + i32.load offset=8 + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $1 + i32.const 1 + global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Int32Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 local.get $2 - local.get $3 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Int32Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Int32Array#__get i32.ne if i32.const 0 @@ -25963,107 +25839,161 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint32Array.wrap (; 408 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + i32.const 0 local.get $0 - i32.const 7388 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $2 i32.gt_u if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $2 - i32.const 7388 - i32.gt_u + i32.const 3 + i32.and if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable end + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $2 + i32.store offset=8 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 312 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 409 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Uint32Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 + call $~lib/typedarray/Uint32Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Uint32Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint32Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint32Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int64Array.wrap (; 410 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -26073,8 +26003,8 @@ call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 3 + local.get $2 + i32.const 7 i32.and if i32.const 32 @@ -26084,146 +26014,119 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 313 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 411 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Int64Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Int64Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Int64Array#__get + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array.wrap (; 412 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -26233,8 +26136,8 @@ call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 3 + local.get $2 + i32.const 7 i32.and if i32.const 32 @@ -26244,147 +26147,119 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 314 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 413 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Uint64Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 + call $~lib/typedarray/Uint64Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength + local.get $1 + call $~lib/typedarray/Uint64Array.wrap + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint64Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint64Array#__get + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array.wrap (; 414 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -26394,8 +26269,8 @@ call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 7 + local.get $2 + i32.const 3 i32.and if i32.const 32 @@ -26405,198 +26280,88 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 415 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3308 + i32.load + local.tee $3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if + local.get $0 + local.get $1 + i32.const 3296 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $1 - local.get $3 - call $~lib/typedarray/Int64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int64Array#__get - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $1 + br $for-loop|0 end end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 315 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + local.get $1 + call $~lib/typedarray/Float32Array.wrap + local.set $4 loop $for-loop|1 + local.get $2 local.get $3 - local.get $4 i32.lt_s if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint64Array#__get + local.get $0 local.get $2 - local.get $3 - call $~lib/typedarray/Uint64Array#__get - i64.ne + call $~lib/typedarray/Float32Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Float32Array#__get + f32.ne if i32.const 0 i32.const 304 @@ -26605,108 +26370,29 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 316 ;) - (local $0 i32) + (func $~lib/typedarray/Float64Array.wrap (; 416 ;) (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 3308 - i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub - local.get $1 - i32.load offset=8 - local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $2 i32.gt_u if i32.const 368 @@ -26716,8 +26402,8 @@ call $~lib/builtins/abort unreachable end - local.get $6 - i32.const 3 + local.get $2 + i32.const 7 i32.and if i32.const 32 @@ -26727,196 +26413,86 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $6 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Float32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float32Array#__get - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 317 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 417 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.set $4 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.get $4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + call $~lib/typedarray/Float64Array#constructor local.tee $5 - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3296 - local.get $0 + local.get $1 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - 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 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $6 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 + local.get $1 + call $~lib/typedarray/Float64Array.wrap + local.set $4 loop $for-loop|1 + local.get $2 local.get $3 - local.get $4 i32.lt_s if - local.get $1 - local.get $3 + local.get $0 + local.get $2 call $~lib/typedarray/Float64Array#__get + local.get $4 local.get $2 - local.get $3 call $~lib/typedarray/Float64Array#__get f64.ne if @@ -26927,42 +26503,21 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 318 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 418 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27013,7 +26568,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 319 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 419 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27079,14 +26634,14 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 320 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 420 ;) (param $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 + (local $4 i32) + i32.const 3436 + i32.load i32.const 3 - i32.shr_u - i32.const 6 i32.add local.get $0 i32.load offset=8 @@ -27101,22 +26656,20 @@ end local.get $0 i32.load offset=4 - i32.const 6 + i32.const 3 i32.add local.set $2 - local.get $1 - i32.load offset=4 + i32.const 3428 + i32.load local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + i32.const 3436 + i32.load + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if local.get $0 @@ -27124,11 +26677,22 @@ i32.add local.get $3 local.get $0 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load - i64.store8 + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store8 local.get $0 i32.const 1 i32.add @@ -27137,36 +26701,14 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 321 ;) (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - 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 - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 322 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 421 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - i32.const 4 + i32.const 6 i32.add local.get $0 i32.load offset=8 @@ -27181,7 +26723,7 @@ end local.get $0 i32.load offset=4 - i32.const 4 + i32.const 6 i32.add local.set $2 local.get $1 @@ -27189,7 +26731,7 @@ local.set $3 local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $1 i32.const 0 @@ -27204,11 +26746,11 @@ i32.add local.get $3 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_s - i32.store8 + i64.load + i64.store8 local.get $0 i32.const 1 i32.add @@ -27217,10 +26759,14 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 323 ;) (param $0 i32) - i32.const 3580 + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 422 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3516 i32.load - i32.const 7 + i32.const 2 i32.add local.get $0 i32.load offset=8 @@ -27235,15 +26781,158 @@ end local.get $0 i32.load offset=4 - i32.const 7 + i32.const 2 i32.add - i32.const 3572 + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + 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|0 + end + end + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 423 ;) (param $0 i32) (param $1 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + 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 + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 424 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) + i32.const 3580 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 7 + i32.add + i32.const 3572 i32.load i32.const 3576 i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 324 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 426 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27252,347 +26941,136 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) - (local $12 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $2 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $2 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $1 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $1 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $1 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $3 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + i32.const 10 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3600 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + 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 14 + i32.const 3680 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.tee $6 + 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 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + i32.const 14 + i32.const 3712 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + 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 14 + i32.const 3744 + call $~lib/rt/__allocArray + 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 $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 14 - i32.const 3600 + i32.const 3776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - block $folding-inner0 - i32.const 3436 - i32.load - 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 - i32.const 3428 - i32.load - local.set $6 - i32.const 3436 - i32.load - local.set $7 - loop $for-loop|0 - local.get $0 - local.get $7 - 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 $9 - local.get $9 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $9 - 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 $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - i32.const 3516 - i32.load - 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 $7 - i32.const 3508 - i32.load - local.set $11 - i32.const 3516 - i32.load - local.set $12 - i32.const 0 - local.set $0 - loop $for-loop|00 - local.get $0 - local.get $12 - i32.lt_s - if - local.get $0 - local.get $7 - i32.add - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $10 - local.get $10 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $10 - 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 $1 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3744 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $1 - local.get $4 - 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 14 - i32.const 3776 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - return - end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + 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 $0 + 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 ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 325 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 427 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27658,356 +27136,344 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 326 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 428 ;) (param $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 f64) - (local $11 i32) - (local $12 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 + i32.const 3436 + i32.load i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $3 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $2 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $4 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + 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 + ) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 429 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 2 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + 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|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 430 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $3 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + i32.const 10 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3808 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.tee $5 + 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 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + i32.const 21 + i32.const 3888 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + 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 21 + i32.const 3920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + 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 21 + i32.const 3952 + call $~lib/rt/__allocArray + 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 21 - i32.const 3808 + i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - block $folding-inner0 - i32.const 3436 - i32.load - 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 - i32.const 3428 - i32.load - local.set $6 - i32.const 3436 - i32.load - local.set $7 - loop $for-loop|0 - local.get $0 - local.get $7 - 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 $9 - local.get $9 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $9 - 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 $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3888 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - i32.const 3516 - i32.load - 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 $7 - i32.const 3508 - i32.load - local.set $11 - i32.const 3516 - i32.load - local.set $12 - i32.const 0 - local.set $0 - loop $for-loop|01 - local.get $0 - local.get $12 - i32.lt_s - if - local.get $0 - local.get $7 - i32.add - local.get $11 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $10 - local.get $10 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $10 - 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 $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3952 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - 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 $0 + 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 + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 431 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + i32.const 3364 + i32.load + local.set $3 + i32.const 3372 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $1 local.get $4 - 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 21 - i32.const 3984 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - i32.const 7388 - i32.gt_u + i32.lt_s if local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 i32.sub - call $~lib/rt/pure/decrement + 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 - return end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 327 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 432 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -28073,7 +27539,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 328 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 433 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28144,7 +27610,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 329 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 434 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -28230,7 +27696,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 330 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 435 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28301,7 +27767,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 331 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 436 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -28383,7 +27849,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 332 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 437 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28450,7 +27916,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 333 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 438 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28459,154 +27925,64 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $4 + local.get $2 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $4 + local.get $2 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $5 + local.get $3 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $5 + local.get $3 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - i32.const 3372 - i32.load + call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - i32.load offset=4 - local.set $7 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $8 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $1 - local.get $8 - i32.lt_s - if - local.get $1 - local.get $7 - i32.add - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $6 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $6 - i32.const 255 - local.get $6 - 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 $0 - i32.const 10 + i32.const 10 i32.const 0 i32.const 21 i32.const 4016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> @@ -28620,7 +27996,7 @@ local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 - local.get $4 + local.get $2 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> local.get $0 @@ -28641,22 +28017,15 @@ i32.const 4176 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $4 + call $~lib/rt/pure/__release local.get $0 - local.get $3 + local.get $1 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $0 - local.get $5 + local.get $3 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> local.get $0 @@ -28668,82 +28037,26 @@ i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 334 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 439 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28798,7 +28111,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 335 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 440 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -28868,7 +28181,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 336 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28939,7 +28252,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 337 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 442 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29001,7 +28314,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 338 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 443 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29072,7 +28385,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 339 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 444 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29124,7 +28437,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 340 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 445 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -29154,7 +28467,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 341 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 446 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29211,7 +28524,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 342 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 447 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29220,16 +28533,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -29242,16 +28547,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -29268,16 +28565,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -29290,16 +28579,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 @@ -29346,14 +28627,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> @@ -29372,79 +28646,23 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 343 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 448 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -29514,7 +28732,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 344 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 449 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29585,7 +28803,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 345 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29656,7 +28874,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 346 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 451 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29665,16 +28883,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -29687,16 +28897,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -29713,16 +28915,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -29735,16 +28929,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 @@ -29791,14 +28977,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> @@ -29817,79 +28996,23 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 347 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 452 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -29930,17 +29053,16 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 348 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 453 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -29954,33 +29076,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int32Array#__get - local.set $3 + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 4880 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i32_s - local.get $6 + local.get $5 f64.convert_i32_s f64.const 0 f64.const 0 @@ -30000,7 +29115,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 349 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 454 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30071,7 +29186,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 350 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 455 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30133,7 +29248,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 351 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 456 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30204,7 +29319,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 352 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 457 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30256,7 +29371,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 353 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 458 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30318,7 +29433,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 354 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30375,7 +29490,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 355 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 460 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30384,16 +29499,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -30406,16 +29513,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -30432,16 +29531,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -30454,16 +29545,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 3360 i32.const 0 @@ -30512,14 +29595,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> @@ -30538,89 +29614,32 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 356 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 461 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -30634,33 +29653,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint32Array#__get - local.set $3 + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 5248 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i32_u - local.get $6 + local.get $5 f64.convert_i32_u f64.const 0 f64.const 0 @@ -30680,7 +29692,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 357 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 462 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30751,7 +29763,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 358 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 463 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30822,7 +29834,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 359 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 464 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30831,16 +29843,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -30853,16 +29857,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -30879,16 +29875,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -30901,16 +29889,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 3360 i32.const 0 @@ -30959,14 +29939,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> @@ -30985,79 +29958,23 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 360 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 465 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31112,17 +30029,25 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 361 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_get (; 466 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 467 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i64) - (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -31136,33 +30061,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int64Array#__get - local.set $3 + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i64.ne if i32.const 5648 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i64_s - local.get $6 + local.get $5 f64.convert_i64_s f64.const 0 f64.const 0 @@ -31182,7 +30100,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 468 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -31253,7 +30171,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 363 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 469 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -31283,7 +30201,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 470 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -31354,7 +30272,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 365 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 471 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31406,7 +30324,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 366 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 472 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31468,7 +30386,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 367 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 473 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31525,7 +30443,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 368 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 474 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31534,16 +30452,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -31556,16 +30466,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -31582,16 +30484,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -31604,16 +30498,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 10 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $0 call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 @@ -31660,14 +30546,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> @@ -31686,89 +30565,32 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 369 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 475 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i64) - (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -31782,33 +30604,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint64Array#__get - local.set $3 + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i64.ne if i32.const 6176 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i64_u - local.get $6 + local.get $5 f64.convert_i64_u f64.const 0 f64.const 0 @@ -31828,7 +30643,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 370 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 476 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -31899,7 +30714,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 477 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -31970,7 +30785,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 372 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 478 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31979,16 +30794,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 i32.const 0 i64.const 7 @@ -32001,16 +30808,8 @@ i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.const 0 i32.const 100 @@ -32027,16 +30826,8 @@ i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 i32.const 0 i32.const 1000 @@ -32049,16 +30840,8 @@ i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 10 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 @@ -32105,14 +30888,7 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 local.get $1 call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> @@ -32131,79 +30907,79 @@ local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 479 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $1 + i32.const 3364 + i32.load + local.set $2 + i32.const 3372 + i32.load + local.set $3 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 2 + i32.shl + local.tee $4 + i32.add + local.get $2 + local.get $4 + i32.add + i32.load + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 373 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 480 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -32273,7 +31049,244 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 374 ;) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 481 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + 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|0 + end + end + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 482 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 483 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 2 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + 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|0 + end + end + ) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 484 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3580 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $1 + i32.const 3572 + i32.load + local.set $2 + i32.const 3580 + i32.load + local.set $3 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $2 + i32.add + i32.load8_s + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 485 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32282,449 +31295,181 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $4 + local.get $2 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $4 + local.get $2 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.get $1 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $5 + local.get $3 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $5 + local.get $3 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + i32.const 10 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + call $~lib/typedarray/Float32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6608 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + i32.const 3424 + i32.const 3 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 i32.const 10 i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + i32.const 19 + i32.const 6720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + local.get $2 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6784 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + local.get $1 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/typedarray/Float32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6848 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $7 + 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 $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 486 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $1 + i32.const 3364 + i32.load + local.set $2 + i32.const 3372 + i32.load + local.set $3 + i32.const 0 local.set $0 - block $folding-inner0 - i32.const 3372 - i32.load - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - local.set $9 - i32.const 3364 - i32.load - local.set $10 - i32.const 3372 - i32.load - local.set $7 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $7 - i32.lt_s - if - local.get $9 - local.get $0 - i32.const 2 - i32.shl - local.tee $2 - i32.add - local.get $2 - local.get $10 - i32.add - i32.load - f32.convert_i32_s - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $1 - i32.const 3424 - i32.const 3 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $1 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $4 - 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 $7 - local.get $4 - i32.load offset=4 - local.set $2 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $6 - i32.const 0 - local.set $0 - loop $for-loop|00 - local.get $0 - local.get $6 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $2 - 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 $1 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6784 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $3 - i32.load offset=8 - 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 - local.set $2 - local.get $3 - i32.load offset=4 - local.set $6 - local.get $3 - i32.load offset=8 - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|01 - local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $6 - i32.add - i32.load8_u - f32.convert_i32_u - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $5 - 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 $2 - local.get $5 - i32.load offset=4 - local.set $6 - local.get $5 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|02 - local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - 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 - i32.const 3580 - i32.load - i32.const 7 - 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 28 - i32.add - local.set $2 - i32.const 3572 - i32.load - local.set $6 - i32.const 3580 - i32.load - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|03 - local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $6 - i32.add - i32.load8_s - f32.convert_i32_s - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $1 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6848 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $9 - i32.const 7388 - i32.gt_u - if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 7388 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - return end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 375 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 487 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -32792,502 +31537,429 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 376 ;) - (local $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 488 ;) (param $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) - (local $9 i32) - (local $10 i32) - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + i32.const 3436 + i32.load i32.const 3 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#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 $5 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 24 i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.set $1 + i32.const 3428 + i32.load + local.set $2 + i32.const 3436 + i32.load + local.set $3 i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $3 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $3 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 489 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load offset=8 i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 + i32.shr_u i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 i32.add - call $~lib/rt/pure/__retain + local.get $0 + i32.load offset=8 i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $6 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $6 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 48 i32.add - call $~lib/rt/pure/__retain - i32.const 10 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + i32.shr_u + local.set $1 + i32.const 0 local.set $0 - block $folding-inner0 - i32.const 3372 - i32.load - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner0 + loop $for-loop|0 local.get $0 - i32.load offset=4 - local.set $10 - i32.const 3364 - i32.load - local.set $9 - i32.const 3372 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $10 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $9 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 6912 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - i32.const 3436 - i32.load - i32.const 3 - 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 24 - i32.add - local.set $9 - i32.const 3428 - i32.load - local.set $4 - i32.const 3436 - i32.load - local.set $2 - i32.const 0 - local.set $0 - loop $for-loop|00 - local.get $0 + i32.lt_s + if local.get $2 - i32.lt_s - if - local.get $9 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7056 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $5 - 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 $4 - local.get $5 - i32.load offset=4 - local.set $2 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $7 - i32.const 0 - local.set $0 - loop $for-loop|01 - local.get $0 - local.get $7 - i32.lt_s - if - local.get $4 - local.get $0 - i32.const 3 - i32.shl - local.tee $8 - i32.add - local.get $2 - 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 $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7152 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $3 - i32.load offset=8 - 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 - local.set $2 - local.get $3 - i32.load offset=4 - local.set $7 - local.get $3 - i32.load offset=8 - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|02 - local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $7 - i32.add - i32.load8_u - f64.convert_i32_u - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $6 - 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 $2 - local.get $6 - i32.load offset=4 - local.set $7 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|03 local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - 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 - i32.const 3580 - i32.load - i32.const 7 - 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 56 - i32.add - local.set $2 - i32.const 3572 - i32.load - local.set $7 - i32.const 3580 - i32.load - local.set $8 - i32.const 0 - local.set $0 - loop $for-loop|04 + i32.const 3 + i32.shl + local.tee $4 + i32.add + local.get $3 + local.get $4 + i32.add + i64.load + f64.convert_i64_s + f64.store local.get $0 - local.get $8 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $7 - i32.add - i32.load8_s - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|04 - end + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7248 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 490 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u + local.get $1 + i32.lt_s if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 491 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 32 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 7388 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $9 - i32.const 7388 - i32.gt_u + i32.lt_s if - local.get $9 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $3 + 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|0 end - local.get $4 - i32.const 7388 - i32.gt_u + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 492 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3580 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 56 + i32.add + local.set $1 + i32.const 3572 + i32.load + local.set $2 + i32.const 3580 + i32.load + local.set $3 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $2 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - return end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 377 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 493 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + call $~lib/typedarray/Float64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 6912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + call $~lib/typedarray/Float64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7056 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + local.get $2 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7152 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + local.get $1 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/typedarray/Float64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $7 + 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 $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 494 ;) (param $0 i32) (param $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -33361,7 +32033,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 378 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 495 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -33433,7 +32105,68 @@ end end ) - (func $start:std/typedarray (; 379 ;) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 496 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.const 255 + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $4 + i32.const 255 + local.get $4 + i32.lt_u + select + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $start:std/typedarray (; 497 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -33443,11 +32176,11 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) + (local $9 i32) (local $10 i32) (local $11 i32) (local $12 i32) - (local $13 f64) + (local $13 i32) (local $14 i32) (local $15 i32) (local $16 i32) @@ -33460,23 +32193,12 @@ (local $23 i32) (local $24 i32) (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 f32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 call $std/typedarray/testInstantiate - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -33573,14 +32295,7 @@ call $~lib/typedarray/Int32Array#subarray local.set $1 local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.load offset=8 i32.const 2 @@ -33636,24 +32351,9 @@ unreachable end local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 8 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $1 i32.const 0 f64.const 1 @@ -33692,14 +32392,7 @@ call $~lib/typedarray/Float64Array#subarray local.set $0 local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.load offset=8 i32.const 3 @@ -33743,71 +32436,9 @@ end i32.const 0 global.set $~argumentsLength - i32.const 1 - local.set $1 - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.const 1 - i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $4 - i32.load offset=4 - local.set $2 - local.get $3 - i32.const 2 - i32.eq - if - local.get $2 - f64.load offset=8 - local.set $9 - local.get $2 - f64.load - local.set $13 - i32.const 2 - global.set $~argumentsLength - local.get $9 - local.get $13 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $13 - f64.store offset=8 - local.get $2 - local.get $9 - f64.store - end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $3 - i32.const 256 - i32.lt_s - if - local.get $2 - local.get $3 - call $~lib/util/sort/insertionSort - else - local.get $2 - local.get $3 - call $~lib/util/sort/weakHeapSort - end - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.get $0 + call $~lib/typedarray/Float64Array#sort + call $~lib/rt/pure/__release local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get @@ -33850,24 +32481,9 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 i32.const 0 i32.const -32 @@ -33918,24 +32534,9 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 5 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -33961,15 +32562,7 @@ i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 0 @@ -33993,15 +32586,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 0 @@ -34025,15 +32610,7 @@ i32.const 0 i32.const -3 call $~lib/typedarray/Int8Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 0 @@ -34057,15 +32634,7 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 0 @@ -34089,15 +32658,7 @@ i32.const 1 i32.const 0 call $~lib/typedarray/Int8Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 0 @@ -34120,20 +32681,12 @@ i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#subarray - local.tee $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - local.tee $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + local.tee $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release local.get $1 i32.load offset=8 i32.const 3 @@ -34210,96 +32763,25 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -34325,15 +32807,7 @@ i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 2 @@ -34357,15 +32831,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 2 @@ -34389,15 +32855,7 @@ i32.const 0 i32.const -3 call $~lib/typedarray/Int32Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 2 @@ -34421,15 +32879,7 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 2 @@ -34453,15 +32903,7 @@ i32.const 1 i32.const 0 call $~lib/typedarray/Int32Array#fill - local.tee $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $0 i32.const 5 i32.const 2 @@ -34489,15 +32931,7 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill - local.tee $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 i32.load offset=8 i32.const 2 @@ -34576,96 +33010,25 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 6 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -34859,77 +33222,41 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice local.set $2 - local.get $0 + local.get $1 i32.const 0 i32.const 3 i32.const 2147483647 @@ -34956,17 +33283,9 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 3 i32.const 2147483647 @@ -34993,17 +33312,9 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 2 i32.const 2147483647 @@ -35030,28 +33341,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $10 + local.tee $9 i32.const 5 i32.const 2 i32.const 15 i32.const 1232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35066,28 +33370,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 0 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $12 + local.tee $11 i32.const 5 i32.const 2 i32.const 15 i32.const 1280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $12 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35102,28 +33399,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 + local.tee $13 i32.const 5 i32.const 2 i32.const 15 i32.const 1328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $14 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35138,28 +33428,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $15 i32.const 5 i32.const 2 i32.const 15 i32.const 1376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35174,28 +33457,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $17 i32.const 5 i32.const 2 i32.const 15 i32.const 1424 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $18 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35210,28 +33486,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 0 i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $19 i32.const 5 i32.const 2 i32.const 15 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $20 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35246,28 +33515,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -4 i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $21 i32.const 5 i32.const 2 i32.const 15 i32.const 1520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $22 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35282,28 +33544,21 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const -4 i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35318,16 +33573,10 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice + local.set $0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.tee $0 i32.const -4 i32.const -3 i32.const 2147483647 @@ -35339,7 +33588,7 @@ i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -35351,249 +33600,59 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $8 - i32.const 7388 - i32.gt_u - if - local.get $8 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $10 - i32.const 7388 - i32.gt_u - if - local.get $10 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $11 - i32.const 7388 - i32.gt_u - if - local.get $11 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + 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 $12 - i32.const 7388 - i32.gt_u - if - local.get $12 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release local.get $14 - i32.const 7388 - i32.gt_u - if - local.get $14 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $15 - i32.const 7388 - i32.gt_u - if - local.get $15 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $16 - i32.const 7388 - i32.gt_u - if - local.get $16 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $17 - i32.const 7388 - i32.gt_u - if - local.get $17 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $18 - i32.const 7388 - i32.gt_u - if - local.get $18 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $19 - i32.const 7388 - i32.gt_u - if - local.get $19 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $20 - i32.const 7388 - i32.gt_u - if - local.get $20 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $21 - i32.const 7388 - i32.gt_u - if - local.get $21 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $22 - i32.const 7388 - i32.gt_u - if - local.get $22 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $23 - i32.const 7388 - i32.gt_u - if - local.get $23 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $24 - i32.const 7388 - i32.gt_u - if - local.get $24 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $25 - i32.const 7388 - i32.gt_u - if - local.get $25 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $26 - i32.const 7388 - i32.gt_u - if - local.get $26 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $27 - i32.const 7388 - i32.gt_u - if - local.get $27 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release i32.const 5 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 @@ -35849,2790 +33908,506 @@ unreachable end local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor + call $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> + i32.const 3 + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - 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 $0 - i32.const 3 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - 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 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - 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> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner2 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner2 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner2 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner2 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner2 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner2 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner2 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner2 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner2 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner3 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner6 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner6 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner6 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner6 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner6 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner6 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner6 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner6 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner6 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner6 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - local.get $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 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner6 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner7 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 117 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 118 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 0 - global.set $std/typedarray/forEachCallCount - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> - 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> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 607 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - i32.const 0 - local.get $3 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $5 - loop $while-continue|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 1 - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $9 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $9 - local.get $9 - f64.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 608 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 613 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 - if (result i32) - i32.const 0 - local.get $4 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 - i32.load offset=4 - local.set $6 - loop $while-continue|05 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 1 - local.get $6 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $28 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $28 - local.get $28 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|05 - end - end - i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> - 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|trampoline - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $0 - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 695 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - 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> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 10 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 3 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#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 - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $6 - 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 $2 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - local.get $6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 7344 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - call $~lib/rt/tlsf/maybeInitialize - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - i32.const 4 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#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 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $8 - local.get $1 - i32.load offset=4 - local.set $10 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $11 - i32.const 0 - local.set $5 - loop $for-loop|0 - local.get $5 - local.get $11 - i32.lt_s - if - local.get $5 - local.get $8 - i32.add - i32.const 255 - local.get $10 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $12 - i32.const 255 - local.get $12 - i32.lt_u - select - i32.store8 - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - 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 21 - i32.const 7376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - i32.const 7388 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $4 - i32.const 7388 - i32.gt_u - if - local.get $4 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $2 - i32.const 7388 - i32.gt_u - if - local.get $2 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $6 - i32.const 7388 - i32.gt_u - if - local.get $6 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $7 - i32.const 7388 - i32.gt_u - if - local.get $7 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $1 - i32.const 7388 - i32.gt_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $3 - i32.const 7388 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - local.get $5 - i32.const 7388 - i32.gt_u - if - local.get $5 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - return - end - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + f32.const 3 + call $~lib/typedarray/Float32Array#__set + block $folding-inner1 + block $folding-inner0 + local.get $0 + call $~lib/typedarray/Float32Array#reduce + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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#reduce + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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#reduceRight + f32.const 6 + f32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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#reduceRight + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + 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> + call $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> + 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 $0 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $0 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/typedarray/Float64Array#includes + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if i32.const 0 i32.const 304 - i32.const 440 + i32.const 608 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/typedarray/Float32Array#includes i32.const 0 - i32.const 304 - i32.const 461 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 i32.const 2 - call $~lib/builtins/abort - unreachable + global.set $~argumentsLength + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.tee $2 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 691 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $1 + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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 21 + i32.const 7344 + call $~lib/rt/__allocArray + 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 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 21 + i32.const 7376 + call $~lib/rt/__allocArray + 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 end i32.const 0 i32.const 304 - i32.const 463 + i32.const 323 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 495 + i32.const 344 i32.const 2 call $~lib/builtins/abort unreachable ) - (func $~start (; 380 ;) + (func $~start (; 498 ;) global.get $~started if return @@ -38642,7 +34417,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 381 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 499 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -38709,17 +34484,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store global.get $~lib/rt/tlsf/ROOT local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree + call $~lib/rt/tlsf/freeBlock else local.get $1 i32.const 0 diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index a1608ea03e..0202f18225 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -60,7 +60,27 @@ end i32.const 0 ) - (func $start:switch (; 3 ;) + (func $switch/doSwitchBreakCase (; 3 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.ne + if + i32.const 2 + return + end + i32.const 1 + ) + (func $switch/doSwitchBreakDefault (; 4 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.eq + if + i32.const 1 + return + end + i32.const 2 + ) + (func $start:switch (; 5 ;) i32.const 0 call $switch/doSwitch if @@ -229,8 +249,152 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + call $switch/doSwitchBreakCase + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 51 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $switch/doSwitchBreakCase + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 52 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $switch/doSwitchBreakCase + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 53 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $switch/doSwitchBreakDefault + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 62 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $switch/doSwitchBreakDefault + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 63 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $switch/doSwitchBreakDefault + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 64 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $switch/doSwitchBreakCase + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 73 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $switch/doSwitchBreakCase + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 74 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $switch/doSwitchBreakCase + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 75 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $switch/doSwitchBreakDefault + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 84 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $switch/doSwitchBreakDefault + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 85 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 2 + call $switch/doSwitchBreakDefault + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 86 + i32.const 0 + call $~lib/builtins/abort + unreachable + end ) - (func $~start (; 4 ;) + (func $~start (; 6 ;) call $start:switch ) ) diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 836fea1ede..88a77a791b 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,6 +1,8 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param 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 (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))) @@ -19,7 +21,15 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/util/string/compareImpl (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#get:length (; 1 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -95,7 +105,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -112,18 +122,10 @@ select br_if $folding-inner0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length local.tee $2 local.get $1 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/string/String#get:length i32.ne br_if $folding-inner0 local.get $0 @@ -135,9 +137,49 @@ end i32.const 0 ) - (func $start:typeof (; 3 ;) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 4 ;) (param $0 i32) (local $1 i32) + (local $2 i32) + local.get $0 + memory.size + local.tee $2 + i32.const 16 + i32.shl + local.tee $1 + i32.gt_u + if + local.get $2 + local.get $0 + local.get $1 + i32.sub + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.get $2 + local.get $1 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $1 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + local.get $0 + global.set $~lib/rt/stub/offset + ) + (func $start:typeof (; 5 ;) i32.const 64 i32.const 64 call $~lib/string/String.__eq @@ -359,41 +401,7 @@ i32.const 304 global.set $~lib/rt/stub/offset i32.const 336 - memory.size - local.tee $1 - i32.const 16 - i32.shl - local.tee $0 - i32.gt_u - if - local.get $1 - i32.const 65871 - local.get $0 - i32.sub - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $0 - local.get $1 - local.get $0 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $0 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - i32.const 336 - global.set $~lib/rt/stub/offset + call $~lib/rt/stub/maybeGrowMemory i32.const 304 i32.const 16 i32.store @@ -469,7 +477,7 @@ unreachable end ) - (func $~start (; 4 ;) + (func $~start (; 6 ;) global.get $~started if return diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 30ce483ffd..d79f187707 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result 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))) @@ -22,7 +22,49 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $while/testNested (; 5 ;) + (func $while/testSimple (; 5 ;) + (local $0 i32) + (local $1 i32) + i32.const 10 + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + ) + (func $while/testNested (; 6 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -110,7 +152,103 @@ i32.const 1 global.set $while/ran ) - (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) + (func $while/testEmpty (; 7 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1 + local.set $0 + loop $while-continue|0 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $1 + else + i32.const 0 + end + br_if $while-continue|0 + end + local.get $0 + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 45 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 46 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + ) + (func $while/testNestedContinue (; 8 ;) + (local $0 i32) + (local $1 i32) + i32.const 10 + local.set $0 + i32.const 10 + local.set $1 + loop $while-continue|0 + local.get $0 + if + loop $while-continue|1 + local.get $1 + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|1 + end + end + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|0 + end + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if + i32.const 0 + i32.const 32 + i32.const 127 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + ) + (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -276,7 +414,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -559,7 +697,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -673,7 +811,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -760,7 +898,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -817,116 +955,56 @@ end end ) - (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/tlsf/collectLock - if - i32.const 0 - i32.const 64 - i32.const 490 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/tlsf/searchBlock + memory.size local.tee $1 - i32.eqz - if - i32.const 1 - global.set $~lib/rt/tlsf/collectLock - i32.const 0 - global.set $~lib/rt/tlsf/collectLock - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - local.get $0 - call $~lib/rt/tlsf/searchBlock - local.tee $1 - i32.eqz - if - i32.const 0 - i32.const 64 - i32.const 502 - i32.const 19 - call $~lib/builtins/abort - unreachable - end - end - end + i32.const 16 + local.get $0 + i32.load offset=1568 local.get $1 - i32.load - i32.const -4 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 i32.and i32.const 16 - i32.lt_u + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s if + local.get $2 + memory.grow i32.const 0 - i32.const 64 - i32.const 510 - i32.const 13 - call $~lib/builtins/abort - unreachable + i32.lt_s + if + unreachable + end end - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - i32.const 3 - i32.store offset=8 - local.get $1 - i32.const 0 - i32.store offset=12 local.get $0 local.get $1 - call $~lib/rt/tlsf/removeBlock + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 i32.load local.tee $2 @@ -948,7 +1026,7 @@ local.get $1 i32.const 32 i32.add - local.tee $2 + local.tee $1 local.get $3 i32.const 16 i32.sub @@ -956,7 +1034,7 @@ i32.or i32.store local.get $0 - local.get $2 + local.get $1 call $~lib/rt/tlsf/insertBlock else local.get $1 @@ -984,13 +1062,123 @@ i32.and i32.store end - local.get $1 - call $~lib/rt/rtrace/onalloc - local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) + global.get $~lib/rt/tlsf/collectLock + if + i32.const 0 + i32.const 64 + i32.const 490 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 1 + global.set $~lib/rt/tlsf/collectLock + i32.const 0 + global.set $~lib/rt/tlsf/collectLock + local.get $0 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + local.get $0 + call $~lib/rt/tlsf/growMemory + local.get $0 + call $~lib/rt/tlsf/searchBlock + local.tee $1 + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 502 + i32.const 19 + call $~lib/builtins/abort + unreachable + end + end + end + local.get $1 + i32.load + i32.const -4 + i32.and + i32.const 16 + i32.lt_u + if + i32.const 0 + i32.const 64 + i32.const 510 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + i32.const 3 + i32.store offset=8 + local.get $1 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $1 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + call $~lib/rt/rtrace/onalloc + local.get $1 + ) + (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.const 208 i32.gt_u @@ -998,48 +1186,22 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $while/testRef (; 13 ;) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + local.get $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $while/testRef (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1064,14 +1226,7 @@ local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end else call $~lib/rt/tlsf/maybeInitialize @@ -1081,14 +1236,7 @@ call $~lib/rt/pure/__retain local.set $2 local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end local.get $2 local.set $0 @@ -1118,20 +1266,12 @@ i32.const 1 global.set $while/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $while/testRefAutorelease (; 14 ;) + (func $while/testRefAutorelease (; 21 ;) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -1146,16 +1286,7 @@ i32.add call $~lib/rt/pure/__retain local.tee $1 - local.set $3 - local.get $1 - i32.const 208 - i32.gt_u - if - local.get $3 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release local.get $1 if local.get $2 @@ -1170,14 +1301,7 @@ local.get $0 if local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 0 local.set $0 @@ -1210,59 +1334,23 @@ i32.const 1 global.set $while/ran local.get $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release ) - (func $start:while (; 15 ;) + (func $start:while (; 22 ;) (local $0 i32) - (local $1 i32) - (local $2 i32) i32.const 0 global.set $while/ran - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 + call $while/testSimple + global.get $while/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if + i32.const 16 i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $while/ran i32.const 0 global.set $while/ran call $while/testNested @@ -1278,61 +1366,27 @@ end i32.const 0 global.set $while/ran - i32.const 1 - local.set $0 - loop $while-continue|00 - local.get $0 - local.tee $1 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - if (result i32) - local.get $2 - i32.const 1 - i32.add - local.tee $2 - else - i32.const 0 - end - br_if $while-continue|00 - end - local.get $0 - i32.const -1 - i32.ne + call $while/testEmpty + global.get $while/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 45 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.ne - if + i32.const 51 i32.const 0 - i32.const 32 - i32.const 46 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $while/ran i32.const 0 global.set $while/ran - i32.const 0 - local.set $0 - loop $while-continue|01 + loop $while-continue|0 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $while-continue|01 + br_if $while-continue|0 end local.get $0 i32.const 10 @@ -1363,14 +1417,14 @@ global.set $while/ran i32.const 10 local.set $0 - loop $while-continue|02 + loop $while-continue|00 local.get $0 if local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|02 + br $while-continue|00 end end local.get $0 @@ -1386,50 +1440,17 @@ global.set $while/ran i32.const 0 global.set $while/ran - i32.const 10 - local.set $0 - i32.const 10 - local.set $1 - loop $while-continue|03 - local.get $0 - if - loop $while-continue|1 - local.get $1 - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|1 - end - end - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|03 - end - end - local.get $0 + call $while/testNestedContinue + global.get $while/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if + i32.const 132 i32.const 0 - i32.const 32 - i32.const 127 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $while/ran i32.const 0 global.set $while/ran call $while/testRef @@ -1457,7 +1478,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 23 ;) global.get $~started if return @@ -1467,7 +1488,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From 9e66bc4a21c52aa46cd5e56c6dd923b4f004cd95 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 15:10:33 +0200 Subject: [PATCH 04/51] better --- cli/asc.js | 6 +- tests/compiler/call-optional.optimized.wat | 36 +- tests/compiler/call-super.optimized.wat | 90 +- tests/compiler/class.optimized.wat | 112 +- tests/compiler/constructor.optimized.wat | 86 +- tests/compiler/do.optimized.wat | 230 +- tests/compiler/exports.optimized.wat | 59 +- .../extends-baseaggregate.optimized.wat | 194 +- tests/compiler/for.optimized.wat | 127 +- tests/compiler/getter-call.optimized.wat | 37 +- .../implicit-getter-setter.optimized.wat | 100 +- tests/compiler/infer-array.optimized.wat | 92 +- tests/compiler/infer-generic.optimized.wat | 17 +- .../inlining-blocklocals.optimized.wat | 5 +- tests/compiler/inlining.optimized.wat | 87 +- tests/compiler/instanceof-class.optimized.wat | 51 +- tests/compiler/issues/1095.optimized.wat | 125 +- tests/compiler/logical.optimized.wat | 5 +- tests/compiler/loop-flow.optimized.wat | 65 +- tests/compiler/managed-cast.optimized.wat | 102 +- tests/compiler/many-locals.optimized.wat | 22 +- tests/compiler/new.optimized.wat | 46 +- tests/compiler/number.optimized.wat | 190 +- .../optional-typeparameters.optimized.wat | 46 +- tests/compiler/rc/local-init.optimized.wat | 188 +- .../rc/logical-and-mismatch.optimized.wat | 128 +- .../rc/logical-or-mismatch.optimized.wat | 128 +- tests/compiler/rc/optimize.optimized.wat | 118 +- tests/compiler/rc/rereturn.optimized.wat | 86 +- .../rc/ternary-mismatch.optimized.wat | 109 +- tests/compiler/resolve-access.optimized.wat | 105 +- tests/compiler/resolve-binary.optimized.wat | 222 +- .../resolve-elementaccess.optimized.wat | 197 +- .../resolve-function-expression.optimized.wat | 89 +- tests/compiler/resolve-new.optimized.wat | 40 +- .../resolve-propertyaccess.optimized.wat | 96 +- tests/compiler/resolve-ternary.optimized.wat | 268 +- tests/compiler/resolve-unary.optimized.wat | 96 +- .../retain-release-sanity.optimized.wat | 128 +- tests/compiler/retain-release.optimized.wat | 111 +- tests/compiler/retain-return.optimized.wat | 161 +- tests/compiler/rt/instanceof.optimized.wat | 54 +- tests/compiler/runtime-full.optimized.wat | 86 +- tests/compiler/runtime-stub.optimized.wat | 93 +- .../compiler/std/array-literal.optimized.wat | 96 +- tests/compiler/std/array.optimized.wat | 1504 +++--- tests/compiler/std/arraybuffer.optimized.wat | 100 +- tests/compiler/std/dataview.optimized.wat | 109 +- tests/compiler/std/date.optimized.wat | 64 +- tests/compiler/std/map.optimized.wat | 1180 ++--- tests/compiler/std/math.optimized.wat | 2516 ++++----- tests/compiler/std/new.optimized.wat | 58 +- .../compiler/std/object-literal.optimized.wat | 95 +- .../std/operator-overloading.optimized.wat | 62 +- tests/compiler/std/set.optimized.wat | 500 +- tests/compiler/std/static-array.optimized.wat | 144 +- tests/compiler/std/staticarray.optimized.wat | 103 +- .../std/string-casemapping.optimized.wat | 219 +- .../std/string-encoding.optimized.wat | 250 +- tests/compiler/std/string.optimized.wat | 230 +- tests/compiler/std/symbol.optimized.wat | 214 +- tests/compiler/std/typedarray.optimized.wat | 4672 ++++++++--------- tests/compiler/typeof.optimized.wat | 52 +- tests/compiler/while.optimized.wat | 237 +- 64 files changed, 7740 insertions(+), 9098 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index adfef97751..5cee74136d 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -649,9 +649,9 @@ exports.main = function main(argv, options, callback) { module.setFlexibleInlineMaxSize(60); module.setOneCallerInlineMaxSize(60); } else { - module.setAlwaysInlineMaxSize(5); // default: 2 - module.setFlexibleInlineMaxSize(30); // default: 20 - module.setOneCallerInlineMaxSize(30); // default: 15 + module.setAlwaysInlineMaxSize(4); // default: 2 + module.setFlexibleInlineMaxSize(40); // default: 20 + module.setOneCallerInlineMaxSize(40); // default: 15 } // Optimize the module if requested diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index a4cb568d6c..3385c7e707 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_none (func (param 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 16) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") @@ -10,7 +10,14 @@ (export "__setArgumentsLength" (func $~setArgumentsLength)) (export "memory" (memory $0)) (start $~start) - (func $call-optional/opt|trampoline (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $call-optional/opt (; 1 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + local.get $0 + local.get $1 + i32.add + i32.add + ) + (func $call-optional/opt|trampoline (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 block $1of2 block $0of2 @@ -28,17 +35,16 @@ i32.const -2 local.set $2 end - local.get $2 local.get $0 local.get $1 - i32.add - i32.add + local.get $2 + call $call-optional/opt ) - (func $~setArgumentsLength (; 2 ;) (param $0 i32) + (func $~setArgumentsLength (; 3 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:call-optional (; 3 ;) + (func $start:call-optional (; 4 ;) i32.const 1 global.set $~argumentsLength i32.const 3 @@ -69,6 +75,20 @@ call $~lib/builtins/abort unreachable end + i32.const 3 + i32.const 4 + i32.const 5 + call $call-optional/opt + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 6 + i32.const 0 + call $~lib/builtins/abort + unreachable + end i32.const 1 global.set $~argumentsLength i32.const 3 @@ -116,7 +136,7 @@ unreachable end ) - (func $~start (; 4 ;) + (func $~start (; 5 ;) call $start:call-optional ) ) diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 2e63e07bdb..e0ea03c505 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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))) @@ -11,20 +10,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -32,16 +57,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -50,42 +75,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -96,9 +92,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $call-super/B#constructor (; 3 ;) (result i32) + (func $call-super/B#constructor (; 2 ;) (result i32) (local $0 i32) i32.const 8 i32.const 3 @@ -155,7 +151,7 @@ end local.get $0 ) - (func $call-super/D#constructor (; 4 ;) (result i32) + (func $call-super/D#constructor (; 3 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -200,7 +196,7 @@ end local.get $0 ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) (local $0 i32) i32.const 64 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 8ac03e2fb9..a34a3385bf 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) (data (i32.const 16) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h") @@ -33,20 +33,46 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -54,16 +80,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -72,42 +98,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -118,10 +115,15 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 3 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 2 ;) (result i32) + (local $0 i32) (local $1 i32) + i32.const 16 + i32.const 5 + call $~lib/rt/stub/__alloc + local.set $0 i32.const 0 i32.const 0 call $~lib/rt/stub/__alloc @@ -156,27 +158,21 @@ i32.const 0 i32.store offset=8 local.get $0 - ) - (func $class/testGenericInitializer (; 4 ;) - (local $0 i32) - (local $1 i32) - i32.const 4 - i32.const 4 - call $~lib/rt/stub/__alloc - i32.const 16 - i32.const 5 - call $~lib/rt/stub/__alloc - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 i32.const 0 i32.store offset=12 local.get $0 i32.const 0 i32.store offset=12 local.get $0 + ) + (func $class/testGenericInitializer (; 3 ;) + i32.const 4 + i32.const 4 + call $~lib/rt/stub/__alloc + call $~lib/array/Array#constructor i32.store ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index dfda5b0343..def857c975 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -17,20 +16,46 @@ (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -38,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -56,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -102,9 +98,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) (local $0 i32) i32.const 16 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index c03b72c01a..419d85e177 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -3,9 +3,9 @@ (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,46 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $do/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - 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|0 - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testNested (; 6 ;) + (func $do/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -144,7 +105,7 @@ i32.const 1 global.set $do/ran ) - (func $do/testNestedContinue (; 7 ;) + (func $do/testNestedContinue (; 6 ;) (local $0 i32) (local $1 i32) loop $do-continue|0 @@ -192,7 +153,7 @@ i32.const 1 global.set $do/ran ) - (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -358,7 +319,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -641,7 +602,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -755,7 +716,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -842,7 +803,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -899,7 +860,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -946,7 +907,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1007,7 +968,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -1081,48 +1042,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 208 i32.gt_u @@ -1130,11 +1052,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $do/Ref#constructor (; 16 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1145,15 +1111,11 @@ call $~lib/rt/pure/decrement end ) - (func $do/testRef (; 19 ;) + (func $do/testRef (; 18 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $do/Ref#constructor local.set $0 loop $do-continue|0 local.get $1 @@ -1171,11 +1133,7 @@ call $~lib/rt/pure/__release end else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $do/Ref#constructor local.set $2 local.get $0 call $~lib/rt/pure/__release @@ -1209,15 +1167,11 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $do/testRefAutorelease (; 20 ;) + (func $do/testRefAutorelease (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $do/Ref#constructor local.set $0 loop $do-continue|0 block $do-break|0 @@ -1239,11 +1193,7 @@ local.set $0 br $do-break|0 end - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $do/Ref#constructor local.tee $2 call $~lib/rt/pure/__release local.get $2 @@ -1275,34 +1225,58 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $start:do (; 21 ;) + (func $start:do (; 20 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $do/ran - call $do/testSimple - global.get $do/ran - i32.eqz + i32.const 10 + local.set $0 + loop $do-continue|0 + 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|0 + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 16 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran i32.const 10 local.set $1 - loop $do-continue|0 + loop $do-continue|00 local.get $1 local.tee $0 i32.const 1 i32.sub local.set $1 local.get $0 - br_if $do-continue|0 + br_if $do-continue|00 end local.get $1 i32.const -1 @@ -1334,14 +1308,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|00 + loop $do-continue|01 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|00 + br_if $do-continue|01 end local.get $0 i32.const 10 @@ -1372,14 +1346,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|02 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|02 end local.get $0 i32.const 10 @@ -1434,7 +1408,7 @@ unreachable end ) - (func $~start (; 22 ;) + (func $~start (; 21 ;) global.get $~started if return @@ -1444,7 +1418,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index af3824c4d2..a783640e03 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -60,20 +60,28 @@ (func $exports/Car.getNumTires (; 2 ;) (result i32) i32.const 4 ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -81,16 +89,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -99,20 +107,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -127,27 +124,27 @@ local.get $1 i32.const 4 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $exports/Car#get:doors (; 5 ;) (param $0 i32) (result i32) + (func $exports/Car#get:doors (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:doors (; 6 ;) (param $0 i32) (param $1 i32) + (func $exports/Car#set:doors (; 5 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 7 ;) (param $0 i32) + (func $exports/Car#openDoors (; 6 ;) (param $0 i32) nop ) - (func $~start (; 8 ;) + (func $~start (; 7 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset ) - (func $exports/subOpt|trampoline (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 8 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -165,11 +162,11 @@ local.get $1 i32.sub ) - (func $~setArgumentsLength (; 10 ;) (param $0 i32) + (func $~setArgumentsLength (; 9 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $exports/Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 10 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -196,7 +193,7 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#constructor|trampoline (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 0eb6c15c13..1d4bf09280 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1062,46 +1062,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1109,11 +1072,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1155,7 +1153,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1328,7 +1326,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 14 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1339,7 +1337,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/reallocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1439,7 +1437,7 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1650,7 +1648,7 @@ end end ) - (func $~lib/array/ensureSize (; 18 ;) (param $0 i32) + (func $~lib/array/ensureSize (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1709,7 +1707,7 @@ i32.store end ) - (func $start:extends-baseaggregate (; 19 ;) + (func $start:extends-baseaggregate (; 18 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1764,10 +1762,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 20 ;) + (func $~start (; 19 ;) call $start:extends-baseaggregate ) - (func $~lib/rt/pure/markGray (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 20 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1791,7 +1789,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 21 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1804,7 +1802,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 22 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1838,7 +1836,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 23 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1871,7 +1869,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 25 ;) + (func $~lib/rt/pure/__collect (; 24 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1992,53 +1990,11 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 26 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $0 - i32.const 256 - local.get $0 - i32.const 256 - i32.gt_u - select - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - if - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 - global.set $~lib/rt/pure/ROOTS - local.get $0 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $0 - local.get $3 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2140,7 +2096,43 @@ 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 $4 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + 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 $4 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -2155,7 +2147,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 28 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 26 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2258,7 +2250,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 27 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2291,7 +2283,7 @@ end end ) - (func $~lib/rt/__visit_members (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 28 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index f54dd883c5..ed43ace588 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -3,9 +3,9 @@ (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -991,48 +991,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 208 i32.gt_u @@ -1040,10 +1001,54 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) + (func $for/Ref#constructor (; 15 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 208 @@ -1059,11 +1064,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $for/Ref#constructor local.set $0 loop $for-loop|0 local.get $0 @@ -1083,11 +1084,7 @@ call $~lib/rt/pure/__release end else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $for/Ref#constructor local.set $2 local.get $0 call $~lib/rt/pure/__release @@ -1126,25 +1123,13 @@ (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $for/Ref#constructor + call $for/Ref#constructor local.set $0 call $~lib/rt/pure/__release loop $for-loop|0 block $for-break0 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $for/Ref#constructor local.tee $1 call $~lib/rt/pure/__release local.get $1 @@ -1167,11 +1152,7 @@ local.set $0 br $for-break0 end - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $for/Ref#constructor local.get $0 call $~lib/rt/pure/__release local.set $0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 7d9a5e54ca..31848c9a8a 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -10,10 +10,18 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $0 memory.size local.tee $2 i32.const 16 @@ -51,21 +59,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 2 ;) (result i32) - (local $0 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $0 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $0 + local.get $3 i32.const 16 i32.sub local.tee $0 @@ -80,6 +74,13 @@ local.get $0 i32.const 0 i32.store offset=12 + ) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 2 ;) (result i32) + call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index dfcee59dc3..ccb391680b 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1066,48 +1066,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 220 i32.gt_u @@ -1115,11 +1076,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1130,7 +1128,7 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1145,16 +1143,16 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 18 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 19 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1170,12 +1168,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 21 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 22 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1193,10 +1191,10 @@ local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 23 ;) + (func $~lib/rt/pure/__collect (; 22 ;) nop ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index aa25df3123..6cee555feb 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,6 +1,5 @@ (module (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -30,20 +29,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -51,16 +76,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -69,42 +94,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -115,9 +111,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -290,7 +286,7 @@ end end ) - (func $~lib/rt/__allocArray (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -327,7 +323,7 @@ i32.store offset=12 local.get $2 ) - (func $start:infer-array (; 5 ;) + (func $start:infer-array (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -510,7 +506,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) call $start:infer-array ) ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 524a39965c..aaaad1e619 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -28,7 +28,13 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#reduce (; 2 ;) + (func $infer-generic/test1 (; 2 ;) (param $0 f32) (result f32) + local.get $0 + ) + (func $infer-generic/test2 (; 3 ;) (param $0 i32) (result i32) + local.get $0 + ) + (func $~start (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -70,13 +76,4 @@ end end ) - (func $infer-generic/test1 (; 3 ;) (param $0 f32) (result f32) - local.get $0 - ) - (func $infer-generic/test2 (; 4 ;) (param $0 i32) (result i32) - local.get $0 - ) - (func $~start (; 5 ;) - call $~lib/array/Array#reduce - ) ) diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index daedfe913b..49b142ecbf 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -10,7 +10,7 @@ (global $inlining-blocklocals/theCall_c (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $inlining-blocklocals/test (; 1 ;) + (func $~start (; 1 ;) (local $0 i32) global.get $inlining-blocklocals/b local.tee $0 @@ -46,7 +46,4 @@ unreachable end ) - (func $~start (; 2 ;) - call $inlining-blocklocals/test - ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ed205d4afd..27f36ff0b3 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -21,20 +21,46 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -42,16 +68,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -60,42 +86,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -106,9 +103,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $inlining/test_ctor (; 5 ;) + (func $inlining/test_ctor (; 4 ;) (local $0 i32) i32.const 16 i32.const 4 @@ -188,7 +185,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 1 global.set $~argumentsLength i32.const 64 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index ea73072a98..ed55da4f34 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) @@ -14,20 +13,28 @@ (global $instanceof-class/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -35,16 +42,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -53,20 +60,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -81,9 +77,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $start:instanceof-class (; 3 ;) + (func $~start (; 2 ;) (local $0 i32) i32.const 144 global.set $~lib/rt/stub/startOffset @@ -142,10 +138,7 @@ unreachable end ) - (func $~start (; 4 ;) - call $start:instanceof-class - ) - (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 483435f89e..c12e6448d4 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -910,48 +910,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 252 i32.gt_u @@ -959,11 +920,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 252 i32.gt_u @@ -974,14 +972,21 @@ call $~lib/rt/pure/decrement end ) - (func $issues/1095/test (; 16 ;) (param $0 i32) + (func $~start (; 15 ;) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - local.tee $1 + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 192 + i32.store local.get $0 i32.load - local.tee $0 + local.tee $1 i32.eqz if i32.const 0 @@ -991,37 +996,25 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $0 i32.load - local.tee $1 + local.tee $2 i32.ne if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $2 call $~lib/rt/pure/__release end local.get $0 + local.get $1 i32.store - ) - (func $~start (; 17 ;) - (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 192 - i32.store - local.get $0 - call $issues/1095/test local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 0298582781..bdab016514 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -8,7 +8,7 @@ (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:logical (; 0 ;) + (func $~start (; 0 ;) i32.const 2 global.set $logical/i i32.const 1 @@ -42,7 +42,4 @@ f64.const nan:0x8000000000000 global.set $logical/F ) - (func $~start (; 1 ;) - call $start:logical - ) ) diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 97d51576a3..4cf6e35cbf 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -88,7 +88,37 @@ end end ) - (func $start:loop-flow (; 5 ;) + (func $loop-flow/whileThrow (; 5 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 11 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/whileContinue (; 6 ;) (result i32) + loop $while-continue|0 + br $while-continue|0 + end + unreachable + ) + (func $loop-flow/forThrow (; 7 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 41 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/doThrow (; 8 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 71 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~start (; 9 ;) i32.const 1 call $loop-flow/whileAny i32.const 1 @@ -126,37 +156,4 @@ unreachable end ) - (func $loop-flow/whileThrow (; 6 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 11 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/whileContinue (; 7 ;) (result i32) - loop $while-continue|0 - br $while-continue|0 - end - unreachable - ) - (func $loop-flow/forThrow (; 8 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 41 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/doThrow (; 9 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 71 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $~start (; 10 ;) - call $start:loop-flow - ) ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 14a242f60c..5a7e5e397c 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -912,48 +912,16 @@ call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 - local.get $1 - i32.const 1 + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end ) (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 i32.const 268 i32.gt_u @@ -961,29 +929,61 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) (func $managed-cast/Cat#constructor (; 15 ;) (result i32) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize i32.const 3 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 - if (result i32) - local.get $0 - else - call $~lib/rt/tlsf/maybeInitialize + i32.eqz + if i32.const 4 - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain + local.set $0 end + local.get $0 ) (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index abe9619493..68668d9d07 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -1,18 +1,36 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) - (func $many-locals/testI32 (; 0 ;) (param $0 i32) (result i32) + (start $~start) + (func $many-locals/testI32 (; 1 ;) (param $0 i32) (result i32) local.get $0 ) - (func $many-locals/testI8 (; 1 ;) (param $0 i32) (result i32) + (func $many-locals/testI8 (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s ) + (func $~start (; 3 ;) + i32.const 42 + call $many-locals/testI8 + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 267 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) ) diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 62c4e11140..2e14cfff60 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $new/ref (mut i32) (i32.const 0)) @@ -10,20 +9,28 @@ (global $new/ref2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -31,16 +38,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -49,20 +56,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -77,9 +73,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index c8a2d56936..cfb4615cb5 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,12 +1,12 @@ (module (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 $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -89,20 +89,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -110,16 +136,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -128,42 +154,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -174,9 +171,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -200,47 +197,46 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 32 - return - end - local.get $0 - i32.const 0 - i32.lt_s - local.tee $1 - if + if (result i32) + local.get $0 i32.const 0 + i32.lt_s + local.tee $1 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end local.get $0 - i32.sub - local.set $0 - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 + end local.get $2 - i32.const 45 - i32.store16 + else + i32.const 32 end - local.get $2 ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -248,7 +244,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -324,7 +320,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -356,7 +352,7 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -747,7 +743,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -920,7 +916,7 @@ end end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1165,7 +1161,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1303,7 +1299,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1374,7 +1370,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1418,7 +1414,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/number/F32.isSafeInteger (; 15 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 14 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1430,7 +1426,7 @@ f32.le select ) - (func $~lib/number/F32.isInteger (; 16 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 15 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1443,7 +1439,7 @@ f32.eq select ) - (func $~lib/number/F64.isSafeInteger (; 17 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 16 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1455,7 +1451,7 @@ f64.le select ) - (func $~lib/number/F64.isInteger (; 18 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 17 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1468,7 +1464,7 @@ f64.eq select ) - (func $start:number (; 19 ;) + (func $start:number (; 18 ;) (local $0 i32) (local $1 i32) i32.const 1536 @@ -1476,7 +1472,7 @@ i32.const 1536 global.set $~lib/rt/stub/offset global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1516,7 +1512,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -1529,7 +1525,7 @@ unreachable end i32.const -5 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -1542,7 +1538,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -1559,7 +1555,7 @@ i32.add global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -1576,7 +1572,7 @@ i32.sub global.set $number/a global.get $number/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1618,7 +1614,7 @@ i32.add global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 64 call $~lib/string/String.__eq i32.eqz @@ -1636,7 +1632,7 @@ i32.sub global.set $number/a local.get $0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2089,7 +2085,7 @@ unreachable end ) - (func $~start (; 20 ;) + (func $~start (; 19 ;) call $start:number ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index e5a0edcd04..f9e27ebac4 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -9,20 +8,28 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -30,16 +37,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -48,20 +55,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -76,9 +72,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 8698dfa1ef..37ccd04b30 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -8,9 +8,6 @@ (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) - (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) - (import "rtrace" "ondecrement" (func $~lib/rt/rtrace/ondecrement (param i32))) - (import "rtrace" "onfree" (func $~lib/rt/rtrace/onfree (param i32))) (memory $0 1) (data (i32.const 20) "\01\00\00\00\01") (data (i32.const 32) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -20,7 +17,7 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/removeBlock (; 5 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 2 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -186,7 +183,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 3 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -469,7 +466,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -583,7 +580,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 8 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 5 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -670,7 +667,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -727,7 +724,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -774,7 +771,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,7 +832,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -909,172 +906,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start (; 14 ;) - (local $0 i32) + (func $~start (; 10 ;) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - local.tee $0 - i32.const 192 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - i32.const 192 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 268435455 - i32.and - local.set $1 - local.get $0 - call $~lib/rt/rtrace/ondecrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 122 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.eq - if - block $__inlined_func$~lib/rt/__visit_members - block $switch$1$default - block $switch$1$case$4 - local.get $0 - i32.const 16 - i32.add - local.tee $1 - 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default - end - local.get $1 - i32.load - local.tee $1 - if - local.get $1 - i32.const 192 - i32.ge_u - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - end - br $__inlined_func$~lib/rt/__visit_members - end - unreachable - end - local.get $2 - i32.const -2147483648 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 126 - i32.const 17 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.load - i32.const 1 - i32.or - i32.store - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/insertBlock - local.get $0 - call $~lib/rt/rtrace/onfree - else - local.get $1 - i32.const 0 - i32.le_u - if - i32.const 0 - i32.const 160 - i32.const 136 - i32.const 15 - call $~lib/builtins/abort - unreachable - end - 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 + drop ) ) diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 8b81f07e0e..7744c9fec6 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -2,10 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -909,48 +909,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,10 +919,54 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) + (func $rc/logical-and-mismatch/Ref#constructor (; 14 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 176 @@ -973,19 +978,11 @@ call $~lib/rt/pure/decrement end ) - (func $start:rc/logical-and-mismatch (; 16 ;) + (func $~start (; 16 ;) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-and-mismatch/Ref#constructor global.set $rc/logical-and-mismatch/gloRef - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-and-mismatch/Ref#constructor local.tee $0 if local.get $0 @@ -999,30 +996,18 @@ global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-and-mismatch/Ref#constructor else local.get $0 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-and-mismatch/Ref#constructor local.tee $0 if local.get $0 call $~lib/rt/pure/__release - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-and-mismatch/Ref#constructor local.set $0 end local.get $0 @@ -1030,10 +1015,7 @@ global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~start (; 17 ;) - call $start:rc/logical-and-mismatch - ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 50e94c8a0d..0f8811f36f 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -2,10 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -909,48 +909,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,10 +919,54 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) + (func $rc/logical-or-mismatch/Ref#constructor (; 14 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 176 @@ -973,19 +978,11 @@ call $~lib/rt/pure/decrement end ) - (func $start:rc/logical-or-mismatch (; 16 ;) + (func $~start (; 16 ;) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-or-mismatch/Ref#constructor global.set $rc/logical-or-mismatch/gloRef - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-or-mismatch/Ref#constructor local.tee $0 i32.eqz if @@ -1003,28 +1000,16 @@ local.get $0 call $~lib/rt/pure/__retain else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-or-mismatch/Ref#constructor end call $~lib/rt/pure/__release - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-or-mismatch/Ref#constructor local.tee $0 i32.eqz if local.get $0 call $~lib/rt/pure/__release - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/logical-or-mismatch/Ref#constructor local.set $0 end local.get $0 @@ -1032,10 +1017,7 @@ global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~start (; 17 ;) - call $start:rc/logical-or-mismatch - ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 7a2122ac44..f85b0d2b7e 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -60,48 +60,9 @@ (func $rc/optimize/eliminated_viii (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 196 i32.gt_u @@ -109,11 +70,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 32 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -279,7 +277,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -562,7 +560,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -676,7 +674,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -763,7 +761,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -894,7 +892,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -956,7 +954,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1032,7 +1030,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1134,7 +1132,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1142,13 +1140,13 @@ i32.const 16 i32.add ) - (func $rc/optimize/getRef (; 20 ;) (result i32) + (func $rc/optimize/getRef (; 19 ;) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1159,13 +1157,13 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/eliminated_rr (; 22 ;) (param $0 i32) (result i32) + (func $rc/optimize/eliminated_rr (; 21 ;) (param $0 i32) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1177,7 +1175,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 24 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 23 ;) (param $0 i32) (param $1 i32) local.get $1 if (result i32) local.get $0 @@ -1187,7 +1185,7 @@ end call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1200,16 +1198,16 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 26 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 25 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 27 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 26 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 9c64dd213e..6c743ea78f 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,46 +1050,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 212 i32.gt_u @@ -1097,11 +1060,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1112,10 +1110,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 13 ;) + (func $~start (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index c295c81656..00848b6872 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -2,10 +2,10 @@ (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_i32 (func (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -911,48 +911,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -960,18 +921,58 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) + (func $rc/ternary-mismatch/Ref#constructor (; 14 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) (func $rc/ternary-mismatch/test1 (; 15 ;) (param $0 i32) (result i32) local.get $0 if (result i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/ternary-mismatch/Ref#constructor else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain @@ -994,19 +995,11 @@ global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/ternary-mismatch/Ref#constructor end ) (func $~start (; 18 ;) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $rc/ternary-mismatch/Ref#constructor global.set $rc/ternary-mismatch/gloRef i32.const 1 call $rc/ternary-mismatch/test1 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 53530df67e..8b49f5e1b1 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (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 $i32_=>_i32 (func (param i32) (result i32))) @@ -20,20 +20,46 @@ (export "fieldAccess" (func $resolve-access/fieldAccess)) (export "propertyAccess" (func $resolve-access/propertyAccess)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -41,16 +67,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -59,42 +85,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -105,9 +102,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -278,7 +275,7 @@ end end ) - (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -326,7 +323,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -350,7 +347,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/decimalCount64 (; 6 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 5 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -403,7 +400,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa64 (; 7 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 6 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -468,7 +465,7 @@ end local.get $3 ) - (func $resolve-access/arrayAccess (; 8 ;) (result i32) + (func $resolve-access/arrayAccess (; 7 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -509,7 +506,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/Container#constructor (; 9 ;) (result i32) + (func $resolve-access/Container#constructor (; 8 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -519,7 +516,7 @@ i64.store local.get $0 ) - (func $resolve-access/fieldAccess (; 10 ;) (result i32) + (func $resolve-access/fieldAccess (; 9 ;) (result i32) (local $0 i32) call $resolve-access/Container#constructor local.tee $0 @@ -529,7 +526,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/propertyAccess (; 11 ;) (result i32) + (func $resolve-access/propertyAccess (; 10 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -559,7 +556,7 @@ end local.get $0 ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index a30a8aa4e4..a5ef86bae2 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -2,9 +2,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) @@ -221,20 +221,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 5 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 5 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -242,16 +268,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -260,42 +286,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 6 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -306,9 +303,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/utoa_simple (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -332,48 +329,47 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 8 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 192 - return - end - local.get $0 - i32.const 0 - i32.lt_s - local.tee $1 - if + if (result i32) + local.get $0 i32.const 0 + i32.lt_s + local.tee $1 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end local.get $0 - i32.sub - local.set $0 - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 + end local.get $2 - i32.const 45 - i32.store16 + else + i32.const 192 end - local.get $2 ) - (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -764,7 +760,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -937,7 +933,7 @@ end end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1182,7 +1178,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1327,7 +1323,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1399,7 +1395,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1443,7 +1439,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 15 ;) (result i32) + (func $~lib/util/number/dtoa (; 14 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 56 @@ -1464,7 +1460,7 @@ local.get $0 call $~lib/rt/stub/__free ) - (func $start:resolve-binary (; 16 ;) + (func $start:resolve-binary (; 15 ;) i32.const 32 i32.const 32 call $~lib/string/String.__eq @@ -1568,7 +1564,7 @@ i32.const 1 global.set $resolve-binary/a i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1585,7 +1581,7 @@ i32.add global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1602,7 +1598,7 @@ i32.sub global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1619,7 +1615,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1652,7 +1648,7 @@ i32.const 2 global.set $resolve-binary/a i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1669,7 +1665,7 @@ i32.rem_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1686,7 +1682,7 @@ i32.shl global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1703,7 +1699,7 @@ i32.shr_s global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1720,7 +1716,7 @@ i32.shr_u global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1737,7 +1733,7 @@ i32.and global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1754,7 +1750,7 @@ i32.or global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1771,7 +1767,7 @@ i32.xor global.set $resolve-binary/a global.get $resolve-binary/a - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1784,7 +1780,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1797,7 +1793,7 @@ unreachable end i32.const -1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1568 call $~lib/string/String.__eq i32.eqz @@ -1810,7 +1806,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1823,7 +1819,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1836,7 +1832,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1861,7 +1857,7 @@ unreachable end i32.const 4 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1504 call $~lib/string/String.__eq i32.eqz @@ -1874,7 +1870,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1887,7 +1883,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1900,7 +1896,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1913,7 +1909,7 @@ unreachable end i32.const 3 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 1536 call $~lib/string/String.__eq i32.eqz @@ -1926,7 +1922,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1939,7 +1935,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -1952,7 +1948,7 @@ unreachable end i32.const 0 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 192 call $~lib/string/String.__eq i32.eqz @@ -1965,7 +1961,7 @@ unreachable end i32.const 1 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -1978,7 +1974,7 @@ unreachable end i32.const 2 - call $~lib/util/number/itoa32 + call $~lib/number/I32#toString i32.const 256 call $~lib/string/String.__eq i32.eqz @@ -2171,7 +2167,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) call $start:resolve-binary ) ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b6abe0288a..b5b6cf3c47 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,9 +1,9 @@ (module - (type $i32_=>_none (func (param i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) @@ -41,20 +41,46 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -62,16 +88,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -80,42 +106,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -126,9 +123,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) + (func $~lib/memory/memory.fill (; 2 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -172,45 +169,7 @@ i32.const 0 i32.store8 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/stub/__alloc - 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.load - drop - local.get $0 - local.get $1 - 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/Float32Array#__set (; 5 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -234,7 +193,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 6 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -257,7 +216,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -305,7 +264,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -695,7 +654,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -868,7 +827,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -892,7 +851,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1137,7 +1096,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -1446,7 +1405,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1454,7 +1413,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1526,7 +1485,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1570,7 +1529,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 16 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 14 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1620,7 +1579,7 @@ local.get $1 call $~lib/rt/stub/__free ) - (func $~lib/util/string/compareImpl (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1696,7 +1655,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1728,8 +1687,9 @@ end i32.const 0 ) - (func $start:resolve-elementaccess (; 19 ;) + (func $start:resolve-elementaccess (; 17 ;) (local $0 i32) + (local $1 i32) i32.const 1600 global.set $~lib/rt/stub/startOffset i32.const 1600 @@ -1737,7 +1697,42 @@ i32.const 12 i32.const 3 call $~lib/rt/stub/__alloc - call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 + call $~lib/memory/memory.fill + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/stub/__alloc + 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.load + drop + local.get $0 + local.get $1 + 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 global.set $resolve-elementaccess/arr global.get $resolve-elementaccess/arr i32.const 0 @@ -1826,7 +1821,7 @@ unreachable end ) - (func $~start (; 20 ;) + (func $~start (; 18 ;) call $start:resolve-elementaccess ) ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 06e278cf72..d3d8a39c25 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -67,20 +67,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -88,16 +114,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -106,42 +132,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -152,9 +149,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -215,7 +212,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -223,7 +220,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -298,7 +295,7 @@ end i32.const 0 ) - (func $start:resolve-function-expression (; 8 ;) + (func $start:resolve-function-expression (; 7 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -351,7 +348,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 8 ;) call $start:resolve-function-expression ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 0aaab3bea0..e217064f83 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,18 +7,26 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,18 +56,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $resolve-new/Foo#constructor (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -75,16 +71,16 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc global.set $resolve-new/foo - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc drop ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 1ad123c0fb..7937b36c02 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param 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))) @@ -71,20 +70,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -92,16 +117,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -110,42 +135,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -156,9 +152,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -220,7 +216,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -228,7 +224,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -304,7 +300,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -336,7 +332,7 @@ end i32.const 0 ) - (func $start:resolve-propertyaccess (; 8 ;) + (func $start:resolve-propertyaccess (; 7 ;) (local $0 i32) i32.const 448 global.set $~lib/rt/stub/startOffset @@ -480,7 +476,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 8 ;) call $start:resolve-propertyaccess ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 6e13abd4fd..4a22abd9cb 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module - (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_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 $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 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_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -1072,46 +1072,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1119,11 +1082,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1134,7 +1132,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 13 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1182,7 +1180,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1206,7 +1204,7 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (; 15 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1214,7 +1212,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1290,7 +1288,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1324,7 +1322,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 18 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 17 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1715,7 +1713,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1888,7 +1886,7 @@ end end ) - (func $~lib/util/number/prettify (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2133,7 +2131,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 21 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 20 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2271,7 +2269,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2345,49 +2343,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2398,28 +2354,96 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~lib/number/F64#toString (; 23 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + block $__inlined_func$~lib/util/number/dtoa + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $0 + local.get $1 + call $~lib/string/String#substring + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/tlsf/freeBlock + end + local.get $2 + ) + (func $~setArgumentsLength (; 24 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-ternary (; 26 ;) + (func $start:resolve-ternary (; 25 ;) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $0 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 i32.const 1 - local.get $1 - call $~lib/util/number/utoa_simple local.get $0 + call $~lib/util/number/utoa_simple + local.get $1 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 + local.get $0 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -2431,31 +2455,8 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/util/number/dtoa - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - call $~lib/util/number/dtoa_core - local.tee $0 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 + call $~lib/number/F64#toString + local.tee $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2473,18 +2474,17 @@ global.set $~argumentsLength i32.const 1 global.set $~argumentsLength - local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 27 ;) + (func $~start (; 26 ;) call $start:resolve-ternary ) - (func $~lib/rt/pure/__collect (; 28 ;) + (func $~lib/rt/pure/__collect (; 27 ;) nop ) - (func $~lib/rt/pure/decrement (; 29 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 6f79954fa4..c72b48c07e 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param 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))) @@ -79,20 +78,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -100,16 +125,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -118,42 +143,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -164,9 +160,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -228,7 +224,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -236,7 +232,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -312,7 +308,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -344,7 +340,7 @@ end i32.const 0 ) - (func $start:resolve-unary (; 8 ;) + (func $start:resolve-unary (; 7 ;) (local $0 i32) i32.const 544 global.set $~lib/rt/stub/startOffset @@ -624,7 +620,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 8 ;) call $start:resolve-unary ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 98f96d23f2..60a2b950f8 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1282,48 +1282,9 @@ end end ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 708 i32.gt_u @@ -1331,11 +1292,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 708 i32.gt_u @@ -1346,7 +1344,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1412,7 +1410,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 21 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 20 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1454,7 +1452,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1627,7 +1625,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1640,7 +1638,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1743,7 +1741,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 24 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1802,7 +1800,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 26 ;) (param $0 i32) + (func $~lib/array/Array#push (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1825,7 +1823,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#get:length (; 27 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 26 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1833,7 +1831,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1892,7 +1890,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 480 local.get $0 @@ -1900,7 +1898,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $start:retain-release-sanity (; 30 ;) + (func $start:retain-release-sanity (; 29 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2159,10 +2157,10 @@ call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) - (func $~start (; 31 ;) + (func $~start (; 30 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 32 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 31 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2186,7 +2184,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 32 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2199,7 +2197,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 34 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 33 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2233,7 +2231,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 35 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 34 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2266,7 +2264,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 36 ;) + (func $~lib/rt/pure/__collect (; 35 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2387,7 +2385,7 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 37 ;) + (func $~lib/rt/pure/growRoots (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2438,7 +2436,7 @@ i32.add global.set $~lib/rt/pure/END ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 37 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2560,7 +2558,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 38 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2663,7 +2661,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 39 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2696,7 +2694,7 @@ end end ) - (func $~lib/rt/__visit_members (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 40 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index a0026aad7b..bb79b2231a 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -57,20 +57,46 @@ (export "provideRefIndirect" (func $retain-release/provideRefIndirect)) (export "receiveRefIndirect" (func $retain-release/receiveRefIndirect)) (export "receiveRefIndirectDrop" (func $retain-release/receiveRefIndirect)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -78,16 +104,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -96,42 +122,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -142,31 +139,31 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $retain-release/returnRef (; 3 ;) (result i32) + (func $retain-release/returnRef (; 2 ;) (result i32) global.get $retain-release/REF ) - (func $retain-release/receiveRef (; 4 ;) + (func $retain-release/receiveRef (; 3 ;) nop ) - (func $retain-release/takeRef (; 5 ;) (param $0 i32) + (func $retain-release/takeRef (; 4 ;) (param $0 i32) nop ) - (func $retain-release/takeReturnRef (; 6 ;) (param $0 i32) (result i32) + (func $retain-release/takeReturnRef (; 5 ;) (param $0 i32) (result i32) local.get $0 ) - (func $retain-release/newRef (; 7 ;) + (func $retain-release/newRef (; 6 ;) i32.const 0 i32.const 3 call $~lib/rt/stub/__alloc drop ) - (func $retain-release/assignGlobal (; 8 ;) + (func $retain-release/assignGlobal (; 7 ;) global.get $retain-release/REF global.set $retain-release/glo ) - (func $retain-release/assignField (; 9 ;) + (func $retain-release/assignField (; 8 ;) (local $0 i32) (local $1 i32) global.get $retain-release/REF @@ -180,7 +177,7 @@ local.get $0 i32.store ) - (func $retain-release/scopeForComplex (; 10 ;) (param $0 i32) + (func $retain-release/scopeForComplex (; 9 ;) (param $0 i32) (local $1 i32) (local $2 i32) loop $for-loop|0 @@ -206,7 +203,7 @@ end end ) - (func $retain-release/scopeThrow (; 11 ;) (param $0 i32) + (func $retain-release/scopeThrow (; 10 ;) (param $0 i32) local.get $0 if i32.const 32 @@ -217,31 +214,31 @@ unreachable end ) - (func $retain-release/scopeUnreachable (; 12 ;) (param $0 i32) + (func $retain-release/scopeUnreachable (; 11 ;) (param $0 i32) local.get $0 if unreachable end ) - (func $~setArgumentsLength (; 13 ;) (param $0 i32) + (func $~setArgumentsLength (; 12 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $retain-release/provideRefIndirect (; 14 ;) (param $0 i32) + (func $retain-release/provideRefIndirect (; 13 ;) (param $0 i32) i32.const 1 global.set $~argumentsLength global.get $retain-release/REF local.get $0 call_indirect (type $i32_=>_none) ) - (func $retain-release/receiveRefIndirect (; 15 ;) (param $0 i32) + (func $retain-release/receiveRefIndirect (; 14 ;) (param $0 i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) drop ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) (local $0 i32) global.get $~started if diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 777f0f5983..33abd89266 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -3,9 +3,9 @@ (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -906,46 +906,63 @@ call $~lib/rt/tlsf/prepareBlock local.get $1 ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne + i32.const 176 + i32.gt_u if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 - local.get $1 - i32.const 1 + ) + (func $retain-return/Ref#constructor (; 10 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -953,44 +970,33 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + call $~lib/rt/pure/decrement end - local.get $0 ) - (func $~setArgumentsLength (; 11 ;) (param $0 i32) + (func $~setArgumentsLength (; 12 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:retain-return (; 12 ;) + (func $start:retain-return (; 13 ;) (local $0 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + 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.set $retain-return/ref i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 1 global.set $~argumentsLength i32.const 1 @@ -1001,24 +1007,20 @@ global.set $~argumentsLength i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 0 global.set $~argumentsLength - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - drop + call $retain-return/Ref#constructor + call $~lib/rt/pure/__release i32.const 0 global.set $~argumentsLength i32.const 0 @@ -1027,19 +1029,12 @@ local.tee $0 if local.get $0 - i32.const 176 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end + call $~lib/rt/pure/__release end i32.const 0 global.set $retain-return/ref ) - (func $~start (; 13 ;) + (func $~start (; 14 ;) global.get $~started if return @@ -1049,7 +1044,7 @@ end call $start:retain-return ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 7bf903065c..ff9fbe852c 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,7 +1,6 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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))) @@ -19,20 +18,28 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -40,16 +47,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -58,20 +65,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -86,9 +82,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $rt/instanceof/Animal#constructor (; 3 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Animal#constructor (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -98,7 +94,7 @@ end local.get $0 ) - (func $rt/instanceof/Cat#constructor (; 4 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Cat#constructor (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -109,7 +105,7 @@ local.get $0 call $rt/instanceof/Animal#constructor ) - (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 4 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -139,7 +135,7 @@ end i32.const 0 ) - (func $start:rt/instanceof (; 6 ;) + (func $start:rt/instanceof (; 5 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -406,7 +402,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 6 ;) global.get $~started if return diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 11cd08d75e..d9e1741d3f 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,46 +1050,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 204 i32.gt_u @@ -1097,11 +1060,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1112,10 +1110,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 13 ;) + (func $~lib/rt/pure/__collect (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 4647e2d833..eab4d7d804 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -16,20 +16,46 @@ (export "__reset" (func $~lib/rt/stub/__reset)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -37,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -55,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -101,22 +98,22 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/rt/stub/__retain (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__retain (; 1 ;) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/rt/stub/__release (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__release (; 2 ;) (param $0 i32) nop ) - (func $~lib/rt/stub/__collect (; 4 ;) + (func $~lib/rt/stub/__collect (; 3 ;) nop ) - (func $~lib/rt/stub/__reset (; 5 ;) + (func $~lib/rt/stub/__reset (; 4 ;) global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 48 global.set $~lib/rt/stub/startOffset i32.const 48 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 6d9d6e3e15..050503279f 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1104,48 +1104,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 496 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 496 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 528 i32.gt_u @@ -1153,11 +1114,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 496 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 496 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/__allocArray (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) i32.const 16 local.get $2 @@ -1183,7 +1181,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 528 i32.gt_u @@ -1194,7 +1192,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/array-literal (; 20 ;) + (func $start:std/array-literal (; 19 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1558,10 +1556,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 21 ;) + (func $~start (; 20 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1665,7 +1663,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 22 ;) (param $0 i32) local.get $0 i32.const 528 i32.lt_u @@ -1677,7 +1675,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 24 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 4dfa69ba96..4869255b84 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4,12 +4,12 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) @@ -1495,48 +1495,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1544,11 +1505,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1559,7 +1557,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1628,7 +1626,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 22 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 21 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 3 @@ -1645,7 +1643,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Ref#constructor (; 23 ;) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 22 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 4 i32.const 4 @@ -1656,7 +1654,7 @@ i32.store local.get $1 ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1829,7 +1827,7 @@ end end ) - (func $~lib/rt/__allocArray (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1867,7 +1865,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1934,7 +1932,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1953,7 +1951,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1998,7 +1996,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2073,7 +2071,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2094,7 +2092,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2142,7 +2140,7 @@ end i32.const 1 ) - (func $std/array/internalCapacity (; 32 ;) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 31 ;) (param $0 i32) (result i32) local.get $0 i32.load i32.const 16 @@ -2151,7 +2149,7 @@ i32.const 2 i32.shr_s ) - (func $~lib/rt/tlsf/checkUsedBlock (; 33 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2193,7 +2191,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2206,7 +2204,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2309,7 +2307,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2369,7 +2367,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2392,7 +2390,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 38 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2422,45 +2420,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#set:length (; 39 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 0 - i32.gt_s - if - local.get $0 - i32.load offset=4 - local.tee $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $1 - loop $do-continue|0 - local.get $2 - i32.load - call $~lib/rt/pure/__release - local.get $2 - i32.const 4 - i32.add - local.tee $2 - local.get $1 - i32.lt_u - br_if $do-continue|0 - end - else - local.get $0 - i32.const 0 - call $~lib/array/ensureSize - end - local.get $0 - i32.const 0 - i32.store offset=12 - ) - (func $~lib/array/Array#concat (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 38 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2513,7 +2473,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2617,7 +2577,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 42 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2646,50 +2606,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 43 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 1 - i32.lt_s - if - i32.const 976 - i32.const 512 - i32.const 349 - i32.const 20 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.tee $2 - i32.load - local.get $2 - local.get $2 - i32.const 4 - i32.add - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.const 2 - i32.shl - local.tee $4 - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array#reverse (; 44 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 41 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2739,7 +2656,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#indexOf (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2799,99 +2716,7 @@ end i32.const -1 ) - (func $~lib/array/Array#indexOf (; 46 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.const nan:0x400000 - f32.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/array/Array#indexOf (; 47 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.const nan:0x8000000000000 - f64.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/array/Array#includes (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2899,7 +2724,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#includes (; 49 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#includes (; 44 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -2954,7 +2779,7 @@ end i32.const 0 ) - (func $~lib/array/Array#includes (; 50 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#includes (; 45 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -3009,7 +2834,7 @@ end i32.const 0 ) - (func $~lib/array/Array#splice (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3099,7 +2924,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3190,7 +3015,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3200,7 +3025,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3230,7 +3055,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 55 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 50 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3308,7 +3133,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 51 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3325,7 +3150,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3362,15 +3187,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 59 ;) (param $0 i32) + (func $~setArgumentsLength (; 54 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 55 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3415,17 +3240,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3433,7 +3258,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3441,12 +3266,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 66 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 61 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3492,12 +3317,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3505,12 +3330,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3518,12 +3343,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 72 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 67 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3568,12 +3393,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3581,12 +3406,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3594,13 +3419,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 78 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 73 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3640,7 +3465,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3649,7 +3474,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3658,7 +3483,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3751,11 +3576,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 83 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 78 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3811,7 +3636,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 84 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3832,7 +3657,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3842,7 +3667,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 86 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 81 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3901,14 +3726,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3918,12 +3743,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 90 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 85 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3979,7 +3804,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3991,7 +3816,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -4000,7 +3825,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4012,12 +3837,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4060,7 +3885,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -4068,7 +3893,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -4076,7 +3901,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4084,7 +3909,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4092,7 +3917,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 100 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -4128,7 +3953,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 101 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 96 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4149,7 +3974,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 102 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 97 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4181,7 +4006,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 103 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 98 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -4225,7 +4050,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (; 104 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 99 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4303,7 +4128,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 100 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4562,7 +4387,7 @@ local.get $4 f32.store ) - (func $~lib/array/Array#sort (; 106 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -4624,7 +4449,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 102 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4653,7 +4478,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 108 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 103 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4718,7 +4543,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 109 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 104 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -4796,7 +4621,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 110 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 105 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5055,7 +4880,7 @@ local.get $4 f64.store ) - (func $~lib/array/Array#sort (; 111 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5117,7 +4942,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 112 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -5146,7 +4971,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 113 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -5167,7 +4992,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 114 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 109 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -5232,7 +5057,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5311,7 +5136,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 116 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5572,7 +5397,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 117 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 112 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5636,12 +5461,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 113 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5650,7 +5475,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 120 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5678,7 +5503,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 121 ;) (result f64) + (func $~lib/math/NativeMath.random (; 116 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5722,7 +5547,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 122 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 117 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5750,53 +5575,51 @@ end local.get $2 ) - (func $std/array/isSorted (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSorted (; 118 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - i32.const 1 - local.set $2 - local.get $0 - i32.load offset=12 - local.set $3 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $2 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.get $0 + (local $4 i32) + block $__inlined_func$std/array/isSorted (result i32) + i32.const 1 + local.set $2 + local.get $0 + local.get $1 + call $~lib/array/Array#sort + local.tee $3 + local.tee $0 + i32.load offset=12 + local.set $4 + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__get - local.get $1 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s + local.get $4 + i32.lt_s if + i32.const 2 + global.set $~argumentsLength i32.const 0 - return + local.get $0 + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s + br_if $__inlined_func$std/array/isSorted + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 1 end - i32.const 1 - ) - (func $std/array/assertSorted (; 124 ;) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/array/Array#sort - local.tee $0 - local.get $1 - call $std/array/isSorted i32.eqz if i32.const 0 @@ -5806,15 +5629,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|44 (; 125 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5862,52 +5685,7 @@ call $~lib/rt/pure/__release end ) - (func $std/array/createReverseOrderedNestedArray (; 127 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 - local.get $0 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - local.get $0 - i32.sub - call $~lib/array/Array#__set - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $start:std/array~anonymous|47 (; 128 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 121 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5916,7 +5694,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 129 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 122 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5970,7 +5748,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 130 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 123 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6022,7 +5800,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 131 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 124 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -6041,7 +5819,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedElementsArray (; 132 ;) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 125 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6087,14 +5865,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 133 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 126 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 134 ;) (param $0 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 127 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6145,7 +5923,7 @@ end i32.const 1 ) - (func $~lib/string/String#get:length (; 135 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 128 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -6153,7 +5931,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6229,7 +6007,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 137 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 130 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -6283,7 +6061,7 @@ select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 131 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6317,7 +6095,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 139 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 132 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6375,7 +6153,7 @@ end i32.const 1 ) - (func $~lib/string/String#concat (; 140 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 133 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6434,7 +6212,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 134 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 5232 local.get $0 @@ -6442,7 +6220,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 142 ;) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 135 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6514,49 +6292,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 143 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 400 - i32.store offset=12 - loop $for-loop|0 - local.get $1 - i32.const 400 - i32.lt_s - if - local.get $0 - local.get $1 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - ) - (func $~lib/string/String#substring (; 144 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 136 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6630,7 +6366,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 137 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6770,7 +6506,7 @@ end local.get $3 ) - (func $~lib/util/number/decimalCount32 (; 146 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 138 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6818,7 +6554,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6842,7 +6578,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 148 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 140 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6884,7 +6620,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6926,7 +6662,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7033,7 +6769,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 143 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -7041,7 +6777,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/utoa32 (; 152 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 144 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7064,7 +6800,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -7088,7 +6824,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 146 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7195,7 +6931,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 147 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -7203,7 +6939,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 156 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 148 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7593,7 +7329,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7838,7 +7574,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 158 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 150 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8147,7 +7883,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 159 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 151 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -8201,7 +7937,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 160 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 152 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8272,7 +8008,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 153 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8379,7 +8115,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8547,7 +8283,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 155 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -8555,7 +8291,7 @@ local.get $1 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> ) - (func $~lib/util/string/joinReferenceArray (; 164 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 156 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8707,7 +8443,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 165 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#join (; 157 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray + ) + (func $~lib/util/number/itoa_stream (; 158 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8762,7 +8505,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 166 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8865,7 +8608,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8895,7 +8638,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 168 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9002,7 +8745,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 169 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 162 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -9055,7 +8798,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 170 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 163 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -9082,50 +8825,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 171 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -9165,12 +8865,13 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 173 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 165 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -9186,19 +8887,56 @@ if local.get $0 i64.load - call $~lib/util/number/utoa64 + local.tee $4 + i64.eqz + if (result i32) + i32.const 5472 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 5360 call $~lib/string/String#get:length - local.tee $4 + local.tee $5 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -9208,14 +8946,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -9224,7 +8962,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -9232,23 +8970,23 @@ i32.shl i32.add i32.const 5360 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 @@ -9272,7 +9010,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa64 (; 174 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 166 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9336,7 +9074,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9397,7 +9135,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9504,7 +9242,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 177 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 169 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9671,7 +9409,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 170 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9701,7 +9439,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 179 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9804,7 +9542,14 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 180 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#toString (; 172 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 173 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9836,10 +9581,7 @@ local.get $3 if (result i32) local.get $3 - i32.load offset=4 - local.get $3 - i32.load offset=12 - call $~lib/util/string/joinIntegerArray + call $~lib/array/Array#toString else i32.const 5120 end @@ -9876,15 +9618,11 @@ end local.get $4 if - local.get $4 - i32.load offset=4 - local.get $4 - i32.load offset=12 - call $~lib/util/string/joinIntegerArray - local.tee $2 local.get $1 local.get $1 - local.get $2 + local.get $4 + call $~lib/array/Array#toString + local.tee $6 call $~lib/string/String.__concat local.tee $8 local.tee $2 @@ -9896,6 +9634,7 @@ 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 @@ -9947,17 +9686,13 @@ end local.get $2 if - local.get $2 - i32.load offset=4 - local.get $2 - i32.load offset=12 - call $~lib/util/string/joinIntegerArray - local.tee $0 local.get $1 local.get $1 - local.get $0 - call $~lib/string/String.__concat + local.get $2 + call $~lib/array/Array#toString local.tee $0 + call $~lib/string/String.__concat + local.tee $3 local.tee $4 i32.ne if @@ -9967,9 +9702,10 @@ local.get $1 call $~lib/rt/pure/__release end - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $4 local.set $1 end @@ -9977,7 +9713,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 181 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 174 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10144,7 +9880,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 182 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 175 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=12 + call $~lib/util/string/joinReferenceArray<~lib/array/Array> + ) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 176 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10176,10 +9919,7 @@ local.get $3 if (result i32) local.get $3 - i32.load offset=4 - local.get $3 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array> + call $~lib/array/Array<~lib/array/Array>#toString else i32.const 5120 end @@ -10216,15 +9956,11 @@ end local.get $4 if - local.get $4 - i32.load offset=4 - local.get $4 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 local.get $1 local.get $1 - local.get $2 + local.get $4 + call $~lib/array/Array<~lib/array/Array>#toString + local.tee $6 call $~lib/string/String.__concat local.tee $8 local.tee $2 @@ -10236,6 +9972,7 @@ 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 @@ -10287,17 +10024,13 @@ end local.get $2 if - local.get $2 - i32.load offset=4 - local.get $2 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $0 local.get $1 local.get $1 - local.get $0 - call $~lib/string/String.__concat + local.get $2 + call $~lib/array/Array<~lib/array/Array>#toString local.tee $0 + call $~lib/string/String.__concat + local.tee $3 local.tee $4 i32.ne if @@ -10307,9 +10040,10 @@ local.get $1 call $~lib/rt/pure/__release end - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $4 local.set $1 end @@ -10317,7 +10051,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $start:std/array (; 183 ;) + (func $start:std/array (; 177 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10406,13 +10140,13 @@ i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10430,20 +10164,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -10454,20 +10188,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -10478,13 +10212,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10502,13 +10236,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10526,14 +10260,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 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 + local.get $2 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release local.get $0 @@ -10544,13 +10278,13 @@ i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10569,20 +10303,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10594,20 +10328,20 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10619,13 +10353,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10644,13 +10378,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10669,14 +10403,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 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 + local.get $2 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release local.get $0 @@ -10940,19 +10674,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 local.tee $0 + i32.load offset=4 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 - call $~lib/array/Array#set:length - local.get $1 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $0 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $1 + loop $do-continue|0 + local.get $2 + i32.load + call $~lib/rt/pure/__release + local.get $2 + i32.const 4 + i32.add + local.tee $2 + local.get $1 + i32.lt_u + br_if $do-continue|0 + end + else + local.get $0 + i32.const 0 + call $~lib/array/ensureSize + end + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 i32.load offset=12 if i32.const 0 @@ -10962,13 +10728,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $4 + local.set $5 global.get $std/array/arr - local.get $4 + local.get $5 call $~lib/array/Array#concat local.set $1 global.get $std/array/arr @@ -11068,14 +10834,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.const 46 call $~lib/array/Array#push - local.get $4 + local.get $5 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $4 + local.get $5 call $~lib/array/Array#concat local.set $3 local.get $1 @@ -11092,7 +10858,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=12 i32.const 2 i32.ne @@ -11202,7 +10968,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.load offset=12 if i32.const 0 @@ -11212,7 +10978,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 global.get $std/array/arr call $~lib/array/Array#concat local.set $1 @@ -11230,7 +10996,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 i32.load offset=12 if i32.const 0 @@ -11240,13 +11006,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11389,7 +11155,7 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $6 + local.tee $18 i32.const 5 i32.const 2 i32.const 3 @@ -11524,7 +11290,7 @@ i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11549,14 +11315,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $19 + local.tee $6 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11588,7 +11354,7 @@ i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11613,7 +11379,7 @@ i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 @@ -11650,7 +11416,7 @@ call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $6 + local.get $18 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -11668,18 +11434,18 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr @@ -11854,7 +11620,43 @@ unreachable end global.get $std/array/arr - call $~lib/array/Array#shift + local.tee $5 + i32.load offset=12 + local.tee $0 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 512 + i32.const 349 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.load offset=4 + local.tee $3 + i32.load + local.get $3 + local.get $3 + i32.const 4 + i32.add + local.get $0 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.add + i32.const 0 + i32.store + local.get $5 + local.get $1 + i32.store offset=12 global.set $std/array/i global.get $std/array/i i32.const 41 @@ -12256,8 +12058,54 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#indexOf + local.tee $3 + local.set $0 + i32.const 0 + local.set $6 + block $__inlined_func$~lib/array/Array#indexOf + local.get $3 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $6 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $6 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $6 + i32.const 2 + i32.shl + i32.add + f32.load + f32.const nan:0x400000 + f32.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $while-continue|0 + end + end + i32.const -1 + local.set $6 + end + local.get $6 i32.const -1 i32.ne if @@ -12274,8 +12122,54 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/array/Array#indexOf + local.tee $5 + local.set $0 + i32.const 0 + local.set $6 + block $__inlined_func$~lib/array/Array#indexOf + local.get $5 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $6 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|022 + local.get $6 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + f64.const nan:0x8000000000000 + f64.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $while-continue|022 + end + end + i32.const -1 + local.set $6 + end + local.get $6 i32.const -1 i32.ne if @@ -12286,9 +12180,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -13056,7 +12950,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13209,7 +13103,7 @@ i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13258,23 +13152,23 @@ call $~lib/rt/pure/__retain local.tee $25 i32.load offset=4 - local.tee $5 + local.tee $2 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $5 + local.get $2 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $5 + local.get $2 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $2 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $5 + local.get $2 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 @@ -13301,7 +13195,7 @@ local.get $29 i32.const 0 call $~lib/array/Array#__get - local.tee $19 + local.tee $6 i32.load i32.const 3 i32.ne @@ -13316,7 +13210,7 @@ local.get $29 i32.const 1 call $~lib/array/Array#__get - local.tee $2 + local.tee $4 i32.load i32.const 4 i32.ne @@ -13358,7 +13252,7 @@ local.get $25 i32.const 1 call $~lib/array/Array#__get - local.tee $4 + local.tee $5 i32.load i32.const 2 i32.ne @@ -13373,7 +13267,7 @@ local.get $25 i32.const 2 call $~lib/array/Array#__get - local.tee $5 + local.tee $2 i32.load i32.const 5 i32.ne @@ -13558,7 +13452,7 @@ call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $6 + local.get $18 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -13576,18 +13470,18 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release local.get $1 @@ -14066,19 +13960,19 @@ unreachable end i32.const 0 - local.set $0 + local.set $6 loop $for-loop|0 - local.get $0 + local.get $6 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $0 + local.get $6 i32.const 1 i32.add - local.set $0 + local.set $6 br $for-loop|0 end end @@ -14655,7 +14549,7 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -14702,21 +14596,21 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $18 i32.const 0 global.set $~argumentsLength - local.get $6 + local.get $18 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $6 + local.get $18 i32.const 5 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14748,7 +14642,7 @@ i32.const 4672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14766,7 +14660,7 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $18 + local.set $19 i32.const 1 i32.const 2 i32.const 3 @@ -14809,8 +14703,8 @@ local.set $15 i32.const 512 call $std/array/createRandomOrderedArray - local.set $19 - local.get $18 + local.set $6 + local.get $19 i32.const 48 call $std/array/assertSorted local.get $9 @@ -14937,26 +14831,26 @@ call $~lib/builtins/abort unreachable end - local.get $19 + local.get $6 i32.const 48 call $std/array/assertSorted local.get $16 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $6 + local.get $18 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release - local.get $18 + local.get $19 call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release @@ -14974,7 +14868,7 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release - local.get $19 + local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -15002,11 +14896,51 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray - local.tee $0 + i32.const 0 + local.set $2 + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 2 + i32.store offset=12 + loop $for-loop|00 + local.get $2 + 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 $2 + i32.sub + call $~lib/array/Array#__set + local.get $1 + local.get $2 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|00 + end + end + local.get $1 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $std/array/createReverseOrderedElementsArray local.tee $0 @@ -15020,19 +14954,19 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $3 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $2 i32.const 55 - local.tee $5 + local.tee $1 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 call $std/array/isSorted<~lib/string/String | null> @@ -15047,8 +14981,8 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $1 - local.get $4 + local.get $2 + local.get $3 call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if @@ -15059,16 +14993,52 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray - local.set $0 + i32.const 0 + local.set $5 + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 400 + i32.store offset=12 + loop $for-loop|04 + local.get $5 + i32.const 400 + i32.lt_s + if + local.get $0 + local.get $5 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $1 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $1 + call $~lib/rt/pure/__release + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|04 + end + end i32.const 1 global.set $~argumentsLength local.get $0 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15078,9 +15048,9 @@ i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.load offset=4 - local.get $9 + local.get $8 i32.load offset=12 call $~lib/util/string/joinBooleanArray local.tee $0 @@ -15102,10 +15072,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $13 i32.const 5120 call $~lib/array/Array#join - local.tee $13 + local.tee $14 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15123,10 +15093,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $15 i32.const 5568 call $~lib/array/Array#join - local.tee $15 + local.tee $19 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15144,10 +15114,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $6 i32.const 5632 call $~lib/array/Array#join - local.tee $19 + local.tee $4 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15165,13 +15135,13 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.load offset=4 - local.get $10 + local.get $9 i32.load offset=12 call $~lib/util/string/joinFloatArray local.tee $0 - local.set $2 + local.set $3 local.get $0 i32.const 6944 call $~lib/string/String.__eq @@ -15190,10 +15160,10 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $5 i32.const 5120 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $4 + local.tee $2 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15211,7 +15181,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $10 i32.load offset=4 local.tee $0 i32.const 0 @@ -15224,14 +15194,9 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $6 - i32.load offset=4 - local.get $6 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray - local.tee $0 - local.set $5 - local.get $0 + local.get $10 + call $~lib/array/Array#join + local.tee $1 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -15249,7 +15214,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $11 i32.load offset=4 local.tee $0 i32.const 0 @@ -15259,14 +15224,9 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $8 - i32.load offset=4 - local.get $8 - i32.load offset=12 - call $~lib/util/string/joinReferenceArray - local.tee $1 - local.set $0 - local.get $1 + local.get $11 + call $~lib/array/Array#join + local.tee $0 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -15278,10 +15238,8 @@ call $~lib/builtins/abort unreachable end - local.get $9 - call $~lib/rt/pure/__release + local.get $8 call $~lib/rt/pure/__release - local.get $12 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release @@ -15289,23 +15247,25 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $10 + local.get $6 call $~lib/rt/pure/__release - local.get $2 + local.get $4 + call $~lib/rt/pure/__release + local.get $9 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 $6 + local.get $2 call $~lib/rt/pure/__release - local.get $5 + local.get $10 call $~lib/rt/pure/__release - local.get $8 + local.get $1 + call $~lib/rt/pure/__release + local.get $11 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15485,9 +15445,9 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $18 i32.load offset=4 - local.get $6 + local.get $18 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 @@ -15510,11 +15470,11 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $19 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $19 + local.set $6 local.get $0 i32.const 7952 call $~lib/string/String.__eq @@ -15533,7 +15493,7 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 @@ -15580,7 +15540,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - local.set $4 + local.set $5 local.get $0 i32.const 8192 call $~lib/string/String.__eq @@ -15623,7 +15583,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - local.set $5 + local.set $2 local.get $0 i32.const 8192 call $~lib/string/String.__eq @@ -15707,22 +15667,22 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $6 + local.get $18 call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr @@ -15742,7 +15702,7 @@ local.get $20 call $~lib/rt/pure/__release ) - (func $~start (; 184 ;) + (func $~start (; 178 ;) global.get $~started if return @@ -15752,7 +15712,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 185 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 179 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15820,7 +15780,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 186 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 180 ;) (param $0 i32) local.get $0 i32.const 8292 i32.lt_u @@ -15832,7 +15792,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 187 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 181 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15864,7 +15824,7 @@ end end ) - (func $~lib/rt/__visit_members (; 188 ;) (param $0 i32) + (func $~lib/rt/__visit_members (; 182 ;) (param $0 i32) block $folding-inner0 block $block$4$break block $switch$1$default diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 2dede897a4..f83482fa83 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1268,48 +1268,9 @@ end end ) - (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 432 i32.gt_u @@ -1317,11 +1278,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1494,7 +1492,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1564,7 +1562,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 432 i32.gt_u @@ -1575,7 +1573,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1644,7 +1642,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1704,11 +1702,11 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 22 ;) (param $0 i32) + (func $~setArgumentsLength (; 21 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 23 ;) + (func $start:std/arraybuffer (; 22 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1985,10 +1983,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 24 ;) + (func $~start (; 23 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 6199423dd1..9058b61fc8 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 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_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) @@ -1109,48 +1109,9 @@ i32.const 0 i32.store8 ) - (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 512 i32.gt_u @@ -1158,11 +1119,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 512 i32.gt_u @@ -1173,7 +1171,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1225,7 +1223,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1245,7 +1243,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1309,6 +1307,13 @@ i32.store offset=8 local.get $3 ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 20 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) (func $~lib/polyfills/bswap (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.const -16711936 @@ -1908,10 +1913,7 @@ local.get $1 i32.load local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 i32.load offset=8 call $~lib/dataview/DataView#constructor @@ -3432,10 +3434,7 @@ local.get $0 call $~lib/rt/pure/__release local.get $2 - i32.load offset=4 - local.get $2 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 480 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index ea90a4f667..d892c94c7c 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,18 +15,26 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -37,7 +45,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -56,9 +64,26 @@ end local.get $0 global.set $~lib/rt/stub/offset + local.get $2 + i32.const 16 + i32.sub + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 + i32.const 3 + i32.store offset=8 + local.get $0 + i32.const 8 + i32.store offset=12 + local.get $2 ) (func $start:std/date (; 4 ;) - (local $0 i64) + (local $0 i32) + (local $1 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -135,31 +160,18 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - local.set $0 - i32.const 96 - call $~lib/rt/stub/maybeGrowMemory - i32.const 64 - i32.const 16 - i32.store - i32.const 68 - i32.const 1 - i32.store - i32.const 72 - i32.const 3 - i32.store - i32.const 76 - i32.const 8 - i32.store - i32.const 80 + local.set $1 + call $~lib/rt/stub/__alloc + local.tee $0 i64.const 0 i64.store - i32.const 80 local.get $0 + local.get $1 i64.store - i32.const 80 + local.get $0 global.set $std/date/date global.get $std/date/creationTime - i32.const 80 + global.get $std/date/date i64.load i64.ne if diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index f10b50ad55..8cc449c056 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3,20 +3,18 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1079,48 +1077,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1128,11 +1087,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1343,7 +1339,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1365,7 +1361,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 556 i32.gt_u @@ -1376,7 +1372,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#clear (; 21 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 20 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1409,6 +1405,13 @@ i32.const 0 i32.store offset=20 ) + (func $~lib/util/hash/hash8 (; 21 ;) (param $0 i32) (result i32) + local.get $0 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + ) (func $~lib/map/Map#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1460,10 +1463,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 i32.ne @@ -1526,13 +1526,10 @@ i32.store offset=4 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -1606,20 +1603,15 @@ (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 - local.get $0 - local.get $1 - local.get $3 + call $~lib/util/hash/hash8 + local.tee $4 call $~lib/map/Map#find local.tee $3 if @@ -1709,10 +1701,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -1795,49 +1784,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 28 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2010,7 +1957,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2023,7 +1970,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2126,6 +2073,54 @@ end local.get $3 ) + (func $~lib/rt/tlsf/__realloc (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2150,20 +2145,15 @@ call $~lib/builtins/abort unreachable end + local.get $3 local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.tee $4 local.get $1 local.get $2 i32.shl local.tee $2 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $1 i32.add local.get $2 @@ -2506,50 +2496,7 @@ i32.add i32.load ) - (func $~lib/map/Map#find (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 43 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2607,13 +2554,10 @@ i32.store8 offset=1 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -2683,28 +2627,62 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 + local.tee $3 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 + call $~lib/util/hash/hash8 local.set $4 local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end local.get $1 - local.get $3 - call $~lib/map/Map#find - local.tee $3 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -2750,10 +2728,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -2762,7 +2740,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -2772,17 +2750,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 46 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 45 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2813,7 +2791,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2854,7 +2832,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 48 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2985,7 +2963,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3075,7 +3053,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 50 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 49 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3084,10 +3062,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3141,7 +3116,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 51 ;) + (func $std/map/testNumeric (; 50 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3667,21 +3642,18 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 51 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 53 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 52 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3739,13 +3711,10 @@ i32.store offset=4 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_u - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -3815,22 +3784,17 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 - local.set $4 - local.get $0 - local.get $1 - local.get $3 + call $~lib/util/hash/hash8 + local.tee $4 call $~lib/map/Map#find local.tee $3 if @@ -3912,16 +3876,13 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $0 i32.eqz @@ -3936,7 +3897,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 56 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 55 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4003,7 +3964,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 57 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 56 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4061,13 +4022,10 @@ i32.store8 offset=1 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_u - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -4137,26 +4095,60 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $1 + local.tee $3 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $3 + call $~lib/util/hash/hash8 local.set $4 local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end local.get $1 - local.get $3 - call $~lib/map/Map#find - local.tee $3 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -4202,10 +4194,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -4214,7 +4206,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -4224,27 +4216,24 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 59 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 58 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -4298,7 +4287,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 60 ;) + (func $std/map/testNumeric (; 59 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4802,7 +4791,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (; 61 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 60 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4817,7 +4806,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -4860,7 +4849,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 63 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 62 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4873,7 +4862,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 63 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5004,7 +4993,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5098,7 +5087,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 66 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 65 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5121,7 +5110,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5159,7 +5148,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 68 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 67 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -5171,7 +5160,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 69 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 68 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5238,50 +5227,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#find (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 71 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 69 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5412,23 +5358,62 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 16 i32.shl i32.const 16 i32.shr_s call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -5474,10 +5459,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -5486,7 +5471,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -5496,17 +5481,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 73 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5569,7 +5554,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 74 ;) + (func $std/map/testNumeric (; 72 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6097,7 +6082,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 75 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 73 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6108,7 +6093,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 76 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 74 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6239,7 +6224,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6331,7 +6316,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 78 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 76 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6352,7 +6337,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 79 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 77 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6419,7 +6404,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 80 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 78 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6550,21 +6535,60 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -6610,10 +6634,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -6622,7 +6646,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -6632,17 +6656,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 82 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 80 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6703,7 +6727,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 83 ;) + (func $std/map/testNumeric (; 81 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7209,7 +7233,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 84 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 82 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7218,7 +7242,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 83 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7237,7 +7261,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 86 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 84 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7293,7 +7317,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#delete (; 87 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 85 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7352,7 +7376,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 88 ;) + (func $std/map/testNumeric (; 86 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7775,7 +7799,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 89 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 87 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7842,7 +7866,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 90 ;) + (func $std/map/testNumeric (; 88 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8309,7 +8333,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#clear (; 91 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 89 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8342,7 +8366,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 92 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 90 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -8408,7 +8432,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 93 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 91 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8449,7 +8473,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 94 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 92 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8458,7 +8482,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 95 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8589,7 +8613,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 96 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8679,7 +8703,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 97 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 95 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8698,7 +8722,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -8736,7 +8760,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 99 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 97 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -8748,7 +8772,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 100 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 98 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8815,7 +8839,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#values (; 101 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 99 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8871,7 +8895,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 102 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 100 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8904,7 +8928,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 103 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -8925,48 +8949,7 @@ i32.add i64.load ) - (func $~lib/map/Map#find (; 104 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - local.get $0 - i64.load - i64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 102 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9097,17 +9080,53 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 106 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 103 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 + (local $5 i32) local.get $1 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + local.get $3 + i64.load + i64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -9187,7 +9206,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 107 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 104 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -9247,7 +9266,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 108 ;) + (func $std/map/testNumeric (; 105 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9720,7 +9739,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 109 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9787,7 +9806,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 110 ;) + (func $std/map/testNumeric (; 107 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10260,7 +10279,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 111 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 108 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -10301,7 +10320,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 112 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 109 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10311,7 +10330,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 113 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 110 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10443,7 +10462,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 114 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 111 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10534,7 +10553,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 115 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 112 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10554,79 +10573,42 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 116 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/map/Map#keys (; 117 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 113 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $2 + local.set $3 i32.const 16 i32.const 27 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $2 + local.get $3 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $2 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $2 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 12 i32.mul i32.add @@ -10637,20 +10619,53 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $1 - local.get $6 local.get $5 f32.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -10659,7 +10674,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 118 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10791,7 +10806,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 119 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10882,7 +10897,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 120 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 116 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -10943,7 +10958,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 121 ;) + (func $std/map/testNumeric (; 117 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -11432,7 +11447,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 122 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 118 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11473,7 +11488,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 123 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 119 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11483,7 +11498,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 124 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 120 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11615,7 +11630,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 125 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 121 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11706,7 +11721,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 126 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 122 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11726,79 +11741,42 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 127 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/map/Map#keys (; 128 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 123 ;) (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.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $2 + local.set $3 i32.const 16 i32.const 30 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $2 + local.get $3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $2 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $2 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 4 i32.shl i32.add @@ -11809,20 +11787,53 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $1 - local.get $6 local.get $5 f64.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -11831,48 +11842,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#find (; 129 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - f64.load - local.get $1 - f64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 130 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 124 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12004,18 +11974,54 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 131 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 125 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $3 + f64.load + local.get $1 + f64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -12095,7 +12101,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 132 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 126 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -12156,7 +12162,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 133 ;) + (func $std/map/testNumeric (; 127 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -12645,7 +12651,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 134 ;) + (func $~start (; 128 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -12657,7 +12663,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 135 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 129 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -12752,7 +12758,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 136 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 130 ;) (param $0 i32) local.get $0 i32.const 556 i32.lt_u diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index fc0fe34bf8..b50f8038e5 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1,15 +1,15 @@ (module (type $f64_=>_f64 (func (param f64) (result f64))) (type $f64_f64_f64_=>_i32 (func (param f64 f64 f64) (result i32))) + (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) + (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) - (type $f32_f32_f32_=>_i32 (func (param f32 f32 f32) (result i32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f32_f32_f32_f32_=>_i32 (func (param f32 f32 f32 f32) (result i32))) (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $none_=>_none (func)) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) (type $none_=>_f64 (func (result f64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -512,7 +512,14 @@ i32.const 0 end ) - (func $~lib/math/R (; 41 ;) (param $0 f64) (result f64) + (func $std/math/test_absf (; 41 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + f32.abs + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/R (; 42 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.16666666666666666 local.get $0 @@ -555,7 +562,7 @@ f64.add f64.div ) - (func $~lib/math/NativeMath.acos (; 42 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acos (; 43 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -679,7 +686,7 @@ f64.add f64.mul ) - (func $std/math/test_acos (; 43 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_acos (; 44 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 @@ -695,7 +702,7 @@ i32.const 0 end ) - (func $~lib/math/Rf (; 44 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 45 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -714,7 +721,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 45 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 46 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -830,7 +837,14 @@ f32.add f32.mul ) - (func $~lib/math/NativeMath.log1p (; 46 ;) (param $0 f64) (result f64) + (func $std/math/test_acosf (; 47 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.acos + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.log1p (; 48 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1028,7 +1042,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.log (; 47 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log (; 49 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 f64) @@ -1196,7 +1210,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 48 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.acosh (; 50 ;) (param $0 f64) (result f64) (local $1 i64) local.get $0 i64.reinterpret_f64 @@ -1250,7 +1264,7 @@ f64.const 0.6931471805599453 f64.add ) - (func $std/math/test_acosh (; 49 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_acosh (; 51 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.acosh local.get $1 @@ -1266,7 +1280,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (; 50 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 52 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -1436,7 +1450,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 51 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 53 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -1570,7 +1584,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.acosh (; 52 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acosh (; 54 ;) (param $0 f32) (result f32) (local $1 i32) local.get $0 i32.reinterpret_f32 @@ -1620,7 +1634,14 @@ f32.const 0.6931471824645996 f32.add ) - (func $~lib/math/NativeMath.asin (; 53 ;) (param $0 f64) (result f64) + (func $std/math/test_acoshf (; 55 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.acosh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.asin (; 56 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1758,7 +1779,7 @@ end local.get $0 ) - (func $std/math/test_asin (; 54 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asin (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 @@ -1774,7 +1795,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (; 55 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 58 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -1854,7 +1875,14 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.asinh (; 56 ;) (param $0 f64) (result f64) + (func $std/math/test_asinf (; 59 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.asin + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.asinh (; 60 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -1924,7 +1952,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_asinh (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asinh (; 61 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 @@ -1940,7 +1968,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asinh (; 58 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asinh (; 62 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -2005,7 +2033,14 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.atan (; 59 ;) (param $0 f64) (result f64) + (func $std/math/test_asinhf (; 63 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.asinh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.atan (; 64 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2228,7 +2263,7 @@ local.get $3 f64.copysign ) - (func $std/math/test_atan (; 60 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atan (; 65 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 @@ -2244,7 +2279,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan (; 61 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 66 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2440,7 +2475,14 @@ local.get $4 f32.copysign ) - (func $~lib/math/NativeMath.atanh (; 62 ;) (param $0 f64) (result f64) + (func $std/math/test_atanf (; 67 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.atan + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.atanh (; 68 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) @@ -2494,7 +2536,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_atanh (; 63 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atanh (; 69 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.atanh local.get $1 @@ -2510,7 +2552,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atanh (; 64 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atanh (; 70 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -2558,7 +2600,14 @@ local.get $0 f32.copysign ) - (func $~lib/math/NativeMath.atan2 (; 65 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_atanhf (; 71 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.atanh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.atan2 (; 72 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2768,7 +2817,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 73 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2786,7 +2835,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 67 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 74 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2979,7 +3028,7 @@ i32.and select ) - (func $std/math/test_atan2f (; 68 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_atan2f (; 75 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 @@ -2987,7 +3036,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.cbrt (; 69 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 76 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3109,7 +3158,7 @@ f64.mul f64.add ) - (func $std/math/test_cbrt (; 70 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cbrt (; 77 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 @@ -3125,7 +3174,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cbrt (; 71 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 78 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3224,7 +3273,14 @@ f64.div f32.demote_f64 ) - (func $std/math/test_ceil (; 72 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_cbrtf (; 79 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.cbrt + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_ceil (; 80 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.ceil local.get $1 @@ -3240,7 +3296,14 @@ i32.const 0 end ) - (func $~lib/math/pio2_large_quot (; 73 ;) (param $0 i64) (result i32) + (func $std/math/test_ceilf (; 81 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + f32.ceil + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/pio2_large_quot (; 82 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3526,7 +3589,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 74 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 83 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3864,7 +3927,7 @@ end local.get $0 ) - (func $std/math/test_cos (; 75 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cos (; 84 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cos local.get $1 @@ -3880,7 +3943,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 85 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4149,7 +4212,14 @@ end local.get $0 ) - (func $~lib/math/NativeMath.expm1 (; 77 ;) (param $0 f64) (result f64) + (func $std/math/test_cosf (; 86 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.cos + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.expm1 (; 87 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4420,7 +4490,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 78 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 88 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4572,7 +4642,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 79 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 89 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -4636,7 +4706,7 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $std/math/test_cosh (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cosh (; 90 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 @@ -4652,7 +4722,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 81 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 91 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4902,7 +4972,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 82 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 92 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5036,7 +5106,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 83 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cosh (; 93 ;) (param $0 f32) (result f32) (local $1 i32) local.get $0 i32.reinterpret_f32 @@ -5095,7 +5165,14 @@ f32.const 1661534994731144841129758e11 f32.mul ) - (func $std/math/test_exp (; 84 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_coshf (; 94 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.cosh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_exp (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 @@ -5111,7 +5188,14 @@ i32.const 0 end ) - (func $std/math/test_expm1 (; 85 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_expf (; 96 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.exp + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_expm1 (; 97 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 @@ -5127,7 +5211,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.exp2 (; 86 ;) (param $0 f64) (result f64) + (func $std/math/test_expm1f (; 98 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.exp2 (; 99 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5333,7 +5424,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 87 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 100 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5350,7 +5441,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 88 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 101 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5445,7 +5536,14 @@ f32.demote_f64 end ) - (func $std/math/test_floor (; 89 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_exp2f (; 102 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.exp2 + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_floor (; 103 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.floor local.get $1 @@ -5461,7 +5559,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.hypot (; 90 ;) (param $0 f64) (param $1 f64) (result f64) + (func $std/math/test_floorf (; 104 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + f32.floor + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.hypot (; 105 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5630,7 +5735,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 91 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_hypot (; 106 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot @@ -5638,7 +5743,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.hypot (; 92 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 107 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5743,7 +5848,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 93 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_hypotf (; 108 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot @@ -5751,7 +5856,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_log (; 94 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log (; 109 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 @@ -5767,7 +5872,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.log10 (; 95 ;) (param $0 f64) (result f64) + (func $std/math/test_logf (; 110 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.log + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.log10 (; 111 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5969,7 +6081,7 @@ local.get $1 f64.add ) - (func $std/math/test_log10 (; 96 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log10 (; 112 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 @@ -5985,7 +6097,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log10 (; 97 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 113 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6143,7 +6255,14 @@ f32.mul f32.add ) - (func $std/math/test_log1p (; 98 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log10f (; 114 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.log10 + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_log1p (; 115 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 @@ -6159,7 +6278,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.log2 (; 99 ;) (param $0 f64) (result f64) + (func $std/math/test_log1pf (; 116 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.log1p + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.log2 (; 117 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6354,7 +6480,7 @@ local.get $1 f64.add ) - (func $std/math/test_log2 (; 100 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log2 (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 @@ -6370,7 +6496,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (; 101 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 119 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6520,7 +6646,14 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_max (; 102 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log2f (; 120 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.log2 + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_max (; 121 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6538,7 +6671,7 @@ i32.const 0 end ) - (func $std/math/test_maxf (; 103 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_maxf (; 122 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.max @@ -6546,7 +6679,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_min (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_min (; 123 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6564,7 +6697,7 @@ i32.const 0 end ) - (func $std/math/test_minf (; 105 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_minf (; 124 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.min @@ -6572,7 +6705,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.mod (; 106 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 125 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6775,7 +6908,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 107 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 126 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6793,7 +6926,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 108 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 127 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6985,7 +7118,7 @@ local.get $0 f32.mul ) - (func $std/math/test_modf (; 109 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_modf (; 128 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.mod @@ -6993,7 +7126,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.pow (; 110 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 129 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -7949,7 +8082,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 111 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 130 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -7967,7 +8100,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 112 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 131 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8425,7 +8558,7 @@ end local.get $0 ) - (func $std/math/test_powf (; 113 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_powf (; 132 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow @@ -8433,7 +8566,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/murmurHash3 (; 114 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 133 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8454,7 +8587,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 115 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 134 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8486,7 +8619,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 116 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 135 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8530,7 +8663,7 @@ unreachable end ) - (func $~lib/math/NativeMath.random (; 117 ;) (result f64) + (func $~lib/math/NativeMath.random (; 136 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -8574,7 +8707,7 @@ f64.const 1 f64.sub ) - (func $~lib/math/NativeMathf.random (; 118 ;) (result f32) + (func $~lib/math/NativeMathf.random (; 137 ;) (result f32) (local $0 i32) (local $1 i32) global.get $~lib/math/random_seeded @@ -8620,7 +8753,7 @@ f32.const 1 f32.sub ) - (func $std/math/test_round (; 119 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_round (; 138 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.const 0.5 f64.add @@ -8631,7 +8764,7 @@ f64.const 0 call $std/math/check ) - (func $std/math/test_roundf (; 120 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_roundf (; 139 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.const 0.5 f32.add @@ -8642,7 +8775,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_sign (; 121 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_sign (; 140 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8665,7 +8798,7 @@ i32.const 0 end ) - (func $std/math/test_signf (; 122 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_signf (; 141 ;) (param $0 f32) (param $1 f32) (result i32) f32.const 1 local.get $0 f32.copysign @@ -8679,7 +8812,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 123 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 142 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -8928,7 +9061,7 @@ end local.get $0 ) - (func $std/math/test_rem (; 124 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_rem (; 143 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.rem @@ -8936,7 +9069,7 @@ f64.const 0 call $std/math/check ) - (func $~lib/math/NativeMathf.rem (; 125 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 144 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9177,7 +9310,7 @@ end local.get $0 ) - (func $std/math/test_remf (; 126 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_remf (; 145 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.rem @@ -9185,7 +9318,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.sin (; 127 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 146 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9505,7 +9638,7 @@ end local.get $0 ) - (func $std/math/test_sin (; 128 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sin (; 147 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sin local.get $1 @@ -9521,7 +9654,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (; 129 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 148 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9791,7 +9924,14 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sinh (; 130 ;) (param $0 f64) (result f64) + (func $std/math/test_sinf (; 149 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.sin + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.sinh (; 150 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -9868,7 +10008,7 @@ f64.mul f64.mul ) - (func $std/math/test_sinh (; 131 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sinh (; 151 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 @@ -9884,7 +10024,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (; 132 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 152 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -9956,7 +10096,14 @@ f32.mul f32.mul ) - (func $std/math/test_sqrt (; 133 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sinhf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.sinh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_sqrt (; 154 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 f64.sqrt local.get $1 @@ -9972,7 +10119,14 @@ i32.const 0 end ) - (func $~lib/math/tan_kern (; 134 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $std/math/test_sqrtf (; 155 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + f32.sqrt + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/tan_kern (; 156 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -10154,7 +10308,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 135 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 157 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10331,7 +10485,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (; 136 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tan (; 158 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tan local.get $1 @@ -10347,7 +10501,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (; 137 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 159 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10601,7 +10755,14 @@ local.get $1 f32.demote_f64 ) - (func $~lib/math/NativeMath.tanh (; 138 ;) (param $0 f64) (result f64) + (func $std/math/test_tanf (; 160 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.tan + local.get $1 + local.get $2 + call $std/math/check + ) + (func $~lib/math/NativeMath.tanh (; 161 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10680,7 +10841,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 139 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tanh (; 162 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 @@ -10696,7 +10857,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tanh (; 140 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 163 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -10770,7 +10931,14 @@ local.get $0 f32.copysign ) - (func $std/math/test_trunc (; 141 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_tanhf (; 164 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + local.get $0 + call $~lib/math/NativeMathf.tanh + local.get $1 + local.get $2 + call $std/math/check + ) + (func $std/math/test_trunc (; 165 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.trunc local.get $1 @@ -10786,7 +10954,14 @@ i32.const 0 end ) - (func $~lib/math/NativeMath.sincos (; 142 ;) (param $0 f64) + (func $std/math/test_truncf (; 166 ;) (param $0 f32) (param $1 f32) (result i32) + local.get $0 + f32.trunc + local.get $1 + f32.const 0 + call $std/math/check + ) + (func $~lib/math/NativeMath.sincos (; 167 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -11181,7 +11356,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 143 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 168 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -11207,7 +11382,7 @@ drop end ) - (func $~lib/math/dtoi32 (; 144 ;) (param $0 f64) (result i32) + (func $~lib/math/dtoi32 (; 169 ;) (param $0 f64) (result i32) local.get $0 f64.const 4294967296 local.get $0 @@ -11219,7 +11394,7 @@ i64.trunc_f64_s i32.wrap_i64 ) - (func $~lib/math/NativeMath.imul (; 145 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 170 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -11240,7 +11415,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 146 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 171 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -11255,7 +11430,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 147 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 172 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -11286,7 +11461,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 148 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 173 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -11332,7 +11507,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 149 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 174 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -11378,7 +11553,7 @@ end local.get $2 ) - (func $start:std/math (; 150 ;) + (func $start:std/math (; 175 ;) (local $0 f64) (local $1 f32) (local $2 i32) @@ -12529,10 +12704,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const 8.066848754882812 - f32.const 8.066848754882812 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12544,8 +12718,7 @@ end f32.const 4.345239639282227 f32.const 4.345239639282227 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12555,10 +12728,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const 8.381433486938477 - f32.const 8.381433486938477 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12568,10 +12740,9 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const 6.531673431396484 - f32.const 6.531673431396484 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12583,8 +12754,7 @@ end f32.const 9.267057418823242 f32.const 9.267057418823242 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12596,8 +12766,7 @@ end f32.const 0.6619858741760254 f32.const 0.6619858741760254 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12607,10 +12776,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.40660393238067627 f32.const 0.40660393238067627 - f32.const 0.40660393238067627 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12622,8 +12790,7 @@ end f32.const 0.5617597699165344 f32.const 0.5617597699165344 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12635,8 +12802,7 @@ end f32.const 0.7741522789001465 f32.const 0.7741522789001465 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12646,10 +12812,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.6787636876106262 f32.const 0.6787636876106262 - f32.const 0.6787636876106262 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12661,8 +12826,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12672,10 +12836,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12687,8 +12850,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12698,10 +12860,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12713,8 +12874,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12724,10 +12884,9 @@ call $~lib/builtins/abort unreachable end + f32.const -inf f32.const inf - f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -12739,8 +12898,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_absf i32.eqz if i32.const 0 @@ -13011,10 +13169,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13025,10 +13182,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13039,10 +13195,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13053,10 +13208,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13067,10 +13221,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13081,10 +13234,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.acos f32.const 0.8473311066627502 f32.const -0.13588131964206696 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13095,10 +13247,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.acos f32.const 1.989530086517334 f32.const 0.03764917701482773 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13109,10 +13260,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.acos f32.const 0.9742849469184875 f32.const 0.18443739414215088 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13123,10 +13273,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.acos f32.const 0.6854215264320374 f32.const -0.29158344864845276 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13137,10 +13286,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.acos f32.const 2.3168740272521973 f32.const -0.3795364499092102 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13151,10 +13299,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.acos f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13165,10 +13312,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.acos f32.const 3.1415927410125732 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13179,10 +13325,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.acos f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13193,10 +13338,9 @@ unreachable end f32.const 1.0000001192092896 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13207,10 +13351,9 @@ unreachable end f32.const -1.0000001192092896 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13221,10 +13364,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13235,10 +13377,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13249,10 +13390,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.acos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13263,10 +13403,9 @@ unreachable end f32.const 0.49965065717697144 - call $~lib/math/NativeMathf.acos f32.const 1.0476008653640747 f32.const -0.21161814033985138 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13277,10 +13416,9 @@ unreachable end f32.const -0.5051405429840088 - call $~lib/math/NativeMathf.acos f32.const 2.1003410816192627 f32.const -0.20852705836296082 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13291,10 +13429,9 @@ unreachable end f32.const -0.5189794898033142 - call $~lib/math/NativeMathf.acos f32.const 2.116452932357788 f32.const -0.14600826799869537 - call $std/math/check + call $std/math/test_acosf i32.eqz if i32.const 0 @@ -13565,10 +13702,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13579,10 +13715,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.acosh f32.const 2.148716449737549 f32.const 0.4251045286655426 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13593,10 +13728,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13607,10 +13741,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13621,10 +13754,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.acosh f32.const 2.916689157485962 f32.const -0.1369788944721222 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13635,10 +13767,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13649,10 +13780,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13663,10 +13793,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13677,10 +13806,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13691,10 +13819,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13705,10 +13832,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13719,10 +13845,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.acosh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13733,10 +13858,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.acosh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13747,10 +13871,9 @@ unreachable end f32.const 0.9999923706054688 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13761,10 +13884,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13775,10 +13897,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13789,10 +13910,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -13803,10 +13923,9 @@ unreachable end f32.const -1125899906842624 - call $~lib/math/NativeMathf.acosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_acoshf i32.eqz if i32.const 0 @@ -14077,10 +14196,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 @@ -14091,10 +14209,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 @@ -14105,10 +14222,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 @@ -14119,10 +14235,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 @@ -14133,10 +14248,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 @@ -14147,10 +14261,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 @@ -14161,10 +14274,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 @@ -14175,10 +14287,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 @@ -14189,10 +14300,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 @@ -14203,10 +14313,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 @@ -14217,10 +14326,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 @@ -14231,10 +14339,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 @@ -14245,10 +14352,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 @@ -14259,10 +14365,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 @@ -14273,10 +14378,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 @@ -14287,10 +14391,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 @@ -14301,10 +14404,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 @@ -14315,10 +14417,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 @@ -14329,10 +14430,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 @@ -14343,10 +14443,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 @@ -14552,10 +14651,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.asinh f32.const -2.7847299575805664 f32.const -0.14418013393878937 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14566,10 +14664,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.asinh f32.const 2.17521333694458 f32.const -0.020796965807676315 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14580,10 +14677,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.asinh f32.const -2.8227059841156006 f32.const 0.44718533754348755 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14594,10 +14690,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.asinh f32.const -2.5756194591522217 f32.const -0.14822272956371307 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14608,10 +14703,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.asinh f32.const 2.922511577606201 f32.const 0.14270681142807007 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14622,10 +14716,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.asinh f32.const 0.6212462782859802 f32.const 0.3684912919998169 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14636,10 +14729,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.asinh f32.const -0.39615991711616516 f32.const -0.13170306384563446 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14650,10 +14742,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.asinh f32.const 0.535758912563324 f32.const 0.08184859901666641 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14664,10 +14755,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.asinh f32.const 0.7123571038246155 f32.const -0.14270737767219543 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14678,10 +14768,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.asinh f32.const -0.6351823210716248 f32.const 0.2583143711090088 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14692,10 +14781,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.asinh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14706,10 +14794,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.asinh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14720,10 +14807,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.asinh f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14734,10 +14820,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.asinh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14748,10 +14833,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.asinh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_asinhf i32.eqz if i32.const 0 @@ -14996,10 +15080,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.atan f32.const -1.4474613666534424 f32.const 0.12686480581760406 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15010,10 +15093,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.atan f32.const 1.3445979356765747 f32.const 0.16045434772968292 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15024,10 +15106,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.atan f32.const -1.4520463943481445 f32.const -0.39581751823425293 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15038,10 +15119,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.atan f32.const -1.418875813484192 f32.const 0.410570353269577 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15052,10 +15132,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.atan f32.const 1.4633032083511353 f32.const 0.48403501510620117 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15066,10 +15145,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.atan f32.const 0.5847550630569458 f32.const 0.2125193476676941 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15080,10 +15158,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.atan f32.const -0.386186420917511 f32.const 0.18169628083705902 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15094,10 +15171,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.atan f32.const 0.5118269920349121 f32.const 0.3499770760536194 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15108,10 +15184,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.atan f32.const 0.6587802171707153 f32.const -0.2505330741405487 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15122,10 +15197,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.atan f32.const -0.5963307619094849 f32.const 0.17614826560020447 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15136,10 +15210,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.atan f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15150,10 +15223,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.atan f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15164,10 +15236,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.atan f32.const 0.7853981852531433 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15178,10 +15249,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.atan f32.const -0.7853981852531433 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15192,10 +15262,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.atan f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15206,10 +15275,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.atan f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15220,10 +15288,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.atan f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanf i32.eqz if i32.const 0 @@ -15546,10 +15613,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15560,10 +15626,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15574,10 +15639,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15588,10 +15652,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15602,10 +15665,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15616,10 +15678,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.atanh f32.const 0.7963404059410095 f32.const 0.19112196564674377 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15630,10 +15691,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.atanh f32.const -0.4315357208251953 f32.const -0.05180925130844116 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15644,10 +15704,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.atanh f32.const 0.635400652885437 f32.const 0.11911056190729141 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15658,10 +15717,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.atanh f32.const 1.0306085348129272 f32.const 0.1798270344734192 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15672,10 +15730,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.atanh f32.const -0.8268179297447205 f32.const 0.11588983237743378 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15686,10 +15743,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15700,10 +15756,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15714,10 +15769,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15728,10 +15782,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.atanh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15742,10 +15795,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.atanh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15756,10 +15808,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.atanh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15770,10 +15821,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.atanh f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15784,10 +15834,9 @@ unreachable end f32.const 1.0000152587890625 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15798,10 +15847,9 @@ unreachable end f32.const -1.0000152587890625 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15812,10 +15860,9 @@ unreachable end f32.const 1.3552527156068805e-20 - call $~lib/math/NativeMathf.atanh f32.const 1.3552527156068805e-20 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15826,10 +15873,9 @@ unreachable end f32.const 7.888609052210118e-31 - call $~lib/math/NativeMathf.atanh f32.const 7.888609052210118e-31 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15840,10 +15886,9 @@ unreachable end f32.const 2.938735877055719e-39 - call $~lib/math/NativeMathf.atanh f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15854,10 +15899,9 @@ unreachable end f32.const -2.938735877055719e-39 - call $~lib/math/NativeMathf.atanh f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -15868,10 +15912,9 @@ unreachable end f32.const 1701411834604692317316873e14 - call $~lib/math/NativeMathf.atanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_atanhf i32.eqz if i32.const 0 @@ -17234,10 +17277,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.cbrt f32.const -2.0055553913116455 f32.const -0.44719240069389343 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17248,10 +17290,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.cbrt f32.const 1.6318162679672241 f32.const 0.44636252522468567 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17262,10 +17303,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.cbrt f32.const -2.0312938690185547 f32.const 0.19483426213264465 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17276,10 +17316,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.cbrt f32.const -1.8692820072174072 f32.const -0.17075514793395996 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17290,10 +17329,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.cbrt f32.const 2.1004576683044434 f32.const -0.36362043023109436 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17304,10 +17342,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.cbrt f32.const 0.8715311288833618 f32.const -0.12857209146022797 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17318,10 +17355,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.cbrt f32.const -0.7408390641212463 f32.const -0.4655757546424866 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17332,10 +17368,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.cbrt f32.const 0.8251195549964905 f32.const 0.05601907894015312 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17346,10 +17381,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.cbrt f32.const 0.9182102680206299 f32.const 0.45498204231262207 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17360,10 +17394,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.cbrt f32.const -0.8788326978683472 f32.const -0.22978967428207397 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17374,10 +17407,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.cbrt f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17388,10 +17420,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.cbrt f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17402,10 +17433,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.cbrt f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17416,10 +17446,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.cbrt f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17430,10 +17459,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.cbrt f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17444,10 +17472,9 @@ unreachable end f32.const 9.313225746154785e-10 - call $~lib/math/NativeMathf.cbrt f32.const 0.0009765625 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17458,10 +17485,9 @@ unreachable end f32.const -9.313225746154785e-10 - call $~lib/math/NativeMathf.cbrt f32.const -0.0009765625 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17472,10 +17498,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.cbrt f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17486,10 +17511,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.cbrt f32.const -1 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -17500,10 +17524,9 @@ unreachable end f32.const 8 - call $~lib/math/NativeMathf.cbrt f32.const 2 f32.const 0 - call $std/math/check + call $std/math/test_cbrtf i32.eqz if i32.const 0 @@ -18173,10 +18196,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18186,10 +18208,9 @@ call $~lib/builtins/abort unreachable end + f32.const 4.345239639282227 f32.const 5 - f32.const 5 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18199,10 +18220,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18212,10 +18232,9 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const -6 - f32.const -6 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18225,10 +18244,9 @@ call $~lib/builtins/abort unreachable end + f32.const 9.267057418823242 f32.const 10 - f32.const 10 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18238,10 +18256,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.6619858741760254 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18251,10 +18268,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.40660393238067627 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18264,10 +18280,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5617597699165344 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18277,10 +18292,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.7741522789001465 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18290,10 +18304,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.6787636876106262 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18305,8 +18318,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18318,8 +18330,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18331,8 +18342,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18344,8 +18354,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18357,8 +18366,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18370,8 +18378,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18383,8 +18390,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18394,10 +18400,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18407,10 +18412,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18420,10 +18424,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 2 - f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18433,10 +18436,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18446,10 +18448,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18459,10 +18460,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18472,10 +18472,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18485,10 +18484,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18500,8 +18498,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18513,8 +18510,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18526,8 +18522,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18539,8 +18534,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18552,8 +18546,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18565,8 +18558,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18578,8 +18570,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18589,10 +18580,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18602,10 +18592,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18615,10 +18604,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 2 - f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18628,10 +18616,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18641,10 +18628,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18654,10 +18640,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18667,10 +18652,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18680,10 +18664,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18695,8 +18678,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18708,8 +18690,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18721,8 +18702,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18734,8 +18714,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18747,8 +18726,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18760,8 +18738,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18773,8 +18750,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18784,10 +18760,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18797,10 +18772,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18810,10 +18784,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 2 - f32.const 2 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18823,10 +18796,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18836,10 +18808,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18849,10 +18820,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18862,10 +18832,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -18875,10 +18844,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_ceilf i32.eqz if i32.const 0 @@ -20782,10 +20750,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.cos f32.const -0.21126316487789154 f32.const 0.48328569531440735 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20796,10 +20763,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.cos f32.const -0.3589562177658081 f32.const 0.042505208402872086 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20810,10 +20776,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.cos f32.const -0.5033331513404846 f32.const -0.1386195719242096 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20824,10 +20789,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.cos f32.const 0.9692853689193726 f32.const 0.1786951720714569 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20838,10 +20802,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.cos f32.const -0.9875878691673279 f32.const 0.1389600932598114 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20852,10 +20815,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.cos f32.const 0.7887731194496155 f32.const 0.2989593744277954 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20866,10 +20828,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.cos f32.const 0.918469250202179 f32.const 0.24250665307044983 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20880,10 +20841,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.cos f32.const 0.8463190197944641 f32.const -0.24033240973949432 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20894,10 +20854,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.cos f32.const 0.7150139212608337 f32.const -0.3372635245323181 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20908,10 +20867,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.cos f32.const 0.7783495187759399 f32.const 0.16550153493881226 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20922,10 +20880,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20936,10 +20893,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20950,10 +20906,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20964,10 +20919,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20978,10 +20932,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.cos f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -20992,10 +20945,9 @@ unreachable end f32.const 1.862645149230957e-09 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 1.4551915228366852e-11 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21006,10 +20958,9 @@ unreachable end f32.const -1.862645149230957e-09 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 1.4551915228366852e-11 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21020,10 +20971,9 @@ unreachable end f32.const 1.1754943508222875e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21034,10 +20984,9 @@ unreachable end f32.const -1.1754943508222875e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21048,10 +20997,9 @@ unreachable end f32.const 1.401298464324817e-45 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21062,10 +21010,9 @@ unreachable end f32.const -1.401298464324817e-45 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21076,10 +21023,9 @@ unreachable end f32.const 2.802596928649634e-45 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21090,10 +21036,9 @@ unreachable end f32.const 1.2611686178923354e-44 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21104,10 +21049,9 @@ unreachable end f32.const 2.938735877055719e-39 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21118,10 +21062,9 @@ unreachable end f32.const 5.877471754111438e-39 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21132,10 +21075,9 @@ unreachable end f32.const 1.1754940705625946e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21146,10 +21088,9 @@ unreachable end f32.const 1.1754942106924411e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21160,10 +21101,9 @@ unreachable end f32.const 1.175494490952134e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21174,10 +21114,9 @@ unreachable end f32.const 1.1754946310819804e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21188,10 +21127,9 @@ unreachable end f32.const 2.3509880009953429e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21202,10 +21140,9 @@ unreachable end f32.const 2.350988701644575e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21216,10 +21153,9 @@ unreachable end f32.const 2.3509895424236536e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21230,10 +21166,9 @@ unreachable end f32.const 4.70197740328915e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21244,10 +21179,9 @@ unreachable end f32.const 7.450580596923828e-09 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 2.3283064365386963e-10 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21258,10 +21192,9 @@ unreachable end f32.const 0.000244140625 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0.25 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21272,10 +21205,9 @@ unreachable end f32.const 0.00048828125 - call $~lib/math/NativeMathf.cos f32.const 0.9999998807907104 f32.const -3.973643103449831e-08 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21286,10 +21218,9 @@ unreachable end f32.const 0.0009765625 - call $~lib/math/NativeMathf.cos f32.const 0.9999995231628418 f32.const -6.357828397085541e-07 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21300,10 +21231,9 @@ unreachable end f32.const -2.802596928649634e-45 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21314,10 +21244,9 @@ unreachable end f32.const -1.2611686178923354e-44 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21328,10 +21257,9 @@ unreachable end f32.const -2.938735877055719e-39 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21342,10 +21270,9 @@ unreachable end f32.const -5.877471754111438e-39 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21356,10 +21283,9 @@ unreachable end f32.const -1.1754940705625946e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21370,10 +21296,9 @@ unreachable end f32.const -1.1754942106924411e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21384,10 +21309,9 @@ unreachable end f32.const -1.175494490952134e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21398,10 +21322,9 @@ unreachable end f32.const -1.1754946310819804e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21412,10 +21335,9 @@ unreachable end f32.const -2.3509880009953429e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21426,10 +21348,9 @@ unreachable end f32.const -2.350988701644575e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21440,10 +21361,9 @@ unreachable end f32.const -2.3509895424236536e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21454,10 +21374,9 @@ unreachable end f32.const -4.70197740328915e-38 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21468,10 +21387,9 @@ unreachable end f32.const -7.450580596923828e-09 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 2.3283064365386963e-10 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21482,10 +21400,9 @@ unreachable end f32.const -0.000244140625 - call $~lib/math/NativeMathf.cos f32.const 1 f32.const 0.25 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21496,10 +21413,9 @@ unreachable end f32.const -0.00048828125 - call $~lib/math/NativeMathf.cos f32.const 0.9999998807907104 f32.const -3.973643103449831e-08 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21510,10 +21426,9 @@ unreachable end f32.const -0.0009765625 - call $~lib/math/NativeMathf.cos f32.const 0.9999995231628418 f32.const -6.357828397085541e-07 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21524,10 +21439,9 @@ unreachable end f32.const 255.99993896484375 - call $~lib/math/NativeMathf.cos f32.const -0.03985174745321274 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21538,10 +21452,9 @@ unreachable end f32.const 5033165 - call $~lib/math/NativeMathf.cos f32.const 0.8471871614456177 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21552,10 +21465,9 @@ unreachable end f32.const 421657440 - call $~lib/math/NativeMathf.cos f32.const 0.6728929281234741 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21566,10 +21478,9 @@ unreachable end f32.const 2147483392 - call $~lib/math/NativeMathf.cos f32.const 0.9610780477523804 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21580,10 +21491,9 @@ unreachable end f32.const 68719476736 - call $~lib/math/NativeMathf.cos f32.const 0.1694190502166748 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21594,10 +21504,9 @@ unreachable end f32.const 549755813888 - call $~lib/math/NativeMathf.cos f32.const 0.20735950767993927 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21608,10 +21517,9 @@ unreachable end f32.const 3402823466385288598117041e14 - call $~lib/math/NativeMathf.cos f32.const 0.8530210256576538 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21622,10 +21530,9 @@ unreachable end f32.const -255.99993896484375 - call $~lib/math/NativeMathf.cos f32.const -0.03985174745321274 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21636,10 +21543,9 @@ unreachable end f32.const -5033165 - call $~lib/math/NativeMathf.cos f32.const 0.8471871614456177 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21650,10 +21556,9 @@ unreachable end f32.const -421657440 - call $~lib/math/NativeMathf.cos f32.const 0.6728929281234741 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21664,10 +21569,9 @@ unreachable end f32.const -2147483392 - call $~lib/math/NativeMathf.cos f32.const 0.9610780477523804 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21678,10 +21582,9 @@ unreachable end f32.const -68719476736 - call $~lib/math/NativeMathf.cos f32.const 0.1694190502166748 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21692,10 +21595,9 @@ unreachable end f32.const -549755813888 - call $~lib/math/NativeMathf.cos f32.const 0.20735950767993927 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21706,10 +21608,9 @@ unreachable end f32.const -3402823466385288598117041e14 - call $~lib/math/NativeMathf.cos f32.const 0.8530210256576538 f32.const 0 - call $std/math/check + call $std/math/test_cosf i32.eqz if i32.const 0 @@ -21915,10 +21816,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.cosh f32.const 1593.5216064453125 f32.const 0.26242581009864807 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21929,10 +21829,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.cosh f32.const 38.56174087524414 f32.const -0.08168885856866837 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21943,10 +21842,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.cosh f32.const 2182.631103515625 f32.const -0.02331414446234703 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21957,10 +21855,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.cosh f32.const 343.2738037109375 f32.const 0.20081493258476257 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21971,10 +21868,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.cosh f32.const 5291.78173828125 f32.const 0.36286723613739014 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21985,10 +21881,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.cosh f32.const 1.2272322177886963 f32.const 0.32777416706085205 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -21999,10 +21894,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.cosh f32.const 1.0838085412979126 f32.const -0.039848703891038895 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22013,10 +21907,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.cosh f32.const 1.161980390548706 f32.const 0.15274477005004883 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22027,10 +21920,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.cosh f32.const 1.314923644065857 f32.const -0.2387111485004425 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22041,10 +21933,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.cosh f32.const 1.2393412590026855 f32.const -0.45791932940483093 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22055,10 +21946,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22069,10 +21959,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.cosh f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22083,10 +21972,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22097,10 +21985,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.cosh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22111,10 +21998,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.cosh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_coshf i32.eqz if i32.const 0 @@ -22684,10 +22570,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.exp f32.const 3.1377049162983894e-04 f32.const -0.030193336308002472 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22698,10 +22583,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.exp f32.const 77.11051177978516 f32.const -0.2875460684299469 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22712,10 +22596,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.exp f32.const 2.2908132814336568e-04 f32.const 0.2237040400505066 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22726,10 +22609,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.exp f32.const 1.4565663877874613e-03 f32.const 0.36469703912734985 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22740,10 +22622,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.exp f32.const 10583.5634765625 f32.const 0.45962104201316833 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22754,10 +22635,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.exp f32.const 1.93863844871521 f32.const 0.3568260967731476 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22768,10 +22648,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.exp f32.const 0.6659078598022461 f32.const -0.38294991850852966 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22782,10 +22661,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.exp f32.const 1.753756046295166 f32.const 0.44355490803718567 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22796,10 +22674,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.exp f32.const 2.168752908706665 f32.const 0.24562469124794006 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22810,10 +22687,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.exp f32.const 0.5072436928749084 f32.const -0.3974292278289795 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22824,10 +22700,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22838,10 +22713,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.exp f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22852,10 +22726,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.exp f32.const 2.7182817459106445 f32.const -0.3462330996990204 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22866,10 +22739,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.exp f32.const 0.3678794503211975 f32.const 0.3070148527622223 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22880,10 +22752,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22894,10 +22765,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.exp f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22908,10 +22778,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.exp f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22922,10 +22791,9 @@ unreachable end f32.const 88.72283172607422 - call $~lib/math/NativeMathf.exp f32.const 340279851902147610656242e15 f32.const -0.09067153930664062 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22936,10 +22804,9 @@ unreachable end f32.const 88.72283935546875 - call $~lib/math/NativeMathf.exp f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22950,10 +22817,9 @@ unreachable end f32.const -103.97207641601562 - call $~lib/math/NativeMathf.exp f32.const 1.401298464324817e-45 f32.const 0.49999967217445374 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22964,10 +22830,9 @@ unreachable end f32.const -103.97208404541016 - call $~lib/math/NativeMathf.exp f32.const 0 f32.const -0.49999651312828064 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22978,10 +22843,9 @@ unreachable end f32.const 0.3465735614299774 - call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const 0.13922421634197235 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -22992,10 +22856,9 @@ unreachable end f32.const 0.3465735912322998 - call $~lib/math/NativeMathf.exp f32.const 1.4142135381698608 f32.const -0.21432916820049286 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -23006,10 +22869,9 @@ unreachable end f32.const 0.3465736210346222 - call $~lib/math/NativeMathf.exp f32.const 1.4142136573791504 f32.const 0.43211743235588074 - call $std/math/check + call $std/math/test_expf i32.eqz if i32.const 0 @@ -23267,10 +23129,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.expm1 f32.const -0.9996862411499023 f32.const -0.19532723724842072 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23281,10 +23142,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.expm1 f32.const 76.11051177978516 f32.const -0.2875460684299469 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23295,10 +23155,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.expm1 f32.const -0.9997709393501282 f32.const -0.34686920046806335 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23309,10 +23168,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.expm1 f32.const -0.9985434412956238 f32.const -0.1281939446926117 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23323,10 +23181,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.expm1 f32.const 10582.5634765625 f32.const 0.45962104201316833 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23337,10 +23194,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.expm1 f32.const 0.9386383891105652 f32.const -0.28634780645370483 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23351,10 +23207,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.expm1 f32.const -0.3340921103954315 f32.const 0.23410017788410187 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23365,10 +23220,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.expm1 f32.const 0.7537559866905212 f32.const -0.11289017647504807 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23379,10 +23233,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.expm1 f32.const 1.168752908706665 f32.const 0.4912493824958801 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23393,10 +23246,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.expm1 f32.const -0.49275627732276917 f32.const 0.20514154434204102 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23407,10 +23259,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.expm1 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23421,10 +23272,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.expm1 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23435,10 +23285,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.expm1 f32.const 1.718281865119934 f32.const 0.3075338304042816 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23449,10 +23298,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.expm1 f32.const -0.6321205496788025 f32.const 0.15350742638111115 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23463,10 +23311,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.expm1 f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23477,10 +23324,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.expm1 f32.const -1 f32.const 0 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23491,10 +23337,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.expm1 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_expm1f i32.eqz if i32.const 0 @@ -23960,10 +23805,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.exp2 f32.const 3.7293792702257633e-03 f32.const -0.0674908235669136 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -23974,10 +23818,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.exp2 f32.const 20.32579231262207 f32.const 0.34121403098106384 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -23988,10 +23831,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.exp2 f32.const 2.9987283051013947e-03 f32.const 0.15504619479179382 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24002,10 +23844,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.exp2 f32.const 0.010808623395860195 f32.const 0.2603940963745117 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24016,10 +23857,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.exp2 f32.const 616.1156616210938 f32.const -0.1379322111606598 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24030,10 +23870,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.exp2 f32.const 1.5822590589523315 f32.const -0.427890807390213 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24044,10 +23883,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.exp2 f32.const 0.7543970942497253 f32.const -0.38062313199043274 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24058,10 +23896,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.exp2 f32.const 1.4760686159133911 f32.const 0.1507442593574524 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24072,10 +23909,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.exp2 f32.const 1.7101848125457764 f32.const -0.39102980494499207 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24086,10 +23922,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.exp2 f32.const 0.6247003674507141 f32.const -0.20904375612735748 - call $std/math/check + call $std/math/test_exp2f i32.eqz if i32.const 0 @@ -24399,10 +24234,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const -9 - f32.const -9 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24412,10 +24246,9 @@ call $~lib/builtins/abort unreachable end + f32.const 4.345239639282227 f32.const 4 - f32.const 4 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24425,10 +24258,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const -9 - f32.const -9 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24438,10 +24270,9 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const -7 - f32.const -7 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24451,10 +24282,9 @@ call $~lib/builtins/abort unreachable end + f32.const 9.267057418823242 f32.const 9 - f32.const 9 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24464,10 +24294,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.6619858741760254 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24477,10 +24306,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.40660393238067627 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24490,10 +24318,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5617597699165344 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24503,10 +24330,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.7741522789001465 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24516,10 +24342,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.6787636876106262 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24531,8 +24356,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24544,8 +24368,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24557,8 +24380,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24570,8 +24392,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24583,8 +24404,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24596,8 +24416,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24609,8 +24428,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24620,10 +24438,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24633,10 +24450,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24646,10 +24462,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24659,10 +24474,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -2 - f32.const -2 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24672,10 +24486,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24685,10 +24498,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24698,10 +24510,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -24711,10 +24522,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_floorf i32.eqz if i32.const 0 @@ -25799,10 +25609,8 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.log f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25813,10 +25621,8 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.log f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25827,10 +25633,8 @@ unreachable end f32.const -7.888609052210118e-31 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25841,10 +25645,8 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.log - f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25855,10 +25657,8 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25869,10 +25669,8 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.log f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25883,10 +25681,8 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25897,10 +25693,8 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25911,10 +25705,8 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.log f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25925,10 +25717,8 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.log f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25939,10 +25729,8 @@ unreachable end f32.const -7.888609052210118e-31 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25953,10 +25741,8 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.log f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25967,10 +25753,8 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25981,10 +25765,8 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.log f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -25995,10 +25777,8 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -26009,10 +25789,8 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.log f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_logf i32.eqz if i32.const 0 @@ -26257,10 +26035,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26271,10 +26048,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.log10 f32.const 0.6380137205123901 f32.const -0.20476758480072021 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26285,10 +26061,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26299,10 +26074,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26313,10 +26087,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.log10 f32.const 0.9669418334960938 f32.const -0.34273025393486023 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26327,10 +26100,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.log10 f32.const -0.1791512817144394 f32.const -0.27078554034233093 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26341,10 +26113,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26355,10 +26126,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.log10 f32.const -0.25044935941696167 f32.const 0.2126826047897339 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26369,10 +26139,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.log10 f32.const -0.1111735999584198 f32.const 0.46515095233917236 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26383,10 +26152,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26397,10 +26165,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26411,10 +26178,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.log10 f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26425,10 +26191,9 @@ unreachable end f32.const -7.888609052210118e-31 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26439,10 +26204,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.log10 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26453,10 +26217,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26467,10 +26230,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.log10 f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26481,10 +26243,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26495,10 +26256,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.log10 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log10f i32.eqz if i32.const 0 @@ -26743,10 +26503,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26757,10 +26516,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.log1p f32.const 1.676206350326538 f32.const -0.23014859855175018 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26771,10 +26529,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26785,10 +26542,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26799,10 +26555,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.log1p f32.const 2.3289403915405273 f32.const -0.29075589776039124 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26813,10 +26568,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.log1p f32.const 0.5080131888389587 f32.const -0.1386766880750656 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26827,10 +26581,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.log1p f32.const -0.5218932032585144 f32.const -0.08804433047771454 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26841,10 +26594,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.log1p f32.const 0.44581323862075806 f32.const -0.15101368725299835 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26855,10 +26607,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.log1p f32.const 0.5733227133750916 f32.const -0.10264533013105392 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26869,10 +26620,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.log1p f32.const -1.1355782747268677 f32.const -0.19879481196403503 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26883,10 +26633,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.log1p f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26897,10 +26646,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.log1p f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26911,10 +26659,9 @@ unreachable end f32.const -7.888609052210118e-31 - call $~lib/math/NativeMathf.log1p f32.const -7.888609052210118e-31 f32.const 3.308722450212111e-24 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26925,10 +26672,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.log1p f32.const 0.6931471824645996 f32.const 0.031954795122146606 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26939,10 +26685,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.log1p f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26953,10 +26698,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.log1p f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26967,10 +26711,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26981,10 +26724,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.log1p f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -26995,10 +26737,9 @@ unreachable end f32.const -1.1754942106924411e-38 - call $~lib/math/NativeMathf.log1p f32.const -1.1754942106924411e-38 f32.const 4.930380657631324e-32 - call $std/math/check + call $std/math/test_log1pf i32.eqz if i32.const 0 @@ -27243,10 +26984,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27257,10 +26997,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.log2 f32.const 2.1194357872009277 f32.const 0.18271538615226746 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27271,10 +27010,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27285,10 +27023,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27299,10 +27036,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.log2 f32.const 3.212111234664917 f32.const -0.3188050389289856 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27313,10 +27049,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.log2 f32.const -0.5951276421546936 f32.const 0.34231460094451904 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27327,10 +27062,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27341,10 +27075,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.log2 f32.const -0.8319748044013977 f32.const -0.33473604917526245 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27355,10 +27088,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.log2 f32.const -0.3693107068538666 f32.const 0.3278401792049408 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27369,10 +27101,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27383,10 +27114,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27397,10 +27127,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.log2 f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27411,10 +27140,9 @@ unreachable end f32.const -7.888609052210118e-31 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27425,10 +27153,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.log2 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27439,10 +27166,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27453,10 +27179,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.log2 f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27467,10 +27192,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -27481,10 +27205,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.log2 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_log2f i32.eqz if i32.const 0 @@ -41014,10 +40737,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.sin f32.const -0.977429211139679 f32.const 0.0801057294011116 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41028,10 +40750,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.sin f32.const -0.933354377746582 f32.const 0.34475627541542053 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41042,10 +40763,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.sin f32.const -0.8640924692153931 f32.const -0.468659907579422 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41056,10 +40776,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.sin f32.const -0.24593880772590637 f32.const -0.3955177664756775 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41070,10 +40789,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.sin f32.const 0.1570674479007721 f32.const -0.24006809294223785 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41084,10 +40802,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.sin f32.const 0.6146844625473022 f32.const -0.07707194238901138 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41098,10 +40815,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.sin f32.const -0.39549243450164795 f32.const -0.11720617115497589 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41112,10 +40828,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.sin f32.const 0.5326763391494751 f32.const -0.16059114038944244 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41126,10 +40841,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.sin f32.const 0.699110209941864 f32.const 0.26384368538856506 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41140,10 +40854,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.sin f32.const -0.627831220626831 f32.const 0.005127954296767712 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41154,10 +40867,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.sin f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41168,10 +40880,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.sin f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41182,10 +40893,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41196,10 +40906,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41210,10 +40919,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.sin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41224,10 +40932,9 @@ unreachable end f32.const 1.862645149230957e-09 - call $~lib/math/NativeMathf.sin f32.const 1.862645149230957e-09 f32.const 4.850638554015907e-12 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41238,10 +40945,9 @@ unreachable end f32.const -1.862645149230957e-09 - call $~lib/math/NativeMathf.sin f32.const -1.862645149230957e-09 f32.const -4.850638554015907e-12 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41252,10 +40958,9 @@ unreachable end f32.const 1.1754943508222875e-38 - call $~lib/math/NativeMathf.sin f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41266,10 +40971,9 @@ unreachable end f32.const -1.1754943508222875e-38 - call $~lib/math/NativeMathf.sin f32.const -1.1754943508222875e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41280,10 +40984,9 @@ unreachable end f32.const 1.401298464324817e-45 - call $~lib/math/NativeMathf.sin f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41294,10 +40997,9 @@ unreachable end f32.const -1.401298464324817e-45 - call $~lib/math/NativeMathf.sin f32.const -1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41308,10 +41010,9 @@ unreachable end f32.const 1.175494490952134e-38 - call $~lib/math/NativeMathf.sin f32.const 1.175494490952134e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41322,10 +41023,9 @@ unreachable end f32.const 1.1754946310819804e-38 - call $~lib/math/NativeMathf.sin f32.const 1.1754946310819804e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41336,10 +41036,9 @@ unreachable end f32.const 2.3509880009953429e-38 - call $~lib/math/NativeMathf.sin f32.const 2.3509880009953429e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41350,10 +41049,9 @@ unreachable end f32.const 2.350988701644575e-38 - call $~lib/math/NativeMathf.sin f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41364,10 +41062,9 @@ unreachable end f32.const 2.3509895424236536e-38 - call $~lib/math/NativeMathf.sin f32.const 2.3509895424236536e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41378,10 +41075,9 @@ unreachable end f32.const 4.70197740328915e-38 - call $~lib/math/NativeMathf.sin f32.const 4.70197740328915e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41392,10 +41088,9 @@ unreachable end f32.const 1.1175870895385742e-08 - call $~lib/math/NativeMathf.sin f32.const 1.1175870895385742e-08 f32.const 2.6193447411060333e-10 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41406,10 +41101,9 @@ unreachable end f32.const 1.4901161193847656e-08 - call $~lib/math/NativeMathf.sin f32.const 1.4901161193847656e-08 f32.const 3.1044086745701804e-10 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41420,10 +41114,9 @@ unreachable end f32.const 0.000244140625 - call $~lib/math/NativeMathf.sin f32.const 0.000244140625 f32.const 0.0833333358168602 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41434,10 +41127,9 @@ unreachable end f32.const 0.0003662109375 - call $~lib/math/NativeMathf.sin f32.const 0.0003662109375 f32.const 0.28125 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41448,10 +41140,9 @@ unreachable end f32.const -1.175494490952134e-38 - call $~lib/math/NativeMathf.sin f32.const -1.175494490952134e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41462,10 +41153,9 @@ unreachable end f32.const -1.1754946310819804e-38 - call $~lib/math/NativeMathf.sin f32.const -1.1754946310819804e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41476,10 +41166,9 @@ unreachable end f32.const -2.3509880009953429e-38 - call $~lib/math/NativeMathf.sin f32.const -2.3509880009953429e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41490,10 +41179,9 @@ unreachable end f32.const -2.350988701644575e-38 - call $~lib/math/NativeMathf.sin f32.const -2.350988701644575e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41504,10 +41192,9 @@ unreachable end f32.const -2.3509895424236536e-38 - call $~lib/math/NativeMathf.sin f32.const -2.3509895424236536e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41518,10 +41205,9 @@ unreachable end f32.const -4.70197740328915e-38 - call $~lib/math/NativeMathf.sin f32.const -4.70197740328915e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41532,10 +41218,9 @@ unreachable end f32.const -1.1175870895385742e-08 - call $~lib/math/NativeMathf.sin f32.const -1.1175870895385742e-08 f32.const -2.6193447411060333e-10 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41546,10 +41231,9 @@ unreachable end f32.const -1.4901161193847656e-08 - call $~lib/math/NativeMathf.sin f32.const -1.4901161193847656e-08 f32.const -3.1044086745701804e-10 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41560,10 +41244,9 @@ unreachable end f32.const -0.000244140625 - call $~lib/math/NativeMathf.sin f32.const -0.000244140625 f32.const -0.0833333358168602 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41574,10 +41257,9 @@ unreachable end f32.const -0.0003662109375 - call $~lib/math/NativeMathf.sin f32.const -0.0003662109375 f32.const -0.28125 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41588,10 +41270,9 @@ unreachable end f32.const 2.802596928649634e-45 - call $~lib/math/NativeMathf.sin f32.const 2.802596928649634e-45 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41602,10 +41283,9 @@ unreachable end f32.const 1.2611686178923354e-44 - call $~lib/math/NativeMathf.sin f32.const 1.2611686178923354e-44 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41616,10 +41296,9 @@ unreachable end f32.const 2.938735877055719e-39 - call $~lib/math/NativeMathf.sin f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41630,10 +41309,9 @@ unreachable end f32.const 5.877471754111438e-39 - call $~lib/math/NativeMathf.sin f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41644,10 +41322,9 @@ unreachable end f32.const 1.1754940705625946e-38 - call $~lib/math/NativeMathf.sin f32.const 1.1754940705625946e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41658,10 +41335,9 @@ unreachable end f32.const 1.1754942106924411e-38 - call $~lib/math/NativeMathf.sin f32.const 1.1754942106924411e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41672,10 +41348,9 @@ unreachable end f32.const -2.802596928649634e-45 - call $~lib/math/NativeMathf.sin f32.const -2.802596928649634e-45 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41686,10 +41361,9 @@ unreachable end f32.const -1.2611686178923354e-44 - call $~lib/math/NativeMathf.sin f32.const -1.2611686178923354e-44 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41700,10 +41374,9 @@ unreachable end f32.const -2.938735877055719e-39 - call $~lib/math/NativeMathf.sin f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41714,10 +41387,9 @@ unreachable end f32.const -5.877471754111438e-39 - call $~lib/math/NativeMathf.sin f32.const -5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41728,10 +41400,9 @@ unreachable end f32.const -1.1754940705625946e-38 - call $~lib/math/NativeMathf.sin f32.const -1.1754940705625946e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41742,10 +41413,9 @@ unreachable end f32.const -1.1754942106924411e-38 - call $~lib/math/NativeMathf.sin f32.const -1.1754942106924411e-38 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41756,10 +41426,9 @@ unreachable end f32.const 255.99993896484375 - call $~lib/math/NativeMathf.sin f32.const -0.9992055892944336 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41770,10 +41439,9 @@ unreachable end f32.const 5033165 - call $~lib/math/NativeMathf.sin f32.const 0.5312945246696472 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41784,10 +41452,9 @@ unreachable end f32.const 421657440 - call $~lib/math/NativeMathf.sin f32.const -0.7397398948669434 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41798,10 +41465,9 @@ unreachable end f32.const 2147483392 - call $~lib/math/NativeMathf.sin f32.const 0.2762770354747772 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41812,10 +41478,9 @@ unreachable end f32.const 68719476736 - call $~lib/math/NativeMathf.sin f32.const 0.9855440855026245 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41826,10 +41491,9 @@ unreachable end f32.const 549755813888 - call $~lib/math/NativeMathf.sin f32.const -0.9782648086547852 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41840,10 +41504,9 @@ unreachable end f32.const 3402823466385288598117041e14 - call $~lib/math/NativeMathf.sin f32.const -0.5218765139579773 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41854,10 +41517,9 @@ unreachable end f32.const -255.99993896484375 - call $~lib/math/NativeMathf.sin f32.const 0.9992055892944336 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41868,10 +41530,9 @@ unreachable end f32.const -5033165 - call $~lib/math/NativeMathf.sin f32.const -0.5312945246696472 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41882,10 +41543,9 @@ unreachable end f32.const -421657440 - call $~lib/math/NativeMathf.sin f32.const 0.7397398948669434 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41896,10 +41556,9 @@ unreachable end f32.const -2147483392 - call $~lib/math/NativeMathf.sin f32.const -0.2762770354747772 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41910,10 +41569,9 @@ unreachable end f32.const -68719476736 - call $~lib/math/NativeMathf.sin f32.const -0.9855440855026245 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41924,10 +41582,9 @@ unreachable end f32.const -549755813888 - call $~lib/math/NativeMathf.sin f32.const 0.9782648086547852 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -41938,10 +41595,9 @@ unreachable end f32.const -3402823466385288598117041e14 - call $~lib/math/NativeMathf.sin f32.const 0.5218765139579773 f32.const 0 - call $std/math/check + call $std/math/test_sinf i32.eqz if i32.const 0 @@ -42147,10 +41803,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 @@ -42161,10 +41816,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 @@ -42175,10 +41829,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 @@ -42189,10 +41842,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 @@ -42203,10 +41855,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 @@ -42217,10 +41868,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 @@ -42231,10 +41881,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 @@ -42245,10 +41894,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 @@ -42259,10 +41907,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 @@ -42273,10 +41920,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 @@ -42287,10 +41933,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 @@ -42301,10 +41946,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 @@ -42315,10 +41959,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 @@ -42329,10 +41972,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 @@ -42343,10 +41985,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 @@ -43448,10 +43089,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -8.066848754882812 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43461,10 +43102,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2.084523916244507 + f32.const 4.345239639282227 f32.const 2.084523916244507 f32.const 0.3200402557849884 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43474,10 +43115,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -8.381433486938477 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43487,10 +43128,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -6.531673431396484 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43500,10 +43141,10 @@ call $~lib/builtins/abort unreachable end - f32.const 3.0441842079162598 + f32.const 9.267057418823242 f32.const 3.0441842079162598 f32.const 0.05022354796528816 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43513,10 +43154,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.813625156879425 + f32.const 0.6619858741760254 f32.const 0.813625156879425 f32.const 0.2240506112575531 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43526,10 +43167,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -0.40660393238067627 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43539,10 +43180,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.7495063543319702 + f32.const 0.5617597699165344 f32.const 0.7495063543319702 f32.const 0.05895441770553589 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43552,10 +43193,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.879859209060669 + f32.const 0.7741522789001465 f32.const 0.879859209060669 f32.const -0.4874873757362366 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43565,10 +43206,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -0.6787636876106262 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43581,7 +43222,7 @@ f32.const nan:0x400000 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43594,7 +43235,7 @@ f32.const inf f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43604,10 +43245,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -inf f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43620,7 +43261,7 @@ f32.const 0 f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43633,7 +43274,7 @@ f32.const -0 f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43646,7 +43287,7 @@ f32.const 1 f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43656,10 +43297,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -1 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43669,10 +43310,10 @@ call $~lib/builtins/abort unreachable end - f32.const 2 + f32.const 4 f32.const 2 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43682,10 +43323,10 @@ call $~lib/builtins/abort unreachable end - f32.const 5.293955920339377e-23 + f32.const 2.802596928649634e-45 f32.const 5.293955920339377e-23 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43695,10 +43336,10 @@ call $~lib/builtins/abort unreachable end - f32.const 6.483745598763743e-23 + f32.const 4.203895392974451e-45 f32.const 6.483745598763743e-23 f32.const 0.37388554215431213 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43708,10 +43349,10 @@ call $~lib/builtins/abort unreachable end - f32.const 3.743392066509216e-23 + f32.const 1.401298464324817e-45 f32.const 3.743392066509216e-23 f32.const -0.20303145051002502 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43721,10 +43362,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -1.401298464324817e-45 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43734,10 +43375,10 @@ call $~lib/builtins/abort unreachable end - f32.const 18446742974197923840 + f32.const 3402823466385288598117041e14 f32.const 18446742974197923840 f32.const -0.5 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43747,10 +43388,10 @@ call $~lib/builtins/abort unreachable end - f32.const -nan:0x400000 + f32.const -3402823466385288598117041e14 f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43760,10 +43401,10 @@ call $~lib/builtins/abort unreachable end - f32.const 0.9999999403953552 + f32.const 0.9999998807907104 f32.const 0.9999999403953552 f32.const 2.980232594040899e-08 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43776,7 +43417,7 @@ f32.const 0.9999999403953552 f32.const 0.9999999403953552 f32.const -0.5 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43786,10 +43427,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.4142134189605713 + f32.const 1.999999761581421 f32.const 1.4142134189605713 f32.const -0.4959246516227722 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43799,10 +43440,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.4142135381698608 + f32.const 1.9999998807907104 f32.const 1.4142135381698608 f32.const 0.15052194893360138 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43812,10 +43453,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1 + f32.const 1.0000001192092896 f32.const 1 f32.const -0.5 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43825,10 +43466,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.0000001192092896 + f32.const 1.000000238418579 f32.const 1.0000001192092896 f32.const 5.960463766996327e-08 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43838,10 +43479,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.4142136573791504 + f32.const 2.000000238418579 f32.const 1.4142136573791504 f32.const 0.08986179530620575 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -43851,10 +43492,10 @@ call $~lib/builtins/abort unreachable end - f32.const 1.41421377658844 + f32.const 2.000000476837158 f32.const 1.41421377658844 f32.const 0.3827550709247589 - call $std/math/check + call $std/math/test_sqrtf i32.eqz if i32.const 0 @@ -44762,10 +44403,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.tan f32.const 4.626595497131348 f32.const 0.2455666959285736 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44776,10 +44416,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.tan f32.const 2.6001901626586914 f32.const 0.3652407228946686 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44790,10 +44429,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.tan f32.const 1.716740608215332 f32.const 0.08169349282979965 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44804,10 +44442,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.tan f32.const -0.2537320852279663 f32.const 0.23186513781547546 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44818,10 +44455,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.tan f32.const -0.15904149413108826 f32.const -0.009332014247775078 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44832,10 +44468,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.tan f32.const 0.7792918682098389 f32.const -0.06759700924158096 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44846,10 +44481,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.tan f32.const -0.43059954047203064 f32.const 0.005771996453404427 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44860,10 +44494,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.tan f32.const 0.6294037103652954 f32.const -0.16838163137435913 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44874,10 +44507,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.tan f32.const 0.977757453918457 f32.const 0.38969388604164124 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44888,10 +44520,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.tan f32.const -0.8066186308860779 f32.const 0.12294059991836548 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44902,10 +44533,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.tan f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44916,10 +44546,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.tan f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44930,10 +44559,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44944,10 +44572,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44958,10 +44585,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.tan f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44972,10 +44598,9 @@ unreachable end f32.const 1.862645149230957e-09 - call $~lib/math/NativeMathf.tan f32.const 1.862645149230957e-09 f32.const -9.701277108031814e-12 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -44986,10 +44611,9 @@ unreachable end f32.const -1.862645149230957e-09 - call $~lib/math/NativeMathf.tan f32.const -1.862645149230957e-09 f32.const 9.701277108031814e-12 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45000,10 +44624,9 @@ unreachable end f32.const 1.1754943508222875e-38 - call $~lib/math/NativeMathf.tan f32.const 1.1754943508222875e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45014,10 +44637,9 @@ unreachable end f32.const -1.1754943508222875e-38 - call $~lib/math/NativeMathf.tan f32.const -1.1754943508222875e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45028,10 +44650,9 @@ unreachable end f32.const 1.401298464324817e-45 - call $~lib/math/NativeMathf.tan f32.const 1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45042,10 +44663,9 @@ unreachable end f32.const -1.401298464324817e-45 - call $~lib/math/NativeMathf.tan f32.const -1.401298464324817e-45 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45056,10 +44676,9 @@ unreachable end f32.const 1.175494490952134e-38 - call $~lib/math/NativeMathf.tan f32.const 1.175494490952134e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45070,10 +44689,9 @@ unreachable end f32.const 1.1754946310819804e-38 - call $~lib/math/NativeMathf.tan f32.const 1.1754946310819804e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45084,10 +44702,9 @@ unreachable end f32.const 2.3509880009953429e-38 - call $~lib/math/NativeMathf.tan f32.const 2.3509880009953429e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45098,10 +44715,9 @@ unreachable end f32.const 2.350988701644575e-38 - call $~lib/math/NativeMathf.tan f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45112,10 +44728,9 @@ unreachable end f32.const 2.3509895424236536e-38 - call $~lib/math/NativeMathf.tan f32.const 2.3509895424236536e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45126,10 +44741,9 @@ unreachable end f32.const 4.70197740328915e-38 - call $~lib/math/NativeMathf.tan f32.const 4.70197740328915e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45140,10 +44754,9 @@ unreachable end f32.const 1.1175870895385742e-08 - call $~lib/math/NativeMathf.tan f32.const 1.1175870895385742e-08 f32.const -5.238689482212067e-10 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45154,10 +44767,9 @@ unreachable end f32.const 1.4901161193847656e-08 - call $~lib/math/NativeMathf.tan f32.const 1.4901161193847656e-08 f32.const -6.208817349140361e-10 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45168,10 +44780,9 @@ unreachable end f32.const 0.000244140625 - call $~lib/math/NativeMathf.tan f32.const 0.000244140625 f32.const -0.1666666716337204 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45182,10 +44793,9 @@ unreachable end f32.const -1.175494490952134e-38 - call $~lib/math/NativeMathf.tan f32.const -1.175494490952134e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45196,10 +44806,9 @@ unreachable end f32.const -1.1754946310819804e-38 - call $~lib/math/NativeMathf.tan f32.const -1.1754946310819804e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45210,10 +44819,9 @@ unreachable end f32.const -2.3509880009953429e-38 - call $~lib/math/NativeMathf.tan f32.const -2.3509880009953429e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45224,10 +44832,9 @@ unreachable end f32.const 2.350988701644575e-38 - call $~lib/math/NativeMathf.tan f32.const 2.350988701644575e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45238,10 +44845,9 @@ unreachable end f32.const -2.3509895424236536e-38 - call $~lib/math/NativeMathf.tan f32.const -2.3509895424236536e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45252,10 +44858,9 @@ unreachable end f32.const -4.70197740328915e-38 - call $~lib/math/NativeMathf.tan f32.const -4.70197740328915e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45266,10 +44871,9 @@ unreachable end f32.const -1.1175870895385742e-08 - call $~lib/math/NativeMathf.tan f32.const -1.1175870895385742e-08 f32.const 5.238689482212067e-10 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45280,10 +44884,9 @@ unreachable end f32.const -1.4901161193847656e-08 - call $~lib/math/NativeMathf.tan f32.const -1.4901161193847656e-08 f32.const 6.208817349140361e-10 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45294,10 +44897,9 @@ unreachable end f32.const -0.000244140625 - call $~lib/math/NativeMathf.tan f32.const -0.000244140625 f32.const 0.1666666716337204 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45308,10 +44910,9 @@ unreachable end f32.const 2.802596928649634e-45 - call $~lib/math/NativeMathf.tan f32.const 2.802596928649634e-45 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45322,10 +44923,9 @@ unreachable end f32.const 1.2611686178923354e-44 - call $~lib/math/NativeMathf.tan f32.const 1.2611686178923354e-44 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45336,10 +44936,9 @@ unreachable end f32.const 2.938735877055719e-39 - call $~lib/math/NativeMathf.tan f32.const 2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45350,10 +44949,9 @@ unreachable end f32.const 5.877471754111438e-39 - call $~lib/math/NativeMathf.tan f32.const 5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45364,10 +44962,9 @@ unreachable end f32.const 1.1754940705625946e-38 - call $~lib/math/NativeMathf.tan f32.const 1.1754940705625946e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45378,10 +44975,9 @@ unreachable end f32.const 1.1754942106924411e-38 - call $~lib/math/NativeMathf.tan f32.const 1.1754942106924411e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45392,10 +44988,9 @@ unreachable end f32.const -2.802596928649634e-45 - call $~lib/math/NativeMathf.tan f32.const -2.802596928649634e-45 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45406,10 +45001,9 @@ unreachable end f32.const -1.2611686178923354e-44 - call $~lib/math/NativeMathf.tan f32.const -1.2611686178923354e-44 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45420,10 +45014,9 @@ unreachable end f32.const -2.938735877055719e-39 - call $~lib/math/NativeMathf.tan f32.const -2.938735877055719e-39 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45434,10 +45027,9 @@ unreachable end f32.const -5.877471754111438e-39 - call $~lib/math/NativeMathf.tan f32.const -5.877471754111438e-39 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45448,10 +45040,9 @@ unreachable end f32.const -1.1754940705625946e-38 - call $~lib/math/NativeMathf.tan f32.const -1.1754940705625946e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45462,10 +45053,9 @@ unreachable end f32.const -1.1754942106924411e-38 - call $~lib/math/NativeMathf.tan f32.const -1.1754942106924411e-38 f32.const 0 - call $std/math/check + call $std/math/test_tanf i32.eqz if i32.const 0 @@ -45671,10 +45261,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.tanh f32.const -0.9999998211860657 f32.const -0.3034979999065399 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45685,10 +45274,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.tanh f32.const 0.9996637105941772 f32.const 0.2154078334569931 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45699,10 +45287,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.tanh f32.const -0.9999998807907104 f32.const 0.23912210762500763 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45713,10 +45300,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.tanh f32.const -0.999995768070221 f32.const -0.18844597041606903 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45727,10 +45313,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.tanh f32.const 1 f32.const 0.1497807800769806 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45741,10 +45326,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.tanh f32.const 0.5796834826469421 f32.const -0.05590476095676422 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45755,10 +45339,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.tanh f32.const -0.38558530807495117 f32.const 0.349787175655365 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45769,10 +45352,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.tanh f32.const 0.5092819333076477 f32.const -0.1528785079717636 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45783,10 +45365,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.tanh f32.const 0.6493374705314636 f32.const 0.4317026138305664 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45797,10 +45378,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.tanh f32.const -0.5907150506973267 f32.const 0.4079873859882355 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45811,10 +45391,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.tanh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45825,10 +45404,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.tanh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45839,10 +45417,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.tanh f32.const 1 f32.const 0 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45853,10 +45430,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.tanh f32.const -1 f32.const 0 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -45867,10 +45443,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.tanh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_tanhf i32.eqz if i32.const 0 @@ -46180,10 +45755,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.066848754882812 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46193,10 +45767,9 @@ call $~lib/builtins/abort unreachable end + f32.const 4.345239639282227 f32.const 4 - f32.const 4 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46206,10 +45779,9 @@ call $~lib/builtins/abort unreachable end + f32.const -8.381433486938477 f32.const -8 - f32.const -8 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46219,10 +45791,9 @@ call $~lib/builtins/abort unreachable end + f32.const -6.531673431396484 f32.const -6 - f32.const -6 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46232,10 +45803,9 @@ call $~lib/builtins/abort unreachable end + f32.const 9.267057418823242 f32.const 9 - f32.const 9 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46245,10 +45815,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.6619858741760254 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46258,10 +45827,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.40660393238067627 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46271,10 +45839,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5617597699165344 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46284,10 +45851,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.7741522789001465 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46297,10 +45863,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.6787636876106262 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46312,8 +45877,7 @@ end f32.const nan:0x400000 f32.const nan:0x400000 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46325,8 +45889,7 @@ end f32.const inf f32.const inf - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46338,8 +45901,7 @@ end f32.const -inf f32.const -inf - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46351,8 +45913,7 @@ end f32.const 0 f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46364,8 +45925,7 @@ end f32.const -0 f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46377,8 +45937,7 @@ end f32.const 1 f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46390,8 +45949,7 @@ end f32.const -1 f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46401,10 +45959,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.5 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46414,10 +45971,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.5 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46427,10 +45983,9 @@ call $~lib/builtins/abort unreachable end + f32.const 1.0000152587890625 f32.const 1 - f32.const 1 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46440,10 +45995,9 @@ call $~lib/builtins/abort unreachable end + f32.const -1.0000152587890625 f32.const -1 - f32.const -1 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46453,10 +46007,9 @@ call $~lib/builtins/abort unreachable end + f32.const 0.9999923706054688 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46466,10 +46019,9 @@ call $~lib/builtins/abort unreachable end + f32.const -0.9999923706054688 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46479,10 +46031,9 @@ call $~lib/builtins/abort unreachable end + f32.const 7.888609052210118e-31 f32.const 0 - f32.const 0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -46492,10 +46043,9 @@ call $~lib/builtins/abort unreachable end + f32.const -7.888609052210118e-31 f32.const -0 - f32.const -0 - f32.const 0 - call $std/math/check + call $std/math/test_truncf i32.eqz if i32.const 0 @@ -47704,7 +47254,7 @@ unreachable end ) - (func $~start (; 151 ;) + (func $~start (; 176 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index a8c58006df..ad93153023 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,18 +7,26 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,33 +56,31 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $std/new/AClass#constructor (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $0 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $0 + local.get $2 i32.const 16 i32.sub - local.tee $1 + local.tee $0 i32.const 16 i32.store - local.get $1 + local.get $0 i32.const 1 i32.store offset=4 - local.get $1 + local.get $0 i32.const 3 i32.store offset=8 - local.get $1 + local.get $0 i32.const 8 i32.store offset=12 - local.get $0 + local.get $2 + ) + (func $~start (; 1 ;) + (local $0 i32) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 i32.store local.get $0 @@ -91,13 +96,6 @@ f32.const 3 f32.store offset=4 local.get $0 - ) - (func $~start (; 2 ;) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 385b2a670a..d088da9d94 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -12,20 +12,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -33,16 +59,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -51,42 +77,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -97,9 +94,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -107,7 +104,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -182,7 +179,7 @@ end i32.const 0 ) - (func $std/object-literal/bar (; 5 ;) (param $0 i32) + (func $std/object-literal/bar (; 4 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -236,7 +233,7 @@ unreachable end ) - (func $start:std/object-literal (; 6 ;) + (func $start:std/object-literal (; 5 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -290,7 +287,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 6 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 46b6bcf27f..2e4ed6d68e 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,7 +1,6 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -79,20 +78,28 @@ (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -100,16 +107,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -118,20 +125,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -146,9 +142,9 @@ local.get $1 i32.const 8 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $std/operator-overloading/Tester#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 3 call $~lib/rt/stub/__alloc @@ -160,7 +156,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 4 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 3 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -237,7 +233,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 5 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 4 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1193,7 +1189,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.equals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1209,7 +1205,7 @@ i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1225,7 +1221,7 @@ i32.const 0 end ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 4 call $~lib/rt/stub/__alloc @@ -1237,7 +1233,7 @@ i32.store offset=4 local.get $2 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 5 call $~lib/rt/stub/__alloc @@ -1249,7 +1245,7 @@ i32.store offset=4 local.get $2 ) - (func $start:std/operator-overloading (; 10 ;) + (func $start:std/operator-overloading (; 9 ;) (local $0 i32) (local $1 i32) i32.const 96 @@ -2426,7 +2422,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 10 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index dff8a7f778..6e1f3590d5 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -12,8 +12,6 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1076,48 +1074,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 444 i32.gt_u @@ -1125,11 +1084,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1340,7 +1336,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1362,7 +1358,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 444 i32.gt_u @@ -1373,7 +1369,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#clear (; 21 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 20 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1406,7 +1402,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 22 ;) (result i32) + (func $~lib/set/Set#constructor (; 21 ;) (result i32) (local $0 i32) i32.const 24 i32.const 3 @@ -1434,6 +1430,13 @@ call $~lib/set/Set#clear local.get $0 ) + (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) + local.get $0 + i32.const -2128831035 + i32.xor + i32.const 16777619 + i32.mul + ) (func $~lib/set/Set#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load @@ -1485,10 +1488,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 i32.ne @@ -1547,13 +1547,10 @@ i32.store8 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -1627,20 +1624,15 @@ (local $2 i32) (local $3 i32) (local $4 i32) + local.get $0 + local.get $1 local.get $1 i32.const 24 i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + call $~lib/util/hash/hash8 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -1783,49 +1775,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 28 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1998,7 +1948,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2011,7 +1961,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2114,6 +2064,54 @@ end local.get $3 ) + (func $~lib/rt/tlsf/__realloc (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -2138,20 +2136,15 @@ call $~lib/builtins/abort unreachable end + local.get $3 local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.tee $4 local.get $1 local.get $2 i32.shl local.tee $2 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc local.tee $1 i32.add local.get $2 @@ -2302,10 +2295,7 @@ i32.shl i32.const 24 i32.shr_s - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2712,10 +2702,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/set/Set#find i32.const 0 i32.ne @@ -2774,13 +2761,10 @@ i32.store8 local.get $3 local.get $5 - local.get $1 local.get $2 i32.load8_u - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 + local.get $1 i32.and i32.const 2 i32.shl @@ -2854,18 +2838,13 @@ (local $2 i32) (local $3 i32) (local $4 i32) + local.get $0 + local.get $1 local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul - local.tee $2 - local.set $3 - local.get $0 - local.get $1 - local.get $2 + call $~lib/util/hash/hash8 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -3030,10 +3009,7 @@ local.get $1 i32.const 255 i32.and - i32.const -2128831035 - i32.xor - i32.const 16777619 - i32.mul + call $~lib/util/hash/hash8 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -7680,79 +7656,42 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 99 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/set/Set#values (; 100 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 99 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $1 + local.set $3 i32.const 16 i32.const 20 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $1 + local.get $3 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 local.get $1 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $1 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 3 i32.shl i32.add @@ -7763,26 +7702,59 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.get $6 local.get $5 f32.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 + local.get $1 ) - (func $~lib/array/Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -7803,7 +7775,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 102 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 101 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -7864,7 +7836,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 103 ;) + (func $std/set/testNumeric (; 102 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -8166,7 +8138,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 104 ;) (result i32) + (func $~lib/set/Set#constructor (; 103 ;) (result i32) (local $0 i32) i32.const 24 i32.const 21 @@ -8194,7 +8166,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 105 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 104 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8235,7 +8207,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 106 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 105 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8245,7 +8217,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 107 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 106 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8373,7 +8345,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 108 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 107 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8457,79 +8429,42 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 109 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/set/Set#values (; 110 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 108 ;) (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.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $1 + local.set $3 i32.const 16 i32.const 22 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $1 + local.get $3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 local.get $1 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $1 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 4 i32.shl i32.add @@ -8540,26 +8475,59 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.get $6 local.get $5 f64.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 + local.get $1 ) - (func $~lib/array/Array#__get (; 111 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -8580,7 +8548,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 112 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 110 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -8641,7 +8609,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 113 ;) + (func $std/set/testNumeric (; 111 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -8943,7 +8911,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 114 ;) + (func $~start (; 112 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -8955,7 +8923,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 115 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 113 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9050,7 +9018,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 116 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 114 ;) (param $0 i32) local.get $0 i32.const 444 i32.lt_u diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index deb88eaed6..b16f11b7f6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -92,52 +92,7 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 - i32.const 16 - i32.sub - local.tee $2 - local.get $4 - i32.store - local.get $2 - i32.const 1 - i32.store offset=4 - local.get $2 - local.get $1 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - ) - (func $~lib/memory/memory.copy (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -310,11 +265,13 @@ end end ) - (func $~lib/rt/stub/__realloc (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__realloc (; 4 ;) (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.get $0 i32.const 15 i32.and @@ -334,10 +291,10 @@ local.get $0 i32.const 16 i32.sub - local.tee $3 + local.tee $4 i32.load - local.set $4 - local.get $3 + local.set $2 + local.get $4 i32.load offset=4 i32.const 1 i32.ne @@ -351,7 +308,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $4 + local.get $2 i32.add i32.eq local.set $5 @@ -360,9 +317,9 @@ i32.add i32.const -16 i32.and - local.set $2 + local.set $3 local.get $1 - local.get $4 + local.get $2 i32.gt_u if local.get $5 @@ -374,54 +331,93 @@ unreachable end local.get $0 - local.get $2 + local.get $3 i32.add call $~lib/rt/stub/maybeGrowMemory + local.get $4 local.get $3 - local.get $2 i32.store else - local.get $2 local.get $4 + i32.load offset=8 + local.set $6 + local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $4 + local.tee $2 + local.get $3 local.get $2 - local.get $4 i32.gt_u select + local.tee $5 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $5 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $7 + i32.add + call $~lib/rt/stub/maybeGrowMemory local.get $3 - i32.load offset=8 - call $~lib/rt/stub/__alloc + i32.const 16 + i32.sub local.tee $2 - local.get $0 + local.get $7 + i32.store + local.get $2 + i32.const 1 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $5 + i32.store offset=12 local.get $3 + local.get $0 + local.get $4 i32.load offset=12 call $~lib/memory/memory.copy - local.get $2 + local.get $3 local.tee $0 i32.const 16 i32.sub - local.set $3 + local.set $4 end else local.get $5 if local.get $0 - local.get $2 + local.get $3 i32.add global.set $~lib/rt/stub/offset + local.get $4 local.get $3 - local.get $2 i32.store end end - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 5 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -632,7 +628,7 @@ end end ) - (func $~lib/array/ensureSize (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -688,7 +684,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i64) local.get $0 i32.const 140 i32.load @@ -709,7 +705,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result f32) local.get $0 i32.const 204 i32.load @@ -730,7 +726,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 10 ;) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f64) local.get $0 i32.const 268 i32.load @@ -751,7 +747,7 @@ i32.add f64.load ) - (func $start:std/static-array (; 11 ;) + (func $start:std/static-array (; 10 ;) i32.const 76 i32.load i32.const 2 @@ -1013,7 +1009,7 @@ unreachable end ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) call $start:std/static-array ) ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index e3ea27b810..98b2f92428 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -4,10 +4,10 @@ (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 $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result 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))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -1293,48 +1293,9 @@ end local.get $1 ) - (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 432 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 432 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 20 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 464 i32.gt_u @@ -1342,10 +1303,54 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 432 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 432 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) + (func $std/staticarray/test (; 20 ;) (result i32) + i32.const 12 + i32.const 3 + i32.const 288 + call $~lib/rt/__allocBuffer + call $~lib/rt/pure/__retain + ) (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) local.get $0 i32.const 464 @@ -1442,11 +1447,7 @@ call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 3 - i32.const 288 - call $~lib/rt/__allocBuffer - call $~lib/rt/pure/__retain + call $std/staticarray/test global.set $std/staticarray/arr3 global.get $std/staticarray/arr3 i32.const 0 @@ -1515,11 +1516,7 @@ call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 3 - i32.const 288 - call $~lib/rt/__allocBuffer - call $~lib/rt/pure/__retain + call $std/staticarray/test global.get $std/staticarray/arr3 call $~lib/rt/pure/__release global.set $std/staticarray/arr3 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 86aaa8ae44..d7e05774d6 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (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_i32_=>_none (func (param i32 i32 i32))) @@ -305,48 +305,9 @@ i32.const 1 i32.shr_u ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 48 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 48 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 17376 i32.gt_u @@ -354,11 +315,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 48 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -524,7 +522,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -807,7 +805,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -921,7 +919,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1008,7 +1006,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1032,7 +1030,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1163,7 +1161,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1225,7 +1223,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1301,7 +1299,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1383,7 +1381,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 20 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 1 @@ -1391,7 +1389,7 @@ i32.const 16 i32.add ) - (func $~lib/util/casemap/casemap (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1542,49 +1540,7 @@ i32.and i32.add ) - (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1757,7 +1713,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1770,7 +1726,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1873,16 +1829,55 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 - call $~lib/rt/tlsf/checkUsedBlock + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 28 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2189,7 +2184,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 29 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 27 ;) (param $0 i32) local.get $0 i32.const 17376 i32.gt_u @@ -2200,7 +2195,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/string/compareImpl (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2276,7 +2271,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 29 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2310,7 +2305,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2335,7 +2330,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 33 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2816,7 +2811,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 34 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 32 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2866,7 +2861,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 33 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2925,7 +2920,7 @@ i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 36 ;) + (func $start:std/string-casemapping (; 34 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -4558,7 +4553,7 @@ local.get $94 call $~lib/rt/pure/__release ) - (func $~start (; 37 ;) + (func $~start (; 35 ;) global.get $~started if return @@ -4568,7 +4563,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 36 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index fd939998b9..938d11be48 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,9 +1,9 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (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_=>_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))) @@ -35,48 +35,9 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 21052 i32.gt_u @@ -84,11 +45,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 64 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) local.get $0 i32.const 21052 i32.gt_u @@ -99,7 +97,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -265,7 +263,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -548,7 +546,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -662,7 +660,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -749,7 +747,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -773,7 +771,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -904,7 +902,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -966,7 +964,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1042,7 +1040,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1124,7 +1122,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1132,7 +1130,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1305,7 +1303,7 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 20 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 19 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1322,7 +1320,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 21 ;) + (func $std/string-encoding/testUTF16Encode (; 20 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1485,7 +1483,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const -2 @@ -1500,7 +1498,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.decode (; 22 ;) (param $0 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -1508,7 +1506,7 @@ i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe ) - (func $~lib/string/String#get:length (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 23 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1516,7 +1514,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1592,7 +1590,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 25 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1626,7 +1624,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 27 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 26 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1771,7 +1769,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF8.byteLength (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1862,7 +1860,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2072,7 +2070,7 @@ local.get $4 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 30 ;) + (func $std/string-encoding/testUTF8Encode (; 29 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2216,7 +2214,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 31 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 30 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2370,49 +2368,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2425,7 +2381,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2528,7 +2484,55 @@ end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) + (func $~lib/string/String.UTF8.decodeUnsafe (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2711,18 +2715,14 @@ end end end - call $~lib/rt/tlsf/maybeInitialize local.get $6 - call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $6 i32.sub - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add + call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF8.decode (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.decode (; 35 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -2731,7 +2731,7 @@ local.get $1 call $~lib/string/String.UTF8.decodeUnsafe ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 37 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2845,7 +2845,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 38 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3042,7 +3042,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testLarge (; 39 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3090,7 +3090,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/string-encoding (; 40 ;) + (func $start:std/string-encoding (; 39 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3184,10 +3184,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 41 ;) + (func $~start (; 40 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 42 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 41 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4ac075b3f8..dd5bf6c909 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -386,48 +386,9 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 17000 i32.gt_u @@ -435,11 +396,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) local.get $0 i32.const 17000 i32.gt_u @@ -450,7 +448,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 8 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -458,7 +456,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 local.get $1 @@ -538,7 +536,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -573,7 +571,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__not (; 12 ;) (param $0 i32) (result i32) + (func $~lib/string/String.__not (; 11 ;) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -583,7 +581,7 @@ i32.const 1 end ) - (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -749,7 +747,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1032,7 +1030,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -1146,7 +1144,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1233,7 +1231,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1257,7 +1255,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1388,7 +1386,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 19 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1450,7 +1448,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1526,7 +1524,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1608,7 +1606,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1616,7 +1614,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String.fromCharCode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 2 @@ -1639,7 +1637,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 23 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1658,11 +1656,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~setArgumentsLength (; 24 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 25 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1713,7 +1711,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 27 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1759,7 +1757,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String#indexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1819,7 +1817,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1992,7 +1990,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2017,7 +2015,7 @@ end end ) - (func $~lib/string/String#padStart (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2098,7 +2096,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2180,7 +2178,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2240,7 +2238,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 33 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2278,7 +2276,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 35 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 34 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2342,7 +2340,7 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 36 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 35 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2400,7 +2398,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 37 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2454,7 +2452,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 38 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2541,7 +2539,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 39 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 38 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2758,7 +2756,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 40 ;) (result i32) + (func $~lib/util/string/strtol (; 39 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2976,7 +2974,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 41 ;) (result i64) + (func $~lib/util/string/strtol (; 40 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3196,7 +3194,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 42 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 41 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3230,7 +3228,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 43 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 42 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3307,7 +3305,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 44 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 43 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -4055,7 +4053,7 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4114,7 +4112,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 640 local.get $0 @@ -4122,7 +4120,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__gt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 46 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4169,7 +4167,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4216,7 +4214,7 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 48 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4275,7 +4273,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4372,7 +4370,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 51 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 50 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4414,7 +4412,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 51 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -4427,7 +4425,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4530,7 +4528,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 53 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -4539,7 +4537,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#replaceAll (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4832,7 +4830,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 call $~lib/string/String#get:length @@ -4906,7 +4904,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -4963,7 +4961,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5042,7 +5040,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 59 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 58 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5070,7 +5068,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5281,7 +5279,7 @@ end end ) - (func $~lib/array/ensureSize (; 61 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5335,7 +5333,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 61 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5359,7 +5357,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5571,7 +5569,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5606,7 +5604,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 65 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 64 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5654,7 +5652,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5678,7 +5676,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 67 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 66 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5720,7 +5718,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 68 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 67 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5743,7 +5741,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 69 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 68 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -5796,7 +5794,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 69 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -5823,7 +5821,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 71 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 70 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5866,7 +5864,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 72 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 71 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5930,7 +5928,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 73 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 72 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6320,7 +6318,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6565,7 +6563,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 75 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 74 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -6874,7 +6872,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 76 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 75 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6929,7 +6927,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 77 ;) + (func $start:std/string (; 76 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14450,11 +14448,11 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 78 ;) (result i32) + (func $std/string/getString (; 77 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 79 ;) + (func $~start (; 78 ;) global.get $~started if return @@ -14464,7 +14462,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 80 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 79 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14584,7 +14582,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 81 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 80 ;) (param $0 i32) local.get $0 i32.const 17000 i32.lt_u diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index c858d7e0c5..0a25108c6a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,11 +1,11 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -66,20 +66,46 @@ end local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -87,16 +113,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -105,42 +131,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -151,9 +148,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 4 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -364,7 +361,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -385,7 +382,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -418,7 +415,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/string/String#get:length (; 7 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -426,7 +423,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 8 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -466,7 +463,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -542,7 +539,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -574,7 +571,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 10 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -615,7 +612,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -728,7 +725,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -815,7 +812,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 14 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -846,7 +843,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -887,7 +884,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1000,7 +997,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1094,7 +1091,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 18 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 17 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1191,7 +1188,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1200,7 +1197,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1219,7 +1216,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 20 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString @@ -1236,7 +1233,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1409,55 +1406,54 @@ end end ) - (func $~lib/string/String#concat (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - i32.const 832 - local.get $1 - select - local.tee $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if - i32.const 336 - return + block $__inlined_func$~lib/string/String#concat + local.get $0 + i32.const 832 + local.get $0 + select + local.tee $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $2 + local.get $1 + i32.const 832 + local.get $1 + select + local.tee $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add + local.tee $0 + i32.eqz + if + i32.const 336 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $3 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy end - local.get $2 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $2 - ) - (func $~lib/string/String.__concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 832 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 25 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 23 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1533,7 +1529,7 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 26 ;) + (func $start:std/symbol (; 24 ;) (local $0 i32) call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -1702,7 +1698,7 @@ unreachable end ) - (func $~start (; 27 ;) + (func $~start (; 25 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index dbe2b911a4..0333e0501f 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -3,15 +3,14 @@ (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_=>_none (func (param 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 $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 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))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) @@ -20,8 +19,7 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i32_=>_f32 (func (param i32) (result f32))) - (type $i32_=>_f64 (func (param i32) (result f64))) + (type $i64_=>_i32 (func (param i64) (result 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_f64_=>_none (func (param i32 i32 f64))) @@ -1467,48 +1465,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1516,11 +1475,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1531,7 +1527,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1600,7 +1596,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 22 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 21 ;) (param $0 i32) (result i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1609,6 +1605,13 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 22 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) (func $~lib/typedarray/Uint8Array#constructor (; 23 ;) (param $0 i32) (result i32) i32.const 12 i32.const 4 @@ -1714,10 +1717,7 @@ local.get $0 call $~lib/typedarray/Int8Array#constructor local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1753,10 +1753,7 @@ local.get $0 call $~lib/typedarray/Uint8Array#constructor local.tee $2 - i32.load offset=4 - local.get $2 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1792,10 +1789,7 @@ local.get $0 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 - i32.load offset=4 - local.get $3 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1831,10 +1825,7 @@ local.get $0 call $~lib/typedarray/Int16Array#constructor local.tee $4 - i32.load offset=4 - local.get $4 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1874,10 +1865,7 @@ local.get $0 call $~lib/typedarray/Uint16Array#constructor local.tee $5 - i32.load offset=4 - local.get $5 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1917,10 +1905,7 @@ local.get $0 call $~lib/typedarray/Int32Array#constructor local.tee $6 - i32.load offset=4 - local.get $6 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -1960,10 +1945,7 @@ local.get $0 call $~lib/typedarray/Uint32Array#constructor local.tee $7 - i32.load offset=4 - local.get $7 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -2003,10 +1985,7 @@ local.get $0 call $~lib/typedarray/Int64Array#constructor local.tee $8 - i32.load offset=4 - local.get $8 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -2046,10 +2025,7 @@ local.get $0 call $~lib/typedarray/Uint64Array#constructor local.tee $9 - i32.load offset=4 - local.get $9 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -2089,10 +2065,7 @@ local.get $0 call $~lib/typedarray/Float32Array#constructor local.tee $10 - i32.load offset=4 - local.get $10 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -2132,10 +2105,7 @@ local.get $0 call $~lib/typedarray/Float64Array#constructor local.tee $11 - i32.load offset=4 - local.get $11 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -3313,7 +3283,14 @@ i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s + ) + (func $std/typedarray/isInt8ArrayEqual (; 55 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3337,6 +3314,7 @@ local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get + local.set $4 local.get $2 local.get $1 i32.load offset=12 @@ -3349,11 +3327,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $1 - i32.load offset=4 - i32.add - i32.load8_s + local.get $2 + call $~lib/array/Array#__unchecked_get + local.get $4 i32.ne if i32.const 0 @@ -3368,7 +3345,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3446,7 +3423,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3527,7 +3504,7 @@ end local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3536,7 +3513,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3553,7 +3530,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 60 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3597,7 +3574,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3676,7 +3653,7 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3784,75 +3761,11 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 63 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $3 - 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.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $1 - local.get $4 - i32.add - i32.load8_s - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8Array#__set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 @@ -3910,79 +3823,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 66 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 67 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4006,79 +3847,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 69 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 70 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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#reduce - i32.const 65535 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4102,79 +3871,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 72 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 73 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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#reduce - i32.const 65535 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array#reduce (; 74 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 68 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4215,41 +3912,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 75 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#__set (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4273,41 +3936,7 @@ local.get $2 i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 77 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#__set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4331,12 +3960,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 79 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 71 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 80 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 72 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4377,41 +4006,7 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 81 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#__set (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4435,41 +4030,7 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 83 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 323 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#__set (; 84 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4493,713 +4054,407 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 85 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 75 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 86 ;) (param $0 i32) (result f32) - (local $1 i32) - (local $2 f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 76 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + local.get $0 + local.get $1 + f64.add + ) + (func $~lib/typedarray/Uint8Array#reduceRight (; 77 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 - local.set $3 + local.set $4 local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 + i32.const 1 + i32.sub + local.set $2 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s + local.get $2 + i32.const 0 + i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 - local.get $1 - i32.const 2 - i32.shl + local.get $2 + local.get $4 i32.add - f32.load - f32.add - local.set $2 + i32.load8_u + local.get $2 + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $2 i32.const 1 - i32.add - local.set $1 + i32.sub + local.set $2 br $for-loop|0 end end - local.get $2 - ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 87 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) - local.get $0 - local.get $1 - f64.add + local.get $3 ) - (func $~lib/typedarray/Float64Array#reduce (; 88 ;) (param $0 i32) (result f64) - (local $1 i32) - (local $2 f64) + (func $~lib/typedarray/Int32Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 - local.set $3 + local.set $4 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.set $0 + i32.const 1 + i32.sub + local.set $2 loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s + local.get $2 + i32.const 0 + i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $2 local.get $3 - local.get $1 - i32.const 3 + local.get $4 + local.get $2 + i32.const 2 i32.shl i32.add - f64.load - f64.add - local.set $2 + i32.load + local.get $2 + local.get $0 local.get $1 + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $2 i32.const 1 - i32.add - local.set $1 + i32.sub + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 89 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#reduceRight (; 79 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) - (local $3 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - 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 $3 i64) + (local $4 i32) local.get $0 i32.load offset=4 - local.set $3 + local.set $4 local.get $0 i32.load offset=8 + i32.const 3 + i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $2 loop $for-loop|0 - local.get $0 + local.get $2 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $0 local.get $3 + local.get $4 + local.get $2 + i32.const 3 + i32.shl i32.add - i32.load8_s - i32.add - local.set $1 + i64.load + local.get $2 local.get $0 + local.get $1 + call_indirect (type $i64_i64_i32_i32_=>_i64) + local.set $3 + local.get $2 i32.const 1 i32.sub - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release + local.get $3 + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $0 + i32.mul ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 90 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 81 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $4 + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 1 - i32.sub local.set $2 + local.get $0 + i32.load offset=4 + local.set $4 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.set $0 + local.get $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 loop $for-loop|0 + local.get $1 local.get $2 - i32.const 0 - i32.ge_s + i32.lt_s if - i32.const 4 + i32.const 3 global.set $~argumentsLength + local.get $1 local.get $3 - local.get $2 + i32.add + local.get $1 local.get $4 i32.add - i32.load8_u - local.get $2 - local.get $0 + i32.load8_s + local.tee $5 + local.get $5 + i32.mul + i32.store8 local.get $1 - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $2 i32.const 1 - i32.sub - local.set $2 + i32.add + local.set $1 br $for-loop|0 end end + local.get $0 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $0 local.get $3 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 91 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 82 ;) (local $0 i32) (local $1 i32) i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.const 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 + call $~lib/typedarray/Int8Array#map + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 365 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 92 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 + call $~lib/typedarray/Int8Array#__get + i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 366 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#reduceRight (; 93 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 94 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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#reduceRight - i32.const 65535 - i32.and - i32.const 6 + call $~lib/typedarray/Int8Array#__get + i32.const 9 i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 367 i32.const 2 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 95 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 96 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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#reduceRight - i32.const 65535 - i32.and - i32.const 6 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reduceRight (; 97 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 83 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $4 + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub local.set $2 + local.get $0 + i32.load offset=4 + local.set $4 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.set $0 + local.get $2 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 loop $for-loop|0 + local.get $1 local.get $2 - i32.const 0 - i32.ge_s + i32.lt_s if - i32.const 4 + i32.const 3 global.set $~argumentsLength + local.get $1 local.get $3 + i32.add + local.get $1 local.get $4 - local.get $2 - i32.const 2 - i32.shl i32.add - i32.load - local.get $2 - local.get $0 + i32.load8_u + local.tee $5 + local.get $5 + i32.mul + i32.store8 local.get $1 - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $2 i32.const 1 - i32.sub - local.set $2 + i32.add + local.set $1 br $for-loop|0 end end + local.get $0 local.get $3 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 98 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + call $~lib/rt/pure/__retain + i32.store local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set + local.get $3 + i32.store offset=4 local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set + local.get $2 + i32.store offset=8 local.get $0 - i32.const 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint8Array#__get (; 84 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 344 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 152 + i32.const 44 call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/rt/pure/__release + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 99 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 85 ;) (local $0 i32) (local $1 i32) i32.const 3 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 + call $~lib/typedarray/Uint8Array#map + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 365 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#reduceRight (; 100 ;) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i64) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $2 - loop $for-loop|0 - local.get $2 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i64_i32_i32_=>_i64) - local.set $3 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $for-loop|0 - end - end - local.get $3 - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 101 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 366 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 102 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne if i32.const 0 i32.const 304 - i32.const 344 + i32.const 367 i32.const 2 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#reduceRight (; 103 ;) (param $0 i32) (result f32) - (local $1 f32) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $~lib/typedarray/Float64Array#reduceRight (; 104 ;) (param $0 i32) (result f64) - (local $1 f64) - (local $2 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|0 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 local.get $0 - i32.mul + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#map (; 106 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 86 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5212,7 +4467,7 @@ i32.load offset=4 local.set $4 i32.const 12 - i32.const 3 + i32.const 5 call $~lib/rt/tlsf/__alloc local.set $0 local.get $2 @@ -5232,7 +4487,7 @@ local.get $1 local.get $4 i32.add - i32.load8_s + i32.load8_u local.tee $5 local.get $5 i32.mul @@ -5257,29 +4512,29 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 107 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 87 ;) (local $0 i32) (local $1 i32) i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - call $~lib/typedarray/Int8Array#map + call $~lib/typedarray/Uint8ClampedArray#map local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.ne if @@ -5292,7 +4547,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if @@ -5305,7 +4560,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.ne if @@ -5321,106 +4576,122 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#map (; 108 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 88 ;) (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.get $0 i32.load offset=8 - local.set $2 + i32.const 1 + i32.shr_u + local.set $4 local.get $0 i32.load offset=4 - local.set $4 + local.set $5 i32.const 12 - i32.const 4 + i32.const 6 call $~lib/rt/tlsf/__alloc local.set $0 - local.get $2 + local.get $4 + i32.const 1 + i32.shl + local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $1 loop $for-loop|0 - local.get $1 local.get $2 + local.get $4 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - local.tee $5 local.get $5 + local.get $2 + i32.const 1 + i32.shl + local.tee $7 + i32.add + i32.load16_s + local.tee $3 + local.get $3 i32.mul - i32.store8 + local.set $3 local.get $1 + local.get $7 + i32.add + local.get $3 + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $1 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $1 i32.store offset=4 local.get $0 - local.get $2 + local.get $6 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 89 ;) (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 368 i32.const 432 - i32.const 152 - i32.const 44 + i32.const 408 + i32.const 63 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_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 110 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 90 ;) (local $0 i32) (local $1 i32) i32.const 3 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $1 local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Uint8Array#map + call $~lib/typedarray/Int16Array#map local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 1 i32.ne if @@ -5433,7 +4704,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if @@ -5446,7 +4717,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 9 i32.ne if @@ -5462,303 +4733,24 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 111 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 91 ;) (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.get $0 i32.load offset=8 - local.set $2 + i32.const 1 + i32.shr_u + local.set $4 local.get $0 i32.load offset=4 - local.set $4 + local.set $5 i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $2 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 - local.get $4 - i32.add - i32.load8_u - local.tee $5 - local.get $5 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $3 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 112 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 365 - i32.const 2 - 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 304 - i32.const 366 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 367 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#map (; 113 ;) (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.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $4 - i32.const 1 - i32.shl - local.tee $6 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $1 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 1 - i32.shl - local.tee $7 - i32.add - i32.load16_s - local.tee $3 - local.get $3 - i32.mul - local.set $3 - local.get $1 - local.get $7 - i32.add - local.get $3 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $1 - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Int16Array#__get (; 114 ;) (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 368 - i32.const 432 - i32.const 408 - i32.const 63 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 115 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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 $0 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 365 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 366 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 367 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#map (; 116 ;) (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.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 12 - i32.const 7 + i32.const 7 call $~lib/rt/tlsf/__alloc local.set $0 local.get $4 @@ -5811,7 +4803,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 117 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 92 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5834,7 +4826,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 118 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 93 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5898,7 +4890,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#map (; 119 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 94 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5968,7 +4960,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 120 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 95 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6032,7 +5024,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#map (; 121 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 96 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6102,7 +5094,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 122 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -6125,7 +5117,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 123 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 98 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6189,12 +5181,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 124 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 99 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 125 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6264,7 +5256,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 126 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6287,7 +5279,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 127 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 102 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6351,7 +5343,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#map (; 128 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -6421,7 +5413,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 129 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 104 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -6444,7 +5436,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 130 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 105 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6508,12 +5500,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 131 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 106 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 132 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 107 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -6583,7 +5575,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 133 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -6606,7 +5598,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 134 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 109 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6670,12 +5662,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 135 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 110 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 136 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 111 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -6745,7 +5737,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 137 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 112 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -6809,7 +5801,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 138 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 113 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -6818,7 +5810,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6921,7 +5913,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 140 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 115 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -6930,7 +5922,7 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (; 141 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#filter (; 116 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7004,7 +5996,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 142 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 117 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7032,10 +6024,7 @@ local.get $0 call $~lib/typedarray/Int8Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -7100,14 +6089,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 144 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 119 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7115,6 +6104,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 local.set $4 @@ -7142,16 +6132,17 @@ i32.const 3 global.set $~argumentsLength local.get $6 - i32.const 2 - i32.gt_u + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $3 - local.tee $0 + local.tee $8 i32.const 1 i32.add local.set $3 - local.get $0 local.get $5 + local.get $8 i32.add local.get $6 i32.store8 @@ -7179,7 +6170,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 145 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 120 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7207,10 +6198,7 @@ local.get $0 call $~lib/typedarray/Uint8Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -7275,7 +6263,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 146 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 121 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7283,6 +6271,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 local.set $4 @@ -7310,16 +6299,17 @@ i32.const 3 global.set $~argumentsLength local.get $6 - i32.const 2 - i32.gt_u + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $3 - local.tee $0 + local.tee $8 i32.const 1 i32.add local.set $3 - local.get $0 local.get $5 + local.get $8 i32.add local.get $6 i32.store8 @@ -7347,7 +6337,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 147 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 122 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7375,10 +6365,7 @@ local.get $0 call $~lib/typedarray/Uint8ClampedArray#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -7443,7 +6430,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 123 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7452,7 +6439,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 149 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 124 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7537,7 +6524,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 150 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 125 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7565,10 +6552,7 @@ local.get $0 call $~lib/typedarray/Int16Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -7635,14 +6619,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 152 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 127 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7650,6 +6634,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 i32.const 1 @@ -7669,12 +6654,12 @@ i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $3 + local.get $2 local.get $4 i32.lt_s if local.get $7 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add @@ -7683,49 +6668,50 @@ i32.const 3 global.set $~argumentsLength local.get $6 - i32.const 2 - i32.gt_u + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 if - local.get $2 - local.tee $0 + local.get $3 + local.tee $8 i32.const 1 i32.add - local.set $2 + local.set $3 local.get $5 - local.get $0 + local.get $8 i32.const 1 i32.shl i32.add local.get $6 i32.store16 end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end local.get $1 local.get $5 - local.get $2 + local.get $3 i32.const 1 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $3 call $~lib/rt/pure/__retain i32.store local.get $1 local.get $0 i32.store offset=8 local.get $1 - local.get $2 + local.get $3 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 153 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 128 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7753,10 +6739,7 @@ local.get $0 call $~lib/typedarray/Uint16Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -7823,12 +6806,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 129 ;) (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 (; 155 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 130 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7911,7 +6894,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 156 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 131 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7939,10 +6922,7 @@ local.get $0 call $~lib/typedarray/Int32Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8009,12 +6989,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 158 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 133 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8097,7 +7077,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 159 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 134 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -8125,10 +7105,7 @@ local.get $0 call $~lib/typedarray/Uint32Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8195,12 +7172,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 160 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 135 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 161 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 136 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8283,7 +7260,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 162 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 137 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -8311,10 +7288,7 @@ local.get $0 call $~lib/typedarray/Int64Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8381,12 +7355,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 163 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 138 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 164 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 139 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8469,7 +7443,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 165 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 140 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -8497,10 +7471,7 @@ local.get $0 call $~lib/typedarray/Uint64Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8567,12 +7538,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 166 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 141 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 167 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 142 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8655,7 +7626,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 168 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 143 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -8683,10 +7654,7 @@ local.get $0 call $~lib/typedarray/Float32Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8753,12 +7721,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 169 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 144 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 170 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 145 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8841,7 +7809,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 171 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 146 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -8869,10 +7837,7 @@ local.get $0 call $~lib/typedarray/Float64Array#filter local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -8939,14 +7904,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 173 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8985,13 +7950,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 175 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 150 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9035,7 +8000,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#some (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 151 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9074,7 +8039,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 177 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 152 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9118,7 +8083,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 178 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 153 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9162,14 +8127,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 180 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9212,13 +8177,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 181 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 182 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 157 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9262,7 +8227,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#some (; 183 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9305,7 +8270,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 184 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 159 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9349,12 +8314,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 185 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9397,11 +8362,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 187 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 188 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 163 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9445,7 +8410,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 189 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 164 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9489,12 +8454,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 190 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 165 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 191 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 166 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9537,11 +8502,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 192 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 167 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 193 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 168 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9585,7 +8550,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 194 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 169 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9629,12 +8594,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 195 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 170 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 196 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9677,12 +8642,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 197 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 172 ;) (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/Float32Array,f32> (; 198 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 173 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9726,12 +8691,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 199 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 174 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 200 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 175 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9774,12 +8739,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 176 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 202 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 177 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9823,7 +8788,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#findIndex (; 203 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 178 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9862,14 +8827,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 204 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 205 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 180 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9916,7 +8881,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#findIndex (; 206 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 181 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9955,7 +8920,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 207 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 182 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10002,7 +8967,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 208 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 183 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10049,7 +9014,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#findIndex (; 209 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 184 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10092,14 +9057,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 210 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 185 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 211 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 186 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10146,7 +9111,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#findIndex (; 212 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 187 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10189,7 +9154,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 213 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 188 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10236,7 +9201,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#findIndex (; 214 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 189 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10279,12 +9244,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 190 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 216 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 191 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10331,7 +9296,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 217 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 192 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10378,7 +9343,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#findIndex (; 218 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 193 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10421,12 +9386,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 219 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 194 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 220 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 195 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10473,7 +9438,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 221 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 196 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10520,7 +9485,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#findIndex (; 222 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 197 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10563,12 +9528,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 223 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 198 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 224 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 199 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10615,7 +9580,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#findIndex (; 225 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 200 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10658,12 +9623,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 226 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 227 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 202 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10710,7 +9675,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 228 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 203 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10720,7 +9685,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 229 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10760,7 +9725,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 230 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 205 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10804,13 +9769,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 206 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 232 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 207 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10850,7 +9815,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 233 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 208 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10894,7 +9859,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 234 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10938,7 +9903,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 235 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 210 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -10948,7 +9913,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 236 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 211 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10992,7 +9957,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 237 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 212 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11036,7 +10001,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#every (; 238 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 213 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11080,7 +10045,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 239 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 214 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11124,13 +10089,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 240 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 241 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 216 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11174,7 +10139,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 242 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 217 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11218,7 +10183,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 243 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 218 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11262,13 +10227,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 244 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 219 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 245 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 220 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11312,7 +10277,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 246 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 221 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11356,13 +10321,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 247 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 222 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 248 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 223 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11406,7 +10371,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/math/NativeMathf.mod (; 249 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 224 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11553,13 +10518,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 250 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 225 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 251 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 226 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11603,7 +10568,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 252 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 227 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11647,7 +10612,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/math/NativeMath.mod (; 253 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 228 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -11801,13 +10766,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 254 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 229 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 255 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 230 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11851,7 +10816,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 256 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 231 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -11895,7 +10860,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 232 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -11940,7 +10905,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 258 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 233 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12024,7 +10989,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#forEach (; 259 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 234 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12057,7 +11022,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 260 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 235 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12108,7 +11073,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 261 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12159,7 +11124,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 262 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -12204,50 +11169,17 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 263 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 238 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 264 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $1 + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12281,46 +11213,26 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int16Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#forEach (; 265 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 i32.load offset=4 - local.set $2 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 + local.set $4 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl i32.add - i32.load16_u + i32.load16_s local.get $1 local.get $0 call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 @@ -12331,15 +11243,31 @@ br $for-loop|0 end end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 495 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 266 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 239 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $1 + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12367,7 +11295,36 @@ i32.and call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12379,10 +11336,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 267 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 240 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -12423,7 +11380,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 268 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 241 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12460,7 +11417,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 269 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 242 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12505,7 +11462,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 270 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 243 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12550,7 +11507,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 271 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 244 ;) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12592,7 +11549,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 272 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 245 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12629,7 +11586,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 273 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 246 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12677,7 +11634,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 274 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 247 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -12725,7 +11682,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 275 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 248 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12767,50 +11724,17 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 276 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 249 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 277 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12835,7 +11759,36 @@ f32.convert_i32_s call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12847,10 +11800,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 278 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 250 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -12892,50 +11845,17 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 279 ;) (param $0 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 251 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $3 - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 280 ;) - (local $0 i32) - (local $1 i32) + (local $4 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $2 local.tee $0 global.set $std/typedarray/forEachSelf local.get $0 @@ -12960,7 +11880,36 @@ f64.convert_i32_s call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Float64Array#forEach + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne @@ -12972,10 +11921,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (; 281 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 252 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13027,7 +11976,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 282 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 253 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13183,7 +12132,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 283 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 254 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13235,7 +12184,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 284 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13296,7 +12245,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 285 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 256 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13445,7 +12394,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 286 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 257 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13506,7 +12455,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 287 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 258 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13655,7 +12604,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 288 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 259 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13713,7 +12662,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 289 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 260 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13780,7 +12729,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 290 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 261 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13935,7 +12884,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 291 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 262 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13993,7 +12942,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 292 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 263 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14060,7 +13009,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 293 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 264 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14209,7 +13158,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 294 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 265 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14267,7 +13216,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 295 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 266 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14411,7 +13360,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 296 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 267 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14478,7 +13427,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 297 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 268 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14621,7 +13570,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 298 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 269 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14679,7 +13628,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 299 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 270 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14746,7 +13695,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 300 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 271 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14892,7 +13841,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 301 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 272 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14959,7 +13908,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 302 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 273 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15105,7 +14054,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 303 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 274 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15163,7 +14112,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 304 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 275 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -15230,7 +14179,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 305 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 276 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15376,7 +14325,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (; 306 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 277 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15434,7 +14383,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 307 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 278 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15581,7 +14530,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (; 308 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15643,7 +14592,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 309 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 280 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -15700,7 +14649,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 310 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 281 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15721,7 +14670,7 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 311 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 282 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16141,7 +15090,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 312 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 283 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16558,7 +15507,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 313 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 284 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16975,7 +15924,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 314 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -17041,7 +15990,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 286 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -17102,7 +16051,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 316 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 287 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -17125,7 +16074,7 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 317 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 288 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17544,7 +16493,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 318 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 289 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17961,7 +16910,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 319 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 290 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -18025,7 +16974,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 320 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -18084,7 +17033,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 321 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 292 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -18107,7 +17056,7 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 322 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18523,7 +17472,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 323 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 294 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18938,7 +17887,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 324 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 295 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -19002,7 +17951,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 325 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 296 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -19061,7 +18010,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 326 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 297 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19084,7 +18033,7 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 327 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 298 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19500,7 +18449,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 328 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 299 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19916,7 +18865,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 329 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 300 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -19980,7 +18929,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 330 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 301 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -20039,7 +18988,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 331 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 302 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20062,7 +19011,7 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 332 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 303 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20478,7 +19427,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 333 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 304 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -20542,7 +19491,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 334 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 305 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -20601,7 +19550,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 335 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 306 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -20624,7 +19573,7 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 336 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 307 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21041,7 +19990,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#includes (; 337 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#includes (; 308 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -21098,7 +20047,7 @@ i32.const 0 end ) - (func $~lib/typedarray/Float32Array#includes (; 338 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#includes (; 309 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -21155,7 +20104,7 @@ i32.const 0 end ) - (func $~lib/util/number/decimalCount32 (; 339 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 310 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -21203,7 +20152,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 340 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 311 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -21227,7 +20176,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 341 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 312 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21269,7 +20218,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#get:length (; 342 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 313 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -21277,7 +20226,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/number/itoa_stream (; 343 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 314 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -21332,7 +20281,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 344 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 315 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21406,7 +20355,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 345 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 316 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21509,7 +20458,14 @@ end local.get $2 ) - (func $~lib/util/string/compareImpl (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#join (; 317 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/string/compareImpl (; 318 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -21585,7 +20541,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 347 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 319 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -21619,7 +20575,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 348 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 320 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21627,7 +20583,6 @@ i32.const 5 call $~lib/typedarray/Int8Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21649,12 +20604,8 @@ i32.const 5 call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int8Array#join local.tee $2 - local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21666,13 +20617,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Int8Array#join local.tee $1 - local.set $2 local.get $1 i32.const 2000 call $~lib/string/String.__eq @@ -21685,13 +20631,13 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/utoa32 (; 349 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 321 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -21714,7 +20660,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 350 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 322 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21744,7 +20690,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 351 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 323 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21847,7 +20793,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 352 ;) + (func $~lib/typedarray/Uint8Array#join (; 324 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 325 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21855,7 +20808,6 @@ i32.const 5 call $~lib/typedarray/Uint8Array#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21877,12 +20829,8 @@ i32.const 5 call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint8Array#join local.tee $2 - local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21894,13 +20842,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint8Array#join local.tee $1 - local.set $2 local.get $1 i32.const 2000 call $~lib/string/String.__eq @@ -21913,13 +20856,13 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 353 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 326 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21927,7 +20870,6 @@ i32.const 5 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - local.set $1 local.get $0 i32.const 0 i32.const 1 @@ -21949,12 +20891,8 @@ i32.const 5 call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint8Array#join local.tee $2 - local.get $2 i32.const 2000 call $~lib/string/String.__eq i32.eqz @@ -21966,13 +20904,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray + call $~lib/typedarray/Uint8Array#join local.tee $1 - local.set $2 local.get $1 i32.const 2000 call $~lib/string/String.__eq @@ -21985,13 +20918,13 @@ call $~lib/builtins/abort unreachable end - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 354 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 327 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -22046,7 +20979,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 355 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 328 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22153,7 +21086,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#join (; 356 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (; 329 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22162,7 +21095,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 357 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 330 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22224,7 +21157,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 358 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 331 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22254,7 +21187,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 359 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 332 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22361,7 +21294,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#join (; 360 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (; 333 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22370,7 +21303,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 361 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 334 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22432,7 +21365,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 362 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 335 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22474,7 +21407,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 363 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 336 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22581,7 +21514,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#join (; 364 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#join (; 337 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22590,7 +21523,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 365 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 338 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22652,7 +21585,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 366 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 339 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -22676,7 +21609,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 367 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 340 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22783,7 +21716,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#join (; 368 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#join (; 341 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22792,7 +21725,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 369 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22854,7 +21787,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount64 (; 370 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 343 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -22907,7 +21840,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 371 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 344 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -22934,7 +21867,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa64 (; 372 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 345 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22998,7 +21931,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 373 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -23059,7 +21992,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 374 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 347 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23166,7 +22099,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#join (; 375 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 348 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -23175,7 +22108,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 376 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 349 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23237,50 +22170,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/utoa64 (; 377 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 1936 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 350 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -23320,12 +22210,13 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 379 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 351 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -23341,19 +22232,56 @@ if local.get $0 i64.load - call $~lib/util/number/utoa64 + local.tee $4 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $4 + local.tee $5 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -23363,14 +22291,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -23379,7 +22307,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -23387,23 +22315,23 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 @@ -23427,7 +22355,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#join (; 380 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 352 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -23436,7 +22364,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 381 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 353 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23498,7 +22426,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/genDigits (; 382 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 354 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -23888,7 +22816,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 383 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 355 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -24133,7 +23061,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 384 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 356 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -24442,7 +23370,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 385 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 357 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -24496,7 +23424,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 386 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 358 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -24567,7 +23495,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 387 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 359 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24677,7 +23605,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#join (; 388 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#join (; 360 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -24686,7 +23614,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 389 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 361 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24748,7 +23676,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinFloatArray (; 390 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 362 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -24855,7 +23783,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#join (; 391 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#join (; 363 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -24864,7 +23792,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 392 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 364 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24926,7 +23854,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 393 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 365 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -24949,7 +23877,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap (; 366 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 local.get $0 @@ -25019,7 +23947,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 395 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 367 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -25043,7 +23971,7 @@ local.get $2 call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 396 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 368 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -25113,107 +24041,96 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int8Array.wrap (; 397 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 398 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 369 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 + local.tee $4 call $~lib/typedarray/Int8Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 - local.get $3 + local.get $0 + local.get $4 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 - call $~lib/typedarray/Int8Array.wrap - local.set $4 + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 + local.get $1 + local.get $3 call $~lib/typedarray/Int8Array#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -25224,21 +24141,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 399 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 370 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25250,47 +24167,41 @@ local.tee $3 call $~lib/typedarray/Uint8Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline local.set $4 @@ -25299,7 +24210,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Uint8Array#__get local.get $4 @@ -25323,110 +24234,99 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray.wrap (; 400 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 401 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 371 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 + local.tee $4 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 - local.get $3 + local.get $0 + local.get $4 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 - call $~lib/typedarray/Uint8ClampedArray.wrap - local.set $4 + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 loop $for-loop|1 - local.get $2 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 + local.get $1 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $4 local.get $2 + local.get $3 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -25437,21 +24337,21 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|1 end end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array.wrap (; 402 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array.wrap (; 372 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25496,7 +24396,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 403 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 373 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25508,49 +24408,43 @@ local.tee $3 call $~lib/typedarray/Int16Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Int16Array.wrap local.set $4 loop $for-loop|1 @@ -25558,7 +24452,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Int16Array#__get local.get $4 @@ -25582,12 +24476,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array.wrap (; 404 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array.wrap (; 374 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25632,7 +24526,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 405 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 375 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25644,47 +24538,41 @@ local.tee $3 call $~lib/typedarray/Uint16Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Uint16Array.wrap local.set $4 loop $for-loop|1 @@ -25692,7 +24580,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Uint16Array#__get local.get $4 @@ -25716,12 +24604,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array.wrap (; 406 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array.wrap (; 376 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25766,7 +24654,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 407 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 377 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25778,45 +24666,39 @@ local.tee $3 call $~lib/typedarray/Int32Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Int32Array.wrap local.set $4 loop $for-loop|1 @@ -25824,7 +24706,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Int32Array#__get local.get $4 @@ -25848,12 +24730,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array.wrap (; 408 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array.wrap (; 378 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25898,7 +24780,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 409 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 379 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25910,45 +24792,39 @@ local.tee $3 call $~lib/typedarray/Uint32Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Uint32Array.wrap local.set $4 loop $for-loop|1 @@ -25956,7 +24832,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Uint32Array#__get local.get $4 @@ -25980,12 +24856,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array.wrap (; 410 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array.wrap (; 380 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -26030,7 +24906,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 411 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 381 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26042,46 +24918,40 @@ local.tee $3 call $~lib/typedarray/Int64Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Int64Array.wrap local.set $4 loop $for-loop|1 @@ -26089,7 +24959,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Int64Array#__get local.get $4 @@ -26113,12 +24983,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array.wrap (; 412 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array.wrap (; 382 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -26163,7 +25033,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 413 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 383 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26175,46 +25045,40 @@ local.tee $3 call $~lib/typedarray/Uint64Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Uint64Array.wrap local.set $4 loop $for-loop|1 @@ -26222,7 +25086,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Uint64Array#__get local.get $4 @@ -26246,12 +25110,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array.wrap (; 414 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array.wrap (; 384 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -26296,7 +25160,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 415 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 385 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26308,46 +25172,40 @@ local.tee $3 call $~lib/typedarray/Float32Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Float32Array.wrap local.set $4 loop $for-loop|1 @@ -26355,7 +25213,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Float32Array#__get local.get $4 @@ -26379,12 +25237,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array.wrap (; 416 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array.wrap (; 386 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -26429,7 +25287,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 417 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 387 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26441,46 +25299,40 @@ local.tee $3 call $~lib/typedarray/Float64Array#constructor local.tee $5 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $1 + local.get $0 local.get $3 i32.lt_s if - local.get $0 local.get $1 + local.get $0 i32.const 3296 - local.get $1 + local.get $0 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - 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 $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $0 + local.get $1 i32.load - i32.sub - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/typedarray/Float64Array.wrap local.set $4 loop $for-loop|1 @@ -26488,7 +25340,7 @@ local.get $3 i32.lt_s if - local.get $0 + local.get $1 local.get $2 call $~lib/typedarray/Float64Array#__get local.get $4 @@ -26512,12 +25364,12 @@ end local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 418 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -26568,15 +25420,14 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 419 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 389 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -26590,31 +25441,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Int8Array#__get - local.set $3 - local.get $2 + local.tee $4 local.get $1 - i32.load offset=4 - i32.add - i32.load8_s + local.get $2 + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 3632 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i32_s - local.get $6 + local.get $5 f64.convert_i32_s f64.const 0 f64.const 0 @@ -26634,7 +25480,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 420 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 390 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -26701,7 +25547,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 421 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 391 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -26759,7 +25605,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 422 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -26826,7 +25672,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 423 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 393 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -26848,7 +25694,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 424 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 394 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -26906,7 +25752,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 395 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -26932,7 +25778,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 426 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 396 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27070,15 +25916,21 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 427 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_get (; 397 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 398 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -27092,31 +25944,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint8Array#__get - local.set $3 - local.get $2 + local.tee $4 local.get $1 - i32.load offset=4 - i32.add - i32.load8_u + local.get $2 + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 3840 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i32_u - local.get $6 + local.get $5 f64.convert_i32_u f64.const 0 f64.const 0 @@ -27136,7 +25983,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 428 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 399 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27203,7 +26050,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 429 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 400 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27270,7 +26117,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 430 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 401 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27408,7 +26255,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 431 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 402 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27473,15 +26320,14 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 432 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 403 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -27495,31 +26341,26 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 call $~lib/typedarray/Uint8ClampedArray#__get - local.set $3 - local.get $2 + local.tee $4 local.get $1 - i32.load offset=4 - i32.add - i32.load8_u + local.get $2 + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if i32.const 4048 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 + local.get $4 f64.convert_i32_u - local.get $6 + local.get $5 f64.convert_i32_u f64.const 0 f64.const 0 @@ -27539,7 +26380,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 433 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 404 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27610,7 +26451,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 434 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 405 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -27696,7 +26537,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 435 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 406 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27767,7 +26608,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 436 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 407 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -27849,7 +26690,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 437 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 408 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27916,7 +26757,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 438 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 409 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28056,7 +26897,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 439 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 410 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28111,7 +26952,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 440 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 411 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -28181,7 +27022,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 412 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28252,7 +27093,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 442 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 413 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -28314,7 +27155,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 443 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28385,7 +27226,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 444 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 415 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -28437,7 +27278,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 445 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 416 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -28467,7 +27308,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 446 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 417 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28524,7 +27365,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 447 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 418 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28662,7 +27503,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 448 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 419 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -28732,7 +27573,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 449 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 420 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28803,7 +27644,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 421 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28874,7 +27715,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 451 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 422 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29012,7 +27853,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 452 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -29053,7 +27894,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 453 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 424 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -29115,7 +27956,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 454 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29186,7 +28027,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 455 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 426 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29248,7 +28089,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 456 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29319,7 +28160,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 457 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 428 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29371,7 +28212,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 458 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 429 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29433,7 +28274,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 430 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29490,7 +28331,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 460 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 431 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29630,7 +28471,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 461 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 432 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -29692,7 +28533,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 462 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 433 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29763,7 +28604,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 463 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 434 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29834,7 +28675,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 464 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 435 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29974,7 +28815,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 465 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 436 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30029,7 +28870,7 @@ end end ) - (func $~lib/array/Array#__unchecked_get (; 466 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 437 ;) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -30038,7 +28879,7 @@ i32.add i64.load ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 467 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 438 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -30100,7 +28941,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 468 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 439 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30171,7 +29012,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 469 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 440 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -30201,7 +29042,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 470 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30272,7 +29113,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 471 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 442 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30324,7 +29165,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 472 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 443 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30386,7 +29227,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 473 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 444 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30443,7 +29284,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 474 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 445 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30581,7 +29422,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 475 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 446 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -30643,7 +29484,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 476 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 447 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -30714,7 +29555,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 477 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 448 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -30785,7 +29626,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 478 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 449 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30923,7 +29764,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 479 ;) (param $0 i32) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30979,7 +29820,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 480 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 451 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -31049,7 +29890,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 481 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 452 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31112,7 +29953,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 482 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 453 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31165,7 +30006,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 483 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 454 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31228,7 +30069,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 484 ;) (param $0 i32) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 455 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31286,7 +30127,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 485 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 456 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31413,7 +30254,7 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 486 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 457 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31469,7 +30310,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 487 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 458 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -31537,7 +30378,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 488 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31597,7 +30438,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 489 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 460 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31660,7 +30501,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 490 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 461 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31713,7 +30554,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 491 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 462 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -31776,7 +30617,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 492 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 463 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -31834,7 +30675,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 493 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 464 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -31959,7 +30800,7 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 494 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 465 ;) (param $0 i32) (param $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -32033,7 +30874,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 495 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 466 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -32105,7 +30946,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 496 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 467 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -32166,7 +31007,7 @@ end end ) - (func $start:std/typedarray (; 497 ;) + (func $start:std/typedarray (; 468 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32175,8 +31016,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) + (local $8 f32) + (local $9 f64) (local $10 i32) (local $11 i32) (local $12 i32) @@ -32193,6 +31034,8 @@ (local $23 i32) (local $24 i32) (local $25 i32) + (local $26 i32) + (local $27 i32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -32226,10 +31069,7 @@ unreachable end local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -32311,10 +31151,7 @@ unreachable end local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne if @@ -32354,46 +31191,46 @@ call $~lib/rt/pure/__release i32.const 8 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 f64.const 7 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 3 f64.const 6 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 4 f64.const 5 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 5 f64.const 4 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 6 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 7 f64.const 8 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u @@ -32407,11 +31244,8 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.get $0 - i32.load - i32.sub + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 16 i32.ne if @@ -32422,7 +31256,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 32 i32.ne @@ -32436,16 +31270,16 @@ end i32.const 0 global.set $~argumentsLength - local.get $0 + local.get $1 call $~lib/typedarray/Float64Array#sort call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq if (result i32) - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 5 @@ -32454,7 +31288,7 @@ i32.const 0 end if (result i32) - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 6 @@ -32463,7 +31297,7 @@ i32.const 0 end if (result i32) - local.get $0 + local.get $1 i32.const 3 call $~lib/typedarray/Float64Array#__get f64.const 7 @@ -32480,7 +31314,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -32700,10 +31534,7 @@ unreachable end local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.ne if @@ -32751,7 +31582,7 @@ i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -32778,7 +31609,7 @@ call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -32947,10 +31778,7 @@ unreachable end local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne if @@ -32998,7 +31826,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33025,7 +31853,7 @@ call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release i32.const 6 call $~lib/typedarray/Int8Array#constructor @@ -33083,10 +31911,7 @@ unreachable end local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.ne if @@ -33139,10 +31964,7 @@ unreachable end local.get $2 - i32.load offset=4 - local.get $2 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.ne if @@ -33195,10 +32017,7 @@ unreachable end local.get $3 - i32.load offset=4 - local.get $3 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 3 i32.ne if @@ -33326,7 +32145,7 @@ i32.const 1184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33348,14 +32167,14 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $9 + local.tee $11 i32.const 5 i32.const 2 i32.const 15 i32.const 1232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $12 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33377,14 +32196,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $11 + local.tee $13 i32.const 5 i32.const 2 i32.const 15 i32.const 1280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $14 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33406,14 +32225,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $13 + local.tee $15 i32.const 5 i32.const 2 i32.const 15 i32.const 1328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $16 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33435,14 +32254,14 @@ i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 + local.tee $17 i32.const 5 i32.const 2 i32.const 15 i32.const 1376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $18 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33464,14 +32283,14 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $19 i32.const 5 i32.const 2 i32.const 15 i32.const 1424 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33493,14 +32312,14 @@ i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $21 i32.const 5 i32.const 2 i32.const 15 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $22 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33515,21 +32334,22 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $23 i32.const 5 i32.const 2 i32.const 15 i32.const 1520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33544,21 +32364,22 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.get $1 i32.const -4 i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $25 i32.const 5 i32.const 2 i32.const 15 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33588,7 +32409,7 @@ i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -33613,10 +32434,6 @@ call $~lib/rt/pure/__release local.get $7 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 @@ -33647,9 +32464,13 @@ call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $25 + local.get $27 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -33692,10 +32513,7 @@ unreachable end local.get $2 - i32.load offset=4 - local.get $2 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne if @@ -33763,10 +32581,7 @@ unreachable end local.get $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -33819,10 +32634,7 @@ unreachable end local.get $3 - i32.load offset=4 - local.get $3 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 i32.const 304 @@ -33876,15 +32688,9 @@ unreachable end local.get $4 - i32.load offset=4 - local.get $4 - i32.load - i32.sub - local.get $0 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $0 - i32.load - i32.sub + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.ne if i32.const 0 @@ -33917,109 +32723,829 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 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 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $0 + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end block $folding-inner1 block $folding-inner0 + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|00 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|01 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#reduce + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|02 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $8 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $8 f32.const 6 f32.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#reduce + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $for-loop|03 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $9 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $9 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $9 f64.const 6 f64.ne br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|04 + local.get $0 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $0 + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|04 + end + end + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 local.get $0 call $~lib/rt/pure/__release - call $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> i32.const 3 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|05 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|06 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#reduceRight + f32.const 0 + local.set $8 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $8 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $8 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end + end + local.get $8 f32.const 6 f32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#reduceRight + f64.const 0 + local.set $9 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $9 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $9 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end + end + local.get $9 f64.const 6 f64.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> @@ -34194,10 +33720,10 @@ call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 + local.set $0 i32.const 2 global.set $~argumentsLength - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline local.tee $2 @@ -34212,18 +33738,18 @@ end i32.const 2 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release i32.const 2 global.set $~argumentsLength - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $1 + local.set $0 local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.load offset=8 if i32.const 0 @@ -34233,10 +33759,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release 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> @@ -34407,7 +33933,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 498 ;) + (func $~start (; 469 ;) global.get $~started if return @@ -34417,7 +33943,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 499 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 470 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 88a77a791b..b4bc9fb7be 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result 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))) @@ -137,18 +137,26 @@ end i32.const 0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 4 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 4 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -159,7 +167,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -178,6 +186,22 @@ end local.get $0 global.set $~lib/rt/stub/offset + local.get $2 + i32.const 16 + i32.sub + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 + i32.const 3 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $2 ) (func $start:typeof (; 5 ;) i32.const 64 @@ -400,21 +424,7 @@ global.set $~lib/rt/stub/startOffset i32.const 304 global.set $~lib/rt/stub/offset - i32.const 336 - call $~lib/rt/stub/maybeGrowMemory - i32.const 304 - i32.const 16 - i32.store - i32.const 308 - i32.const 1 - i32.store - i32.const 312 - i32.const 3 - i32.store - i32.const 316 - i32.const 0 - i32.store - i32.const 320 + call $~lib/rt/stub/__alloc global.set $typeof/c i32.const 64 i32.const 64 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index d79f187707..af4e2f67ea 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -3,9 +3,9 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -22,49 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $while/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNested (; 6 ;) + (func $while/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -152,7 +110,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testEmpty (; 7 ;) + (func $while/testEmpty (; 6 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -200,7 +158,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testNestedContinue (; 8 ;) + (func $while/testNestedContinue (; 7 ;) (local $0 i32) (local $1 i32) i32.const 10 @@ -248,7 +206,7 @@ i32.const 1 global.set $while/ran ) - (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -414,7 +372,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -697,7 +655,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -811,7 +769,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -898,7 +856,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,7 +913,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -1002,7 +960,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1063,7 +1021,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -1137,48 +1095,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 208 i32.gt_u @@ -1186,11 +1105,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $while/Ref#constructor (; 17 ;) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add + call $~lib/rt/pure/__retain + ) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1201,15 +1164,11 @@ call $~lib/rt/pure/decrement end ) - (func $while/testRef (; 20 ;) + (func $while/testRef (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $while/Ref#constructor local.set $0 loop $while-continue|0 local.get $0 @@ -1229,11 +1188,7 @@ call $~lib/rt/pure/__release end else - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $while/Ref#constructor local.set $2 local.get $0 call $~lib/rt/pure/__release @@ -1268,23 +1223,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $while/testRefAutorelease (; 21 ;) + (func $while/testRefAutorelease (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $while/Ref#constructor local.set $0 loop $while-continue|0 block $while-break|0 - call $~lib/rt/tlsf/maybeInitialize - call $~lib/rt/tlsf/allocateBlock - i32.const 16 - i32.add - call $~lib/rt/pure/__retain + call $while/Ref#constructor local.tee $1 call $~lib/rt/pure/__release local.get $1 @@ -1336,21 +1283,49 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $start:while (; 22 ;) + (func $start:while (; 21 ;) (local $0 i32) + (local $1 i32) i32.const 0 global.set $while/ran - call $while/testSimple - global.get $while/ran - i32.eqz + i32.const 10 + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 16 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran call $while/testNested @@ -1379,14 +1354,16 @@ end i32.const 0 global.set $while/ran - loop $while-continue|0 + i32.const 0 + local.set $0 + loop $while-continue|00 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $while-continue|0 + br_if $while-continue|00 end local.get $0 i32.const 10 @@ -1417,14 +1394,14 @@ global.set $while/ran i32.const 10 local.set $0 - loop $while-continue|00 + loop $while-continue|01 local.get $0 if local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|00 + br $while-continue|01 end end local.get $0 @@ -1478,7 +1455,7 @@ unreachable end ) - (func $~start (; 23 ;) + (func $~start (; 22 ;) global.get $~started if return @@ -1488,7 +1465,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From e81a5d758bef2d97519aa5042a49a25a760885f6 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 15:17:47 +0200 Subject: [PATCH 05/51] more --- cli/asc.js | 4 +- tests/compiler/call-super.optimized.wat | 90 +- tests/compiler/class.optimized.wat | 90 +- tests/compiler/constructor.optimized.wat | 86 +- tests/compiler/do.optimized.wat | 211 +-- tests/compiler/exports.optimized.wat | 59 +- .../extends-baseaggregate.optimized.wat | 194 +-- tests/compiler/for.optimized.wat | 94 +- tests/compiler/getter-call.optimized.wat | 37 +- .../implicit-getter-setter.optimized.wat | 100 +- tests/compiler/infer-array.optimized.wat | 92 +- tests/compiler/infer-generic.optimized.wat | 17 +- tests/compiler/inlining.optimized.wat | 87 +- tests/compiler/instanceof-class.optimized.wat | 51 +- tests/compiler/issues/1095.optimized.wat | 108 +- tests/compiler/loop-flow.optimized.wat | 65 +- tests/compiler/managed-cast.optimized.wat | 94 +- tests/compiler/new.optimized.wat | 46 +- tests/compiler/number.optimized.wat | 115 +- .../optional-typeparameters.optimized.wat | 46 +- tests/compiler/rc/local-init.optimized.wat | 188 ++- .../rc/logical-and-mismatch.optimized.wat | 90 +- .../rc/logical-or-mismatch.optimized.wat | 90 +- tests/compiler/rc/optimize.optimized.wat | 118 +- tests/compiler/rc/rereturn.optimized.wat | 86 +- .../rc/ternary-mismatch.optimized.wat | 94 +- tests/compiler/resolve-access.optimized.wat | 105 +- tests/compiler/resolve-binary.optimized.wat | 107 +- .../resolve-elementaccess.optimized.wat | 204 +-- .../resolve-function-expression.optimized.wat | 89 +- tests/compiler/resolve-new.optimized.wat | 40 +- .../resolve-propertyaccess.optimized.wat | 96 +- tests/compiler/resolve-ternary.optimized.wat | 268 ++-- tests/compiler/resolve-unary.optimized.wat | 96 +- .../retain-release-sanity.optimized.wat | 128 +- tests/compiler/retain-release.optimized.wat | 111 +- tests/compiler/retain-return.optimized.wat | 90 +- tests/compiler/rt/instanceof.optimized.wat | 54 +- tests/compiler/runtime-full.optimized.wat | 86 +- tests/compiler/runtime-stub.optimized.wat | 93 +- .../compiler/std/array-literal.optimized.wat | 96 +- tests/compiler/std/array.optimized.wat | 1417 +++++++++-------- tests/compiler/std/arraybuffer.optimized.wat | 100 +- tests/compiler/std/dataview.optimized.wat | 144 +- tests/compiler/std/date.optimized.wat | 64 +- tests/compiler/std/map.optimized.wat | 1121 +++++++------ tests/compiler/std/new.optimized.wat | 58 +- .../compiler/std/object-literal.optimized.wat | 95 +- .../std/operator-overloading.optimized.wat | 62 +- tests/compiler/std/set.optimized.wat | 581 +++---- tests/compiler/std/static-array.optimized.wat | 144 +- tests/compiler/std/staticarray.optimized.wat | 94 +- .../std/string-casemapping.optimized.wat | 219 +-- .../std/string-encoding.optimized.wat | 250 +-- tests/compiler/std/string.optimized.wat | 230 +-- tests/compiler/std/symbol.optimized.wat | 214 +-- tests/compiler/std/typedarray.optimized.wat | 1224 +++++++------- tests/compiler/typeof.optimized.wat | 52 +- tests/compiler/while.optimized.wat | 218 +-- 59 files changed, 5309 insertions(+), 4993 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 5cee74136d..242a9bf216 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -650,8 +650,8 @@ exports.main = function main(argv, options, callback) { module.setOneCallerInlineMaxSize(60); } else { module.setAlwaysInlineMaxSize(4); // default: 2 - module.setFlexibleInlineMaxSize(40); // default: 20 - module.setOneCallerInlineMaxSize(40); // default: 15 + module.setFlexibleInlineMaxSize(35); // default: 20 + module.setOneCallerInlineMaxSize(35); // default: 15 } // Optimize the module if requested diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index e0ea03c505..2e63e07bdb 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,6 +1,7 @@ (module (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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))) @@ -10,46 +11,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,16 +32,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -75,13 +50,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -92,9 +96,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $call-super/B#constructor (; 2 ;) (result i32) + (func $call-super/B#constructor (; 3 ;) (result i32) (local $0 i32) i32.const 8 i32.const 3 @@ -151,7 +155,7 @@ end local.get $0 ) - (func $call-super/D#constructor (; 3 ;) (result i32) + (func $call-super/D#constructor (; 4 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -196,7 +200,7 @@ end local.get $0 ) - (func $~start (; 4 ;) + (func $~start (; 5 ;) (local $0 i32) i32.const 64 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index a34a3385bf..4e604b906e 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -33,46 +34,20 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -80,16 +55,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -98,13 +73,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -115,9 +119,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/array/Array#constructor (; 2 ;) (result i32) + (func $~lib/array/Array#constructor (; 3 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -165,14 +169,14 @@ i32.store offset=12 local.get $0 ) - (func $class/testGenericInitializer (; 3 ;) + (func $class/testGenericInitializer (; 4 ;) i32.const 4 i32.const 4 call $~lib/rt/stub/__alloc call $~lib/array/Array#constructor i32.store ) - (func $~start (; 4 ;) + (func $~start (; 5 ;) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index def857c975..dfda5b0343 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -16,46 +17,20 @@ (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -63,16 +38,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -81,13 +56,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -98,9 +102,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) (local $0 i32) i32.const 16 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 419d85e177..86096a6c73 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_i32 (func (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_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -22,7 +22,46 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $do/testNested (; 5 ;) + (func $do/testSimple (; 5 ;) + (local $0 i32) + (local $1 i32) + i32.const 10 + local.set $0 + loop $do-continue|0 + 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|0 + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + ) + (func $do/testNested (; 6 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -105,7 +144,7 @@ i32.const 1 global.set $do/ran ) - (func $do/testNestedContinue (; 6 ;) + (func $do/testNestedContinue (; 7 ;) (local $0 i32) (local $1 i32) loop $do-continue|0 @@ -153,7 +192,7 @@ i32.const 1 global.set $do/ran ) - (func $~lib/rt/tlsf/removeBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -319,7 +358,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -602,7 +641,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -716,7 +755,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 10 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -803,7 +842,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -860,7 +899,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -907,7 +946,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -968,7 +1007,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -1042,65 +1081,65 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 208 - i32.gt_u + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $do/Ref#constructor (; 16 ;) (result i32) + (func $do/Ref#constructor (; 17 ;) (result i32) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - call $~lib/rt/pure/__retain + local.tee $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1111,7 +1150,7 @@ call $~lib/rt/pure/decrement end ) - (func $do/testRef (; 18 ;) + (func $do/testRef (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1167,7 +1206,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $do/testRefAutorelease (; 19 ;) + (func $do/testRefAutorelease (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1225,58 +1264,34 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $start:do (; 20 ;) + (func $start:do (; 21 ;) (local $0 i32) (local $1 i32) i32.const 0 global.set $do/ran - i32.const 10 - local.set $0 - loop $do-continue|0 - 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|0 - end - local.get $0 + call $do/testSimple + global.get $do/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if + i32.const 16 i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $do/ran i32.const 0 global.set $do/ran i32.const 10 local.set $1 - loop $do-continue|00 + loop $do-continue|0 local.get $1 local.tee $0 i32.const 1 i32.sub local.set $1 local.get $0 - br_if $do-continue|00 + br_if $do-continue|0 end local.get $1 i32.const -1 @@ -1308,14 +1323,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|00 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|00 end local.get $0 i32.const 10 @@ -1346,14 +1361,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|02 + loop $do-continue|01 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-continue|01 end local.get $0 i32.const 10 @@ -1408,7 +1423,7 @@ unreachable end ) - (func $~start (; 21 ;) + (func $~start (; 22 ;) global.get $~started if return @@ -1418,7 +1433,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index a783640e03..af3824c4d2 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -60,28 +60,20 @@ (func $exports/Car.getNumTires (; 2 ;) (result i32) i32.const 4 ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -89,16 +81,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -107,9 +99,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -124,27 +127,27 @@ local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $exports/Car#get:doors (; 4 ;) (param $0 i32) (result i32) + (func $exports/Car#get:doors (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:doors (; 5 ;) (param $0 i32) (param $1 i32) + (func $exports/Car#set:doors (; 6 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 6 ;) (param $0 i32) + (func $exports/Car#openDoors (; 7 ;) (param $0 i32) nop ) - (func $~start (; 7 ;) + (func $~start (; 8 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset ) - (func $exports/subOpt|trampoline (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 9 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -162,11 +165,11 @@ local.get $1 i32.sub ) - (func $~setArgumentsLength (; 9 ;) (param $0 i32) + (func $~setArgumentsLength (; 10 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $exports/Car#constructor|trampoline (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -193,7 +196,7 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 12 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 1d4bf09280..0eb6c15c13 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1062,9 +1062,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 556 i32.gt_u @@ -1072,46 +1109,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 13 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1153,7 +1155,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1326,7 +1328,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1337,7 +1339,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/reallocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1437,7 +1439,7 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1648,7 +1650,7 @@ end end ) - (func $~lib/array/ensureSize (; 17 ;) (param $0 i32) + (func $~lib/array/ensureSize (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1707,7 +1709,7 @@ i32.store end ) - (func $start:extends-baseaggregate (; 18 ;) + (func $start:extends-baseaggregate (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1762,10 +1764,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 19 ;) + (func $~start (; 20 ;) call $start:extends-baseaggregate ) - (func $~lib/rt/pure/markGray (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 21 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1789,7 +1791,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 22 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1802,7 +1804,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 23 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1836,7 +1838,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 24 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1869,7 +1871,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 24 ;) + (func $~lib/rt/pure/__collect (; 25 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1990,11 +1992,53 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/growRoots (; 26 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/rt/pure/CUR + global.get $~lib/rt/pure/ROOTS + local.tee $1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + local.tee $0 + i32.const 256 + local.get $0 + i32.const 256 + i32.gt_u + select + local.tee $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + if + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + end + local.get $0 + global.set $~lib/rt/pure/ROOTS + local.get $0 + local.get $2 + i32.add + global.set $~lib/rt/pure/CUR + local.get $0 + local.get $3 + i32.add + global.set $~lib/rt/pure/END + ) + (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2096,43 +2140,7 @@ global.get $~lib/rt/pure/END i32.ge_u if - 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 $4 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/memory/memory.copy - local.get $1 - if - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - 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 $4 - i32.add - global.set $~lib/rt/pure/END + call $~lib/rt/pure/growRoots global.get $~lib/rt/pure/CUR local.set $1 end @@ -2147,7 +2155,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 28 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2250,7 +2258,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 27 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 29 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2283,7 +2291,7 @@ end end ) - (func $~lib/rt/__visit_members (; 28 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 30 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index ed43ace588..0a03f97182 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_i32 (func (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_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -991,63 +991,63 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 208 - i32.gt_u + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) (func $for/Ref#constructor (; 15 ;) (result i32) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - call $~lib/rt/pure/__retain + local.tee $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 ) (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 31848c9a8a..7d9a5e54ca 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -10,18 +10,10 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size local.tee $2 i32.const 16 @@ -59,7 +51,21 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 2 ;) (result i32) + (local $0 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $0 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $0 i32.const 16 i32.sub local.tee $0 @@ -74,13 +80,6 @@ local.get $0 i32.const 0 i32.store offset=12 - ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 2 ;) (result i32) - call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index ccb391680b..dfcee59dc3 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1066,9 +1066,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 220 i32.gt_u @@ -1076,48 +1115,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1128,7 +1130,7 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1143,16 +1145,16 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 19 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1168,12 +1170,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 22 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1191,10 +1193,10 @@ local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 22 ;) + (func $~lib/rt/pure/__collect (; 23 ;) nop ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 6cee555feb..aa25df3123 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,5 +1,6 @@ (module (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -29,46 +30,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -76,16 +51,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -94,13 +69,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -111,9 +115,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -286,7 +290,7 @@ end end ) - (func $~lib/rt/__allocArray (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -323,7 +327,7 @@ i32.store offset=12 local.get $2 ) - (func $start:infer-array (; 4 ;) + (func $start:infer-array (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -506,7 +510,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) call $start:infer-array ) ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index aaaad1e619..524a39965c 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -28,13 +28,7 @@ local.get $0 global.set $~argumentsLength ) - (func $infer-generic/test1 (; 2 ;) (param $0 f32) (result f32) - local.get $0 - ) - (func $infer-generic/test2 (; 3 ;) (param $0 i32) (result i32) - local.get $0 - ) - (func $~start (; 4 ;) + (func $~lib/array/Array#reduce (; 2 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -76,4 +70,13 @@ end end ) + (func $infer-generic/test1 (; 3 ;) (param $0 f32) (result f32) + local.get $0 + ) + (func $infer-generic/test2 (; 4 ;) (param $0 i32) (result i32) + local.get $0 + ) + (func $~start (; 5 ;) + call $~lib/array/Array#reduce + ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 27f36ff0b3..ed205d4afd 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -21,46 +21,20 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -68,16 +42,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -86,13 +60,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -103,9 +106,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $inlining/test_ctor (; 4 ;) + (func $inlining/test_ctor (; 5 ;) (local $0 i32) i32.const 16 i32.const 4 @@ -185,7 +188,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) i32.const 1 global.set $~argumentsLength i32.const 64 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index ed55da4f34..ea73072a98 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) @@ -13,28 +14,20 @@ (global $instanceof-class/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -42,16 +35,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -60,9 +53,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -77,9 +81,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 2 ;) + (func $start:instanceof-class (; 3 ;) (local $0 i32) i32.const 144 global.set $~lib/rt/stub/startOffset @@ -138,7 +142,10 @@ unreachable end ) - (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~start (; 4 ;) + call $start:instanceof-class + ) + (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index c12e6448d4..bdf36440f5 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -910,9 +910,48 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 252 i32.gt_u @@ -920,48 +959,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 252 i32.gt_u @@ -972,7 +974,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 15 ;) + (func $start:issues/1095 (; 16 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -981,12 +983,13 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 192 i32.store - local.get $0 + local.get $1 + local.tee $2 i32.load - local.tee $1 + local.tee $0 i32.eqz if i32.const 0 @@ -996,25 +999,28 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 i32.load local.tee $2 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $2 call $~lib/rt/pure/__release end - local.get $0 local.get $1 - i32.store local.get $0 + i32.store + local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~start (; 17 ;) + call $start:issues/1095 + ) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 4cf6e35cbf..97d51576a3 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -88,37 +88,7 @@ end end ) - (func $loop-flow/whileThrow (; 5 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 11 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/whileContinue (; 6 ;) (result i32) - loop $while-continue|0 - br $while-continue|0 - end - unreachable - ) - (func $loop-flow/forThrow (; 7 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 41 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/doThrow (; 8 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 71 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $~start (; 9 ;) + (func $start:loop-flow (; 5 ;) i32.const 1 call $loop-flow/whileAny i32.const 1 @@ -156,4 +126,37 @@ unreachable end ) + (func $loop-flow/whileThrow (; 6 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 11 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/whileContinue (; 7 ;) (result i32) + loop $while-continue|0 + br $while-continue|0 + end + unreachable + ) + (func $loop-flow/forThrow (; 8 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 41 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/doThrow (; 9 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 71 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~start (; 10 ;) + call $start:loop-flow + ) ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 5a7e5e397c..977b4ef4b0 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -919,9 +919,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 268 i32.gt_u @@ -929,48 +968,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $managed-cast/Cat#constructor (; 15 ;) (result i32) + (func $managed-cast/Cat#constructor (; 16 ;) (result i32) (local $0 i32) i32.const 3 call $~lib/rt/tlsf/__alloc @@ -985,7 +987,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 268 i32.gt_u @@ -996,7 +998,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/__instanceof (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/__instanceof (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1026,7 +1028,7 @@ end i32.const 0 ) - (func $start:managed-cast (; 18 ;) + (func $start:managed-cast (; 19 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1124,7 +1126,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~start (; 19 ;) + (func $~start (; 20 ;) global.get $~started if return @@ -1134,7 +1136,7 @@ end call $start:managed-cast ) - (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 2e14cfff60..62c4e11140 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $new/ref (mut i32) (i32.const 0)) @@ -9,28 +10,20 @@ (global $new/ref2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -38,16 +31,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -56,9 +49,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -73,9 +77,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index cfb4615cb5..af8cd1b50b 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,12 +1,12 @@ (module (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 $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -89,46 +89,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 - local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $5 - i32.add - local.tee $1 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -136,16 +110,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -154,13 +128,42 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $3 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 - local.get $5 + local.get $3 i32.store local.get $1 i32.const 1 @@ -171,9 +174,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~lib/util/number/utoa_simple (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -197,7 +200,7 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 4 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -236,7 +239,7 @@ i32.const 32 end ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -244,7 +247,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -320,7 +323,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -352,7 +355,7 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -743,7 +746,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -916,7 +919,7 @@ end end ) - (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1161,7 +1164,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1299,7 +1302,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1370,7 +1373,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1414,7 +1417,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/number/F32.isSafeInteger (; 14 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 15 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1426,7 +1429,7 @@ f32.le select ) - (func $~lib/number/F32.isInteger (; 15 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 16 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1439,7 +1442,7 @@ f32.eq select ) - (func $~lib/number/F64.isSafeInteger (; 16 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 17 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1451,7 +1454,7 @@ f64.le select ) - (func $~lib/number/F64.isInteger (; 17 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 18 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1464,7 +1467,7 @@ f64.eq select ) - (func $start:number (; 18 ;) + (func $start:number (; 19 ;) (local $0 i32) (local $1 i32) i32.const 1536 @@ -2085,7 +2088,7 @@ unreachable end ) - (func $~start (; 19 ;) + (func $~start (; 20 ;) call $start:number ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index f9e27ebac4..e5a0edcd04 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,28 +9,20 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -37,16 +30,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -55,9 +48,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -72,9 +76,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 37ccd04b30..8698dfa1ef 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -8,6 +8,9 @@ (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) + (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) + (import "rtrace" "ondecrement" (func $~lib/rt/rtrace/ondecrement (param i32))) + (import "rtrace" "onfree" (func $~lib/rt/rtrace/onfree (param i32))) (memory $0 1) (data (i32.const 20) "\01\00\00\00\01") (data (i32.const 32) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") @@ -17,7 +20,7 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/tlsf/removeBlock (; 2 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 5 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -183,7 +186,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 3 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -466,7 +469,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -580,7 +583,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 5 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 8 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -667,7 +670,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -724,7 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -771,7 +774,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -832,7 +835,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -906,9 +909,172 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~start (; 10 ;) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~start (; 14 ;) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock - drop + i32.const 16 + i32.add + local.tee $0 + i32.const 192 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 + i32.const 192 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + i32.const 268435455 + i32.and + local.set $1 + local.get $0 + call $~lib/rt/rtrace/ondecrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 122 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.eq + if + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$4 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + 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 $__inlined_func$~lib/rt/__visit_members $switch$1$default + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + i32.const 192 + i32.ge_u + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end + local.get $2 + i32.const -2147483648 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 126 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/insertBlock + local.get $0 + call $~lib/rt/rtrace/onfree + else + local.get $1 + i32.const 0 + i32.le_u + if + i32.const 0 + i32.const 160 + i32.const 136 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + 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 ) ) diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 7744c9fec6..01965fd221 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -909,9 +909,48 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -919,55 +958,18 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (; 14 ;) (result i32) + (func $rc/logical-and-mismatch/Ref#constructor (; 15 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -978,7 +980,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 16 ;) + (func $~start (; 17 ;) (local $0 i32) call $rc/logical-and-mismatch/Ref#constructor global.set $rc/logical-and-mismatch/gloRef @@ -1015,7 +1017,7 @@ global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 0f8811f36f..a8f0f9e469 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -909,9 +909,48 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -919,55 +958,18 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (; 14 ;) (result i32) + (func $rc/logical-or-mismatch/Ref#constructor (; 15 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -978,7 +980,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 16 ;) + (func $~start (; 17 ;) (local $0 i32) call $rc/logical-or-mismatch/Ref#constructor global.set $rc/logical-or-mismatch/gloRef @@ -1017,7 +1019,7 @@ global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index f85b0d2b7e..7a2122ac44 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -60,9 +60,48 @@ (func $rc/optimize/eliminated_viii (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 32 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) local.get $0 i32.const 196 i32.gt_u @@ -70,48 +109,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -277,7 +279,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -560,7 +562,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -674,7 +676,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -761,7 +763,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -892,7 +894,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -954,7 +956,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1030,7 +1032,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1132,7 +1134,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1140,13 +1142,13 @@ i32.const 16 i32.add ) - (func $rc/optimize/getRef (; 19 ;) (result i32) + (func $rc/optimize/getRef (; 20 ;) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1157,13 +1159,13 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/eliminated_rr (; 21 ;) (param $0 i32) (result i32) + (func $rc/optimize/eliminated_rr (; 22 ;) (param $0 i32) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1175,7 +1177,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 23 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 24 ;) (param $0 i32) (param $1 i32) local.get $1 if (result i32) local.get $0 @@ -1185,7 +1187,7 @@ end call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1198,16 +1200,16 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 25 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 26 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 26 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 27 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 6c743ea78f..9c64dd213e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,9 +1050,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 212 i32.gt_u @@ -1060,46 +1097,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1110,10 +1112,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 12 ;) + (func $~start (; 13 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 00848b6872..3fa70f8ec7 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -911,9 +911,48 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -921,55 +960,18 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (; 14 ;) (result i32) + (func $rc/ternary-mismatch/Ref#constructor (; 15 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $rc/ternary-mismatch/test1 (; 15 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test1 (; 16 ;) (param $0 i32) (result i32) local.get $0 if (result i32) call $rc/ternary-mismatch/Ref#constructor @@ -978,7 +980,7 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -989,7 +991,7 @@ call $~lib/rt/pure/decrement end ) - (func $rc/ternary-mismatch/test2 (; 17 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test2 (; 18 ;) (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef @@ -998,7 +1000,7 @@ call $rc/ternary-mismatch/Ref#constructor end ) - (func $~start (; 18 ;) + (func $~start (; 19 ;) call $rc/ternary-mismatch/Ref#constructor global.set $rc/ternary-mismatch/gloRef i32.const 1 @@ -1016,7 +1018,7 @@ global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 8b49f5e1b1..53530df67e 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_i32 (func (result i32))) + (type $i32_=>_none (func (param i32))) (type $i64_=>_i32 (func (param i64) (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 $i32_=>_i32 (func (param i32) (result i32))) @@ -20,46 +20,20 @@ (export "fieldAccess" (func $resolve-access/fieldAccess)) (export "propertyAccess" (func $resolve-access/propertyAccess)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -67,16 +41,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -85,13 +59,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -102,9 +105,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -275,7 +278,7 @@ end end ) - (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -323,7 +326,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -347,7 +350,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/decimalCount64 (; 5 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 6 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -400,7 +403,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa64 (; 6 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 7 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -465,7 +468,7 @@ end local.get $3 ) - (func $resolve-access/arrayAccess (; 7 ;) (result i32) + (func $resolve-access/arrayAccess (; 8 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -506,7 +509,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/Container#constructor (; 8 ;) (result i32) + (func $resolve-access/Container#constructor (; 9 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -516,7 +519,7 @@ i64.store local.get $0 ) - (func $resolve-access/fieldAccess (; 9 ;) (result i32) + (func $resolve-access/fieldAccess (; 10 ;) (result i32) (local $0 i32) call $resolve-access/Container#constructor local.tee $0 @@ -526,7 +529,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/propertyAccess (; 10 ;) (result i32) + (func $resolve-access/propertyAccess (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -556,7 +559,7 @@ end local.get $0 ) - (func $~start (; 11 ;) + (func $~start (; 12 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index a5ef86bae2..a65ac994ee 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -2,9 +2,9 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) @@ -221,46 +221,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 5 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -268,16 +242,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -286,13 +260,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -303,9 +306,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/utoa_simple (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -329,7 +332,7 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 7 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 8 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -369,7 +372,7 @@ i32.const 192 end ) - (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -760,7 +763,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -933,7 +936,7 @@ end end ) - (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1178,7 +1181,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1323,7 +1326,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1395,7 +1398,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1439,7 +1442,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 14 ;) (result i32) + (func $~lib/util/number/dtoa (; 15 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 56 @@ -1460,7 +1463,7 @@ local.get $0 call $~lib/rt/stub/__free ) - (func $start:resolve-binary (; 15 ;) + (func $start:resolve-binary (; 16 ;) i32.const 32 i32.const 32 call $~lib/string/String.__eq @@ -2167,7 +2170,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 17 ;) call $start:resolve-binary ) ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b5b6cf3c47..dc76a60ef4 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,12 +1,13 @@ (module + (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -41,46 +42,20 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -88,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -106,13 +81,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -123,9 +127,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.fill (; 2 ;) (param $0 i32) + (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -169,7 +173,50 @@ i32.const 0 i32.store8 ) - (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#constructor (; 4 ;) (result i32) + (local $0 i32) + (local $1 i32) + i32.const 12 + i32.const 3 + call $~lib/rt/stub/__alloc + local.set $0 + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 + call $~lib/memory/memory.fill + local.get $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/stub/__alloc + 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.load + drop + local.get $0 + local.get $1 + 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/Float32Array#__set (; 5 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -193,7 +240,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 6 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -216,7 +263,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -264,7 +311,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -654,7 +701,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -827,7 +874,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -851,7 +898,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1096,7 +1143,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -1405,7 +1452,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#get:length (; 11 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1413,7 +1460,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1485,7 +1532,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 13 ;) (param $0 i32) + (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) (local $1 i32) local.get $0 i32.const 15 @@ -1529,7 +1576,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 14 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 16 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1579,7 +1626,7 @@ local.get $1 call $~lib/rt/stub/__free ) - (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1655,7 +1702,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1687,52 +1734,13 @@ end i32.const 0 ) - (func $start:resolve-elementaccess (; 17 ;) + (func $start:resolve-elementaccess (; 19 ;) (local $0 i32) - (local $1 i32) i32.const 1600 global.set $~lib/rt/stub/startOffset i32.const 1600 global.set $~lib/rt/stub/offset - i32.const 12 - i32.const 3 - call $~lib/rt/stub/__alloc - local.set $0 - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/memory/memory.fill - local.get $0 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/stub/__alloc - 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.load - drop - local.get $0 - local.get $1 - 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 + call $~lib/typedarray/Float32Array#constructor global.set $resolve-elementaccess/arr global.get $resolve-elementaccess/arr i32.const 0 @@ -1821,7 +1829,7 @@ unreachable end ) - (func $~start (; 18 ;) + (func $~start (; 20 ;) call $start:resolve-elementaccess ) ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index d3d8a39c25..06e278cf72 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -67,46 +67,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 - local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $5 - i32.add - local.tee $1 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -114,16 +88,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -132,13 +106,42 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $3 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 - local.get $5 + local.get $3 i32.store local.get $1 i32.const 1 @@ -149,9 +152,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -212,7 +215,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -220,7 +223,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -295,7 +298,7 @@ end i32.const 0 ) - (func $start:resolve-function-expression (; 7 ;) + (func $start:resolve-function-expression (; 8 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -348,7 +351,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 9 ;) call $start:resolve-function-expression ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index e217064f83..0aaab3bea0 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -7,26 +8,18 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.sub @@ -37,7 +30,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 + local.get $2 local.get $1 i32.gt_s select @@ -56,7 +49,18 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 + ) + (func $resolve-new/Foo#constructor (; 1 ;) (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $1 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $1 i32.const 16 i32.sub local.tee $0 @@ -71,16 +75,16 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $1 ) - (func $~start (; 1 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor global.set $resolve-new/foo - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor drop ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 7937b36c02..1ad123c0fb 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -2,6 +2,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param 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))) @@ -70,46 +71,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -117,16 +92,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -135,13 +110,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -152,9 +156,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -216,7 +220,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -224,7 +228,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -300,7 +304,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -332,7 +336,7 @@ end i32.const 0 ) - (func $start:resolve-propertyaccess (; 7 ;) + (func $start:resolve-propertyaccess (; 8 ;) (local $0 i32) i32.const 448 global.set $~lib/rt/stub/startOffset @@ -476,7 +480,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 9 ;) call $start:resolve-propertyaccess ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 4a22abd9cb..6e13abd4fd 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module + (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_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 $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -1072,9 +1072,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 1524 i32.gt_u @@ -1082,46 +1119,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1132,7 +1134,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 13 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1180,7 +1182,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1204,7 +1206,7 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (; 14 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1212,7 +1214,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1288,7 +1290,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1322,7 +1324,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 17 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 18 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1713,7 +1715,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1886,7 +1888,7 @@ end end ) - (func $~lib/util/number/prettify (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2131,7 +2133,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 20 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 21 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2269,7 +2271,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2343,7 +2345,49 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/rt/tlsf/freeBlock (; 24 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2354,96 +2398,28 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/number/F64#toString (; 23 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - block $__inlined_func$~lib/util/number/dtoa - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.set $2 - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $2 - ) - (func $~setArgumentsLength (; 24 ;) (param $0 i32) + (func $~setArgumentsLength (; 25 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-ternary (; 25 ;) + (func $start:resolve-ternary (; 26 ;) (local $0 i32) (local $1 i32) + (local $2 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $0 + local.tee $1 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $0 i32.const 1 - local.get $0 - call $~lib/util/number/utoa_simple local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 + call $~lib/util/number/utoa_simple local.get $0 + call $~lib/rt/pure/__retain + local.tee $2 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -2455,8 +2431,31 @@ call $~lib/builtins/abort unreachable end - call $~lib/number/F64#toString - local.tee $0 + block $__inlined_func$~lib/util/number/dtoa + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + end + local.get $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2474,17 +2473,18 @@ global.set $~argumentsLength i32.const 1 global.set $~argumentsLength + local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 26 ;) + (func $~start (; 27 ;) call $start:resolve-ternary ) - (func $~lib/rt/pure/__collect (; 27 ;) + (func $~lib/rt/pure/__collect (; 28 ;) nop ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 29 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index c72b48c07e..6f79954fa4 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -2,6 +2,7 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_none (func (param 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))) @@ -78,46 +79,20 @@ i32.lt_u select ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -125,16 +100,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -143,13 +118,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -160,9 +164,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -224,7 +228,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -232,7 +236,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -308,7 +312,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -340,7 +344,7 @@ end i32.const 0 ) - (func $start:resolve-unary (; 7 ;) + (func $start:resolve-unary (; 8 ;) (local $0 i32) i32.const 544 global.set $~lib/rt/stub/startOffset @@ -620,7 +624,7 @@ unreachable end ) - (func $~start (; 8 ;) + (func $~start (; 9 ;) call $start:resolve-unary ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 60a2b950f8..98f96d23f2 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1282,9 +1282,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.const 708 i32.gt_u @@ -1292,48 +1331,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 708 i32.gt_u @@ -1344,7 +1346,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1410,7 +1412,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 20 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 21 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1452,7 +1454,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1625,7 +1627,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1638,7 +1640,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1741,7 +1743,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1800,7 +1802,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 25 ;) (param $0 i32) + (func $~lib/array/Array#push (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1823,7 +1825,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#get:length (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 27 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1831,7 +1833,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#concat (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1890,7 +1892,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 480 local.get $0 @@ -1898,7 +1900,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $start:retain-release-sanity (; 29 ;) + (func $start:retain-release-sanity (; 30 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2157,10 +2159,10 @@ call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) - (func $~start (; 30 ;) + (func $~start (; 31 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 31 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 32 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2184,7 +2186,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 32 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 33 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2197,7 +2199,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 34 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2231,7 +2233,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 34 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 35 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2264,7 +2266,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 35 ;) + (func $~lib/rt/pure/__collect (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2385,7 +2387,7 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 36 ;) + (func $~lib/rt/pure/growRoots (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2436,7 +2438,7 @@ i32.add global.set $~lib/rt/pure/END ) - (func $~lib/rt/pure/decrement (; 37 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2558,7 +2560,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 39 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2661,7 +2663,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2694,7 +2696,7 @@ end end ) - (func $~lib/rt/__visit_members (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 41 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index bb79b2231a..a0026aad7b 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -57,46 +57,20 @@ (export "provideRefIndirect" (func $retain-release/provideRefIndirect)) (export "receiveRefIndirect" (func $retain-release/receiveRefIndirect)) (export "receiveRefIndirectDrop" (func $retain-release/receiveRefIndirect)) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -104,16 +78,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -122,13 +96,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -139,31 +142,31 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $retain-release/returnRef (; 2 ;) (result i32) + (func $retain-release/returnRef (; 3 ;) (result i32) global.get $retain-release/REF ) - (func $retain-release/receiveRef (; 3 ;) + (func $retain-release/receiveRef (; 4 ;) nop ) - (func $retain-release/takeRef (; 4 ;) (param $0 i32) + (func $retain-release/takeRef (; 5 ;) (param $0 i32) nop ) - (func $retain-release/takeReturnRef (; 5 ;) (param $0 i32) (result i32) + (func $retain-release/takeReturnRef (; 6 ;) (param $0 i32) (result i32) local.get $0 ) - (func $retain-release/newRef (; 6 ;) + (func $retain-release/newRef (; 7 ;) i32.const 0 i32.const 3 call $~lib/rt/stub/__alloc drop ) - (func $retain-release/assignGlobal (; 7 ;) + (func $retain-release/assignGlobal (; 8 ;) global.get $retain-release/REF global.set $retain-release/glo ) - (func $retain-release/assignField (; 8 ;) + (func $retain-release/assignField (; 9 ;) (local $0 i32) (local $1 i32) global.get $retain-release/REF @@ -177,7 +180,7 @@ local.get $0 i32.store ) - (func $retain-release/scopeForComplex (; 9 ;) (param $0 i32) + (func $retain-release/scopeForComplex (; 10 ;) (param $0 i32) (local $1 i32) (local $2 i32) loop $for-loop|0 @@ -203,7 +206,7 @@ end end ) - (func $retain-release/scopeThrow (; 10 ;) (param $0 i32) + (func $retain-release/scopeThrow (; 11 ;) (param $0 i32) local.get $0 if i32.const 32 @@ -214,31 +217,31 @@ unreachable end ) - (func $retain-release/scopeUnreachable (; 11 ;) (param $0 i32) + (func $retain-release/scopeUnreachable (; 12 ;) (param $0 i32) local.get $0 if unreachable end ) - (func $~setArgumentsLength (; 12 ;) (param $0 i32) + (func $~setArgumentsLength (; 13 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $retain-release/provideRefIndirect (; 13 ;) (param $0 i32) + (func $retain-release/provideRefIndirect (; 14 ;) (param $0 i32) i32.const 1 global.set $~argumentsLength global.get $retain-release/REF local.get $0 call_indirect (type $i32_=>_none) ) - (func $retain-release/receiveRefIndirect (; 14 ;) (param $0 i32) + (func $retain-release/receiveRefIndirect (; 15 ;) (param $0 i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) drop ) - (func $~start (; 15 ;) + (func $~start (; 16 ;) (local $0 i32) global.get $~started if diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 33abd89266..f48204bf8d 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -906,9 +906,46 @@ call $~lib/rt/tlsf/prepareBlock local.get $1 ) - (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) local.get $0 i32.const 176 i32.gt_u @@ -916,53 +953,18 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $retain-return/Ref#constructor (; 10 ;) (result i32) + (func $retain-return/Ref#constructor (; 11 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -973,11 +975,11 @@ call $~lib/rt/pure/decrement end ) - (func $~setArgumentsLength (; 12 ;) (param $0 i32) + (func $~setArgumentsLength (; 13 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:retain-return (; 13 ;) + (func $start:retain-return (; 14 ;) (local $0 i32) call $retain-return/Ref#constructor call $~lib/rt/pure/__release @@ -1034,7 +1036,7 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start (; 14 ;) + (func $~start (; 15 ;) global.get $~started if return @@ -1044,7 +1046,7 @@ end call $start:retain-return ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index ff9fbe852c..7bf903065c 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,6 +1,7 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (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))) @@ -18,28 +19,20 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -47,16 +40,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -65,9 +58,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -82,9 +86,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $rt/instanceof/Animal#constructor (; 2 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Animal#constructor (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -94,7 +98,7 @@ end local.get $0 ) - (func $rt/instanceof/Cat#constructor (; 3 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Cat#constructor (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -105,7 +109,7 @@ local.get $0 call $rt/instanceof/Animal#constructor ) - (func $~lib/rt/__instanceof (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -135,7 +139,7 @@ end i32.const 0 ) - (func $start:rt/instanceof (; 5 ;) + (func $start:rt/instanceof (; 6 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -402,7 +406,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 7 ;) global.get $~started if return diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index d9e1741d3f..11cd08d75e 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,9 +1050,46 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 204 i32.gt_u @@ -1060,46 +1097,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1110,10 +1112,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 12 ;) + (func $~lib/rt/pure/__collect (; 13 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index eab4d7d804..4647e2d833 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -16,46 +16,20 @@ (export "__reset" (func $~lib/rt/stub/__reset)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -63,16 +37,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -81,13 +55,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -98,22 +101,22 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/rt/stub/__retain (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__retain (; 2 ;) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/rt/stub/__release (; 2 ;) (param $0 i32) + (func $~lib/rt/stub/__release (; 3 ;) (param $0 i32) nop ) - (func $~lib/rt/stub/__collect (; 3 ;) + (func $~lib/rt/stub/__collect (; 4 ;) nop ) - (func $~lib/rt/stub/__reset (; 4 ;) + (func $~lib/rt/stub/__reset (; 5 ;) global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~start (; 5 ;) + (func $~start (; 6 ;) i32.const 48 global.set $~lib/rt/stub/startOffset i32.const 48 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 050503279f..6d9d6e3e15 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1104,9 +1104,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 496 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 496 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 528 i32.gt_u @@ -1114,48 +1153,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 496 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 496 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/__allocArray (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) i32.const 16 local.get $2 @@ -1181,7 +1183,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 528 i32.gt_u @@ -1192,7 +1194,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/array-literal (; 19 ;) + (func $start:std/array-literal (; 20 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1556,10 +1558,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 20 ;) + (func $~start (; 21 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1663,7 +1665,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 23 ;) (param $0 i32) local.get $0 i32.const 528 i32.lt_u @@ -1675,7 +1677,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 23 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 4869255b84..937fd6059a 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4,12 +4,12 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 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 $none_=>_none (func)) + (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) + (type $none_=>_none (func)) + (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) @@ -1495,9 +1495,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.const 8292 i32.gt_u @@ -1505,48 +1544,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1557,7 +1559,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1626,7 +1628,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 22 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 3 @@ -1643,7 +1645,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Ref#constructor (; 22 ;) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 23 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 4 i32.const 4 @@ -1654,7 +1656,7 @@ i32.store local.get $1 ) - (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1827,7 +1829,7 @@ end end ) - (func $~lib/rt/__allocArray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1865,7 +1867,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1932,7 +1934,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1951,7 +1953,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1996,7 +1998,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2071,7 +2073,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2092,7 +2094,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2140,7 +2142,7 @@ end i32.const 1 ) - (func $std/array/internalCapacity (; 31 ;) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 32 ;) (param $0 i32) (result i32) local.get $0 i32.load i32.const 16 @@ -2149,7 +2151,7 @@ i32.const 2 i32.shr_s ) - (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 33 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2191,7 +2193,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 34 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2204,7 +2206,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2307,7 +2309,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2367,7 +2369,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2390,7 +2392,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 37 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 38 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2420,7 +2422,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#concat (; 38 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 39 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2473,7 +2475,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2577,7 +2579,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 41 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2606,7 +2608,50 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#reverse (; 41 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 42 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 512 + i32.const 349 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $4 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $1 + i32.store offset=12 + ) + (func $~lib/array/Array#reverse (; 43 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2656,7 +2701,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#indexOf (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2716,7 +2761,99 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 45 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.const nan:0x400000 + f32.eq + if + local.get $1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#indexOf (; 46 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.tee $2 + if (result i32) + i32.const 0 + local.get $2 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + return + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.const nan:0x8000000000000 + f64.eq + if + local.get $1 + return + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const -1 + ) + (func $~lib/array/Array#includes (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2724,7 +2861,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#includes (; 44 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#includes (; 48 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -2779,7 +2916,7 @@ end i32.const 0 ) - (func $~lib/array/Array#includes (; 45 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#includes (; 49 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2834,7 +2971,7 @@ end i32.const 0 ) - (func $~lib/array/Array#splice (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2924,7 +3061,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 51 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3015,7 +3152,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 52 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3025,7 +3162,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3055,7 +3192,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 50 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 54 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3133,7 +3270,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 51 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3150,7 +3287,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3187,15 +3324,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 54 ;) (param $0 i32) + (func $~setArgumentsLength (; 58 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3240,17 +3377,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3258,7 +3395,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3266,12 +3403,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 65 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3317,12 +3454,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3330,12 +3467,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3343,12 +3480,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 71 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3393,12 +3530,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3406,12 +3543,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3419,13 +3556,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 73 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 77 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3465,7 +3602,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3474,7 +3611,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3483,7 +3620,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3576,11 +3713,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 78 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 82 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3636,7 +3773,7 @@ end local.get $4 ) - (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3657,7 +3794,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3667,7 +3804,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 85 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3726,14 +3863,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3743,12 +3880,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 85 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 89 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3804,7 +3941,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3816,7 +3953,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -3825,7 +3962,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3837,12 +3974,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3885,7 +4022,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -3893,7 +4030,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -3901,7 +4038,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3909,7 +4046,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3917,7 +4054,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3953,7 +4090,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 96 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 100 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -3974,7 +4111,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 97 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 101 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4006,7 +4143,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 98 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 102 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -4050,7 +4187,7 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (; 99 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 103 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4128,7 +4265,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 100 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 104 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4387,7 +4524,7 @@ local.get $4 f32.store ) - (func $~lib/array/Array#sort (; 101 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 105 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -4449,7 +4586,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 102 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 106 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4478,7 +4615,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 103 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 107 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -4543,7 +4680,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 104 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 108 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -4621,7 +4758,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 109 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -4880,7 +5017,7 @@ local.get $4 f64.store ) - (func $~lib/array/Array#sort (; 106 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#sort (; 110 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -4942,7 +5079,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 107 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 111 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4971,7 +5108,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 112 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -4992,7 +5129,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 109 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 113 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -5057,7 +5194,7 @@ end i32.const 1 ) - (func $~lib/util/sort/insertionSort (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5136,7 +5273,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5397,7 +5534,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 112 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 116 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5461,12 +5598,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 113 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 117 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5475,7 +5612,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 115 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 119 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5503,7 +5640,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 116 ;) (result f64) + (func $~lib/math/NativeMath.random (; 120 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5547,7 +5684,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 117 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 121 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5575,7 +5712,7 @@ end local.get $2 ) - (func $std/array/assertSorted (; 118 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 122 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5632,12 +5769,12 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|44 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 123 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5685,7 +5822,52 @@ call $~lib/rt/pure/__release end ) - (func $start:std/array~anonymous|47 (; 121 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 125 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 2 + i32.store offset=12 + loop $for-loop|0 + local.get $0 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + local.get $0 + i32.sub + call $~lib/array/Array#__set + local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + ) + (func $start:std/array~anonymous|47 (; 126 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5694,7 +5876,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 122 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 127 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5748,7 +5930,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 128 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5800,7 +5982,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 124 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 129 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -5819,7 +6001,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedElementsArray (; 125 ;) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 130 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5865,14 +6047,14 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 126 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 131 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 127 ;) (param $0 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 132 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5923,7 +6105,7 @@ end i32.const 1 ) - (func $~lib/string/String#get:length (; 128 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 133 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -5931,7 +6113,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 134 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6007,7 +6189,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 130 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 135 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -6061,7 +6243,7 @@ select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 131 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 136 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -6095,7 +6277,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 132 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 137 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6153,7 +6335,7 @@ end i32.const 1 ) - (func $~lib/string/String#concat (; 133 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 138 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6212,7 +6394,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 134 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 139 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 5232 local.get $0 @@ -6220,7 +6402,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 135 ;) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 140 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6292,7 +6474,49 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 136 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/createRandomStringArray (; 141 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 400 + i32.store offset=12 + loop $for-loop|0 + local.get $1 + i32.const 400 + i32.lt_s + if + local.get $0 + local.get $1 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $2 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + ) + (func $~lib/string/String#substring (; 142 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6366,7 +6590,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 137 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6506,7 +6730,7 @@ end local.get $3 ) - (func $~lib/util/number/decimalCount32 (; 138 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 144 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6554,7 +6778,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 139 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6578,7 +6802,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 140 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 146 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6620,7 +6844,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6662,7 +6886,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 142 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6769,7 +6993,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 149 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -6777,7 +7001,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/utoa32 (; 144 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 150 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6800,7 +7024,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6824,7 +7048,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 146 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 152 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6931,7 +7155,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 147 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 153 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -6939,7 +7163,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 148 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 154 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7329,7 +7553,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7574,7 +7798,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 150 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 156 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7883,7 +8107,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 151 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 157 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7937,7 +8161,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 152 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 158 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8008,7 +8232,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8115,7 +8339,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8283,7 +8507,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 161 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -8291,7 +8515,7 @@ local.get $1 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> ) - (func $~lib/util/string/joinReferenceArray (; 156 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8443,14 +8667,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array#join (; 157 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 163 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray ) - (func $~lib/util/number/itoa_stream (; 158 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8505,7 +8729,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 159 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 165 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8608,7 +8832,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 166 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8638,7 +8862,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 167 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8745,7 +8969,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 162 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 168 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -8798,7 +9022,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 163 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 169 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -8825,7 +9049,50 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/utoa64 (; 170 ;) (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i64.eqz + if + i32.const 5472 + return + end + local.get $0 + i64.const 4294967295 + i64.le_u + if + local.get $0 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (; 171 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8865,13 +9132,12 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 165 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 172 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -8887,56 +9153,19 @@ if local.get $0 i64.load - local.tee $4 - i64.eqz - if (result i32) - i32.const 5472 - else - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end + call $~lib/util/number/utoa64 return end local.get $3 i32.const 5360 call $~lib/string/String#get:length - local.tee $5 + local.tee $4 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -8946,14 +9175,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 + local.get $5 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add @@ -8962,7 +9191,7 @@ local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -8970,23 +9199,23 @@ i32.shl i32.add i32.const 5360 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 @@ -9010,7 +9239,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa64 (; 166 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 173 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9074,7 +9303,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9135,7 +9364,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 168 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 175 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9242,7 +9471,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 169 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 176 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9409,7 +9638,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 170 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9439,7 +9668,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 178 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9542,14 +9771,14 @@ end local.get $2 ) - (func $~lib/array/Array#toString (; 172 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 179 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 173 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 180 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9713,7 +9942,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 174 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 181 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9880,14 +10109,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 175 ;) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 182 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 183 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10051,7 +10280,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $start:std/array (; 177 ;) + (func $start:std/array (; 184 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10140,20 +10369,20 @@ i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -10164,13 +10393,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 0 i32.const 6 @@ -10188,20 +10417,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -10212,13 +10441,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 0 i32.const 6 @@ -10236,13 +10465,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 0 i32.const 6 @@ -10260,13 +10489,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -10278,20 +10507,20 @@ i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10303,13 +10532,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 2 i32.const 7 @@ -10328,20 +10557,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10353,13 +10582,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 2 i32.const 7 @@ -10378,13 +10607,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $2 i32.const 5 i32.const 2 i32.const 7 @@ -10403,13 +10632,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -10692,20 +10921,20 @@ if local.get $0 i32.load offset=4 - local.tee $2 + local.tee $3 local.get $1 i32.const 2 i32.shl i32.add local.set $1 loop $do-continue|0 - local.get $2 + local.get $3 i32.load call $~lib/rt/pure/__release - local.get $2 + local.get $3 i32.const 4 i32.add - local.tee $2 + local.tee $3 local.get $1 i32.lt_u br_if $do-continue|0 @@ -10843,7 +11072,7 @@ global.get $std/array/arr local.get $5 call $~lib/array/Array#concat - local.set $3 + local.set $4 local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr @@ -10870,7 +11099,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=12 i32.const 5 i32.ne @@ -10882,7 +11111,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10895,7 +11124,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10908,7 +11137,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10921,7 +11150,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10934,7 +11163,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10947,10 +11176,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/array/Array#pop drop - local.get $3 + local.get $4 i32.load offset=12 i32.const 4 i32.ne @@ -10968,7 +11197,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.load offset=12 if i32.const 0 @@ -10978,11 +11207,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 global.get $std/array/arr call $~lib/array/Array#concat local.set $1 - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -10996,7 +11225,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=12 if i32.const 0 @@ -11012,7 +11241,7 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11098,7 +11327,7 @@ i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11123,14 +11352,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11155,14 +11384,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $17 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11187,14 +11416,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $9 + local.tee $8 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11219,14 +11448,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $11 + local.tee $10 i32.const 5 i32.const 2 i32.const 3 i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11251,14 +11480,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $13 + local.tee $12 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11283,14 +11512,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $14 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11315,14 +11544,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $6 + local.tee $19 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11347,7 +11576,7 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 @@ -11379,7 +11608,7 @@ i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 @@ -11410,13 +11639,15 @@ call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release - local.get $7 + local.get $6 + call $~lib/rt/pure/__release + local.get $15 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $18 + local.get $7 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -11432,19 +11663,17 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $15 + local.get $18 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $6 + local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -11620,43 +11849,7 @@ unreachable end global.get $std/array/arr - local.tee $5 - i32.load offset=12 - local.tee $0 - i32.const 1 - i32.lt_s - if - i32.const 976 - i32.const 512 - i32.const 349 - i32.const 20 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.load offset=4 - local.tee $3 - i32.load - local.get $3 - local.get $3 - i32.const 4 - i32.add - local.get $0 - i32.const 1 - i32.sub - local.tee $1 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/memory/memory.copy - local.get $0 - local.get $3 - i32.add - i32.const 0 - i32.store - local.get $5 - local.get $1 - i32.store offset=12 + call $~lib/array/Array#shift global.set $std/array/i global.get $std/array/i i32.const 41 @@ -12058,54 +12251,8 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - local.set $0 - i32.const 0 - local.set $6 - block $__inlined_func$~lib/array/Array#indexOf - local.get $3 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $6 - br $__inlined_func$~lib/array/Array#indexOf - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $6 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $6 - i32.const 2 - i32.shl - i32.add - f32.load - f32.const nan:0x400000 - f32.eq - br_if $__inlined_func$~lib/array/Array#indexOf - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $while-continue|0 - end - end - i32.const -1 - local.set $6 - end - local.get $6 + local.tee $1 + call $~lib/array/Array#indexOf i32.const -1 i32.ne if @@ -12122,54 +12269,8 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - local.set $0 - i32.const 0 - local.set $6 - block $__inlined_func$~lib/array/Array#indexOf - local.get $5 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $6 - br $__inlined_func$~lib/array/Array#indexOf - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|022 - local.get $6 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add - f64.load - f64.const nan:0x8000000000000 - f64.eq - br_if $__inlined_func$~lib/array/Array#indexOf - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $while-continue|022 - end - end - i32.const -1 - local.set $6 - end - local.get $6 + local.tee $0 + call $~lib/array/Array#indexOf i32.const -1 i32.ne if @@ -12180,9 +12281,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -12900,7 +13001,7 @@ i32.const 3408 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12924,14 +13025,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $16 + local.tee $15 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12950,7 +13051,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12975,14 +13076,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $8 + local.tee $7 i32.const 0 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13001,7 +13102,7 @@ i32.const 3632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13026,14 +13127,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $11 + local.tee $10 i32.const 0 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13052,7 +13153,7 @@ i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13077,14 +13178,14 @@ i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $14 + local.tee $13 i32.const 0 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13103,7 +13204,7 @@ i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13152,23 +13253,23 @@ call $~lib/rt/pure/__retain local.tee $25 i32.load offset=4 - local.tee $2 + local.tee $3 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $2 + local.get $3 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $2 + local.get $3 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $2 + local.get $3 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $2 + local.get $3 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 @@ -13195,7 +13296,7 @@ local.get $29 i32.const 0 call $~lib/array/Array#__get - local.tee $6 + local.tee $19 i32.load i32.const 3 i32.ne @@ -13210,7 +13311,7 @@ local.get $29 i32.const 1 call $~lib/array/Array#__get - local.tee $4 + local.tee $2 i32.load i32.const 4 i32.ne @@ -13237,7 +13338,7 @@ local.get $25 i32.const 0 call $~lib/array/Array#__get - local.tee $3 + local.tee $4 i32.load i32.const 1 i32.ne @@ -13267,7 +13368,7 @@ local.get $25 i32.const 2 call $~lib/array/Array#__get - local.tee $2 + local.tee $3 i32.load i32.const 5 i32.ne @@ -13446,13 +13547,15 @@ call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release - local.get $7 + local.get $6 + call $~lib/rt/pure/__release + local.get $15 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $18 + local.get $7 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -13468,19 +13571,17 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $15 + local.get $18 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $6 + local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release @@ -13960,19 +14061,19 @@ unreachable end i32.const 0 - local.set $6 + local.set $0 loop $for-loop|0 - local.get $6 + local.get $0 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $6 + local.get $0 i32.const 1 i32.add - local.set $6 + local.set $0 br $for-loop|0 end end @@ -14536,20 +14637,20 @@ i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $16 + local.set $15 i32.const 0 global.set $~argumentsLength - local.get $16 + local.get $15 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $16 + local.get $15 i32.const 8 i32.const 2 i32.const 9 i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -14566,20 +14667,20 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $17 + local.set $16 i32.const 0 global.set $~argumentsLength - local.get $17 + local.get $16 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $17 + local.get $16 i32.const 8 i32.const 3 i32.const 10 i32.const 4448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -14596,14 +14697,14 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $18 + local.set $17 i32.const 0 global.set $~argumentsLength - local.get $18 + local.get $17 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $18 + local.get $17 i32.const 5 i32.const 2 i32.const 3 @@ -14628,21 +14729,21 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $7 i32.const 0 global.set $~argumentsLength - local.get $8 + local.get $7 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $8 + local.get $7 i32.const 5 i32.const 2 i32.const 7 i32.const 4672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14660,57 +14761,57 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $19 + local.set $18 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 + local.set $8 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $10 + local.set $9 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $11 + local.set $10 i32.const 4 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $6 i32.const 64 call $std/array/createReverseOrderedArray - local.set $12 + local.set $11 i32.const 128 call $std/array/createReverseOrderedArray - local.set $13 + local.set $12 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $14 + local.set $13 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $15 + local.set $14 i32.const 512 call $std/array/createRandomOrderedArray - local.set $6 - local.get $19 + local.set $19 + local.get $18 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $8 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $8 i32.const 1 i32.const 2 i32.const 3 @@ -14729,10 +14830,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $9 i32.const 48 call $std/array/assertSorted - local.get $10 + local.get $9 i32.const 2 i32.const 2 i32.const 3 @@ -14751,11 +14852,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $11 - local.get $7 + local.get $10 + local.get $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14767,11 +14868,11 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $11 i32.const 48 call $std/array/assertSorted - local.get $12 - local.get $7 + local.get $11 + local.get $6 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14783,11 +14884,11 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $12 i32.const 48 call $std/array/assertSorted - local.get $13 - local.get $7 + local.get $12 + local.get $6 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14799,11 +14900,11 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $14 - local.get $7 + local.get $13 + local.get $6 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14815,11 +14916,11 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $15 - local.get $7 + local.get $14 + local.get $6 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14831,34 +14932,36 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $19 i32.const 48 call $std/array/assertSorted + local.get $15 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $11 + local.get $6 call $~lib/rt/pure/__release - local.get $7 + local.get $11 call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release @@ -14866,9 +14969,7 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $6 + local.get $19 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -14896,51 +14997,11 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 0 - local.set $2 - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 2 - i32.store offset=12 - loop $for-loop|00 - local.get $2 - 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 $2 - i32.sub - call $~lib/array/Array#__set - local.get $1 - local.get $2 - local.get $0 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|00 - end - end - local.get $1 + call $std/array/createReverseOrderedNestedArray + local.tee $0 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release call $std/array/createReverseOrderedElementsArray local.tee $0 @@ -14954,19 +15015,19 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $5 i32.const 1 global.set $~argumentsLength - local.get $2 + local.get $1 i32.const 55 - local.tee $1 + local.tee $3 call $~lib/array/Array<~lib/array/Array>#sort local.tee $0 call $std/array/isSorted<~lib/string/String | null> @@ -14981,8 +15042,8 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $2 - local.get $3 + local.get $1 + local.get $5 call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if @@ -14993,52 +15054,16 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $5 - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 400 - i32.store offset=12 - loop $for-loop|04 - local.get $5 - i32.const 400 - i32.lt_s - if - local.get $0 - local.get $5 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|04 - end - end + call $std/array/createRandomStringArray + local.set $0 i32.const 1 global.set $~argumentsLength local.get $0 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15048,9 +15073,9 @@ i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $7 i32.load offset=4 - local.get $8 + local.get $7 i32.load offset=12 call $~lib/util/string/joinBooleanArray local.tee $0 @@ -15072,10 +15097,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $12 i32.const 5120 call $~lib/array/Array#join - local.tee $14 + local.tee $13 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15093,10 +15118,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $14 i32.const 5568 call $~lib/array/Array#join - local.tee $19 + local.tee $18 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15114,10 +15139,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $19 i32.const 5632 call $~lib/array/Array#join - local.tee $4 + local.tee $2 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15135,13 +15160,13 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $8 i32.load offset=4 - local.get $9 + local.get $8 i32.load offset=12 call $~lib/util/string/joinFloatArray local.tee $0 - local.set $3 + local.set $4 local.get $0 i32.const 6944 call $~lib/string/String.__eq @@ -15163,7 +15188,7 @@ local.tee $5 i32.const 5120 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $2 + local.tee $3 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15181,7 +15206,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 i32.load offset=4 local.tee $0 i32.const 0 @@ -15194,7 +15219,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $10 + local.get $9 call $~lib/array/Array#join local.tee $1 i32.const 7152 @@ -15214,7 +15239,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.load offset=4 local.tee $0 i32.const 0 @@ -15224,7 +15249,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $11 + local.get $10 call $~lib/array/Array#join local.tee $0 i32.const 7232 @@ -15238,34 +15263,34 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $7 call $~lib/rt/pure/__release call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $15 + local.get $18 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $4 + local.get $2 call $~lib/rt/pure/__release - local.get $9 + local.get $8 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release - local.get $10 + local.get $9 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $11 + local.get $10 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15317,7 +15342,7 @@ i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $9 + local.set $8 local.get $0 i32.const 7040 call $~lib/string/String.__eq @@ -15334,7 +15359,7 @@ i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $10 + local.set $9 local.get $0 i32.const 7424 call $~lib/string/String.__eq @@ -15351,7 +15376,7 @@ i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $11 + local.set $10 local.get $0 i32.const 7456 call $~lib/string/String.__eq @@ -15370,13 +15395,13 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.load offset=4 - local.get $7 + local.get $6 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $12 + local.set $11 local.get $0 i32.const 7520 call $~lib/string/String.__eq @@ -15395,13 +15420,13 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $15 i32.load offset=4 - local.get $16 + local.get $15 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $13 + local.set $12 local.get $0 i32.const 7584 call $~lib/string/String.__eq @@ -15420,13 +15445,13 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $16 i32.load offset=4 - local.get $17 + local.get $16 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $14 + local.set $13 local.get $0 i32.const 7680 call $~lib/string/String.__eq @@ -15445,13 +15470,13 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $17 i32.load offset=4 - local.get $18 + local.get $17 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $15 + local.set $14 local.get $0 i32.const 7792 call $~lib/string/String.__eq @@ -15470,11 +15495,11 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $18 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $6 + local.set $19 local.get $0 i32.const 7952 call $~lib/string/String.__eq @@ -15493,11 +15518,11 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $2 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $3 + local.set $4 local.get $0 i32.const 8096 call $~lib/string/String.__eq @@ -15583,7 +15608,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - local.set $2 + local.set $3 local.get $0 i32.const 8192 call $~lib/string/String.__eq @@ -15649,13 +15674,17 @@ local.get $24 call $~lib/rt/pure/__release 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 $6 + call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release - local.get $7 + local.get $15 call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release @@ -15669,19 +15698,15 @@ call $~lib/rt/pure/__release local.get $18 call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $6 + local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15702,7 +15727,7 @@ local.get $20 call $~lib/rt/pure/__release ) - (func $~start (; 178 ;) + (func $~start (; 185 ;) global.get $~started if return @@ -15712,7 +15737,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 179 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 186 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15780,7 +15805,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 180 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 187 ;) (param $0 i32) local.get $0 i32.const 8292 i32.lt_u @@ -15792,7 +15817,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 181 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 188 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15824,7 +15849,7 @@ end end ) - (func $~lib/rt/__visit_members (; 182 ;) (param $0 i32) + (func $~lib/rt/__visit_members (; 189 ;) (param $0 i32) block $folding-inner0 block $block$4$break block $switch$1$default diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index f83482fa83..2dede897a4 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1268,9 +1268,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 432 i32.gt_u @@ -1278,48 +1317,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1492,7 +1494,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1562,7 +1564,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 432 i32.gt_u @@ -1573,7 +1575,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1642,7 +1644,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1702,11 +1704,11 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 21 ;) (param $0 i32) + (func $~setArgumentsLength (; 22 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 22 ;) + (func $start:std/arraybuffer (; 23 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1983,10 +1985,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 23 ;) + (func $~start (; 24 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 9058b61fc8..0c257b8be9 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1109,9 +1109,48 @@ i32.const 0 i32.store8 ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 512 i32.gt_u @@ -1119,48 +1158,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 512 i32.gt_u @@ -1171,7 +1173,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 17 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1223,7 +1225,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1243,7 +1245,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1307,14 +1309,14 @@ i32.store offset=8 local.get $3 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 20 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/polyfills/bswap (; 21 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -1327,7 +1329,7 @@ i32.rotr i32.or ) - (func $~lib/dataview/DataView#getFloat32 (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1363,7 +1365,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 23 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 24 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1389,7 +1391,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 24 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 25 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1415,7 +1417,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1434,7 +1436,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 26 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 27 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -1447,7 +1449,7 @@ i32.shl i32.or ) - (func $~lib/dataview/DataView#getInt16 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1481,7 +1483,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt32 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1515,7 +1517,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt64 (; 29 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 30 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1541,7 +1543,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 31 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1560,7 +1562,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 31 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 32 ;) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1571,7 +1573,7 @@ i32.shr_u i32.or ) - (func $~lib/dataview/DataView#getUint16 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1605,7 +1607,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint32 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1639,7 +1641,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint64 (; 34 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 35 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1665,7 +1667,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 35 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 36 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1693,7 +1695,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 36 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 37 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1721,7 +1723,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt16 (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1745,7 +1747,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1769,7 +1771,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 39 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 40 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1793,7 +1795,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1817,7 +1819,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1841,7 +1843,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 42 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 43 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1865,11 +1867,11 @@ end i64.store ) - (func $~setArgumentsLength (; 43 ;) (param $0 i32) + (func $~setArgumentsLength (; 44 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 44 ;) + (func $start:std/dataview (; 45 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3460,10 +3462,10 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~start (; 45 ;) + (func $~start (; 46 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 46 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 47 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index d892c94c7c..ea90a4f667 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,26 +15,18 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.sub @@ -45,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 + local.get $2 local.get $1 i32.gt_s select @@ -64,26 +56,9 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 3 - i32.store offset=8 - local.get $0 - i32.const 8 - i32.store offset=12 - local.get $2 ) (func $start:std/date (; 4 ;) - (local $0 i32) - (local $1 i64) + (local $0 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -160,18 +135,31 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - local.set $1 - call $~lib/rt/stub/__alloc - local.tee $0 + local.set $0 + i32.const 96 + call $~lib/rt/stub/maybeGrowMemory + i32.const 64 + i32.const 16 + i32.store + i32.const 68 + i32.const 1 + i32.store + i32.const 72 + i32.const 3 + i32.store + i32.const 76 + i32.const 8 + i32.store + i32.const 80 i64.const 0 i64.store + i32.const 80 local.get $0 - local.get $1 i64.store - local.get $0 + i32.const 80 global.set $std/date/date global.get $std/date/creationTime - global.get $std/date/date + i32.const 80 i64.load i64.ne if diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 8cc449c056..e95996eb25 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3,18 +3,20 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (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_i32_=>_none (func (param i32 i32 i32))) + (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1077,9 +1079,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 556 i32.gt_u @@ -1087,48 +1128,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1339,7 +1343,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1361,7 +1365,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 556 i32.gt_u @@ -1372,7 +1376,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#clear (; 20 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 21 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1405,14 +1409,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (; 21 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1455,7 +1459,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1468,7 +1472,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1599,7 +1603,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1693,7 +1697,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1716,7 +1720,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1784,7 +1788,49 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1957,7 +2003,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1970,7 +2016,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2073,55 +2119,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 31 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2145,15 +2143,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 local.get $0 i32.load - local.tee $4 + local.set $4 + local.get $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $2 i32.shl local.tee $2 - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $1 i32.add local.get $2 @@ -2176,7 +2179,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2212,7 +2215,7 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#set:length (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 35 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2224,7 +2227,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 35 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2291,7 +2294,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/array/Array#constructor (; 36 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 37 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 5 @@ -2308,7 +2311,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2346,7 +2349,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#set:length (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 39 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2358,7 +2361,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#values (; 39 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 40 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2414,7 +2417,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 40 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 41 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -2447,7 +2450,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 41 ;) (result i32) + (func $~lib/map/Map#constructor (; 42 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -2475,7 +2478,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 42 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2496,7 +2499,50 @@ i32.add i32.load ) - (func $~lib/map/Map#rehash (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 45 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2627,62 +2673,23 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/util/hash/hash8 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store8 offset=1 else @@ -2728,10 +2735,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store8 + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store8 offset=1 local.get $0 @@ -2740,7 +2747,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -2750,17 +2757,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 45 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 47 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2791,7 +2798,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2832,7 +2839,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 47 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 49 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2963,7 +2970,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3053,7 +3060,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 49 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 51 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3116,7 +3123,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 50 ;) + (func $std/map/testNumeric (; 52 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3642,7 +3649,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 51 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3653,7 +3660,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3784,7 +3791,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3876,7 +3883,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3897,7 +3904,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 55 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 57 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3964,7 +3971,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 56 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 58 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4095,60 +4102,21 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 255 i32.and call $~lib/util/hash/hash8 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load8_u - local.get $3 - i32.const 255 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store8 offset=1 else @@ -4194,10 +4162,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store8 + local.tee $3 local.get $1 + i32.store8 + local.get $3 local.get $2 i32.store8 offset=1 local.get $0 @@ -4206,7 +4174,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -4216,17 +4184,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4287,7 +4255,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 59 ;) + (func $std/map/testNumeric (; 61 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4791,7 +4759,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (; 60 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 62 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4806,7 +4774,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -4849,7 +4817,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 62 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 64 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4862,7 +4830,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 63 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 65 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4993,7 +4961,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5087,7 +5055,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 65 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 67 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5110,7 +5078,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5148,7 +5116,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 67 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 69 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -5160,7 +5128,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 68 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 70 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5227,7 +5195,50 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 69 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=4 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 72 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5358,62 +5369,23 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 16 i32.shl i32.const 16 i32.shr_s call $~lib/util/hash/hash16 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store16 offset=2 else @@ -5459,10 +5431,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store16 + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store16 offset=2 local.get $0 @@ -5471,7 +5443,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -5481,17 +5453,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 71 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 74 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5554,7 +5526,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 72 ;) + (func $std/map/testNumeric (; 75 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6082,7 +6054,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 76 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6093,7 +6065,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 74 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 77 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6224,7 +6196,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6316,7 +6288,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 76 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 79 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6337,7 +6309,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 77 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 80 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6404,7 +6376,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 78 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 81 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6535,60 +6507,21 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 - local.tee $3 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $1 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $1 - if - local.get $1 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - i32.load16_u - local.get $3 - i32.const 65535 - i32.and - i32.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $1 - i32.load offset=4 - i32.const -2 - i32.and - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - local.set $1 - end - local.get $1 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if - local.get $1 + local.get $3 local.get $2 i32.store16 offset=2 else @@ -6634,10 +6567,10 @@ i32.const 3 i32.shl i32.add - local.tee $1 - local.get $3 - i32.store16 + local.tee $3 local.get $1 + i32.store16 + local.get $3 local.get $2 i32.store16 offset=2 local.get $0 @@ -6646,7 +6579,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $1 + local.get $3 local.get $0 i32.load local.get $4 @@ -6656,17 +6589,17 @@ i32.const 2 i32.shl i32.add - local.tee $2 + local.tee $1 i32.load i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 80 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 83 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6727,7 +6660,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 81 ;) + (func $std/map/testNumeric (; 84 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7233,7 +7166,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 82 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 85 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7242,7 +7175,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 83 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7261,7 +7194,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 84 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 87 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7317,7 +7250,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#delete (; 85 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 88 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7376,7 +7309,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 86 ;) + (func $std/map/testNumeric (; 89 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7799,7 +7732,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 87 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 90 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7866,7 +7799,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 88 ;) + (func $std/map/testNumeric (; 91 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8333,7 +8266,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#clear (; 89 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 92 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8366,7 +8299,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 90 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 93 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -8432,7 +8365,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 91 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8473,7 +8406,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 92 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 95 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8482,7 +8415,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 96 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8613,7 +8546,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 97 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8703,7 +8636,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 95 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 98 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8722,7 +8655,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -8760,7 +8693,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 97 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 100 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -8772,7 +8705,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 98 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8839,7 +8772,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#values (; 99 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 102 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8895,7 +8828,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 100 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 103 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8928,7 +8861,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 104 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -8949,7 +8882,48 @@ i32.add i64.load ) - (func $~lib/map/Map#rehash (; 102 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 105 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + local.get $0 + i64.load + i64.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=16 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 106 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9080,53 +9054,17 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 103 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 107 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $3 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $3 - if - local.get $3 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - local.get $3 - i64.load - i64.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $3 - i32.load offset=16 - i32.const -2 - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - local.set $3 - end - local.get $3 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if local.get $3 local.get $2 @@ -9206,7 +9144,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 104 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 108 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -9266,7 +9204,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 105 ;) + (func $std/map/testNumeric (; 109 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9739,7 +9677,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 106 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 110 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9806,7 +9744,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 107 ;) + (func $std/map/testNumeric (; 111 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10279,7 +10217,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 108 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 112 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -10320,7 +10258,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 109 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 113 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10330,7 +10268,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 110 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10462,7 +10400,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 111 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10553,7 +10491,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 112 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 116 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10573,42 +10511,79 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 113 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 117 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $~lib/map/Map#keys (; 118 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 + local.set $2 i32.const 16 i32.const 27 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 12 i32.mul i32.add @@ -10619,53 +10594,20 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $1 + local.get $6 local.get $5 f32.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $7 - f32.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -10674,7 +10616,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 119 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10806,7 +10748,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 120 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10897,7 +10839,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 116 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 121 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -10958,7 +10900,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 117 ;) + (func $std/map/testNumeric (; 122 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -11447,7 +11389,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 118 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 123 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11488,7 +11430,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 119 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 124 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11498,7 +11440,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 120 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 125 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11630,7 +11572,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 121 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 126 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11721,7 +11663,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 122 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 127 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11741,42 +11683,79 @@ local.get $0 i32.load offset=8 ) - (func $~lib/map/Map#keys (; 123 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 128 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/map/Map#keys (; 129 ;) (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.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 + local.set $2 i32.const 16 i32.const 30 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 4 i32.shl i32.add @@ -11787,53 +11766,20 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $1 + local.get $6 local.get $5 f64.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 3 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -11842,7 +11788,48 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 124 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#find (; 130 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + local.get $0 + i32.load + local.get $2 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $0 + f64.load + local.get $1 + f64.eq + end + if + local.get $0 + return + end + local.get $0 + i32.load offset=16 + i32.const -2 + i32.and + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + ) + (func $~lib/map/Map#rehash (; 131 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11974,54 +11961,18 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 125 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 132 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) + local.get $0 + local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.set $4 - local.get $0 - i32.load - local.get $4 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $3 - block $__inlined_func$~lib/map/Map#find - loop $while-continue|0 - local.get $3 - if - local.get $3 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $3 - f64.load - local.get $1 - f64.eq - end - br_if $__inlined_func$~lib/map/Map#find - local.get $3 - i32.load offset=16 - i32.const -2 - i32.and - local.set $3 - br $while-continue|0 - end - end - i32.const 0 - local.set $3 - end - local.get $3 + local.tee $4 + call $~lib/map/Map#find + local.tee $3 if local.get $3 local.get $2 @@ -12101,7 +12052,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 126 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 133 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -12162,7 +12113,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 127 ;) + (func $std/map/testNumeric (; 134 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -12651,7 +12602,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 128 ;) + (func $~start (; 135 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -12663,7 +12614,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 129 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 136 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -12758,7 +12709,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 130 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 137 ;) (param $0 i32) local.get $0 i32.const 556 i32.lt_u diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ad93153023..a8c58006df 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,5 +1,6 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -7,26 +8,18 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.sub @@ -37,7 +30,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 + local.get $2 local.get $1 i32.gt_s select @@ -56,31 +49,33 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 + ) + (func $std/new/AClass#constructor (; 1 ;) (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/stub/offset i32.const 16 - i32.sub + i32.add local.tee $0 i32.const 16 - i32.store + i32.add + call $~lib/rt/stub/maybeGrowMemory local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.const 16 + i32.store + local.get $1 i32.const 1 i32.store offset=4 - local.get $0 + local.get $1 i32.const 3 i32.store offset=8 - local.get $0 + local.get $1 i32.const 8 i32.store offset=12 - local.get $2 - ) - (func $~start (; 1 ;) - (local $0 i32) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc - local.tee $0 + local.get $0 i32.const 1 i32.store local.get $0 @@ -96,6 +91,13 @@ f32.const 3 f32.store offset=4 local.get $0 + ) + (func $~start (; 2 ;) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset + call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index d088da9d94..385b2a670a 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (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_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -12,46 +12,20 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -59,16 +33,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -77,13 +51,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -94,9 +97,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/string/String#get:length (; 2 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -104,7 +107,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -179,7 +182,7 @@ end i32.const 0 ) - (func $std/object-literal/bar (; 4 ;) (param $0 i32) + (func $std/object-literal/bar (; 5 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -233,7 +236,7 @@ unreachable end ) - (func $start:std/object-literal (; 5 ;) + (func $start:std/object-literal (; 6 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -287,7 +290,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 7 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2e4ed6d68e..46b6bcf27f 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,6 +1,7 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -78,28 +79,20 @@ (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - i32.const 16 - i32.add - local.tee $1 + local.get $0 memory.size - local.tee $4 + local.tee $2 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 - local.get $1 local.get $2 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -107,16 +100,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -125,9 +118,20 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + ) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $2 + i32.const 16 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $2 i32.const 16 i32.sub local.tee $1 @@ -142,9 +146,9 @@ local.get $1 i32.const 8 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $std/operator-overloading/Tester#constructor (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 3 call $~lib/rt/stub/__alloc @@ -156,7 +160,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 3 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 4 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -233,7 +237,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 4 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 5 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1189,7 +1193,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.equals (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1205,7 +1209,7 @@ i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 7 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1221,7 +1225,7 @@ i32.const 0 end ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 4 call $~lib/rt/stub/__alloc @@ -1233,7 +1237,7 @@ i32.store offset=4 local.get $2 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 5 call $~lib/rt/stub/__alloc @@ -1245,7 +1249,7 @@ i32.store offset=4 local.get $2 ) - (func $start:std/operator-overloading (; 9 ;) + (func $start:std/operator-overloading (; 10 ;) (local $0 i32) (local $1 i32) i32.const 96 @@ -2422,7 +2426,7 @@ unreachable end ) - (func $~start (; 10 ;) + (func $~start (; 11 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 6e1f3590d5..5ca92c1986 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) @@ -12,6 +12,8 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) + (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1074,9 +1076,48 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 444 i32.gt_u @@ -1084,48 +1125,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1336,7 +1340,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1358,7 +1362,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 444 i32.gt_u @@ -1369,7 +1373,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#clear (; 20 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 21 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1402,7 +1406,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 21 ;) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (result i32) (local $0 i32) i32.const 24 i32.const 3 @@ -1430,14 +1434,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 23 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1480,7 +1484,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1493,7 +1497,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 26 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1620,7 +1624,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1707,7 +1711,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1775,7 +1779,49 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1948,7 +1994,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1961,7 +2007,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2064,55 +2110,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 31 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/array/ensureSize (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2136,15 +2134,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 local.get $0 i32.load - local.tee $4 + local.set $4 + local.get $3 + call $~lib/rt/tlsf/maybeInitialize + local.get $4 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $2 i32.shl local.tee $2 - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add local.tee $1 i32.add local.get $2 @@ -2167,7 +2170,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2203,7 +2206,7 @@ local.get $2 i32.store8 ) - (func $~lib/set/Set#values (; 34 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 35 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2267,7 +2270,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 36 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2286,7 +2289,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2349,7 +2352,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 37 ;) + (func $std/set/testNumeric (; 38 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2668,7 +2671,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 38 ;) (result i32) + (func $~lib/set/Set#constructor (; 39 ;) (result i32) (local $0 i32) i32.const 24 i32.const 5 @@ -2696,7 +2699,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 40 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2707,7 +2710,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 41 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2834,7 +2837,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 42 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2919,7 +2922,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 42 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 43 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2983,7 +2986,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 44 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3002,7 +3005,7 @@ i32.add i32.load8_u ) - (func $~lib/set/Set#delete (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 45 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3063,7 +3066,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 45 ;) + (func $std/set/testNumeric (; 46 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3374,7 +3377,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 46 ;) (result i32) + (func $~lib/set/Set#constructor (; 47 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -3402,7 +3405,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 47 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 48 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3417,7 +3420,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3460,7 +3463,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 50 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3473,7 +3476,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 50 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 51 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3600,7 +3603,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 51 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 52 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3687,7 +3690,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3725,7 +3728,7 @@ local.get $2 i32.store16 ) - (func $~lib/set/Set#values (; 53 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 54 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3789,7 +3792,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3810,7 +3813,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 55 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 56 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3873,7 +3876,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 56 ;) + (func $std/set/testNumeric (; 57 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4192,7 +4195,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 57 ;) (result i32) + (func $~lib/set/Set#constructor (; 58 ;) (result i32) (local $0 i32) i32.const 24 i32.const 9 @@ -4220,7 +4223,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 59 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4231,7 +4234,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 59 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4358,7 +4361,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 61 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4443,7 +4446,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 61 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 62 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4507,7 +4510,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 62 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4528,7 +4531,7 @@ i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 63 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 64 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4589,7 +4592,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 64 ;) + (func $std/set/testNumeric (; 65 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4900,7 +4903,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 65 ;) (result i32) + (func $~lib/set/Set#constructor (; 66 ;) (result i32) (local $0 i32) i32.const 24 i32.const 11 @@ -4928,7 +4931,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 66 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 67 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4959,7 +4962,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5000,7 +5003,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 69 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5009,7 +5012,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 69 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 70 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5136,7 +5139,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 70 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 71 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5219,7 +5222,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5257,7 +5260,7 @@ local.get $2 i32.store ) - (func $~lib/set/Set#values (; 72 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 73 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5321,7 +5324,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 73 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5342,7 +5345,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 74 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 75 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5401,7 +5404,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 75 ;) + (func $std/set/testNumeric (; 76 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5704,7 +5707,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 76 ;) (result i32) + (func $~lib/set/Set#constructor (; 77 ;) (result i32) (local $0 i32) i32.const 24 i32.const 13 @@ -5732,7 +5735,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 77 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 78 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5796,7 +5799,7 @@ end local.get $2 ) - (func $std/set/testNumeric (; 78 ;) + (func $std/set/testNumeric (; 79 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6099,7 +6102,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#clear (; 79 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 80 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6132,7 +6135,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 80 ;) (result i32) + (func $~lib/set/Set#constructor (; 81 ;) (result i32) (local $0 i32) i32.const 24 i32.const 15 @@ -6160,7 +6163,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 81 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 82 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6226,7 +6229,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 82 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 83 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6267,7 +6270,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 83 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 84 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6276,7 +6279,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 84 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 85 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6403,7 +6406,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 85 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 86 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6486,7 +6489,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -6524,7 +6527,7 @@ local.get $2 i64.store ) - (func $~lib/set/Set#values (; 87 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 88 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6588,7 +6591,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 88 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 89 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -6609,7 +6612,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 89 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 90 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -6669,7 +6672,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 90 ;) + (func $std/set/testNumeric (; 91 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -6971,7 +6974,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 91 ;) (result i32) + (func $~lib/set/Set#constructor (; 92 ;) (result i32) (local $0 i32) i32.const 24 i32.const 17 @@ -6999,7 +7002,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 92 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 93 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7063,7 +7066,7 @@ end local.get $2 ) - (func $std/set/testNumeric (; 93 ;) + (func $std/set/testNumeric (; 94 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -7365,7 +7368,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 94 ;) (result i32) + (func $~lib/set/Set#constructor (; 95 ;) (result i32) (local $0 i32) i32.const 24 i32.const 19 @@ -7393,7 +7396,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 95 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 96 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -7434,7 +7437,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 96 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 97 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7444,7 +7447,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 97 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 98 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7572,7 +7575,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 98 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#add (; 99 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7656,42 +7659,79 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 99 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 100 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 2 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store + ) + (func $~lib/set/Set#values (; 101 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 + local.set $1 i32.const 16 i32.const 20 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $1 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 + local.get $2 local.get $1 - local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $1 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 3 i32.shl i32.add @@ -7702,59 +7742,26 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $2 + local.get $6 local.get $5 f32.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 2 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $7 - f32.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $2 ) - (func $~lib/array/Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -7775,7 +7782,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 101 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 103 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -7836,7 +7843,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 102 ;) + (func $std/set/testNumeric (; 104 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -8138,7 +8145,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 103 ;) (result i32) + (func $~lib/set/Set#constructor (; 105 ;) (result i32) (local $0 i32) i32.const 24 i32.const 21 @@ -8166,7 +8173,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 104 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 106 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8207,7 +8214,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 105 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 107 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8217,7 +8224,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 106 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 108 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8345,7 +8352,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 107 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 109 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8429,42 +8436,79 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 108 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#__set (; 110 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (local $3 i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + local.get $1 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 3 + call $~lib/array/ensureSize + local.get $0 + local.get $3 + i32.store offset=12 + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store + ) + (func $~lib/set/Set#values (; 111 ;) (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.get $0 i32.load offset=8 - local.set $6 + local.set $4 local.get $0 i32.load offset=16 - local.set $3 + local.set $1 i32.const 16 i32.const 22 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $1 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 + local.get $2 local.get $1 - local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $1 i32.lt_s if - local.get $6 local.get $4 + local.get $3 i32.const 4 i32.shl i32.add @@ -8475,59 +8519,26 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $6 i32.const 1 i32.add local.set $0 + local.get $2 + local.get $6 local.get $5 f64.load - local.set $7 - local.get $2 - local.get $1 - i32.load offset=12 - i32.ge_u - if - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - local.tee $5 - i32.const 3 - call $~lib/array/ensureSize - local.get $1 - local.get $5 - i32.store offset=12 - end - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store + call $~lib/array/Array#__set end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $1 + local.get $2 ) - (func $~lib/array/Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 112 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -8548,7 +8559,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 110 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 113 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -8609,7 +8620,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 111 ;) + (func $std/set/testNumeric (; 114 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -8911,7 +8922,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 112 ;) + (func $~start (; 115 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -8923,7 +8934,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 113 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 116 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9018,7 +9029,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 114 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 117 ;) (param $0 i32) local.get $0 i32.const 444 i32.lt_u diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index b16f11b7f6..deb88eaed6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -92,7 +92,52 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 + i32.const 16 + i32.sub + local.tee $2 + local.get $4 + i32.store + local.get $2 + i32.const 1 + i32.store offset=4 + local.get $2 + local.get $1 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + ) + (func $~lib/memory/memory.copy (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -265,13 +310,11 @@ end end ) - (func $~lib/rt/stub/__realloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__realloc (; 5 ;) (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.get $0 i32.const 15 i32.and @@ -291,10 +334,10 @@ local.get $0 i32.const 16 i32.sub - local.tee $4 + local.tee $3 i32.load - local.set $2 - local.get $4 + local.set $4 + local.get $3 i32.load offset=4 i32.const 1 i32.ne @@ -308,7 +351,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $2 + local.get $4 i32.add i32.eq local.set $5 @@ -317,9 +360,9 @@ i32.add i32.const -16 i32.and - local.set $3 + local.set $2 local.get $1 - local.get $2 + local.get $4 i32.gt_u if local.get $5 @@ -331,93 +374,54 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $4 local.get $3 + local.get $2 i32.store else - local.get $4 - i32.load offset=8 - local.set $6 - local.get $3 local.get $2 + local.get $4 i32.const 1 i32.shl - local.tee $2 - local.get $3 - local.get $2 - i32.gt_u - select - local.tee $5 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $5 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 + local.tee $4 local.get $2 - i32.const 16 + local.get $4 i32.gt_u select - local.tee $7 - i32.add - call $~lib/rt/stub/maybeGrowMemory local.get $3 - i32.const 16 - i32.sub + i32.load offset=8 + call $~lib/rt/stub/__alloc local.tee $2 - local.get $7 - i32.store - local.get $2 - i32.const 1 - i32.store offset=4 - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $5 - i32.store offset=12 - local.get $3 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 call $~lib/memory/memory.copy - local.get $3 + local.get $2 local.tee $0 i32.const 16 i32.sub - local.set $4 + local.set $3 end else local.get $5 if local.get $0 - local.get $3 + local.get $2 i32.add global.set $~lib/rt/stub/offset - local.get $4 local.get $3 + local.get $2 i32.store end end - local.get $4 + local.get $3 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (; 5 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -628,7 +632,7 @@ end end ) - (func $~lib/array/ensureSize (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -684,7 +688,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result i64) local.get $0 i32.const 140 i32.load @@ -705,7 +709,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f32) local.get $0 i32.const 204 i32.load @@ -726,7 +730,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 10 ;) (param $0 i32) (result f64) local.get $0 i32.const 268 i32.load @@ -747,7 +751,7 @@ i32.add f64.load ) - (func $start:std/static-array (; 10 ;) + (func $start:std/static-array (; 11 ;) i32.const 76 i32.load i32.const 2 @@ -1009,7 +1013,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 12 ;) call $start:std/static-array ) ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 98b2f92428..d42b9c62d1 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1293,9 +1293,48 @@ end local.get $1 ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 432 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 432 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.const 464 i32.gt_u @@ -1303,55 +1342,18 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 432 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 432 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $std/staticarray/test (; 20 ;) (result i32) + (func $std/staticarray/test (; 21 ;) (result i32) i32.const 12 i32.const 3 i32.const 288 call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 22 ;) (param $0 i32) local.get $0 i32.const 464 i32.gt_u @@ -1362,7 +1364,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/staticarray (; 22 ;) + (func $start:std/staticarray (; 23 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1571,7 +1573,7 @@ i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 23 ;) + (func $~start (; 24 ;) global.get $~started if return @@ -1581,7 +1583,7 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1707,7 +1709,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 26 ;) (param $0 i32) local.get $0 i32.const 464 i32.lt_u diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index d7e05774d6..86aaa8ae44 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -305,9 +305,48 @@ i32.const 1 i32.shr_u ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 48 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 17376 i32.gt_u @@ -315,48 +354,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 48 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 48 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -522,7 +524,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -805,7 +807,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -919,7 +921,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1006,7 +1008,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1030,7 +1032,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1161,7 +1163,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1223,7 +1225,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1299,7 +1301,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1381,7 +1383,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 20 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 1 @@ -1389,7 +1391,7 @@ i32.const 16 i32.add ) - (func $~lib/util/casemap/casemap (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1540,7 +1542,49 @@ i32.and i32.add ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1713,7 +1757,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1726,7 +1770,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1829,55 +1873,16 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 25 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/rt/tlsf/__realloc (; 27 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 28 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2184,7 +2189,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 29 ;) (param $0 i32) local.get $0 i32.const 17376 i32.gt_u @@ -2195,7 +2200,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/string/compareImpl (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2271,7 +2276,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 31 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2305,7 +2310,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 32 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2330,7 +2335,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 31 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 33 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2811,7 +2816,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 32 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2861,7 +2866,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 35 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2920,7 +2925,7 @@ i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 34 ;) + (func $start:std/string-casemapping (; 36 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -4553,7 +4558,7 @@ local.get $94 call $~lib/rt/pure/__release ) - (func $~start (; 35 ;) + (func $~start (; 37 ;) global.get $~started if return @@ -4563,7 +4568,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 36 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 938d11be48..fd939998b9 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -1,9 +1,9 @@ (module (type $none_=>_none (func)) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 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))) @@ -35,9 +35,48 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 64 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 21052 i32.gt_u @@ -45,48 +84,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) local.get $0 i32.const 21052 i32.gt_u @@ -97,7 +99,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -263,7 +265,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -546,7 +548,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -660,7 +662,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -747,7 +749,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -771,7 +773,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -902,7 +904,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -964,7 +966,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1040,7 +1042,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1122,7 +1124,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1130,7 +1132,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1303,7 +1305,7 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 19 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 20 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1320,7 +1322,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 20 ;) + (func $std/string-encoding/testUTF16Encode (; 21 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1483,7 +1485,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const -2 @@ -1498,7 +1500,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (; 22 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.decode (; 23 ;) (param $0 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -1506,7 +1508,7 @@ i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe ) - (func $~lib/string/String#get:length (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 24 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1514,7 +1516,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1590,7 +1592,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1624,7 +1626,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 26 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 27 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1769,7 +1771,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF8.byteLength (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1860,7 +1862,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 29 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2070,7 +2072,7 @@ local.get $4 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 29 ;) + (func $std/string-encoding/testUTF8Encode (; 30 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2214,7 +2216,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 30 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 31 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2368,7 +2370,49 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + ) + (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2381,7 +2425,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2484,55 +2528,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 33 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - i32.const 16 - i32.sub - local.set $2 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $2 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - if (result i32) - local.get $2 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2715,14 +2711,18 @@ end end end + call $~lib/rt/tlsf/maybeInitialize local.get $6 + call $~lib/rt/tlsf/checkUsedBlock local.get $1 local.get $6 i32.sub - call $~lib/rt/tlsf/__realloc + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF8.decode (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.decode (; 36 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -2731,7 +2731,7 @@ local.get $1 call $~lib/string/String.UTF8.decodeUnsafe ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 36 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 37 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2845,7 +2845,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 37 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 38 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3042,7 +3042,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testLarge (; 38 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 39 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3090,7 +3090,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/string-encoding (; 39 ;) + (func $start:std/string-encoding (; 40 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3184,10 +3184,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 40 ;) + (func $~start (; 41 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 41 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 42 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index dd5bf6c909..4ac075b3f8 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -386,9 +386,48 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) - (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 17000 i32.gt_u @@ -396,48 +435,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) local.get $0 i32.const 17000 i32.gt_u @@ -448,7 +450,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#get:length (; 8 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -456,7 +458,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 local.get $1 @@ -536,7 +538,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -571,7 +573,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__not (; 11 ;) (param $0 i32) (result i32) + (func $~lib/string/String.__not (; 12 ;) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -581,7 +583,7 @@ i32.const 1 end ) - (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -747,7 +749,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1030,7 +1032,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -1144,7 +1146,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1231,7 +1233,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1255,7 +1257,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1386,7 +1388,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 19 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1448,7 +1450,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1524,7 +1526,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1606,7 +1608,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 22 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1614,7 +1616,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String.fromCharCode (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 2 @@ -1637,7 +1639,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 24 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1656,11 +1658,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 24 ;) (param $0 i32) + (func $~setArgumentsLength (; 25 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 25 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1711,7 +1713,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 27 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1757,7 +1759,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String#indexOf (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1817,7 +1819,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1990,7 +1992,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2015,7 +2017,7 @@ end end ) - (func $~lib/string/String#padStart (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2096,7 +2098,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2178,7 +2180,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2238,7 +2240,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 34 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2276,7 +2278,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 34 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 35 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2340,7 +2342,7 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 35 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2398,7 +2400,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 36 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2452,7 +2454,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 37 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 38 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2539,7 +2541,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 38 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 39 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2756,7 +2758,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 39 ;) (result i32) + (func $~lib/util/string/strtol (; 40 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2974,7 +2976,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 40 ;) (result i64) + (func $~lib/util/string/strtol (; 41 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3194,7 +3196,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 41 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 42 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3228,7 +3230,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 42 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 43 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3305,7 +3307,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 43 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 44 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -4053,7 +4055,7 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4112,7 +4114,7 @@ call $~lib/rt/pure/__release local.get $2 ) - (func $~lib/string/String.__concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 640 local.get $0 @@ -4120,7 +4122,7 @@ local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__gt (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4167,7 +4169,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 48 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4214,7 +4216,7 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 49 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4273,7 +4275,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4370,7 +4372,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 50 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 51 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4412,7 +4414,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 52 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -4425,7 +4427,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4528,7 +4530,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 54 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -4537,7 +4539,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#replaceAll (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4830,7 +4832,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 call $~lib/string/String#get:length @@ -4904,7 +4906,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -4961,7 +4963,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5040,7 +5042,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 58 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 59 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5068,7 +5070,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 59 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 60 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5279,7 +5281,7 @@ end end ) - (func $~lib/array/ensureSize (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 61 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5333,7 +5335,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array<~lib/string/String>#push (; 61 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -5357,7 +5359,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5569,7 +5571,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5604,7 +5606,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 64 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 65 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5652,7 +5654,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5676,7 +5678,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 66 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 67 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5718,7 +5720,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 67 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 68 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5741,7 +5743,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 68 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 69 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -5794,7 +5796,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 69 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -5821,7 +5823,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 70 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 71 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5864,7 +5866,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 71 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 72 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5928,7 +5930,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 72 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 73 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6318,7 +6320,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6563,7 +6565,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 74 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 75 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -6872,7 +6874,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 75 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 76 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6927,7 +6929,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 76 ;) + (func $start:std/string (; 77 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14448,11 +14450,11 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 77 ;) (result i32) + (func $std/string/getString (; 78 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 78 ;) + (func $~start (; 79 ;) global.get $~started if return @@ -14462,7 +14464,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 79 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 80 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14582,7 +14584,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 80 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 81 ;) (param $0 i32) local.get $0 i32.const 17000 i32.lt_u diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 0a25108c6a..c858d7e0c5 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,11 +1,11 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (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 $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -66,46 +66,20 @@ end local.get $0 ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $4 local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $6 - i32.add - local.tee $2 memory.size - local.tee $5 + local.tee $2 i32.const 16 i32.shl - local.tee $3 + local.tee $1 i32.gt_u if - local.get $5 local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -113,16 +87,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 - local.get $5 - local.get $3 + local.tee $1 + local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $3 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -131,13 +105,42 @@ end end end - local.get $2 + local.get $0 global.set $~lib/rt/stub/offset - local.get $4 + ) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $4 + i32.add + call $~lib/rt/stub/maybeGrowMemory + local.get $3 i32.const 16 i32.sub local.tee $2 - local.get $6 + local.get $4 i32.store local.get $2 i32.const 1 @@ -148,9 +151,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $4 + local.get $3 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 4 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -361,7 +364,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -382,7 +385,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -415,7 +418,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 7 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -423,7 +426,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 7 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 8 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -463,7 +466,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -539,7 +542,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -571,7 +574,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 11 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -612,7 +615,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -725,7 +728,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -812,7 +815,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 13 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -843,7 +846,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -884,7 +887,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -997,7 +1000,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1091,7 +1094,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 17 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 18 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1188,7 +1191,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1197,7 +1200,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1216,7 +1219,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 20 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString @@ -1233,7 +1236,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1406,54 +1409,55 @@ end end ) - (func $~lib/string/String.__concat (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 23 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $__inlined_func$~lib/string/String#concat - local.get $0 - i32.const 832 - local.get $0 - select - local.tee $3 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $2 - local.get $1 - i32.const 832 - local.get $1 - select - local.tee $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $0 - i32.eqz - if - i32.const 336 - local.set $0 - br $__inlined_func$~lib/string/String#concat - end - local.get $0 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - local.get $3 - local.get $2 - call $~lib/memory/memory.copy - local.get $0 - local.get $2 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $3 + local.get $1 + i32.const 832 + local.get $1 + select + local.tee $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add + local.tee $2 + i32.eqz + if + i32.const 336 + return end + local.get $2 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $2 local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $2 + local.get $3 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + local.get $2 + ) + (func $~lib/string/String.__concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 832 + local.get $0 + select + local.get $1 + call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 23 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 25 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1529,7 +1533,7 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 24 ;) + (func $start:std/symbol (; 26 ;) (local $0 i32) call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -1698,7 +1702,7 @@ unreachable end ) - (func $~start (; 25 ;) + (func $~start (; 27 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 0333e0501f..c86aa278a3 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -11,6 +11,7 @@ (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) @@ -19,7 +20,6 @@ (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) - (type $i64_=>_i32 (func (param i64) (result 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_f64_=>_none (func (param i32 i32 f64))) @@ -1465,9 +1465,48 @@ end end ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) (local $1 i32) - (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.const 7388 i32.gt_u @@ -1475,48 +1514,11 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/increment end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1527,7 +1529,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1596,7 +1598,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 22 ;) (param $0 i32) (result i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1605,14 +1607,14 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 22 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 23 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/typedarray/Uint8Array#constructor (; 23 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (param $0 i32) (result i32) i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -1621,7 +1623,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 25 ;) (param $0 i32) (result i32) i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -1630,7 +1632,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 25 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 26 ;) (param $0 i32) (result i32) i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -1639,7 +1641,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 26 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 27 ;) (param $0 i32) (result i32) i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc @@ -1648,7 +1650,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 27 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 28 ;) (param $0 i32) (result i32) i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc @@ -1657,7 +1659,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 28 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 29 ;) (param $0 i32) (result i32) i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -1666,7 +1668,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 29 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 30 ;) (param $0 i32) (result i32) i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -1675,7 +1677,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 31 ;) (param $0 i32) (result i32) i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc @@ -1684,7 +1686,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (param $0 i32) (result i32) i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -1693,7 +1695,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 33 ;) (param $0 i32) (result i32) i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -1702,7 +1704,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 33 ;) (param $0 i32) + (func $std/typedarray/testInstantiate (; 34 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2165,7 +2167,7 @@ local.get $11 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2189,7 +2191,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 36 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2212,7 +2214,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2296,7 +2298,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 38 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2320,7 +2322,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2404,11 +2406,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 39 ;) (param $0 i32) + (func $~setArgumentsLength (; 40 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 41 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2486,7 +2488,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 41 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 42 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2528,7 +2530,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 42 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 43 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2541,7 +2543,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/util/sort/weakHeapSort (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2800,7 +2802,7 @@ local.get $4 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 44 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 45 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2861,7 +2863,7 @@ end local.get $2 ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 45 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 46 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2890,7 +2892,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 46 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 47 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2913,7 +2915,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2945,7 +2947,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2964,7 +2966,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2984,7 +2986,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3053,7 +3055,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3226,7 +3228,7 @@ end end ) - (func $~lib/rt/__allocArray (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3264,7 +3266,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3283,14 +3285,14 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 56 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3345,7 +3347,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3423,7 +3425,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3504,7 +3506,7 @@ end local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3513,7 +3515,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3530,7 +3532,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 61 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3574,7 +3576,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3653,7 +3655,7 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3761,12 +3763,12 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#__set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3786,7 +3788,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 65 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 66 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3823,7 +3825,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3847,7 +3849,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3871,7 +3873,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int32Array#reduce (; 68 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 69 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3912,7 +3914,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint32Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3936,7 +3938,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int64Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3960,12 +3962,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 71 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 72 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 72 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 73 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4006,7 +4008,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint64Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4030,7 +4032,7 @@ local.get $2 i64.store ) - (func $~lib/typedarray/Float32Array#__set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 75 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4054,17 +4056,17 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 75 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 76 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 76 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 77 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 77 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4102,7 +4104,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int32Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 79 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4144,7 +4146,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (; 79 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 80 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4186,12 +4188,12 @@ end local.get $3 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 81 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 82 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4249,7 +4251,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 82 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 83 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4313,7 +4315,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#map (; 83 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 84 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4371,7 +4373,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array#__get (; 84 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4390,7 +4392,7 @@ i32.add i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 85 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 86 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4454,7 +4456,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 86 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 87 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4512,7 +4514,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 87 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 88 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4576,7 +4578,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#map (; 88 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 89 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4646,7 +4648,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#__get (; 89 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4669,7 +4671,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 90 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 91 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4733,7 +4735,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#map (; 91 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 92 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4803,7 +4805,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 92 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4826,7 +4828,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 93 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 94 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4890,7 +4892,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#map (; 94 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 95 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4960,7 +4962,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 95 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 96 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5024,7 +5026,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#map (; 96 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5094,7 +5096,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5117,7 +5119,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 98 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 99 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5181,12 +5183,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 99 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 100 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 100 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 101 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -5256,7 +5258,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5279,7 +5281,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 102 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 103 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5343,7 +5345,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#map (; 103 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 104 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -5413,7 +5415,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 104 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 105 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5436,7 +5438,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 105 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 106 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5500,12 +5502,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 106 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 107 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 107 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 108 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5575,7 +5577,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -5598,7 +5600,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 109 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 110 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5662,12 +5664,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 110 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 111 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 111 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5737,7 +5739,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 112 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 113 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5801,7 +5803,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 113 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -5810,7 +5812,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5913,7 +5915,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 115 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 116 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -5922,7 +5924,7 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (; 116 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#filter (; 117 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5996,7 +5998,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 117 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 118 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6089,14 +6091,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 119 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 120 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6170,7 +6172,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 120 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 121 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6263,7 +6265,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 121 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 122 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6337,7 +6339,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 122 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 123 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6430,7 +6432,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 123 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -6439,7 +6441,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 124 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 125 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6524,7 +6526,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 125 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 126 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6619,14 +6621,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 127 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 128 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6711,7 +6713,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 128 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 129 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6806,12 +6808,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 130 ;) (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 (; 130 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 131 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6894,7 +6896,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 131 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 132 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6989,12 +6991,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 133 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 134 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7077,7 +7079,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 134 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 135 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7172,12 +7174,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 135 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 136 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 136 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 137 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7260,7 +7262,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 137 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 138 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7355,12 +7357,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 138 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 139 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 139 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 140 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7443,7 +7445,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 140 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 141 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7538,12 +7540,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 141 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 142 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 142 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 143 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7626,7 +7628,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 143 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 144 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7721,12 +7723,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 144 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 145 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 145 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 146 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7809,7 +7811,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 146 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 147 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7904,14 +7906,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 149 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7950,13 +7952,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 150 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 151 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8000,7 +8002,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#some (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8039,7 +8041,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 152 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 153 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8083,7 +8085,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 153 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 154 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8127,14 +8129,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 156 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8177,13 +8179,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 157 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 158 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8227,7 +8229,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#some (; 158 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8270,7 +8272,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 159 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 160 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8314,12 +8316,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8362,11 +8364,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 162 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 163 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 163 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 164 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8410,7 +8412,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 164 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 165 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8454,12 +8456,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 165 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 166 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 167 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8502,11 +8504,11 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 167 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 168 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 168 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 169 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8550,7 +8552,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 169 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 170 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8594,12 +8596,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 170 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 171 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 172 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8642,12 +8644,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 172 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 173 ;) (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/Float32Array,f32> (; 173 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 174 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8691,12 +8693,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 174 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 175 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 175 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 176 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8739,12 +8741,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 176 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 177 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 177 ;) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 178 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8788,7 +8790,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#findIndex (; 178 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 179 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8827,14 +8829,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 180 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 180 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 181 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8881,7 +8883,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#findIndex (; 181 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 182 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8920,7 +8922,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 182 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 183 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -8967,7 +8969,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 183 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 184 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9014,7 +9016,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#findIndex (; 184 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 185 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9057,14 +9059,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 185 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 186 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 186 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 187 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9111,7 +9113,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#findIndex (; 187 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 188 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9154,7 +9156,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 188 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 189 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9201,7 +9203,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#findIndex (; 189 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 190 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9244,12 +9246,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 190 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 191 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 191 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 192 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9296,7 +9298,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 192 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 193 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9343,7 +9345,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#findIndex (; 193 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 194 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9386,12 +9388,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 194 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 195 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 195 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 196 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9438,7 +9440,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 196 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 197 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9485,7 +9487,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#findIndex (; 197 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 198 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9528,12 +9530,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 198 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 199 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 199 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 200 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9580,7 +9582,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#findIndex (; 200 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 201 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9623,12 +9625,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 201 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 202 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 202 ;) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 203 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9675,7 +9677,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 203 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 204 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9685,7 +9687,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 204 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 205 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9725,7 +9727,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 205 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 206 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9769,13 +9771,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 206 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 207 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 207 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 208 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9815,7 +9817,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 208 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 209 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9859,7 +9861,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 209 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 210 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -9903,7 +9905,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 210 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 211 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9913,7 +9915,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 211 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 212 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9957,7 +9959,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 212 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 213 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10001,7 +10003,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#every (; 213 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 214 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10045,7 +10047,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 214 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 215 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10089,13 +10091,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 216 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 216 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 217 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10139,7 +10141,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 217 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 218 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10183,7 +10185,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 218 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 219 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10227,13 +10229,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 219 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 220 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 220 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 221 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10277,7 +10279,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 221 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 222 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10321,13 +10323,13 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 222 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 223 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 223 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 224 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10371,7 +10373,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/math/NativeMathf.mod (; 224 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 225 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10518,13 +10520,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 225 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 226 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 226 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 227 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10568,7 +10570,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 227 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 228 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10612,7 +10614,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/math/NativeMath.mod (; 228 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 229 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -10766,13 +10768,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 229 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 230 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 230 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 231 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10816,7 +10818,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 231 ;) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 232 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -10860,7 +10862,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 232 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 233 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -10905,7 +10907,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 233 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 234 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10989,7 +10991,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#forEach (; 234 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 235 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11022,7 +11024,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 235 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 236 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11073,7 +11075,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 237 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11124,7 +11126,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -11169,7 +11171,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 238 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 239 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11257,7 +11259,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 239 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 240 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11339,7 +11341,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 240 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -11380,7 +11382,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 241 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 242 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11417,7 +11419,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 242 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 243 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11462,7 +11464,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 243 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 244 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11507,7 +11509,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 244 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 245 ;) (param $0 i64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11549,7 +11551,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 245 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 246 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11586,7 +11588,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 246 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 247 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11634,7 +11636,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 247 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 248 ;) (local $0 i32) (local $1 i32) i32.const 0 @@ -11682,7 +11684,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 248 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 249 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11724,7 +11726,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 249 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 250 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11803,7 +11805,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 250 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 251 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -11845,7 +11847,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 251 ;) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 252 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11924,7 +11926,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (; 252 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 253 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11976,7 +11978,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 253 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 254 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12132,7 +12134,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 254 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 255 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12184,7 +12186,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 256 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12245,7 +12247,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 256 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 257 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12394,7 +12396,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 257 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12455,7 +12457,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 258 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 259 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12604,7 +12606,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 259 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 260 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12662,7 +12664,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 260 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -12729,7 +12731,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 261 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 262 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12884,7 +12886,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 262 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 263 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12942,7 +12944,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 263 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13009,7 +13011,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 264 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 265 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13158,7 +13160,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 265 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 266 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13216,7 +13218,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 266 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 267 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13360,7 +13362,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 267 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 268 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13427,7 +13429,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 268 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 269 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13570,7 +13572,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 269 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 270 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -13628,7 +13630,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 270 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 271 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13695,7 +13697,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 271 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 272 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13841,7 +13843,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 272 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 273 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -13908,7 +13910,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 273 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 274 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14054,7 +14056,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 274 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 275 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14112,7 +14114,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 275 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 276 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 @@ -14179,7 +14181,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 276 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 277 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14325,7 +14327,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (; 277 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 278 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14383,7 +14385,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 278 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 279 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14530,7 +14532,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (; 279 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 280 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -14592,7 +14594,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 280 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 281 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -14649,7 +14651,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 281 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 282 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -14670,7 +14672,7 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 282 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 283 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15090,7 +15092,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 283 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 284 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15507,7 +15509,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 284 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 285 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15924,7 +15926,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 286 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -15990,7 +15992,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 286 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 287 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -16051,7 +16053,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 287 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 288 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -16074,7 +16076,7 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 288 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 289 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16493,7 +16495,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 289 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 290 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16910,7 +16912,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 290 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -16974,7 +16976,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 292 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -17033,7 +17035,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 292 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 293 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -17056,7 +17058,7 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 293 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 294 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17472,7 +17474,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 294 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 295 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17887,7 +17889,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 295 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 296 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -17951,7 +17953,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 296 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 297 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -18010,7 +18012,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 297 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 298 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -18033,7 +18035,7 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 298 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 299 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18449,7 +18451,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 299 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18865,7 +18867,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 300 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 301 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -18929,7 +18931,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 301 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 302 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -18988,7 +18990,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 302 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 303 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19011,7 +19013,7 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 303 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 304 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19427,7 +19429,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 304 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 305 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -19491,7 +19493,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 305 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 306 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -19550,7 +19552,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 306 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 307 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19573,7 +19575,7 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 307 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 308 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19990,7 +19992,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#includes (; 308 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#includes (; 309 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -20047,7 +20049,7 @@ i32.const 0 end ) - (func $~lib/typedarray/Float32Array#includes (; 309 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#includes (; 310 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -20104,7 +20106,7 @@ i32.const 0 end ) - (func $~lib/util/number/decimalCount32 (; 310 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 311 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -20152,7 +20154,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 311 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 312 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -20176,7 +20178,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 312 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 313 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20218,7 +20220,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#get:length (; 313 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 314 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -20226,7 +20228,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/number/itoa_stream (; 314 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -20281,7 +20283,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 315 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 316 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20355,7 +20357,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 316 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 317 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20458,14 +20460,14 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#join (; 317 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#join (; 318 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (; 318 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 319 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -20541,7 +20543,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 319 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 320 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -20575,7 +20577,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 320 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 321 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20637,7 +20639,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/utoa32 (; 321 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 322 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -20660,7 +20662,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 322 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 323 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -20690,7 +20692,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 323 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 324 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20793,14 +20795,14 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#join (; 324 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#join (; 325 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 325 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 326 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20862,7 +20864,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 326 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 327 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20924,7 +20926,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 327 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 328 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -20979,7 +20981,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 328 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 329 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21086,7 +21088,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#join (; 329 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (; 330 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -21095,7 +21097,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 330 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 331 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21157,7 +21159,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 331 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 332 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21187,7 +21189,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 332 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 333 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21294,7 +21296,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#join (; 333 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (; 334 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -21303,7 +21305,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 334 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 335 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21365,7 +21367,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 335 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 336 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21407,7 +21409,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 336 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 337 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21514,7 +21516,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#join (; 337 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#join (; 338 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -21523,7 +21525,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 338 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 339 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21585,7 +21587,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 339 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 340 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21609,7 +21611,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 340 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 341 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21716,7 +21718,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#join (; 341 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#join (; 342 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -21725,7 +21727,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 342 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 343 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21787,7 +21789,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount64 (; 343 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 344 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -21840,7 +21842,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 344 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 345 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -21867,7 +21869,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa64 (; 345 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 346 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -21931,7 +21933,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 347 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -21992,7 +21994,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 347 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 348 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22099,7 +22101,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#join (; 348 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 349 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22108,7 +22110,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 349 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 350 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22170,7 +22172,50 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 350 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/utoa64 (; 351 ;) (param $0 i64) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i64.eqz + if + i32.const 1936 + return + end + local.get $0 + i64.const 4294967295 + i64.le_u + if + local.get $0 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (; 352 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -22210,13 +22255,12 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 351 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 353 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -22232,56 +22276,19 @@ if local.get $0 i64.load - local.tee $4 - i64.eqz - if (result i32) - i32.const 1936 - else - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end + call $~lib/util/number/utoa64 return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $5 + local.tee $4 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -22291,14 +22298,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 + local.get $5 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add @@ -22307,7 +22314,7 @@ local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -22315,23 +22322,23 @@ i32.shl i32.add i32.const 1968 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 @@ -22355,7 +22362,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#join (; 352 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 354 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -22364,7 +22371,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 353 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 355 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22426,7 +22433,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/genDigits (; 354 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 356 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -22816,7 +22823,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 355 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 357 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -23061,7 +23068,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 356 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 358 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -23370,7 +23377,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 357 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 359 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -23424,7 +23431,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 358 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 360 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -23495,7 +23502,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 359 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 361 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23605,7 +23612,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#join (; 360 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#join (; 362 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -23614,7 +23621,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 361 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 363 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23676,7 +23683,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinFloatArray (; 362 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 364 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23783,7 +23790,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#join (; 363 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#join (; 365 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -23792,7 +23799,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 364 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 366 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23854,7 +23861,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 365 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 367 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -23877,7 +23884,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (; 366 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap (; 368 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 local.get $0 @@ -23947,7 +23954,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 367 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 369 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $2of2 block $1of2 @@ -23971,7 +23978,7 @@ local.get $2 call $~lib/typedarray/Uint8Array.wrap ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 368 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 370 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -24041,7 +24048,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 369 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 371 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24155,7 +24162,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 370 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 372 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24239,7 +24246,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 371 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 373 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24351,7 +24358,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array.wrap (; 372 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array.wrap (; 374 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -24396,7 +24403,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 373 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 375 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24481,7 +24488,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array.wrap (; 374 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array.wrap (; 376 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -24526,7 +24533,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 375 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 377 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24609,7 +24616,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array.wrap (; 376 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array.wrap (; 378 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -24654,7 +24661,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 377 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 379 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24735,7 +24742,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array.wrap (; 378 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array.wrap (; 380 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -24780,7 +24787,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 379 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 381 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24861,7 +24868,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array.wrap (; 380 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array.wrap (; 382 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -24906,7 +24913,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 381 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 383 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24988,7 +24995,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array.wrap (; 382 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array.wrap (; 384 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25033,7 +25040,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 383 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 385 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25115,7 +25122,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array.wrap (; 384 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array.wrap (; 386 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25160,7 +25167,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 385 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 387 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25242,7 +25249,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array.wrap (; 386 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array.wrap (; 388 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 0 @@ -25287,7 +25294,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 387 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 389 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25369,7 +25376,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 390 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -25420,7 +25427,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 389 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 391 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -25480,7 +25487,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 390 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -25547,7 +25554,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 391 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 393 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -25605,7 +25612,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 394 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -25672,7 +25679,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 393 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 395 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -25694,7 +25701,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 394 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 396 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -25752,7 +25759,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 395 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 397 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -25778,7 +25785,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 396 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 398 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25916,14 +25923,14 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/array/Array#__unchecked_get (; 397 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 399 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_u ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 398 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 400 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -25983,7 +25990,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 399 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 401 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -26050,7 +26057,7 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 400 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 402 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -26117,7 +26124,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 401 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 403 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26255,7 +26262,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 402 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 404 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -26320,7 +26327,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 403 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 405 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -26380,7 +26387,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 404 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 406 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -26451,7 +26458,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 405 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 407 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -26537,7 +26544,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 406 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 408 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -26608,7 +26615,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 407 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 409 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -26690,7 +26697,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 408 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 410 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -26757,7 +26764,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 409 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 411 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26897,7 +26904,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 410 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 412 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -26952,7 +26959,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 411 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 413 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27022,7 +27029,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 412 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27093,7 +27100,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 413 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 415 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -27155,7 +27162,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 416 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27226,7 +27233,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 415 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 417 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -27278,7 +27285,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 416 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 418 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -27308,7 +27315,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 417 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 419 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -27365,7 +27372,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 418 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 420 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27503,7 +27510,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 419 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 421 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27573,7 +27580,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 420 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 422 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -27644,7 +27651,7 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 421 ;) (param $0 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -27715,7 +27722,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 422 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 424 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -27853,7 +27860,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -27894,7 +27901,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 424 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 426 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -27956,7 +27963,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28027,7 +28034,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 426 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 428 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -28089,7 +28096,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 429 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28160,7 +28167,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 428 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 430 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -28212,7 +28219,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 429 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 431 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -28274,7 +28281,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 430 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 432 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28331,7 +28338,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 431 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 433 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28471,7 +28478,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 432 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 434 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -28533,7 +28540,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 433 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 435 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28604,7 +28611,7 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 434 ;) (param $0 i32) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 436 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -28675,7 +28682,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 435 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 437 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28815,7 +28822,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 436 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 438 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28870,7 +28877,7 @@ end end ) - (func $~lib/array/Array#__unchecked_get (; 437 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 439 ;) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -28879,7 +28886,7 @@ i32.add i64.load ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 438 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 440 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -28941,7 +28948,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 439 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29012,7 +29019,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 440 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 442 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -29042,7 +29049,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 443 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29113,7 +29120,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 442 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 444 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29165,7 +29172,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 443 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 445 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29227,7 +29234,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 444 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 446 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29284,7 +29291,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 445 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 447 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29422,7 +29429,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 446 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 448 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -29484,7 +29491,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 447 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 449 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29555,7 +29562,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 448 ;) (param $0 i32) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) @@ -29626,7 +29633,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 449 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 451 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29764,7 +29771,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 452 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29820,7 +29827,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 451 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 453 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -29890,7 +29897,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 452 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 454 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29953,7 +29960,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 453 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 455 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30006,7 +30013,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 454 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 456 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30069,7 +30076,7 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 455 ;) (param $0 i32) + (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 457 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30127,7 +30134,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 456 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 458 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30254,7 +30261,7 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 457 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30310,7 +30317,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 458 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 460 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -30378,7 +30385,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 461 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30438,7 +30445,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 460 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 462 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -30501,7 +30508,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 461 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 463 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30554,7 +30561,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 462 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 464 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -30617,7 +30624,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 463 ;) (param $0 i32) + (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 465 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30675,7 +30682,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 464 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 466 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30800,7 +30807,7 @@ local.get $6 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 465 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 467 ;) (param $0 i32) (param $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -30874,7 +30881,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 466 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 468 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -30946,7 +30953,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 467 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 469 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -31007,7 +31014,7 @@ end end ) - (func $start:std/typedarray (; 468 ;) + (func $start:std/typedarray (; 470 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32305,9 +32312,10 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 0 i32.const -2 i32.const -1 @@ -32334,10 +32342,10 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const -2 @@ -32364,10 +32372,10 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const -4 i32.const -3 i32.const -1 @@ -32394,15 +32402,15 @@ i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $1 + local.tee $0 i32.const 5 i32.const 2 i32.const 15 @@ -32420,7 +32428,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -32468,7 +32476,7 @@ call $~lib/rt/pure/__release local.get $26 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release @@ -33237,117 +33245,117 @@ call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $2 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $0 i32.load offset=4 local.set $3 - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|05 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 - local.get $0 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_s i32.add - local.set $1 - local.get $0 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|05 end end - local.get $1 + local.get $2 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner1 - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $2 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $1 - local.get $2 + local.set $2 + local.get $0 i32.load offset=4 local.set $3 - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|06 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 + local.get $2 local.get $3 - local.get $0 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_u i32.add - local.set $1 - local.get $0 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|06 end end - local.get $1 + local.get $2 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner1 - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor @@ -33439,32 +33447,32 @@ call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set f32.const 0 local.set $8 - local.get $1 + local.get $0 i32.load offset=4 local.set $2 - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|07 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if @@ -33472,17 +33480,17 @@ global.set $~argumentsLength local.get $8 local.get $2 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add f32.load f32.add local.set $8 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|07 end end @@ -33490,36 +33498,36 @@ f32.const 6 f32.ne br_if $folding-inner1 - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set f64.const 0 local.set $9 - local.get $1 + local.get $0 i32.load offset=4 local.set $2 - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|08 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if @@ -33527,17 +33535,17 @@ global.set $~argumentsLength local.get $9 local.get $2 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add f64.load f64.add local.set $9 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|08 end end @@ -33545,7 +33553,7 @@ f64.const 6 f64.ne br_if $folding-inner1 - local.get $1 + local.get $0 call $~lib/rt/pure/__release call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> @@ -33933,7 +33941,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 469 ;) + (func $~start (; 471 ;) global.get $~started if return @@ -33943,7 +33951,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 470 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 472 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index b4bc9fb7be..88a77a791b 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result 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))) @@ -137,26 +137,18 @@ end i32.const 0 ) - (func $~lib/rt/stub/__alloc (; 4 ;) (result i32) - (local $0 i32) + (func $~lib/rt/stub/maybeGrowMemory (; 4 ;) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 + local.get $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $3 + local.get $2 local.get $0 local.get $1 i32.sub @@ -167,7 +159,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 + local.get $2 local.get $1 i32.gt_s select @@ -186,22 +178,6 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 3 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $2 ) (func $start:typeof (; 5 ;) i32.const 64 @@ -424,7 +400,21 @@ global.set $~lib/rt/stub/startOffset i32.const 304 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + i32.const 336 + call $~lib/rt/stub/maybeGrowMemory + i32.const 304 + i32.const 16 + i32.store + i32.const 308 + i32.const 1 + i32.store + i32.const 312 + i32.const 3 + i32.store + i32.const 316 + i32.const 0 + i32.store + i32.const 320 global.set $typeof/c i32.const 64 i32.const 64 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index af4e2f67ea..25d7b98e03 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -2,8 +2,8 @@ (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 $none_=>_i32 (func (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_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -22,7 +22,49 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $while/testNested (; 5 ;) + (func $while/testSimple (; 5 ;) + (local $0 i32) + (local $1 i32) + i32.const 10 + local.set $0 + loop $while-continue|0 + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 11 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + ) + (func $while/testNested (; 6 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -110,7 +152,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testEmpty (; 6 ;) + (func $while/testEmpty (; 7 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -158,7 +200,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testNestedContinue (; 7 ;) + (func $while/testNestedContinue (; 8 ;) (local $0 i32) (local $1 i32) i32.const 10 @@ -206,7 +248,7 @@ i32.const 1 global.set $while/ran ) - (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -372,7 +414,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -655,7 +697,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -769,7 +811,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -856,7 +898,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -913,7 +955,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) + (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) memory.size @@ -960,7 +1002,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1021,7 +1063,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (result i32) (local $1 i32) global.get $~lib/rt/tlsf/collectLock if @@ -1095,65 +1137,65 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 208 - i32.gt_u + i32.load offset=4 + local.tee $1 + i32.const -268435456 + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne if - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - local.tee $2 - i32.const -268435456 - i32.and - local.get $2 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $2 - i32.const 1 - i32.add - i32.store offset=4 - local.get $1 - call $~lib/rt/rtrace/onincrement - local.get $1 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end ) - (func $while/Ref#constructor (; 17 ;) (result i32) + (func $while/Ref#constructor (; 18 ;) (result i32) + (local $0 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - call $~lib/rt/pure/__retain + local.tee $0 + i32.const 208 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + local.get $0 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1164,7 +1206,7 @@ call $~lib/rt/pure/decrement end ) - (func $while/testRef (; 19 ;) + (func $while/testRef (; 20 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1223,7 +1265,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $while/testRefAutorelease (; 20 ;) + (func $while/testRefAutorelease (; 21 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1283,49 +1325,21 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $start:while (; 21 ;) + (func $start:while (; 22 ;) (local $0 i32) - (local $1 i32) i32.const 0 global.set $while/ran - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 + call $while/testSimple + global.get $while/ran + i32.eqz if i32.const 0 i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if + i32.const 16 i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $while/ran i32.const 0 global.set $while/ran call $while/testNested @@ -1354,16 +1368,14 @@ end i32.const 0 global.set $while/ran - i32.const 0 - local.set $0 - loop $while-continue|00 + loop $while-continue|0 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $while-continue|00 + br_if $while-continue|0 end local.get $0 i32.const 10 @@ -1394,14 +1406,14 @@ global.set $while/ran i32.const 10 local.set $0 - loop $while-continue|01 + loop $while-continue|00 local.get $0 if local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|01 + br $while-continue|00 end end local.get $0 @@ -1455,7 +1467,7 @@ unreachable end ) - (func $~start (; 22 ;) + (func $~start (; 23 ;) global.get $~started if return @@ -1465,7 +1477,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From aa38d37299b4c33d9d94c41848ce5bc34def4935 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 15:33:05 +0200 Subject: [PATCH 06/51] rebuild examples --- examples/game-of-life/build/optimized.wasm | Bin 916 -> 901 bytes examples/game-of-life/build/optimized.wat | 189 +++++---- examples/game-of-life/build/untouched.wat | 434 ++++++++++----------- examples/mandelbrot/build/optimized.wasm | Bin 578 -> 543 bytes examples/mandelbrot/build/optimized.wat | 200 +++++----- examples/mandelbrot/build/untouched.wat | 250 ++++++------ examples/n-body/build/index.asm.js | 42 +- examples/n-body/build/optimized.wasm | Bin 1614 -> 1607 bytes examples/n-body/build/optimized.wat | 103 +++-- 9 files changed, 600 insertions(+), 618 deletions(-) diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 17c21d1b0ac293f776d19bb9138c0fca9d93383c..45bf31d00864fa6f82658054ddf22dc0c4260dae 100644 GIT binary patch literal 901 zcmZ`&O>fgc5S`gs+XW*OsT?Z#z&ef)r*Pv+w@L#=t&pP9Yhxv8u@lFRV@g4loWB9T zfj_{3-xg+_K%7Ka^2ffNc{6X`8p3&k0DyU7c<)=j812y7%Fd5gJYJ>|~Ur`Bwozk`RR5 zpb|B>n}_pU{tJ@PG%5h)yclI5Qh~xr%hKQj9V-arJ9*3t zcYzo;1$WN(druz~ISfgc5S`gs+XVxP;8Mv4)^QG;dgMyBN>dfJAVsCu#!B4c#7>;V4NygL{s#OL zBrg22FzdKYno>))cb@0-y)lHd6afI=$gU^~=mIXf09`7I1&9kvo`v~Wdm4`V;}p>D zjYn7U_1@ue=dyLATU0;=Ju{F#J-ImAV9w#m`DN$xIU^K}=5`vT9q z1aox%67Cg&)Hw9*fXvI;Dr`K5%2wd{QbQTX9olWrH!W`WWYQ0nqtL4p*OrMX{7!KE zq%_x^tbqZiGTkUtPTQ-C9sfbuyP{2o3K0(xE7|p7q#U>^!+99lj$&pEFZW(`o_Hdg zO6XS;E!wiVLmaKCRiyXlff&{Wch2`mPw(ebCe?cA&r*~M@E6x&M|za;PNT=MT%(ln z$y%)2|0SIB{*;#v&t diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index b51fc8ebda..e3aff88acd 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -1,8 +1,8 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viid (func (param i32 i32 f64))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $none_=>_f64 (func (result f64))) (import "env" "memory" (memory $0 0)) (import "config" "BGR_DEAD" (global $assembly/config/BGR_DEAD i32)) (import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32)) @@ -15,7 +15,7 @@ (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) - (func $assembly/index/init (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/init (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 global.set $assembly/index/w @@ -27,20 +27,18 @@ global.set $assembly/index/s i32.const 0 local.set $0 - loop $loop|0 - block $break|0 - local.get $0 - global.get $assembly/index/h - i32.ge_s - br_if $break|0 + loop $for-loop|0 + local.get $0 + global.get $assembly/index/h + i32.lt_s + if i32.const 0 local.set $1 - loop $loop|1 - block $break|1 - local.get $1 - global.get $assembly/index/w - i32.ge_s - br_if $break|1 + loop $for-loop|1 + local.get $1 + global.get $assembly/index/w + i32.lt_s + if call $~lib/bindings/Math/random f64.const 0.1 f64.gt @@ -48,18 +46,18 @@ global.get $assembly/config/BGR_DEAD i32.const 16777215 i32.and - else + else global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or end local.set $2 + local.get $1 global.get $assembly/index/s - global.get $assembly/index/w local.get $0 + global.get $assembly/index/w i32.mul i32.add - local.get $1 i32.add i32.const 2 i32.shl @@ -69,18 +67,18 @@ i32.const 1 i32.add local.set $1 - br $loop|1 + br $for-loop|1 end end local.get $0 i32.const 1 i32.add local.set $0 - br $loop|0 + br $for-loop|0 end end ) - (func $assembly/index/step (; 2 ;) (type $FUNCSIG$v) + (func $assembly/index/step (; 2 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -97,45 +95,43 @@ i32.const 1 i32.sub local.set $7 - loop $loop|0 - block $break|0 - local.get $0 - global.get $assembly/index/h - i32.ge_s - br_if $break|0 - local.get $0 + loop $for-loop|0 + local.get $1 + global.get $assembly/index/h + i32.lt_s + if + local.get $1 i32.const 1 i32.sub local.get $6 - local.get $0 + local.get $1 select local.set $4 i32.const 0 - local.get $0 + local.get $1 i32.const 1 i32.add - local.get $0 + local.get $1 local.get $6 i32.eq select local.set $5 i32.const 0 - local.set $1 - loop $loop|1 - block $break|1 - local.get $1 - global.get $assembly/index/w - i32.ge_s - br_if $break|1 - local.get $1 + local.set $0 + loop $for-loop|1 + local.get $0 + global.get $assembly/index/w + i32.lt_s + if + local.get $0 i32.const 1 i32.sub local.get $7 - local.get $1 + local.get $0 select local.tee $3 - global.get $assembly/index/w local.get $4 + global.get $assembly/index/w i32.mul i32.add i32.const 2 @@ -143,10 +139,10 @@ i32.load i32.const 1 i32.and - global.get $assembly/index/w + local.get $0 local.get $4 + global.get $assembly/index/w i32.mul - local.get $1 i32.add i32.const 2 i32.shl @@ -155,16 +151,16 @@ i32.and i32.add i32.const 0 - local.get $1 + local.get $0 i32.const 1 i32.add - local.get $1 + local.get $0 local.get $7 i32.eq select local.tee $2 - global.get $assembly/index/w local.get $4 + global.get $assembly/index/w i32.mul i32.add i32.const 2 @@ -173,10 +169,10 @@ i32.const 1 i32.and i32.add + local.get $3 + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul - local.get $3 i32.add i32.const 2 i32.shl @@ -184,10 +180,10 @@ i32.const 1 i32.and i32.add + local.get $2 + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul - local.get $2 i32.add i32.const 2 i32.shl @@ -195,10 +191,10 @@ i32.const 1 i32.and i32.add - global.get $assembly/index/w + local.get $3 local.get $5 + global.get $assembly/index/w i32.mul - local.get $3 i32.add i32.const 2 i32.shl @@ -206,10 +202,10 @@ i32.const 1 i32.and i32.add - global.get $assembly/index/w + local.get $0 local.get $5 + global.get $assembly/index/w i32.mul - local.get $1 i32.add i32.const 2 i32.shl @@ -217,10 +213,10 @@ i32.const 1 i32.and i32.add - global.get $assembly/index/w + local.get $2 local.get $5 + global.get $assembly/index/w i32.mul - local.get $2 i32.add i32.const 2 i32.shl @@ -229,10 +225,10 @@ i32.and i32.add local.set $2 - global.get $assembly/index/w local.get $0 - i32.mul local.get $1 + global.get $assembly/index/w + i32.mul i32.add i32.const 2 i32.shl @@ -247,12 +243,12 @@ i32.const 2 i32.eq if + local.get $0 global.get $assembly/index/s + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul i32.add - local.get $1 i32.add i32.const 2 i32.shl @@ -274,13 +270,13 @@ i32.shl i32.or i32.store - else + else + local.get $0 global.get $assembly/index/s + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul i32.add - local.get $1 i32.add i32.const 2 i32.shl @@ -289,17 +285,17 @@ i32.or i32.store end - else + else local.get $2 i32.const 3 i32.eq if + local.get $0 global.get $assembly/index/s + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul i32.add - local.get $1 i32.add i32.const 2 i32.shl @@ -307,13 +303,13 @@ i32.const -16777216 i32.or i32.store - else + else + local.get $0 global.get $assembly/index/s + local.get $1 global.get $assembly/index/w - local.get $0 i32.mul i32.add - local.get $1 i32.add i32.const 2 i32.shl @@ -337,39 +333,38 @@ i32.store end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - br $loop|1 + local.set $0 + br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - br $loop|0 + local.set $1 + br $for-loop|0 end end ) - (func $assembly/index/fill (; 3 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $assembly/index/fill (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) - loop $loop|0 - block $break|0 - local.get $3 - global.get $assembly/index/w - i32.ge_s - br_if $break|0 + loop $for-loop|0 + local.get $3 + global.get $assembly/index/w + i32.lt_s + if call $~lib/bindings/Math/random local.get $2 f64.lt if + local.get $3 global.get $assembly/index/s - global.get $assembly/index/w local.get $1 + global.get $assembly/index/w i32.mul i32.add - local.get $3 i32.add i32.const 2 i32.shl @@ -382,27 +377,26 @@ i32.const 1 i32.add local.set $3 - br $loop|0 + br $for-loop|0 end end i32.const 0 local.set $3 - loop $loop|1 - block $break|1 - local.get $3 - global.get $assembly/index/h - i32.ge_s - br_if $break|1 + loop $for-loop|1 + local.get $3 + global.get $assembly/index/h + i32.lt_s + if call $~lib/bindings/Math/random local.get $2 f64.lt if + local.get $0 global.get $assembly/index/s - global.get $assembly/index/w local.get $3 + global.get $assembly/index/w i32.mul i32.add - local.get $0 i32.add i32.const 2 i32.shl @@ -415,11 +409,8 @@ i32.const 1 i32.add local.set $3 - br $loop|1 + br $for-loop|1 end end ) - (func $null (; 4 ;) (type $FUNCSIG$v) - nop - ) ) diff --git a/examples/game-of-life/build/untouched.wat b/examples/game-of-life/build/untouched.wat index 9f380f3a71..f8cd16c0b7 100644 --- a/examples/game-of-life/build/untouched.wat +++ b/examples/game-of-life/build/untouched.wat @@ -1,15 +1,14 @@ (module - (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viid (func (param i32 i32 f64))) + (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) + (type $none_=>_f64 (func (result f64))) (import "env" "memory" (memory $0 0)) (import "config" "BGR_DEAD" (global $assembly/config/BGR_DEAD i32)) (import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32)) (import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32)) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/index/w (mut i32) (i32.const 0)) (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) @@ -17,12 +16,14 @@ (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) - (func $assembly/index/init (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $assembly/index/init (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + (local $8 i32) local.get $0 global.set $assembly/index/w local.get $1 @@ -31,28 +32,28 @@ local.get $1 i32.mul global.set $assembly/index/s - block $break|0 - i32.const 0 - local.set $2 - loop $loop|0 - local.get $2 - global.get $assembly/index/h - i32.lt_s - i32.eqz - br_if $break|0 - block $break|1 - i32.const 0 - local.set $3 - loop $loop|1 - local.get $3 - global.get $assembly/index/w - i32.lt_s - i32.eqz - br_if $break|1 - local.get $3 - local.set $6 + i32.const 0 + local.set $2 + loop $for-loop|0 + local.get $2 + global.get $assembly/index/h + i32.lt_s + local.set $3 + local.get $3 + if + i32.const 0 + local.set $4 + loop $for-loop|1 + local.get $4 + global.get $assembly/index/w + i32.lt_s + local.set $5 + local.get $5 + if + local.get $4 + local.set $8 local.get $2 - local.set $5 + local.set $7 call $~lib/bindings/Math/random f64.const 0.1 f64.gt @@ -60,41 +61,39 @@ global.get $assembly/config/BGR_DEAD i32.const 16777215 i32.and - else + else global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or end - local.set $4 + local.set $6 global.get $assembly/index/s - local.get $5 + local.get $7 global.get $assembly/index/w i32.mul i32.add - local.get $6 + local.get $8 i32.add i32.const 2 i32.shl - local.get $4 + local.get $6 i32.store - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 - br $loop|1 + local.set $4 + br $for-loop|1 end - unreachable end local.get $2 i32.const 1 i32.add local.set $2 - br $loop|0 + br $for-loop|0 end - unreachable end ) - (func $assembly/index/step (; 2 ;) (type $FUNCSIG$v) + (func $assembly/index/step (; 2 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -112,6 +111,8 @@ (local $14 i32) (local $15 i32) (local $16 i32) + (local $17 i32) + (local $18 i32) global.get $assembly/index/h i32.const 1 i32.sub @@ -120,90 +121,90 @@ i32.const 1 i32.sub local.set $1 - block $break|0 - i32.const 0 - local.set $2 - loop $loop|0 - local.get $2 - global.get $assembly/index/h - i32.lt_s - i32.eqz - br_if $break|0 + i32.const 0 + local.set $2 + loop $for-loop|0 + local.get $2 + global.get $assembly/index/h + i32.lt_s + local.set $3 + local.get $3 + if local.get $2 i32.const 0 i32.eq if (result i32) local.get $0 - else + else local.get $2 i32.const 1 i32.sub end - local.set $3 + local.set $4 local.get $2 local.get $0 i32.eq if (result i32) i32.const 0 - else + else local.get $2 i32.const 1 i32.add end - local.set $4 - block $break|1 - i32.const 0 - local.set $5 - loop $loop|1 - local.get $5 - global.get $assembly/index/w - i32.lt_s - i32.eqz - br_if $break|1 - local.get $5 + local.set $5 + i32.const 0 + local.set $6 + loop $for-loop|1 + local.get $6 + global.get $assembly/index/w + i32.lt_s + local.set $7 + local.get $7 + if + local.get $6 i32.const 0 i32.eq if (result i32) local.get $1 - else - local.get $5 + else + local.get $6 i32.const 1 i32.sub end - local.set $6 - local.get $5 + local.set $8 + local.get $6 local.get $1 i32.eq if (result i32) i32.const 0 - else - local.get $5 + else + local.get $6 i32.const 1 i32.add end - local.set $7 - local.get $6 local.set $9 - local.get $3 - local.set $8 local.get $8 + local.set $11 + local.get $4 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl i32.load i32.const 1 i32.and - local.get $5 - local.set $9 - local.get $3 - local.set $8 - local.get $8 + local.get $6 + local.set $11 + local.get $4 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -211,14 +212,14 @@ i32.const 1 i32.and i32.add - local.get $7 - local.set $9 - local.get $3 - local.set $8 - local.get $8 + local.get $9 + local.set $11 + local.get $4 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -226,14 +227,14 @@ i32.const 1 i32.and i32.add - local.get $6 - local.set $9 - local.get $2 - local.set $8 local.get $8 + local.set $11 + local.get $2 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -241,14 +242,14 @@ i32.const 1 i32.and i32.add - local.get $7 - local.set $9 + local.get $9 + local.set $11 local.get $2 - local.set $8 - local.get $8 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -256,14 +257,14 @@ i32.const 1 i32.and i32.add - local.get $6 - local.set $9 - local.get $4 - local.set $8 local.get $8 + local.set $11 + local.get $5 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -271,14 +272,14 @@ i32.const 1 i32.and i32.add + local.get $6 + local.set $11 local.get $5 - local.set $9 - local.get $4 - local.set $8 - local.get $8 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -286,14 +287,14 @@ i32.const 1 i32.and i32.add - local.get $7 - local.set $9 - local.get $4 - local.set $8 - local.get $8 + local.get $9 + local.set $11 + local.get $5 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $9 + local.get $11 i32.add i32.const 2 i32.shl @@ -301,267 +302,262 @@ i32.const 1 i32.and i32.add - local.set $9 - local.get $5 - local.set $10 + local.set $11 + local.get $6 + local.set $12 local.get $2 - local.set $8 - local.get $8 + local.set $10 + local.get $10 global.get $assembly/index/w i32.mul - local.get $10 + local.get $12 i32.add i32.const 2 i32.shl i32.load - local.set $10 - local.get $10 + local.set $12 + local.get $12 i32.const 1 i32.and if - local.get $9 + local.get $11 i32.const 14 i32.and i32.const 2 i32.eq if - local.get $5 - local.set $12 + local.get $6 + local.set $14 local.get $2 - local.set $11 + local.set $13 + local.get $12 + local.set $10 local.get $10 - local.set $8 - local.get $8 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $13 + local.tee $15 i32.const 0 - local.tee $14 - local.get $13 - local.get $14 + local.tee $16 + local.get $15 + local.get $16 i32.gt_s select - local.set $13 - local.get $12 - local.set $16 - local.get $11 local.set $15 + local.get $14 + local.set $18 local.get $13 + local.set $17 + local.get $15 i32.const 24 i32.shl - local.get $8 + local.get $10 i32.const 16777215 i32.and i32.or - local.set $14 + local.set $16 global.get $assembly/index/s - local.get $15 + local.get $17 global.get $assembly/index/w i32.mul i32.add - local.get $16 + local.get $18 i32.add i32.const 2 i32.shl - local.get $14 + local.get $16 i32.store - else - local.get $5 - local.set $16 + else + local.get $6 + local.set $18 local.get $2 - local.set $15 + local.set $17 global.get $assembly/config/BGR_DEAD i32.const -16777216 i32.or - local.set $14 + local.set $16 global.get $assembly/index/s - local.get $15 + local.get $17 global.get $assembly/index/w i32.mul i32.add - local.get $16 + local.get $18 i32.add i32.const 2 i32.shl - local.get $14 + local.get $16 i32.store end - else - local.get $9 + else + local.get $11 i32.const 3 i32.eq if - local.get $5 - local.set $12 + local.get $6 + local.set $14 local.get $2 - local.set $11 + local.set $13 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or - local.set $8 + local.set $10 global.get $assembly/index/s - local.get $11 + local.get $13 global.get $assembly/index/w i32.mul i32.add - local.get $12 + local.get $14 i32.add i32.const 2 i32.shl - local.get $8 + local.get $10 i32.store - else - local.get $5 - local.set $15 + else + local.get $6 + local.set $17 local.get $2 - local.set $14 - local.get $10 - local.set $13 - local.get $13 + local.set $16 + local.get $12 + local.set $15 + local.get $15 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $12 + local.tee $14 i32.const 0 - local.tee $11 - local.get $12 - local.get $11 + local.tee $13 + local.get $14 + local.get $13 i32.gt_s select - local.set $12 - local.get $15 - local.set $11 + local.set $14 + local.get $17 + local.set $13 + local.get $16 + local.set $10 local.get $14 - local.set $8 - local.get $12 i32.const 24 i32.shl - local.get $13 + local.get $15 i32.const 16777215 i32.and i32.or - local.set $16 + local.set $18 global.get $assembly/index/s - local.get $8 + local.get $10 global.get $assembly/index/w i32.mul i32.add - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl - local.get $16 + local.get $18 i32.store end end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 - br $loop|1 + local.set $6 + br $for-loop|1 end - unreachable end local.get $2 i32.const 1 i32.add local.set $2 - br $loop|0 + br $for-loop|0 end - unreachable end ) - (func $assembly/index/fill (; 3 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $assembly/index/fill (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $break|0 - i32.const 0 - local.set $3 - loop $loop|0 - local.get $3 - global.get $assembly/index/w - i32.lt_s - i32.eqz - br_if $break|0 + (local $7 i32) + i32.const 0 + local.set $3 + loop $for-loop|0 + local.get $3 + global.get $assembly/index/w + i32.lt_s + local.set $4 + local.get $4 + if call $~lib/bindings/Math/random local.get $2 f64.lt if local.get $3 - local.set $6 + local.set $7 local.get $1 - local.set $5 + local.set $6 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or - local.set $4 + local.set $5 global.get $assembly/index/s - local.get $5 + local.get $6 global.get $assembly/index/w i32.mul i32.add - local.get $6 + local.get $7 i32.add i32.const 2 i32.shl - local.get $4 + local.get $5 i32.store end local.get $3 i32.const 1 i32.add local.set $3 - br $loop|0 + br $for-loop|0 end - unreachable end - block $break|1 - i32.const 0 - local.set $3 - loop $loop|1 - local.get $3 - global.get $assembly/index/h - i32.lt_s - i32.eqz - br_if $break|1 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + global.get $assembly/index/h + i32.lt_s + local.set $4 + local.get $4 + if call $~lib/bindings/Math/random local.get $2 f64.lt if local.get $0 - local.set $6 + local.set $7 local.get $3 - local.set $5 + local.set $6 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or - local.set $4 + local.set $5 global.get $assembly/index/s - local.get $5 + local.get $6 global.get $assembly/index/w i32.mul i32.add - local.get $6 + local.get $7 i32.add i32.const 2 i32.shl - local.get $4 + local.get $5 i32.store end local.get $3 i32.const 1 i32.add local.set $3 - br $loop|1 + br $for-loop|1 end - unreachable end ) - (func $null (; 4 ;) (type $FUNCSIG$v) - ) ) diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index d4fccd63975e3f2da22733a60d93902935927762..1d8d62c490b5f11e352089932056ee7f7bcb7d7e 100644 GIT binary patch literal 543 zcmZva%}T>S6ov2nWro~<1+S!A-&Hr^UK=ortP6pls^$$$r?pInB%V|Ah(Ttjz?YNBnl zP@L8Qt&sJ#RpUx2%Civi(mZw+8cJy&yF{m UyGfe$;@(5lY2MMbXvVGd2e^Z1!2kdN literal 578 zcmY*XyG{a85S{zj2Q0|O%5v_;SX$Ux?2>3FF)^`+zy_DN>_$MNA>mVmD^^x^`#BVT z03TqY!+L=@%{`epXU@#zLT8jR0ARjo%NYf<*_2J&0Q^MAR%d)C?z29y5=w$+z(hQJ zw9`1v9-cXX5FEI3#CI95o2B_=9A72F7LFIzXD853iY=i=N5x6F| z3iZOkc2x1g$(hc?nvM?iMpWMc(}vkp;E$2WCg5=f$@YKVwOXd%0< z16l=XvA$3>!vRqC9y(1>vgF%n>!5-TIy!LYhT%u?WqoT05mBg&-ds6YL3e?*IV~np zY@B414V0`g&l3^K0vlaPf>J`FlDl30eMXZSw2qE>^ diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index 82bdd9a7b0..4b92ab4125 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -1,133 +1,136 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$v (func)) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) (export "memory" (memory $0)) (export "computeLine" (func $assembly/index/computeLine)) - (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) - (local $6 f64) + (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) - local.get $1 - f64.convert_i32_u - local.tee $9 - f64.const 0.625 - f64.mul local.get $0 f64.convert_i32_u local.get $2 f64.convert_i32_u - local.tee $6 f64.const 0.5 f64.mul f64.sub f64.const 10 - f64.const 3 - local.get $9 - f64.mul - f64.const 4 + local.get $1 + i32.const 3 + i32.mul + local.tee $6 + local.get $2 + i32.const 2 + i32.shl + local.tee $2 local.get $6 - f64.mul - f64.min + local.get $2 + i32.lt_s + select + f64.convert_i32_s f64.div - local.tee $10 + local.tee $9 + f64.mul + local.set $10 + local.get $1 + f64.convert_i32_u + f64.const 0.625 f64.mul - local.set $11 - local.get $10 + local.get $9 f64.mul - local.set $13 + local.set $12 local.get $0 local.get $1 i32.mul i32.const 1 i32.shl - local.set $0 + local.set $2 f64.const 1 local.get $3 f64.convert_i32_u - local.tee $6 f64.div - local.set $14 - f64.const 8 - local.get $6 - f64.min - local.set $15 - loop $loop|0 - block $break|0 - local.get $8 - local.get $1 - i32.ge_u - br_if $break|0 - local.get $8 + local.set $13 + i32.const 8 + local.get $3 + i32.const 8 + local.get $3 + i32.lt_u + select + local.set $0 + i32.const 0 + local.set $6 + loop $for-loop|0 + local.get $6 + local.get $1 + i32.lt_u + if + local.get $6 f64.convert_i32_u - local.get $10 + local.get $9 f64.mul - local.get $13 + local.get $12 f64.sub - local.set $12 - f64.const 0 - local.set $4 + local.set $11 f64.const 0 + local.tee $4 local.set $5 i32.const 0 local.set $7 - loop $continue|1 - block $break|1 - local.get $4 - local.get $4 - f64.mul - local.tee $9 - local.get $5 - local.get $5 - f64.mul - local.tee $6 - f64.add - f64.const 4 - f64.le - i32.eqz - br_if $break|1 - f64.const 2 - local.get $4 - f64.mul - local.get $5 - f64.mul - local.get $11 - f64.add - local.set $5 - local.get $9 - local.get $6 - f64.sub - local.get $12 - f64.add - local.set $4 - local.get $7 - local.get $3 - i32.ge_u - br_if $break|1 - local.get $7 - i32.const 1 - i32.add - local.set $7 - br $continue|1 + loop $while-continue|1 + local.get $4 + local.get $4 + f64.mul + local.tee $14 + local.get $5 + local.get $5 + f64.mul + local.tee $8 + f64.add + f64.const 4 + f64.le + if + block $while-break|1 + f64.const 2 + local.get $4 + f64.mul + local.get $5 + f64.mul + local.get $10 + f64.add + local.set $5 + local.get $14 + local.get $8 + f64.sub + local.get $11 + f64.add + local.set $4 + local.get $7 + local.get $3 + i32.ge_u + br_if $while-break|1 + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $while-continue|1 + end end end - loop $continue|2 + loop $while-continue|2 local.get $7 - f64.convert_i32_u - local.get $15 - f64.lt + local.get $0 + i32.lt_u if local.get $4 local.get $4 @@ -136,14 +139,14 @@ local.get $5 f64.mul f64.sub - local.get $12 + local.get $11 f64.add f64.const 2 local.get $4 f64.mul local.get $5 f64.mul - local.get $11 + local.get $10 f64.add local.set $5 local.set $4 @@ -151,15 +154,13 @@ i32.const 1 i32.add local.set $7 - br $continue|2 + br $while-continue|2 end end - i32.const 2047 - local.set $2 - local.get $8 + local.get $6 i32.const 1 i32.shl - local.get $0 + local.get $2 i32.add local.get $4 local.get $4 @@ -168,7 +169,7 @@ local.get $5 f64.mul f64.add - local.tee $6 + local.tee $8 f64.const 1 f64.gt if (result i32) @@ -178,12 +179,12 @@ i32.add f64.convert_i32_u f64.const 0.5 - local.get $6 + local.get $8 call $~lib/bindings/Math/log f64.mul call $~lib/bindings/Math/log2 f64.sub - local.get $14 + local.get $13 f64.mul f64.const 0 f64.max @@ -191,19 +192,16 @@ f64.min f64.mul i32.trunc_f64_u - else + else i32.const 2047 end i32.store16 - local.get $8 + local.get $6 i32.const 1 i32.add - local.set $8 - br $loop|0 + local.set $6 + br $for-loop|0 end end ) - (func $null (; 3 ;) (type $FUNCSIG$v) - nop - ) ) diff --git a/examples/mandelbrot/build/untouched.wat b/examples/mandelbrot/build/untouched.wat index 8db1ec8f17..4d3fc73914 100644 --- a/examples/mandelbrot/build/untouched.wat +++ b/examples/mandelbrot/build/untouched.wat @@ -1,37 +1,37 @@ (module - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$v (func)) + (type $f64_=>_f64 (func (param f64) (result f64))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/index/NUM_COLORS i32 (i32.const 2048)) (export "memory" (memory $0)) (export "computeLine" (func $assembly/index/computeLine)) - (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 f64) + (local $6 i32) + (local $7 i32) (local $8 f64) - (local $9 i32) + (local $9 f64) (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 f64) + (local $11 i32) + (local $12 f64) + (local $13 i32) (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 i32) - (local $19 f64) + (local $18 f64) + (local $19 i32) (local $20 i32) (local $21 f64) (local $22 f64) (local $23 f64) (local $24 f64) + (local $25 f64) + (local $26 f64) local.get $1 f64.convert_i32_u f64.const 1 @@ -47,209 +47,213 @@ f64.mul local.set $5 f64.const 10 - f64.const 3 + i32.const 3 local.get $1 - f64.convert_i32_u - f64.mul - f64.const 4 + i32.mul + local.tee $6 + i32.const 4 local.get $2 - f64.convert_i32_u - f64.mul - f64.min + i32.mul + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + f64.convert_i32_s f64.div - local.set $6 + local.set $8 local.get $0 f64.convert_i32_u local.get $5 f64.sub - local.get $6 + local.get $8 f64.mul - local.set $7 + local.set $9 local.get $4 - local.get $6 + local.get $8 f64.mul - local.set $8 + local.set $10 local.get $0 local.get $1 i32.mul i32.const 1 i32.shl - local.set $9 + local.set $11 f64.const 1 local.get $3 f64.convert_i32_u f64.div - local.set $10 - f64.const 8 + local.set $12 + i32.const 8 + local.tee $6 local.get $3 - f64.convert_i32_u - f64.min - local.set $11 - block $break|0 - i32.const 0 - local.set $12 - loop $loop|0 - local.get $12 - local.get $1 - i32.lt_u - i32.eqz - br_if $break|0 - local.get $12 - f64.convert_i32_u + local.tee $7 + local.get $6 + local.get $7 + i32.lt_u + select + local.set $13 + i32.const 0 + local.set $6 + loop $for-loop|0 + local.get $6 + local.get $1 + i32.lt_u + local.set $7 + local.get $7 + if local.get $6 - f64.mul + f64.convert_i32_u local.get $8 + f64.mul + local.get $10 f64.sub - local.set $13 - f64.const 0 local.set $14 f64.const 0 local.set $15 + f64.const 0 + local.set $16 i32.const 0 - local.set $18 - block $break|1 - loop $continue|1 - local.get $14 - local.get $14 - f64.mul - local.tee $16 + local.set $19 + block $while-break|1 + loop $while-continue|1 local.get $15 local.get $15 f64.mul local.tee $17 + local.get $16 + local.get $16 + f64.mul + local.tee $18 f64.add f64.const 4 f64.le - i32.eqz - br_if $break|1 - f64.const 2 - local.get $14 - f64.mul - local.get $15 - f64.mul - local.get $7 - f64.add - local.set $15 - local.get $16 - local.get $17 - f64.sub - local.get $13 - f64.add - local.set $14 - local.get $18 - local.get $3 - i32.ge_u + local.set $20 + local.get $20 if - br $break|1 + f64.const 2 + local.get $15 + f64.mul + local.get $16 + f64.mul + local.get $9 + f64.add + local.set $16 + local.get $17 + local.get $18 + f64.sub + local.get $14 + f64.add + local.set $15 + local.get $19 + local.get $3 + i32.ge_u + if + br $while-break|1 + end + local.get $19 + i32.const 1 + i32.add + local.set $19 + br $while-continue|1 end - local.get $18 - i32.const 1 - i32.add - local.set $18 - br $continue|1 end - unreachable end - block $break|2 - loop $continue|2 - local.get $18 - f64.convert_i32_u - local.get $11 - f64.lt - i32.eqz - br_if $break|2 - local.get $14 - local.get $14 - f64.mul + loop $while-continue|2 + local.get $19 + local.get $13 + i32.lt_u + local.set $20 + local.get $20 + if local.get $15 local.get $15 f64.mul + local.get $16 + local.get $16 + f64.mul f64.sub - local.get $13 + local.get $14 f64.add - local.set $19 + local.set $21 f64.const 2 - local.get $14 - f64.mul local.get $15 f64.mul - local.get $7 + local.get $16 + f64.mul + local.get $9 f64.add + local.set $16 + local.get $21 local.set $15 local.get $19 - local.set $14 - local.get $18 i32.const 1 i32.add - local.set $18 - br $continue|2 + local.set $19 + br $while-continue|2 end - unreachable end global.get $assembly/index/NUM_COLORS i32.const 1 i32.sub local.set $20 - local.get $14 - local.get $14 - f64.mul local.get $15 local.get $15 f64.mul + local.get $16 + local.get $16 + f64.mul f64.add - local.set $19 - local.get $19 + local.set $22 + local.get $22 f64.const 1 f64.gt if f64.const 0.5 - local.get $19 + local.get $22 call $~lib/bindings/Math/log f64.mul call $~lib/bindings/Math/log2 - local.set $21 + local.set $23 global.get $assembly/index/NUM_COLORS i32.const 1 i32.sub f64.convert_i32_s - local.get $18 + local.get $19 i32.const 1 i32.add f64.convert_i32_u - local.get $21 + local.get $23 f64.sub - local.get $10 + local.get $12 f64.mul - local.set $24 + local.set $26 f64.const 0 - local.set $23 + local.set $25 f64.const 1 - local.set $22 - local.get $24 - local.get $23 + local.set $24 + local.get $26 + local.get $25 f64.max - local.get $22 + local.get $24 f64.min f64.mul i32.trunc_f64_u local.set $20 end - local.get $9 - local.get $12 + local.get $11 + local.get $6 i32.const 1 i32.shl i32.add local.get $20 i32.store16 - local.get $12 + local.get $6 i32.const 1 i32.add - local.set $12 - br $loop|0 + local.set $6 + br $for-loop|0 end - unreachable end ) - (func $null (; 3 ;) (type $FUNCSIG$v) - ) ) diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index 5b3416dec5..3e9012e55d 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -23,37 +23,33 @@ function asmFunc(global, env, buffer) { var assembly_index_system = 0; var $lib_rt_stub_startOffset = 0; var $lib_rt_stub_offset = 0; - function $lib_rt_stub_maybeGrowMemory($0) { - var $1 = 0, $2 = 0; - $2 = __wasm_memory_size(); - $1 = $2 << 16 | 0; - if ($0 >>> 0 > $1 >>> 0) { - $1 = ((($0 - $1 | 0) + 65535 | 0) & -65536 | 0) >>> 16 | 0; - if ((__wasm_memory_grow((($2 | 0) > ($1 | 0) ? $2 : $1) | 0) | 0) < (0 | 0)) { - if ((__wasm_memory_grow($1 | 0) | 0) < (0 | 0)) { - abort() - } - } - } - $lib_rt_stub_offset = $0; - } - function $lib_rt_stub___alloc($0, $1) { - var $2 = 0, $3 = 0, $4 = 0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0; if ($0 >>> 0 > 1073741808 >>> 0) { abort() } $2 = ($0 + 15 | 0) & -16 | 0; - $3 = $2 >>> 0 > 16 >>> 0; - $4 = $lib_rt_stub_offset + 16 | 0; - $3 = $3 ? $2 : 16; - $lib_rt_stub_maybeGrowMemory($4 + $3 | 0); - $2 = $4 - 16 | 0; - HEAP32[$2 >> 2] = $3; + $4 = $2 >>> 0 > 16 >>> 0; + $5 = $lib_rt_stub_offset + 16 | 0; + $6 = $4 ? $2 : 16; + $2 = $5 + $6 | 0; + $4 = __wasm_memory_size(); + $3 = $4 << 16 | 0; + if ($2 >>> 0 > $3 >>> 0) { + $3 = ((($2 - $3 | 0) + 65535 | 0) & -65536 | 0) >>> 16 | 0; + if ((__wasm_memory_grow((($4 | 0) > ($3 | 0) ? $4 : $3) | 0) | 0) < (0 | 0)) { + if ((__wasm_memory_grow($3 | 0) | 0) < (0 | 0)) { + abort() + } + } + } + $lib_rt_stub_offset = $2; + $2 = $5 - 16 | 0; + HEAP32[$2 >> 2] = $6; HEAP32[($2 + 4 | 0) >> 2] = 1; HEAP32[($2 + 8 | 0) >> 2] = $1; HEAP32[($2 + 12 | 0) >> 2] = $0; - return $4; + return $5; } function assembly_index_NBodySystem_constructor($0) { diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 7f296506670d934a85ac031c93dd81acd7a14979..2ad36bbb8785824ad2db0f1b9b3b8d798afb50c9 100644 GIT binary patch delta 324 zcmXAhze)o^5XNU__b!**p&KnMqA+X%b{2vMHo7YW)HJ?;5dVb81vMc-5QIx*ANLLH zt@Iu21Rug)@B!i&i|_Z%e9U|w*?U%pv+*?o0B%;g09`C+_3bRJDbj#(gaosbR;l!O z(i=h?o%e1ouAoxs_a+Com-mn)SgpOKwI{@=Wbohf`CN6hgS1KB6jn>NT=?P0%F3cn z!^VZBeXx-?6Z?0|5fiI{m(Rjarw=1 delta 321 zcmXYrO-chn5QSe=_hgcEf*nCb;-c*Yvz07@8+BTUs6hlz5PyO)!Jm*I2*TtFVQ%2U z3%K(F?mU7gaN!MN8C=w(c)a>veN;XxHJp!c2>`X?K4s`*R%=%)28uPI5P@lS+RU^b zPX-T&ql>}a(FV-AQjhdp=>cH*h06UPpYhG9NeX_!u*N5MXN z5|@ta2?7o!LjMblF%C^OXQTuZe&%u|448)SQoo_ZTuQ^k=#TGYdUdZ;3#Wn|dUiUm z(i*9}MK3EPE$Fb6n;oJoYzJ*A|Ds(cpKtMIe!?Z0Wr_E>EBd<7?}fHix2QU79W1|P ZYQ(Ei1GZq+g{0(Rha;Vc6XkIs`30h`J30UW diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index 92847d63c7..bfba7cb2f6 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $f64_f64_f64_f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) @@ -16,20 +16,46 @@ (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -37,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -55,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -101,9 +98,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $assembly/index/NBodySystem#constructor (; 2 ;) (param $0 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -188,7 +185,7 @@ i32.store local.get $1 ) - (func $assembly/index/Body#constructor (; 3 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $assembly/index/Body#constructor (; 2 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) (local $7 i32) i32.const 56 i32.const 4 @@ -216,7 +213,7 @@ f64.store offset=48 local.get $7 ) - (func $assembly/index/init (; 4 ;) + (func $assembly/index/init (; 3 ;) (local $0 i32) i32.const 20 i32.const 5 @@ -275,7 +272,7 @@ call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 5 ;) (param $0 i32) + (func $assembly/index/NBodySystem#advance (; 4 ;) (param $0 i32) (local $1 i32) (local $2 f64) (local $3 i32) @@ -477,7 +474,7 @@ end end ) - (func $assembly/index/NBodySystem#energy (; 6 ;) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 5 ;) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -607,13 +604,13 @@ end local.get $1 ) - (func $assembly/index/step (; 7 ;) (result f64) + (func $assembly/index/step (; 6 ;) (result f64) global.get $assembly/index/system call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 8 ;) (param $0 i32) + (func $assembly/index/bench (; 7 ;) (param $0 i32) (local $1 i32) loop $for-loop|0 local.get $1 @@ -630,7 +627,7 @@ end end ) - (func $assembly/index/getBody (; 9 ;) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 8 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 global.get $assembly/index/system @@ -653,7 +650,7 @@ i32.const 0 end ) - (func $~start (; 10 ;) + (func $~start (; 9 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 From 1868ef3fa1d2d274b3e4a192184fc5d9e3d928dc Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 16:38:44 +0200 Subject: [PATCH 07/51] slightly improve pass pipeline --- cli/asc.js | 3 +-- tests/compiler/comma.optimized.wat | 4 +--- tests/compiler/std/pointer.optimized.wat | 8 ++++---- tests/compiler/unary.optimized.wat | 12 ++++-------- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 242a9bf216..ee4b8a991f 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -784,10 +784,9 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("reorder-locals"); - } else { - add("simplify-globals-optimizing"); } add("optimize-instructions"); + add("simplify-globals-optimizing"); } // remove unused elements of table and pack / reduce memory add("duplicate-function-elimination"); // differs diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 8066067dba..a8362b0abf 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -73,9 +73,7 @@ global.set $comma/a i32.const 1 global.set $comma/b - global.get $comma/a - i32.const 1 - i32.add + i32.const 2 global.set $comma/a global.get $comma/a global.set $comma/b diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 6d695441d9..a7a2bdb19e 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -239,13 +239,13 @@ global.set $std/pointer/one i32.const 24 global.set $std/pointer/two - global.get $std/pointer/one + i32.const 8 i32.const 1 i32.store - global.get $std/pointer/one + i32.const 12 i32.const 2 - i32.store offset=4 - global.get $std/pointer/one + i32.store + i32.const 8 i32.load i32.const 1 i32.ne diff --git a/tests/compiler/unary.optimized.wat b/tests/compiler/unary.optimized.wat index 87540b0edb..c75f038835 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -42,9 +42,7 @@ global.set $unary/i i32.const -1 global.set $unary/i - global.get $unary/i - i32.const 1 - i32.add + i32.const 0 global.set $unary/i global.get $unary/i i32.const 1 @@ -94,9 +92,7 @@ global.set $unary/I i64.const -1 global.set $unary/I - global.get $unary/I - i64.const 1 - i64.add + i64.const 0 global.set $unary/I global.get $unary/I i64.const 1 @@ -148,7 +144,7 @@ global.set $unary/f f32.const 1.25 global.set $unary/f - global.get $unary/f + f32.const 1.25 local.tee $2 f32.const 1 f32.add @@ -194,7 +190,7 @@ global.set $unary/F f64.const 1.25 global.set $unary/F - global.get $unary/F + f64.const 1.25 local.tee $3 f64.const 1 f64.add From 8b4b83efceb45ce1c2ab2f22685d586ac9dbd799 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 16:42:04 +0200 Subject: [PATCH 08/51] simplify-globals-optimizing -> simplify-globals without regress --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index ee4b8a991f..bde0338c63 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -774,7 +774,7 @@ exports.main = function main(argv, options, callback) { add("code-pushing"); // this quite expensive so do this only for highest opt level - add("simplify-globals-optimizing"); + add("simplify-globals"); if (optimizeLevel >= 3) { add("simplify-locals-nostructure"); add("vacuum"); From a8cd1eda3d5a91c764df5b8794ab3aa4bcd36d90 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 17:27:55 +0200 Subject: [PATCH 09/51] swap optimize-instructions --- cli/asc.js | 3 +- tests/compiler/do.optimized.wat | 2 +- .../extends-baseaggregate.optimized.wat | 4 +-- tests/compiler/for.optimized.wat | 2 +- .../implicit-getter-setter.optimized.wat | 2 +- tests/compiler/issues/1095.optimized.wat | 2 +- tests/compiler/managed-cast.optimized.wat | 2 +- tests/compiler/mandelbrot.optimized.wat | 2 +- tests/compiler/rc/local-init.optimized.wat | 2 +- .../rc/logical-and-mismatch.optimized.wat | 2 +- .../rc/logical-or-mismatch.optimized.wat | 2 +- tests/compiler/rc/optimize.optimized.wat | 2 +- tests/compiler/rc/rereturn.optimized.wat | 2 +- .../rc/ternary-mismatch.optimized.wat | 2 +- tests/compiler/resolve-ternary.optimized.wat | 2 +- .../retain-release-sanity.optimized.wat | 4 +-- tests/compiler/retain-return.optimized.wat | 2 +- tests/compiler/runtime-full.optimized.wat | 2 +- .../compiler/std/array-literal.optimized.wat | 2 +- tests/compiler/std/array.optimized.wat | 4 +-- tests/compiler/std/arraybuffer.optimized.wat | 2 +- tests/compiler/std/dataview.optimized.wat | 2 +- tests/compiler/std/libm.optimized.wat | 2 -- tests/compiler/std/map.optimized.wat | 4 +-- tests/compiler/std/math.optimized.wat | 2 -- tests/compiler/std/set.optimized.wat | 4 +-- tests/compiler/std/staticarray.optimized.wat | 2 +- .../std/string-casemapping.optimized.wat | 26 ++++++++-------- .../std/string-encoding.optimized.wat | 4 +-- tests/compiler/std/string.optimized.wat | 14 ++++----- tests/compiler/std/typedarray.optimized.wat | 30 +++++++++---------- tests/compiler/while.optimized.wat | 2 +- 32 files changed, 69 insertions(+), 72 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index bde0338c63..0fcfce9e44 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -679,11 +679,12 @@ exports.main = function main(argv, options, callback) { add("dce"); add("remove-unused-brs"); add("remove-unused-names"); - add("optimize-instructions"); + // add("optimize-instructions"); // differs move 2 lines above if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("pick-load-signs"); add("simplify-globals-optimizing"); // differs } + add("optimize-instructions"); // differs if (optimizeLevel >= 3 || shrinkLevel >= 2) { add("precompute-propagate"); } else { diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 86096a6c73..934469aa75 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -806,10 +806,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 0eb6c15c13..b59dec43c3 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -644,10 +644,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -1395,10 +1395,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 0a03f97182..83b1d0c94a 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -716,10 +716,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index dfcee59dc3..0493fdf647 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -651,10 +651,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index bdf36440f5..8bdca90a29 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -635,10 +635,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 977b4ef4b0..07e47ead92 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -637,10 +637,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 0757a198bc..bf5a69b441 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -519,10 +519,10 @@ br $while-continue|2 end end + local.get $2 local.get $6 i32.const 1 i32.shl - local.get $2 i32.add local.get $4 local.get $4 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 8698dfa1ef..eeb3fa6575 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -634,10 +634,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 01965fd221..a9c598e97b 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -634,10 +634,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index a8f0f9e469..d02632b65a 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -634,10 +634,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 7a2122ac44..8a4814fb6a 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -727,10 +727,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 9c64dd213e..fea1c03b97 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -637,10 +637,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 3fa70f8ec7..f5df7d4c71 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -636,10 +636,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 6e13abd4fd..1098783177 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -659,10 +659,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 98f96d23f2..fe794fc399 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -651,10 +651,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -1696,10 +1696,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index f48204bf8d..e44cd40436 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -633,10 +633,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 11cd08d75e..7b3231905d 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -637,10 +637,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 6d9d6e3e15..e9369b5194 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -689,10 +689,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 937fd6059a..e04e4acd65 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -851,10 +851,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -2262,10 +2262,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 2dede897a4..154202902b 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -642,10 +642,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 0c257b8be9..d48f97dadd 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -650,10 +650,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 04613ef318..13ee672f11 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1248,7 +1248,6 @@ local.set $4 local.get $5 i32.wrap_i64 - local.set $6 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -1287,7 +1286,6 @@ i32.const 2147483647 i32.and local.tee $4 - local.get $6 i32.or i32.eqz if diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index e95996eb25..224242158c 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -660,10 +660,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -2072,10 +2072,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index b50f8038e5..b405c06109 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -2637,7 +2637,6 @@ local.set $4 local.get $5 i32.wrap_i64 - local.set $6 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -2676,7 +2675,6 @@ i32.const 2147483647 i32.and local.tee $4 - local.get $6 i32.or i32.eqz if diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 5ca92c1986..143a48a8aa 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -657,10 +657,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -2063,10 +2063,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index d42b9c62d1..e859382b31 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -691,10 +691,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 86aaa8ae44..2aff4881ff 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -972,10 +972,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -1826,10 +1826,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -1917,10 +1917,10 @@ local.get $7 i32.lt_u if + local.get $0 local.get $6 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u local.tee $1 @@ -1941,10 +1941,10 @@ i32.lt_u select if + local.get $0 local.get $6 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u offset=2 local.tee $4 @@ -1973,15 +1973,15 @@ i32.const 131072 i32.ge_u if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add + local.get $3 local.get $4 i32.const 16 i32.shl - local.get $3 i32.or i32.store local.get $2 @@ -1998,10 +1998,10 @@ i32.const 25 i32.le_u if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 i32.const 26 @@ -2083,10 +2083,10 @@ local.get $1 i32.load16_u offset=6 local.set $1 + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.tee $4 local.get $3 @@ -2094,12 +2094,12 @@ local.get $4 local.get $1 i32.store16 offset=4 + local.get $2 local.get $1 i32.const 0 i32.ne i32.const 1 i32.add - local.get $2 i32.add local.set $2 else @@ -2112,18 +2112,18 @@ i32.const 65536 i32.lt_s if + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 i32.store16 else + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 i32.const 65536 @@ -2151,12 +2151,13 @@ end end else + local.get $5 local.get $2 i32.const 1 i32.shl - local.get $5 i32.add local.get $1 + local.get $1 i32.const 97 i32.sub i32.const 26 @@ -2167,7 +2168,6 @@ i32.shl i32.const -1 i32.xor - local.get $1 i32.and i32.store16 end diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index fd939998b9..db802c28ec 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -713,10 +713,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -2481,10 +2481,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 4ac075b3f8..c8c2b7634f 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1197,10 +1197,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -4483,10 +4483,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -5440,17 +5440,17 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $2 + local.get $0 local.get $1 i32.const 1 i32.shl - local.get $0 i32.add i32.load16_u i32.store16 + local.get $5 local.get $1 i32.const 2 i32.shl - local.get $5 i32.add local.get $2 i32.store @@ -5494,10 +5494,10 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $9 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add local.get $6 call $~lib/memory/memory.copy @@ -5509,11 +5509,11 @@ i32.const 272 call $~lib/array/Array<~lib/string/String>#push end + local.get $2 local.get $10 i32.const 1 i32.add local.tee $10 - local.get $2 i32.eq if local.get $3 @@ -5549,10 +5549,10 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $2 + local.get $0 local.get $4 i32.const 1 i32.shl - local.get $0 i32.add local.get $1 call $~lib/memory/memory.copy diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index c86aa278a3..82ae054006 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -821,10 +821,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl @@ -5868,10 +5868,10 @@ local.get $6 call $~lib/rt/tlsf/removeBlock local.get $1 + local.get $4 local.get $5 i32.const 3 i32.and - local.get $4 i32.or i32.store local.get $1 @@ -10880,8 +10880,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -10891,8 +10891,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 @@ -11144,8 +11144,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -11155,8 +11155,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 @@ -11355,8 +11355,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -11366,8 +11366,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 @@ -11510,11 +11510,11 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 245 ;) (param $0 i64) (param $1 i32) (param $2 i32) - local.get $0 i32.const 1696 local.get $1 call $~lib/array/Array#__get i64.extend_i32_s + local.get $0 i64.ne if i32.const 0 @@ -11524,8 +11524,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -11535,8 +11535,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 @@ -11699,8 +11699,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -11710,8 +11710,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 @@ -11820,8 +11820,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 global.get $std/typedarray/forEachCallCount + local.get $1 i32.ne if i32.const 0 @@ -11831,8 +11831,8 @@ call $~lib/builtins/abort unreachable end - local.get $2 global.get $std/typedarray/forEachSelf + local.get $2 i32.ne if i32.const 0 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 25d7b98e03..3a0a1a95fd 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -862,10 +862,10 @@ i32.const 16 i32.lt_u if + local.get $2 local.get $1 i32.const 4 i32.shl - local.get $2 i32.add i32.const 2 i32.shl From 9f3694f34e672ae91f4e4e87f00a2358ef351828 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 17:39:18 +0200 Subject: [PATCH 10/51] rebuild examples again --- examples/mandelbrot/build/optimized.wasm | Bin 543 -> 543 bytes examples/mandelbrot/build/optimized.wat | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index 1d8d62c490b5f11e352089932056ee7f7bcb7d7e..640d23e17c4cc0f57e498d2fec2b9fc360e2ef1c 100644 GIT binary patch delta 18 ZcmbQwGM{Bb7b6>!0*fPK$>a%){QxkM1s4DS delta 18 ZcmbQwGM{Bb7b6>sBV&mI)8q+^{QxnX1s4DS diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index 4b92ab4125..ee17a75a04 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -157,10 +157,10 @@ br $while-continue|2 end end + local.get $2 local.get $6 i32.const 1 i32.shl - local.get $2 i32.add local.get $4 local.get $4 From 2dbe139d7d314063a451c9a030266c609fe638fc Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 18:20:07 +0200 Subject: [PATCH 11/51] add LICM pass --- cli/asc.js | 3 +++ tests/compiler/loop-flow.optimized.wat | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 0fcfce9e44..0ccddfc17a 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -694,6 +694,9 @@ exports.main = function main(argv, options, callback) { // if (optimizeLevel >= 2 || shrinkLevel >= 2) { // add("code-pushing"); // } + if (optimizeLevel >= 3 && shrinkLevel <= 1) { // differs + add("licm"); + } add("simplify-locals-nostructure"); add("vacuum"); add("reorder-locals"); diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index 97d51576a3..c11a91c188 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -68,10 +68,13 @@ end ) (func $loop-flow/doAny (; 4 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1 + i32.eq + local.set $1 loop $do-continue|0 (result i32) - local.get $0 - i32.const 1 - i32.eq + local.get $1 if (result i32) i32.const 1 else From c577392cb1c83b2bc2d4960878b16546ad2c4279 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sat, 29 Feb 2020 19:56:17 +0200 Subject: [PATCH 12/51] rebuild game of life after merge --- examples/game-of-life/build/optimized.wasm | Bin 901 -> 901 bytes examples/game-of-life/build/optimized.wat | 78 +++-- examples/game-of-life/build/untouched.wat | 358 +++++++++++---------- 3 files changed, 221 insertions(+), 215 deletions(-) diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 45bf31d00864fa6f82658054ddf22dc0c4260dae..7702c9c6f6395e2dfdac3318b68ab237230695c7 100644 GIT binary patch delta 133 zcmWm6y%mBm7)IgmCm1j;VE2aPFoHEX$AVd6N_r}KJZ_>BxQD}-bkA+>Zg+dUrYZ T=r}ak`eO92J5Pe)Q}`->oHrC( delta 133 zcmW-ZF%H5o5Cm`U9E@Z>KzG(zDR=;NET!Nr#w7(^s`Ma!0(JhubFis)MyuV`um15q z-GN0Zi6S{AMNLDdNHQszySS+dn!x1wO*1zbS|hcT%s1sTw@pTgI3NV2j?^)1g8gDH U;~IA+J^cU2y=IJT@~JrT4~@JOQvd(} diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index a93bb4d47a..9474a6ca67 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -26,19 +26,17 @@ local.get $0 local.get $1 i32.mul - global.set $assembly/index/s - i32.const 0 - local.set $0 + global.set $assembly/index/offset loop $for-loop|0 - local.get $0 - global.get $assembly/index/h + local.get $3 + local.get $1 i32.lt_s if i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 - global.get $assembly/index/w + local.get $2 + local.get $0 i32.lt_s if call $~lib/bindings/Math/random @@ -53,11 +51,11 @@ i32.const -16777216 i32.or end - local.set $2 - local.get $1 - global.get $assembly/index/s - local.get $0 - global.get $assembly/index/w + local.set $4 + local.get $2 + global.get $assembly/index/offset + local.get $3 + global.get $assembly/index/width i32.mul i32.add i32.add @@ -68,14 +66,14 @@ local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|1 end end local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end @@ -103,7 +101,7 @@ local.set $7 loop $for-loop|0 local.get $1 - global.get $assembly/index/h + local.get $8 i32.lt_s if local.get $1 @@ -126,7 +124,7 @@ local.set $0 loop $for-loop|1 local.get $0 - global.get $assembly/index/w + local.get $9 i32.lt_s if local.get $0 @@ -137,7 +135,7 @@ select local.tee $3 local.get $4 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -147,7 +145,7 @@ i32.and local.get $0 local.get $4 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -166,7 +164,7 @@ select local.tee $2 local.get $4 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -177,7 +175,7 @@ i32.add local.get $3 local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -188,7 +186,7 @@ i32.add local.get $2 local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -199,7 +197,7 @@ i32.add local.get $3 local.get $5 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -210,7 +208,7 @@ i32.add local.get $0 local.get $5 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -221,7 +219,7 @@ i32.add local.get $2 local.get $5 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -233,7 +231,7 @@ local.set $2 local.get $0 local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.const 2 @@ -250,9 +248,9 @@ i32.eq if local.get $0 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add @@ -278,9 +276,9 @@ i32.store else local.get $0 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add @@ -297,9 +295,9 @@ i32.eq if local.get $0 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add @@ -311,9 +309,9 @@ i32.store else local.get $0 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add @@ -358,7 +356,7 @@ (local $3 i32) loop $for-loop|0 local.get $3 - global.get $assembly/index/w + global.get $assembly/index/width i32.lt_s if call $~lib/bindings/Math/random @@ -366,9 +364,9 @@ f64.lt if local.get $3 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $1 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add @@ -390,7 +388,7 @@ local.set $3 loop $for-loop|1 local.get $3 - global.get $assembly/index/h + global.get $assembly/index/height i32.lt_s if call $~lib/bindings/Math/random @@ -398,9 +396,9 @@ f64.lt if local.get $0 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $3 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add i32.add diff --git a/examples/game-of-life/build/untouched.wat b/examples/game-of-life/build/untouched.wat index b74bb050be..4e28015dea 100644 --- a/examples/game-of-life/build/untouched.wat +++ b/examples/game-of-life/build/untouched.wat @@ -9,9 +9,9 @@ (import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32)) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (table $0 1 funcref) - (global $assembly/index/w (mut i32) (i32.const 0)) - (global $assembly/index/h (mut i32) (i32.const 0)) - (global $assembly/index/s (mut i32) (i32.const 0)) + (global $assembly/index/width (mut i32) (i32.const 0)) + (global $assembly/index/height (mut i32) (i32.const 0)) + (global $assembly/index/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) @@ -24,6 +24,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 global.set $assembly/index/width local.get $1 @@ -31,12 +32,12 @@ local.get $0 local.get $1 i32.mul - global.set $assembly/index/s + global.set $assembly/index/offset i32.const 0 local.set $2 loop $for-loop|0 local.get $2 - global.get $assembly/index/h + local.get $1 i32.lt_s local.set $3 local.get $3 @@ -45,15 +46,11 @@ local.set $4 loop $for-loop|1 local.get $4 - global.get $assembly/index/w + local.get $0 i32.lt_s local.set $5 local.get $5 if - local.get $4 - local.set $8 - local.get $2 - local.set $7 call $~lib/bindings/Math/random f64.const 0.1 f64.gt @@ -67,16 +64,22 @@ i32.or end local.set $6 - global.get $assembly/index/s - local.get $7 - global.get $assembly/index/w + local.get $4 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + local.set $7 + global.get $assembly/index/offset + local.get $8 + global.get $assembly/index/width i32.mul i32.add - local.get $8 + local.get $9 i32.add i32.const 2 i32.shl - local.get $6 + local.get $7 i32.store local.get $4 i32.const 1 @@ -113,99 +116,104 @@ (local $16 i32) (local $17 i32) (local $18 i32) - global.get $assembly/index/h + (local $19 i32) + (local $20 i32) + global.get $assembly/index/width + local.set $0 + global.get $assembly/index/height + local.set $1 + local.get $1 i32.const 1 i32.sub local.set $2 local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $3 i32.const 0 - local.set $2 + local.set $4 loop $for-loop|0 - local.get $2 - global.get $assembly/index/h + local.get $4 + local.get $1 i32.lt_s - local.set $3 - local.get $3 + local.set $5 + local.get $5 if - local.get $2 + local.get $4 i32.const 0 i32.eq if (result i32) - local.get $0 - else local.get $2 else local.get $4 i32.const 1 i32.sub end - local.set $4 + local.set $6 + local.get $4 local.get $2 i32.eq if (result i32) i32.const 0 else - local.get $2 + local.get $4 i32.const 1 i32.add end - local.set $5 + local.set $7 i32.const 0 - local.set $6 + local.set $8 loop $for-loop|1 - local.get $6 - global.get $assembly/index/w + local.get $8 + local.get $0 i32.lt_s - local.set $7 - local.get $7 + local.set $9 + local.get $9 if - local.get $6 + local.get $8 i32.const 0 i32.eq if (result i32) - local.get $1 + local.get $3 else - local.get $6 + local.get $8 i32.const 1 i32.sub end - local.set $8 - local.get $6 - local.get $1 + local.set $10 + local.get $8 + local.get $3 i32.eq if (result i32) i32.const 0 else - local.get $6 + local.get $8 i32.const 1 i32.add end - local.set $9 - local.get $8 local.set $11 - local.get $4 - local.set $10 local.get $10 - global.get $assembly/index/w + local.set $13 + local.get $6 + local.set $12 + local.get $12 + global.get $assembly/index/width i32.mul - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl i32.load i32.const 1 i32.and + local.get $8 + local.set $13 local.get $6 - local.set $11 - local.get $4 - local.set $10 - local.get $10 - global.get $assembly/index/w + local.set $12 + local.get $12 + global.get $assembly/index/width i32.mul - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl @@ -213,14 +221,14 @@ i32.const 1 i32.and i32.add - local.get $9 - local.set $11 - local.get $4 - local.set $10 - local.get $10 - global.get $assembly/index/w - i32.mul local.get $11 + local.set $13 + local.get $6 + local.set $12 + local.get $12 + global.get $assembly/index/width + i32.mul + local.get $13 i32.add i32.const 2 i32.shl @@ -228,14 +236,14 @@ i32.const 1 i32.and i32.add - local.get $8 - local.set $11 - local.get $2 - local.set $10 local.get $10 - global.get $assembly/index/w + local.set $13 + local.get $4 + local.set $12 + local.get $12 + global.get $assembly/index/width i32.mul - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl @@ -243,14 +251,14 @@ i32.const 1 i32.and i32.add - local.get $9 - local.set $11 - local.get $2 - local.set $10 - local.get $10 - global.get $assembly/index/w - i32.mul local.get $11 + local.set $13 + local.get $4 + local.set $12 + local.get $12 + global.get $assembly/index/width + i32.mul + local.get $13 i32.add i32.const 2 i32.shl @@ -258,14 +266,14 @@ i32.const 1 i32.and i32.add - local.get $8 - local.set $11 - local.get $5 - local.set $10 local.get $10 - global.get $assembly/index/w + local.set $13 + local.get $7 + local.set $12 + local.get $12 + global.get $assembly/index/width i32.mul - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl @@ -273,14 +281,14 @@ i32.const 1 i32.and i32.add - local.get $6 - local.set $11 - local.get $5 - local.set $10 - local.get $10 - global.get $assembly/index/w + local.get $8 + local.set $13 + local.get $7 + local.set $12 + local.get $12 + global.get $assembly/index/width i32.mul - local.get $11 + local.get $13 i32.add i32.const 2 i32.shl @@ -288,14 +296,14 @@ i32.const 1 i32.and i32.add - local.get $9 - local.set $11 - local.get $5 - local.set $10 - local.get $10 - global.get $assembly/index/w - i32.mul local.get $11 + local.set $13 + local.get $7 + local.set $12 + local.get $12 + global.get $assembly/index/width + i32.mul + local.get $13 i32.add i32.const 2 i32.shl @@ -303,173 +311,173 @@ i32.const 1 i32.and i32.add - local.set $11 - local.get $6 + local.set $13 + local.get $8 + local.set $14 + local.get $4 local.set $12 - local.get $2 - local.set $10 - local.get $10 - global.get $assembly/index/w - i32.mul local.get $12 + global.get $assembly/index/width + i32.mul + local.get $14 i32.add i32.const 2 i32.shl i32.load - local.set $12 - local.get $12 + local.set $14 + local.get $14 i32.const 1 i32.and if - local.get $11 + local.get $13 i32.const 14 i32.and i32.const 2 i32.eq if - local.get $6 - local.set $14 - local.get $2 - local.set $13 + local.get $8 + local.set $16 + local.get $4 + local.set $15 + local.get $14 + local.set $12 local.get $12 - local.set $10 - local.get $10 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $15 + local.tee $17 i32.const 0 - local.tee $16 - local.get $15 - local.get $16 + local.tee $18 + local.get $17 + local.get $18 i32.gt_s select - local.set $15 - local.get $14 - local.set $18 - local.get $13 local.set $17 + local.get $16 + local.set $20 local.get $15 + local.set $19 + local.get $17 i32.const 24 i32.shl - local.get $10 + local.get $12 i32.const 16777215 i32.and i32.or - local.set $16 - global.get $assembly/index/s - local.get $17 - global.get $assembly/index/w + local.set $18 + global.get $assembly/index/offset + local.get $19 + global.get $assembly/index/width i32.mul i32.add - local.get $18 + local.get $20 i32.add i32.const 2 i32.shl - local.get $16 + local.get $18 i32.store else - local.get $6 - local.set $18 - local.get $2 - local.set $17 + local.get $8 + local.set $20 + local.get $4 + local.set $19 global.get $assembly/config/BGR_DEAD i32.const -16777216 i32.or - local.set $16 - global.get $assembly/index/s - local.get $17 - global.get $assembly/index/w + local.set $18 + global.get $assembly/index/offset + local.get $19 + global.get $assembly/index/width i32.mul i32.add - local.get $18 + local.get $20 i32.add i32.const 2 i32.shl - local.get $16 + local.get $18 i32.store end else - local.get $11 + local.get $13 i32.const 3 i32.eq if - local.get $6 - local.set $14 - local.get $2 - local.set $13 + local.get $8 + local.set $16 + local.get $4 + local.set $15 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or - local.set $10 - global.get $assembly/index/s - local.get $13 - global.get $assembly/index/w + local.set $12 + global.get $assembly/index/offset + local.get $15 + global.get $assembly/index/width i32.mul i32.add - local.get $14 + local.get $16 i32.add i32.const 2 i32.shl - local.get $10 + local.get $12 i32.store else - local.get $6 + local.get $8 + local.set $19 + local.get $4 + local.set $18 + local.get $14 local.set $17 - local.get $2 - local.set $16 - local.get $12 - local.set $15 - local.get $15 + local.get $17 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $14 + local.tee $16 i32.const 0 - local.tee $13 - local.get $14 - local.get $13 + local.tee $15 + local.get $16 + local.get $15 i32.gt_s select - local.set $14 - local.get $17 - local.set $13 + local.set $16 + local.get $19 + local.set $15 + local.get $18 + local.set $12 local.get $16 - local.set $10 - local.get $14 i32.const 24 i32.shl - local.get $15 + local.get $17 i32.const 16777215 i32.and i32.or - local.set $18 - global.get $assembly/index/s - local.get $10 - global.get $assembly/index/w + local.set $20 + global.get $assembly/index/offset + local.get $12 + global.get $assembly/index/width i32.mul i32.add - local.get $13 + local.get $15 i32.add i32.const 2 i32.shl - local.get $18 + local.get $20 i32.store end end - local.get $6 + local.get $8 i32.const 1 i32.add - local.set $6 + local.set $8 br $for-loop|1 end end local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end @@ -484,7 +492,7 @@ local.set $3 loop $for-loop|0 local.get $3 - global.get $assembly/index/w + global.get $assembly/index/width i32.lt_s local.set $4 local.get $4 @@ -501,9 +509,9 @@ i32.const -16777216 i32.or local.set $5 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $6 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add local.get $7 @@ -524,7 +532,7 @@ local.set $3 loop $for-loop|1 local.get $3 - global.get $assembly/index/h + global.get $assembly/index/height i32.lt_s local.set $4 local.get $4 @@ -541,9 +549,9 @@ i32.const -16777216 i32.or local.set $5 - global.get $assembly/index/s + global.get $assembly/index/offset local.get $6 - global.get $assembly/index/w + global.get $assembly/index/width i32.mul i32.add local.get $7 From eaf9ba3d742d34a0145b3ea58d4cce602fc5e489 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 04:36:44 +0200 Subject: [PATCH 13/51] even more aggresive for single usage functions --- cli/asc.js | 8 +- tests/compiler/call-super.optimized.wat | 151 +- tests/compiler/class.optimized.wat | 99 +- tests/compiler/constructor.optimized.wat | 86 +- tests/compiler/do.optimized.wat | 580 +- tests/compiler/exports.optimized.wat | 59 +- .../extends-baseaggregate.optimized.wat | 289 +- tests/compiler/for.optimized.wat | 311 +- .../function-expression.optimized.wat | 5 +- tests/compiler/getter-call.optimized.wat | 37 +- .../implicit-getter-setter.optimized.wat | 100 +- tests/compiler/infer-array.optimized.wat | 92 +- tests/compiler/infer-generic.optimized.wat | 17 +- tests/compiler/inlining.optimized.wat | 87 +- tests/compiler/instanceof-class.optimized.wat | 51 +- tests/compiler/issues/1095.optimized.wat | 203 +- tests/compiler/loop-flow.optimized.wat | 65 +- tests/compiler/managed-cast.optimized.wat | 208 +- tests/compiler/new.optimized.wat | 46 +- tests/compiler/number.optimized.wat | 155 +- .../optional-typeparameters.optimized.wat | 46 +- tests/compiler/rc/local-init.optimized.wat | 181 +- .../rc/logical-and-mismatch.optimized.wat | 185 +- .../rc/logical-or-mismatch.optimized.wat | 185 +- tests/compiler/rc/optimize.optimized.wat | 118 +- tests/compiler/rc/rereturn.optimized.wat | 86 +- .../rc/ternary-mismatch.optimized.wat | 189 +- tests/compiler/resolve-access.optimized.wat | 209 +- tests/compiler/resolve-binary.optimized.wat | 142 +- .../resolve-elementaccess.optimized.wat | 245 +- .../resolve-function-expression.optimized.wat | 186 +- tests/compiler/resolve-new.optimized.wat | 40 +- .../resolve-propertyaccess.optimized.wat | 192 +- tests/compiler/resolve-ternary.optimized.wat | 271 +- tests/compiler/resolve-unary.optimized.wat | 192 +- .../retain-release-sanity.optimized.wat | 306 +- tests/compiler/retain-release.optimized.wat | 111 +- tests/compiler/retain-return.optimized.wat | 202 +- tests/compiler/rt/instanceof.optimized.wat | 54 +- tests/compiler/rt/stub-realloc.optimized.wat | 90 +- tests/compiler/runtime-full.optimized.wat | 86 +- tests/compiler/runtime-stub.optimized.wat | 93 +- .../compiler/std/array-literal.optimized.wat | 96 +- tests/compiler/std/array.optimized.wat | 3906 +- tests/compiler/std/arraybuffer.optimized.wat | 100 +- tests/compiler/std/dataview.optimized.wat | 217 +- tests/compiler/std/date.optimized.wat | 64 +- tests/compiler/std/libm.optimized.wat | 565 +- tests/compiler/std/map.optimized.wat | 1293 +- tests/compiler/std/math.optimized.wat | 823 +- tests/compiler/std/new.optimized.wat | 58 +- .../compiler/std/object-literal.optimized.wat | 134 +- .../std/operator-overloading.optimized.wat | 62 +- tests/compiler/std/pointer.optimized.wat | 92 +- tests/compiler/std/set.optimized.wat | 581 +- tests/compiler/std/static-array.optimized.wat | 144 +- tests/compiler/std/staticarray.optimized.wat | 94 +- .../std/string-casemapping.optimized.wat | 219 +- .../std/string-encoding.optimized.wat | 251 +- tests/compiler/std/string.optimized.wat | 885 +- tests/compiler/std/symbol.optimized.wat | 214 +- tests/compiler/std/typedarray.optimized.wat | 30078 ++++++++-------- tests/compiler/typeof.optimized.wat | 52 +- tests/compiler/while.optimized.wat | 677 +- 64 files changed, 22645 insertions(+), 24018 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 0ccddfc17a..4824544e83 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -646,12 +646,12 @@ exports.main = function main(argv, options, callback) { // enchance options for inline passes if (optimizeLevel >= 2 && shrinkLevel === 0) { module.setAlwaysInlineMaxSize(12); - module.setFlexibleInlineMaxSize(60); - module.setOneCallerInlineMaxSize(60); + module.setFlexibleInlineMaxSize(80); + module.setOneCallerInlineMaxSize(80); } else { module.setAlwaysInlineMaxSize(4); // default: 2 - module.setFlexibleInlineMaxSize(35); // default: 20 - module.setOneCallerInlineMaxSize(35); // default: 15 + module.setFlexibleInlineMaxSize(55); // default: 20 + module.setOneCallerInlineMaxSize(55); // default: 15 } // Optimize the module if requested diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 2e63e07bdb..2eacf03083 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,7 +1,5 @@ (module - (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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))) @@ -11,20 +9,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -32,16 +56,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -50,42 +74,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -96,10 +91,14 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $call-super/B#constructor (; 3 ;) (result i32) + (func $~start (; 2 ;) (local $0 i32) + i32.const 64 + global.set $~lib/rt/stub/startOffset + i32.const 64 + global.set $~lib/rt/stub/offset i32.const 8 i32.const 3 call $~lib/rt/stub/__alloc @@ -154,9 +153,29 @@ unreachable end local.get $0 - ) - (func $call-super/D#constructor (; 4 ;) (result i32) - (local $0 i32) + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 22 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 23 + i32.const 2 + call $~lib/builtins/abort + unreachable + end i32.const 8 i32.const 5 call $~lib/rt/stub/__alloc @@ -199,40 +218,6 @@ unreachable end local.get $0 - ) - (func $~start (; 5 ;) - (local $0 i32) - i32.const 64 - global.set $~lib/rt/stub/startOffset - i32.const 64 - global.set $~lib/rt/stub/offset - call $call-super/B#constructor - local.tee $0 - i32.load - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 22 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 23 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - call $call-super/D#constructor - local.tee $0 i32.load i32.const 1 i32.ne diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 4e604b906e..4dc2c18dc0 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -1,7 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 1) @@ -34,20 +32,46 @@ i32.store8 offset=6 local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -55,16 +79,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -73,42 +97,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -119,11 +114,15 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/array/Array#constructor (; 3 ;) (result i32) + (func $class/testGenericInitializer (; 2 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 4 + i32.const 4 + call $~lib/rt/stub/__alloc i32.const 16 i32.const 5 call $~lib/rt/stub/__alloc @@ -168,15 +167,9 @@ i32.const 0 i32.store offset=12 local.get $0 - ) - (func $class/testGenericInitializer (; 4 ;) - i32.const 4 - i32.const 4 - call $~lib/rt/stub/__alloc - call $~lib/array/Array#constructor i32.store ) - (func $~start (; 5 ;) + (func $~start (; 3 ;) i32.const 128 global.set $~lib/rt/stub/startOffset i32.const 128 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index dfda5b0343..def857c975 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -17,20 +16,46 @@ (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -38,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -56,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -102,9 +98,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) (local $0 i32) i32.const 16 global.set $~lib/rt/stub/startOffset diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 934469aa75..84f472a5d2 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -22,46 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $do/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - 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|0 - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testNested (; 6 ;) + (func $do/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -144,55 +105,7 @@ i32.const 1 global.set $do/ran ) - (func $do/testNestedContinue (; 7 ;) - (local $0 i32) - (local $1 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - if - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.rem_s - br_if $do-continue|1 - end - br $do-continue|0 - end - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 125 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 90 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -358,7 +271,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -641,7 +554,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -755,7 +668,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -842,7 +755,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -899,54 +812,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1007,8 +873,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1032,8 +899,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -1081,65 +989,63 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $do/Ref#constructor (; 17 ;) (result i32) + (func $do/Ref#constructor (; 13 ;) (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 208 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $0 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end - local.get $0 + local.get $1 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1150,150 +1056,61 @@ call $~lib/rt/pure/decrement end ) - (func $do/testRef (; 19 ;) + (func $start:do (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $do/Ref#constructor - local.set $0 + i32.const 0 + global.set $do/ran + i32.const 10 + local.set $1 loop $do-continue|0 - local.get $1 + local.get $0 i32.const 1 i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub local.tee $1 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $2 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - else - call $do/Ref#constructor - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $2 - local.tee $0 br_if $do-continue|0 end local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 141 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 if i32.const 0 i32.const 32 - i32.const 142 + i32.const 10 i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $do/ran local.get $0 - call $~lib/rt/pure/__release - ) - (func $do/testRefAutorelease (; 20 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $do/Ref#constructor - local.set $0 - loop $do-continue|0 - block $do-break|0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $2 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $0 - br $do-break|0 - end - call $do/Ref#constructor - local.tee $2 - call $~lib/rt/pure/__release - local.get $2 - br_if $do-continue|0 - end - end - local.get $1 i32.const 10 i32.ne if i32.const 0 i32.const 32 - i32.const 161 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 162 + i32.const 11 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 1 global.set $do/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $start:do (; 21 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $do/ran - call $do/testSimple - global.get $do/ran - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 16 - i32.const 0 - call $~lib/builtins/abort - unreachable - end i32.const 0 global.set $do/ran i32.const 10 - local.set $1 - loop $do-continue|0 - local.get $1 - local.tee $0 + local.set $0 + loop $do-continue|00 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $1 - local.get $0 - br_if $do-continue|0 + local.set $0 + local.get $1 + br_if $do-continue|00 end - local.get $1 + local.get $0 i32.const -1 i32.ne if @@ -1323,14 +1140,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|00 + loop $do-continue|01 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|00 + br_if $do-continue|01 end local.get $0 i32.const 10 @@ -1361,14 +1178,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|02 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|02 end local.get $0 i32.const 10 @@ -1385,20 +1202,107 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/testNestedContinue - global.get $do/ran - i32.eqz + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + loop $do-continue|03 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + if + loop $do-continue|1 + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.rem_s + br_if $do-continue|1 + end + br $do-continue|03 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 131 + i32.const 125 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 90 + i32.ne + if i32.const 0 + i32.const 32 + i32.const 126 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran - call $do/testRef + call $do/Ref#constructor + local.set $0 + loop $do-continue|04 + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $1 + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + else + call $do/Ref#constructor + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + end + local.get $1 + local.tee $0 + br_if $do-continue|04 + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 141 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 142 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + local.get $0 + call $~lib/rt/pure/__release global.get $do/ran i32.eqz if @@ -1411,7 +1315,61 @@ end i32.const 0 global.set $do/ran - call $do/testRefAutorelease + i32.const 0 + local.set $2 + call $do/Ref#constructor + local.set $0 + loop $do-continue|05 + block $do-break|0 + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $1 + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 0 + local.set $0 + br $do-break|0 + end + call $do/Ref#constructor + local.tee $1 + call $~lib/rt/pure/__release + local.get $1 + br_if $do-continue|05 + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 161 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 162 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $do/ran + local.get $0 + call $~lib/rt/pure/__release global.get $do/ran i32.eqz if @@ -1423,7 +1381,7 @@ unreachable end ) - (func $~start (; 22 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1433,7 +1391,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index af3824c4d2..a783640e03 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -60,20 +60,28 @@ (func $exports/Car.getNumTires (; 2 ;) (result i32) i32.const 4 ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -81,16 +89,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -99,20 +107,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -127,27 +124,27 @@ local.get $1 i32.const 4 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $exports/Car#get:doors (; 5 ;) (param $0 i32) (result i32) + (func $exports/Car#get:doors (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:doors (; 6 ;) (param $0 i32) (param $1 i32) + (func $exports/Car#set:doors (; 5 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 7 ;) (param $0 i32) + (func $exports/Car#openDoors (; 6 ;) (param $0 i32) nop ) - (func $~start (; 8 ;) + (func $~start (; 7 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset ) - (func $exports/subOpt|trampoline (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 8 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -165,11 +162,11 @@ local.get $1 i32.sub ) - (func $~setArgumentsLength (; 10 ;) (param $0 i32) + (func $~setArgumentsLength (; 9 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $exports/Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 10 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -196,7 +193,7 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#constructor|trampoline (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 11 ;) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index b59dec43c3..467da2da8b 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1062,46 +1062,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 240 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 240 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1109,11 +1072,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 240 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1155,7 +1153,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1328,7 +1326,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 14 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1339,7 +1337,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/reallocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1439,7 +1437,7 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1650,19 +1648,52 @@ end end ) - (func $~lib/array/ensureSize (; 18 ;) (param $0 i32) + (func $start:extends-baseaggregate (; 17 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 20 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + i32.const 20 + i32.const 4 + call $~lib/rt/tlsf/__alloc + 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 + i32.const 108 + i32.load + local.tee $6 + i32.const 1 + i32.add + local.tee $3 + local.set $1 + local.get $3 i32.const 104 i32.load - local.tee $1 + local.tee $4 i32.const 2 i32.shr_u i32.gt_u if - local.get $0 + local.get $1 i32.const 268435452 i32.gt_u if @@ -1675,76 +1706,42 @@ end i32.const 96 i32.load - local.set $2 - local.get $1 + local.set $5 + local.get $4 call $~lib/rt/tlsf/maybeInitialize - local.get $2 + local.get $5 call $~lib/rt/tlsf/checkUsedBlock - local.get $0 + local.get $1 i32.const 2 i32.shl - local.tee $3 + local.tee $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $2 i32.add - local.get $3 local.get $1 + local.get $4 i32.sub call $~lib/memory/memory.fill - local.get $0 local.get $2 + local.get $5 i32.ne if i32.const 96 - local.get $0 + local.get $2 i32.store i32.const 100 - local.get $0 + local.get $2 i32.store end i32.const 104 - local.get $3 + local.get $1 i32.store end - ) - (func $start:extends-baseaggregate (; 19 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 20 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - i32.const 20 - i32.const 4 - call $~lib/rt/tlsf/__alloc - 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 - i32.const 108 - i32.load - local.tee $1 - i32.const 1 - i32.add - local.tee $2 - call $~lib/array/ensureSize i32.const 100 i32.load - local.get $1 + local.get $6 i32.const 2 i32.shl i32.add @@ -1752,7 +1749,7 @@ call $~lib/rt/pure/__retain i32.store i32.const 108 - local.get $2 + local.get $3 i32.store local.get $0 i32.const 556 @@ -1764,10 +1761,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 20 ;) + (func $~start (; 18 ;) call $start:extends-baseaggregate ) - (func $~lib/rt/pure/markGray (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 19 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1791,7 +1788,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 20 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1804,7 +1801,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 21 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1838,7 +1835,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 22 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1871,7 +1868,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 25 ;) + (func $~lib/rt/pure/__collect (; 23 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1992,53 +1989,11 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 26 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $0 - i32.const 256 - local.get $0 - i32.const 256 - i32.gt_u - select - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - if - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 - global.set $~lib/rt/pure/ROOTS - local.get $0 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $0 - local.get $3 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2140,7 +2095,43 @@ 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 $4 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + 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 $4 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -2155,7 +2146,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 28 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2258,7 +2249,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 26 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2291,7 +2282,7 @@ end end ) - (func $~lib/rt/__visit_members (; 30 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 27 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 83b1d0c94a..1500761820 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -809,54 +809,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 11 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -917,8 +870,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -942,8 +896,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -991,65 +986,63 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $for/Ref#constructor (; 15 ;) (result i32) + (func $for/Ref#constructor (; 13 ;) (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 + local.tee $1 i32.const 208 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $0 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end - local.get $0 + local.get $1 ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1060,66 +1053,7 @@ call $~lib/rt/pure/decrement end ) - (func $for/testRef (; 17 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $for/Ref#constructor - local.set $0 - loop $for-loop|0 - local.get $0 - if - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $2 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - else - call $for/Ref#constructor - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $2 - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 137 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 138 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $for/testRefAutorelease (; 18 ;) + (func $for/testRefAutorelease (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1185,8 +1119,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $start:for (; 19 ;) + (func $start:for (; 16 ;) (local $0 i32) + (local $1 i32) + (local $2 i32) i32.const 0 global.set $for/ran loop $for-loop|0 @@ -1403,7 +1339,60 @@ end i32.const 0 global.set $for/ran - call $for/testRef + call $for/Ref#constructor + local.set $0 + loop $for-loop|06 + local.get $0 + if + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $2 + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + else + call $for/Ref#constructor + local.set $2 + local.get $0 + call $~lib/rt/pure/__release + end + local.get $2 + local.set $0 + br $for-loop|06 + end + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 137 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 138 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran + local.get $0 + call $~lib/rt/pure/__release global.get $for/ran i32.eqz if @@ -1428,7 +1417,7 @@ unreachable end ) - (func $~start (; 20 ;) + (func $~start (; 17 ;) global.get $~started if return @@ -1438,7 +1427,7 @@ end call $start:for ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 378226d55d..92ca40df37 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -46,7 +46,7 @@ (func $start:function-expression~anonymous|5 (; 8 ;) (param $0 i32) (param $1 i32) (result i32) i32.const 42 ) - (func $start:function-expression (; 9 ;) + (func $~start (; 9 ;) i32.const 1 global.set $~argumentsLength i32.const 1 @@ -98,7 +98,4 @@ i32.const 2 global.set $~argumentsLength ) - (func $~start (; 10 ;) - call $start:function-expression - ) ) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 7d9a5e54ca..31848c9a8a 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -10,10 +10,18 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $0 memory.size local.tee $2 i32.const 16 @@ -51,21 +59,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 2 ;) (result i32) - (local $0 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $0 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $0 + local.get $3 i32.const 16 i32.sub local.tee $0 @@ -80,6 +74,13 @@ local.get $0 i32.const 0 i32.store offset=12 + ) + (func $~setArgumentsLength (; 1 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 2 ;) (result i32) + call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 0493fdf647..986725a1da 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1066,48 +1066,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 220 i32.gt_u @@ -1115,11 +1076,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1130,7 +1128,7 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1145,16 +1143,16 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 18 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 19 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1170,12 +1168,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 21 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 22 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1193,10 +1191,10 @@ local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 23 ;) + (func $~lib/rt/pure/__collect (; 22 ;) nop ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index aa25df3123..6cee555feb 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -1,6 +1,5 @@ (module (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 $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -30,20 +29,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -51,16 +76,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -69,42 +94,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -115,9 +111,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -290,7 +286,7 @@ end end ) - (func $~lib/rt/__allocArray (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -327,7 +323,7 @@ i32.store offset=12 local.get $2 ) - (func $start:infer-array (; 5 ;) + (func $start:infer-array (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -510,7 +506,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) call $start:infer-array ) ) diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index 524a39965c..aaaad1e619 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -28,7 +28,13 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#reduce (; 2 ;) + (func $infer-generic/test1 (; 2 ;) (param $0 f32) (result f32) + local.get $0 + ) + (func $infer-generic/test2 (; 3 ;) (param $0 i32) (result i32) + local.get $0 + ) + (func $~start (; 4 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -70,13 +76,4 @@ end end ) - (func $infer-generic/test1 (; 3 ;) (param $0 f32) (result f32) - local.get $0 - ) - (func $infer-generic/test2 (; 4 ;) (param $0 i32) (result i32) - local.get $0 - ) - (func $~start (; 5 ;) - call $~lib/array/Array#reduce - ) ) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index ed205d4afd..27f36ff0b3 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -21,20 +21,46 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -42,16 +68,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -60,42 +86,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -106,9 +103,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $inlining/test_ctor (; 5 ;) + (func $inlining/test_ctor (; 4 ;) (local $0 i32) i32.const 16 i32.const 4 @@ -188,7 +185,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 1 global.set $~argumentsLength i32.const 64 diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index ea73072a98..ed55da4f34 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) @@ -14,20 +13,28 @@ (global $instanceof-class/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -35,16 +42,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -53,20 +60,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -81,9 +77,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $start:instanceof-class (; 3 ;) + (func $~start (; 2 ;) (local $0 i32) i32.const 144 global.set $~lib/rt/stub/startOffset @@ -142,10 +138,7 @@ unreachable end ) - (func $~start (; 4 ;) - call $start:instanceof-class - ) - (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 3 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 8bdca90a29..602fb2f36b 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -728,54 +728,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -836,8 +789,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -861,8 +815,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -910,48 +905,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 252 i32.gt_u @@ -959,11 +915,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 252 i32.gt_u @@ -974,7 +967,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:issues/1095 (; 16 ;) + (func $~start (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -983,13 +976,12 @@ i32.const 16 i32.add call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 192 i32.store - local.get $1 - local.tee $2 + local.get $0 i32.load - local.tee $0 + local.tee $1 i32.eqz if i32.const 0 @@ -999,28 +991,25 @@ call $~lib/builtins/abort unreachable end + local.get $1 local.get $0 - local.get $2 i32.load local.tee $2 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 local.get $2 call $~lib/rt/pure/__release end - local.get $1 local.get $0 - i32.store local.get $1 + i32.store + local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 17 ;) - call $start:issues/1095 - ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index c11a91c188..d0844c5dc4 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -91,7 +91,37 @@ end end ) - (func $start:loop-flow (; 5 ;) + (func $loop-flow/whileThrow (; 5 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 11 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/whileContinue (; 6 ;) (result i32) + loop $while-continue|0 + br $while-continue|0 + end + unreachable + ) + (func $loop-flow/forThrow (; 7 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 41 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $loop-flow/doThrow (; 8 ;) (result i32) + i32.const 80 + i32.const 32 + i32.const 71 + i32.const 4 + call $~lib/builtins/abort + unreachable + ) + (func $~start (; 9 ;) i32.const 1 call $loop-flow/whileAny i32.const 1 @@ -129,37 +159,4 @@ unreachable end ) - (func $loop-flow/whileThrow (; 6 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 11 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/whileContinue (; 7 ;) (result i32) - loop $while-continue|0 - br $while-continue|0 - end - unreachable - ) - (func $loop-flow/forThrow (; 8 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 41 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $loop-flow/doThrow (; 9 ;) (result i32) - i32.const 80 - i32.const 32 - i32.const 71 - i32.const 4 - call $~lib/builtins/abort - unreachable - ) - (func $~start (; 10 ;) - call $start:loop-flow - ) ) diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 07e47ead92..d7ccffd387 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param 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 $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_=>_i32 (func (param i32 i32) (result i32))) @@ -730,54 +730,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -838,8 +791,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -863,8 +817,49 @@ local.tee $2 i32.eqz if + memory.size + local.tee $2 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $2 + local.get $3 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $3 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $2 @@ -912,55 +907,16 @@ call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 268 i32.gt_u @@ -968,11 +924,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $managed-cast/Cat#constructor (; 16 ;) (result i32) + (func $managed-cast/Cat#constructor (; 14 ;) (result i32) (local $0 i32) i32.const 3 call $~lib/rt/tlsf/__alloc @@ -987,7 +980,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 268 i32.gt_u @@ -998,7 +991,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/__instanceof (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/__instanceof (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1028,7 +1021,7 @@ end i32.const 0 ) - (func $start:managed-cast (; 19 ;) + (func $~start (; 17 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1037,6 +1030,13 @@ (local $5 i32) (local $6 i32) (local $7 i32) + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end call $managed-cast/Cat#constructor call $managed-cast/Cat#constructor local.tee $3 @@ -1126,17 +1126,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~start (; 20 ;) - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:managed-cast - ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index 62c4e11140..2e14cfff60 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $new/ref (mut i32) (i32.const 0)) @@ -10,20 +9,28 @@ (global $new/ref2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -31,16 +38,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -49,20 +56,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -77,9 +73,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index af8cd1b50b..74c9eba0fa 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,13 +1,13 @@ (module (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 $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (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_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -89,20 +89,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -110,16 +136,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -128,42 +154,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -174,9 +171,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -200,7 +197,7 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 5 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 4 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -239,7 +236,7 @@ i32.const 32 end ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -247,7 +244,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -323,7 +320,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -355,7 +352,7 @@ end i32.const 0 ) - (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -746,7 +743,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -919,7 +916,7 @@ end end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1164,7 +1161,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1302,7 +1299,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1373,8 +1370,24 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (func $~lib/util/number/dtoa (; 13 ;) (result i32) + (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 56 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/string/String#substring local.get $0 i32.const 15 i32.and @@ -1394,7 +1407,7 @@ local.get $0 i32.const 16 i32.sub - local.tee $1 + local.tee $2 i32.load offset=4 i32.const 1 i32.ne @@ -1408,16 +1421,16 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $1 + local.get $2 i32.load i32.add i32.eq if - local.get $1 + local.get $2 global.set $~lib/rt/stub/offset end ) - (func $~lib/number/F32.isSafeInteger (; 15 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 14 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1429,7 +1442,7 @@ f32.le select ) - (func $~lib/number/F32.isInteger (; 16 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 15 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1442,7 +1455,7 @@ f32.eq select ) - (func $~lib/number/F64.isSafeInteger (; 17 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 16 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1454,7 +1467,7 @@ f64.le select ) - (func $~lib/number/F64.isInteger (; 18 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 17 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1467,9 +1480,8 @@ f64.eq select ) - (func $start:number (; 19 ;) + (func $start:number (; 18 ;) (local $0 i32) - (local $1 i32) i32.const 1536 global.set $~lib/rt/stub/startOffset i32.const 1536 @@ -1487,22 +1499,7 @@ call $~lib/builtins/abort unreachable end - i32.const 56 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.ne - if - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 - call $~lib/rt/stub/__free - local.set $0 - end - local.get $0 + call $~lib/util/number/dtoa i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -2088,7 +2085,7 @@ unreachable end ) - (func $~start (; 20 ;) + (func $~start (; 19 ;) call $start:number ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index e5a0edcd04..f9e27ebac4 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -9,20 +8,28 @@ (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -30,16 +37,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -48,20 +55,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -76,9 +72,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index eeb3fa6575..6a1c66e835 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,49 +904,10 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~start (; 14 ;) + (func $~start (; 12 ;) (local $0 i32) + (local $1 i32) + (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 @@ -963,7 +919,44 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 i32.const 192 @@ -975,7 +968,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index a9c598e97b..7379549f3d 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,48 +904,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,18 +914,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (; 15 ;) (result i32) + (func $rc/logical-and-mismatch/Ref#constructor (; 13 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -980,7 +973,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 17 ;) + (func $~start (; 15 ;) (local $0 i32) call $rc/logical-and-mismatch/Ref#constructor global.set $rc/logical-and-mismatch/gloRef @@ -1017,7 +1010,7 @@ global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index d02632b65a..2b7007c6a8 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -727,54 +727,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -835,8 +788,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -860,8 +814,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -909,48 +904,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -958,18 +914,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (; 15 ;) (result i32) + (func $rc/logical-or-mismatch/Ref#constructor (; 13 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -980,7 +973,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 17 ;) + (func $~start (; 15 ;) (local $0 i32) call $rc/logical-or-mismatch/Ref#constructor global.set $rc/logical-or-mismatch/gloRef @@ -1019,7 +1012,7 @@ global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 8a4814fb6a..52ebcbea6f 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -60,48 +60,9 @@ (func $rc/optimize/eliminated_viii (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 32 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 196 i32.gt_u @@ -109,11 +70,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 32 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -279,7 +277,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -562,7 +560,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -676,7 +674,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 13 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -763,7 +761,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -894,7 +892,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -956,7 +954,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1032,7 +1030,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1134,7 +1132,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1142,13 +1140,13 @@ i32.const 16 i32.add ) - (func $rc/optimize/getRef (; 20 ;) (result i32) + (func $rc/optimize/getRef (; 19 ;) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1159,13 +1157,13 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/eliminated_rr (; 22 ;) (param $0 i32) (result i32) + (func $rc/optimize/eliminated_rr (; 21 ;) (param $0 i32) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1177,7 +1175,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 24 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 23 ;) (param $0 i32) (param $1 i32) local.get $1 if (result i32) local.get $0 @@ -1187,7 +1185,7 @@ end call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1200,16 +1198,16 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 26 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 25 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 27 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 26 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 28 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index fea1c03b97..32be45ee8e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,46 +1050,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 212 i32.gt_u @@ -1097,11 +1060,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1112,10 +1110,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 13 ;) + (func $~start (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index f5df7d4c71..88d8cd40f7 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -729,54 +729,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -837,8 +790,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -862,8 +816,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 local.get $0 - call $~lib/rt/tlsf/growMemory + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -911,48 +906,9 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -960,18 +916,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (; 15 ;) (result i32) + (func $rc/ternary-mismatch/Ref#constructor (; 13 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $rc/ternary-mismatch/test1 (; 16 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test1 (; 14 ;) (param $0 i32) (result i32) local.get $0 if (result i32) call $rc/ternary-mismatch/Ref#constructor @@ -980,7 +973,7 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -991,7 +984,7 @@ call $~lib/rt/pure/decrement end ) - (func $rc/ternary-mismatch/test2 (; 18 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test2 (; 16 ;) (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef @@ -1000,7 +993,7 @@ call $rc/ternary-mismatch/Ref#constructor end ) - (func $~start (; 19 ;) + (func $~start (; 17 ;) call $rc/ternary-mismatch/Ref#constructor global.set $rc/ternary-mismatch/gloRef i32.const 1 @@ -1018,7 +1011,7 @@ global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 53530df67e..8e9993e7ed 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -1,12 +1,12 @@ (module (type $none_=>_i32 (func (result i32))) - (type $i32_=>_none (func (param i32))) - (type $i64_=>_i32 (func (param i64) (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 $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\08\00\00\00\01\00\00\00\00\00\00\00\08\00\00\00\01") @@ -20,20 +20,46 @@ (export "fieldAccess" (func $resolve-access/fieldAccess)) (export "propertyAccess" (func $resolve-access/propertyAccess)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -41,16 +67,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -59,42 +85,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -105,9 +102,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) + (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -278,7 +275,7 @@ end end ) - (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -326,7 +323,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -350,60 +347,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/decimalCount64 (; 6 ;) (param $0 i64) (result i32) - i32.const 10 - i32.const 11 - i32.const 12 - local.get $0 - i64.const 100000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 - local.get $0 - i64.const 100000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - i32.const 16 - i32.const 17 - local.get $0 - i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 - local.get $0 - i64.const -8446744073709551616 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000000 - i64.lt_u - select - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa64 (; 7 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 5 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -432,8 +376,57 @@ local.get $1 call $~lib/util/number/utoa_simple else + i32.const 10 + i32.const 11 + i32.const 12 + local.get $0 + i64.const 100000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000 + i64.lt_u + select + i32.const 13 + i32.const 14 + i32.const 15 + local.get $0 + i64.const 100000000000000 + i64.lt_u + select local.get $0 - call $~lib/util/number/decimalCount64 + i64.const 10000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + i32.const 16 + i32.const 17 + local.get $0 + i64.const 10000000000000000 + i64.lt_u + select + i32.const 18 + i32.const 19 + i32.const 20 + local.get $0 + i64.const -8446744073709551616 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000000 + i64.lt_u + select + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select local.tee $1 i32.const 1 i32.shl @@ -468,7 +461,7 @@ end local.get $3 ) - (func $resolve-access/arrayAccess (; 8 ;) (result i32) + (func $resolve-access/arrayAccess (; 6 ;) (result i32) (local $0 i32) (local $1 i32) i32.const 16 @@ -509,7 +502,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/Container#constructor (; 9 ;) (result i32) + (func $resolve-access/Container#constructor (; 7 ;) (result i32) (local $0 i32) i32.const 8 i32.const 5 @@ -519,7 +512,7 @@ i64.store local.get $0 ) - (func $resolve-access/fieldAccess (; 10 ;) (result i32) + (func $resolve-access/fieldAccess (; 8 ;) (result i32) (local $0 i32) call $resolve-access/Container#constructor local.tee $0 @@ -529,7 +522,7 @@ i64.load call $~lib/util/number/utoa64 ) - (func $resolve-access/propertyAccess (; 11 ;) (result i32) + (func $resolve-access/propertyAccess (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -559,7 +552,7 @@ end local.get $0 ) - (func $~start (; 12 ;) + (func $~start (; 10 ;) i32.const 192 global.set $~lib/rt/stub/startOffset i32.const 192 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index a65ac994ee..0fd974f393 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 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 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -221,20 +220,46 @@ i32.lt_u select ) - (func $~lib/rt/stub/maybeGrowMemory (; 5 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 5 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -242,16 +267,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -260,42 +285,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 6 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -306,9 +302,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/utoa_simple (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -332,7 +328,7 @@ br_if $do-continue|0 end ) - (func $~lib/number/I32#toString (; 8 ;) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -372,7 +368,7 @@ i32.const 192 end ) - (func $~lib/util/number/genDigits (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -763,7 +759,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -936,7 +932,7 @@ end end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1181,7 +1177,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1326,7 +1322,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1398,8 +1394,25 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 14 ;) (param $0 i32) + (func $~lib/util/number/dtoa (; 13 ;) (result i32) + (local $0 i32) (local $1 i32) + (local $2 i32) + i32.const 56 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + return + end + local.get $0 + local.get $1 + call $~lib/string/String#substring local.get $0 i32.const 15 i32.and @@ -1442,28 +1455,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/number/dtoa (; 15 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 56 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $0 - call $~lib/util/number/dtoa_core - local.tee $1 - i32.const 28 - i32.eq - if - local.get $0 - return - end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 - call $~lib/rt/stub/__free - ) - (func $start:resolve-binary (; 16 ;) + (func $start:resolve-binary (; 14 ;) i32.const 32 i32.const 32 call $~lib/string/String.__eq @@ -2170,7 +2162,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 15 ;) call $start:resolve-binary ) ) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index dc76a60ef4..1072c4a370 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,13 +1,11 @@ (module - (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -42,20 +40,46 @@ (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -63,16 +87,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -81,42 +105,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -127,64 +122,55 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 2 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 + (local $2 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/stub/__alloc + local.tee $1 i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 8 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 4 i32.sub i32.const 0 i32.store8 - ) - (func $~lib/typedarray/Float32Array#constructor (; 4 ;) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 12 - i32.const 3 - call $~lib/rt/stub/__alloc - local.set $0 - i32.const 8 - i32.const 0 - call $~lib/rt/stub/__alloc - local.tee $1 - call $~lib/memory/memory.fill local.get $0 i32.eqz if @@ -216,7 +202,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Float32Array#__set (; 5 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -240,7 +226,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 6 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -263,7 +249,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -311,7 +297,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -701,7 +687,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -874,7 +860,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -898,7 +884,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1143,7 +1129,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 12 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -1452,7 +1438,7 @@ local.get $10 i32.add ) - (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1460,7 +1446,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#substring (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1532,53 +1518,10 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/rt/stub/__free (; 15 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 1408 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1408 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $1 - i32.load - i32.add - i32.eq - if - local.get $1 - global.set $~lib/rt/stub/offset - end - ) - (func $~lib/util/number/dtoa (; 16 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 13 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) local.get $0 f64.const 0 f64.eq @@ -1624,9 +1567,48 @@ local.get $2 call $~lib/string/String#substring local.get $1 - call $~lib/rt/stub/__free + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $1 + select + i32.eqz + if + i32.const 0 + i32.const 1408 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.tee $3 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1408 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $1 + local.get $3 + i32.load + i32.add + i32.eq + if + local.get $3 + global.set $~lib/rt/stub/offset + end ) - (func $~lib/util/string/compareImpl (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1702,7 +1684,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1734,13 +1716,16 @@ end i32.const 0 ) - (func $start:resolve-elementaccess (; 19 ;) + (func $start:resolve-elementaccess (; 16 ;) (local $0 i32) i32.const 1600 global.set $~lib/rt/stub/startOffset i32.const 1600 global.set $~lib/rt/stub/offset - call $~lib/typedarray/Float32Array#constructor + i32.const 12 + i32.const 3 + call $~lib/rt/stub/__alloc + call $~lib/arraybuffer/ArrayBufferView#constructor global.set $resolve-elementaccess/arr global.get $resolve-elementaccess/arr i32.const 0 @@ -1829,7 +1814,7 @@ unreachable end ) - (func $~start (; 20 ;) + (func $~start (; 17 ;) call $start:resolve-elementaccess ) ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 06e278cf72..49ee60b1ff 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -19,68 +19,46 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/util/number/decimalCount32 (; 2 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $1 + i32.const 16 + local.get $1 + i32.const 16 + i32.gt_u + select + local.tee $5 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -88,16 +66,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -106,42 +84,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 4 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 local.get $1 - i32.const 16 - i32.gt_u - select - local.tee $3 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + global.set $~lib/rt/stub/offset + local.get $3 i32.const 16 i32.sub local.tee $1 - local.get $3 + local.get $5 i32.store local.get $1 i32.const 1 @@ -152,9 +101,9 @@ local.get $1 local.get $0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $~lib/util/number/itoa32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -176,9 +125,53 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add local.tee $2 i32.const 1 @@ -215,7 +208,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -223,7 +216,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -298,7 +291,7 @@ end i32.const 0 ) - (func $start:resolve-function-expression (; 8 ;) + (func $~start (; 6 ;) (local $0 i32) (local $1 i32) i32.const 1 @@ -351,7 +344,4 @@ unreachable end ) - (func $~start (; 9 ;) - call $start:resolve-function-expression - ) ) diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 0aaab3bea0..e217064f83 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,18 +7,26 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,18 +56,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $resolve-new/Foo#constructor (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $1 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $1 + local.get $2 i32.const 16 i32.sub local.tee $0 @@ -75,16 +71,16 @@ local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 ) - (func $~start (; 2 ;) + (func $~start (; 1 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc global.set $resolve-new/foo - call $resolve-new/Foo#constructor + call $~lib/rt/stub/__alloc drop ) ) diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 1ad123c0fb..c783b68c93 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -1,8 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (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_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))) @@ -23,68 +22,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000000 - i32.lt_u - select + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 local.get $0 - i32.const 100000 - i32.lt_u + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -92,16 +69,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -110,42 +87,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -156,9 +104,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -180,9 +128,53 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add local.tee $2 i32.const 1 @@ -220,7 +212,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -228,7 +220,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -304,7 +296,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -336,7 +328,7 @@ end i32.const 0 ) - (func $start:resolve-propertyaccess (; 8 ;) + (func $start:resolve-propertyaccess (; 6 ;) (local $0 i32) i32.const 448 global.set $~lib/rt/stub/startOffset @@ -480,7 +472,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 7 ;) call $start:resolve-propertyaccess ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 1098783177..a5f5cbbc4e 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module - (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_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 $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -1072,46 +1072,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1119,11 +1082,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1134,7 +1132,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 13 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1182,7 +1180,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1206,7 +1204,7 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (; 15 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 14 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1214,7 +1212,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1290,7 +1288,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1324,7 +1322,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 18 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 17 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1715,7 +1713,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1888,7 +1886,7 @@ end end ) - (func $~lib/util/number/prettify (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2133,7 +2131,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 21 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 20 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2271,7 +2269,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2345,49 +2343,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2398,28 +2354,96 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~lib/number/F64#toString (; 23 ;) (result i32) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + block $__inlined_func$~lib/util/number/dtoa + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + call $~lib/util/number/dtoa_core + local.tee $1 + i32.const 28 + i32.eq + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $0 + local.get $1 + call $~lib/string/String#substring + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $0 + i32.const 16 + 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 + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/tlsf/freeBlock + end + local.get $2 + ) + (func $~setArgumentsLength (; 24 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:resolve-ternary (; 26 ;) + (func $~start (; 25 ;) (local $0 i32) (local $1 i32) - (local $2 i32) i32.const 1 call $~lib/util/number/decimalCount32 - local.tee $1 + local.tee $0 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 i32.const 1 - local.get $1 - call $~lib/util/number/utoa_simple local.get $0 + call $~lib/util/number/utoa_simple + local.get $1 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 + local.get $0 i32.const 224 call $~lib/string/String.__eq i32.eqz @@ -2431,31 +2455,8 @@ call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/util/number/dtoa - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - call $~lib/util/number/dtoa_core - local.tee $0 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $0 - br $__inlined_func$~lib/util/number/dtoa - end - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.set $0 - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 + call $~lib/number/F64#toString + local.tee $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2473,18 +2474,14 @@ global.set $~argumentsLength i32.const 1 global.set $~argumentsLength - local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 27 ;) - call $start:resolve-ternary - ) - (func $~lib/rt/pure/__collect (; 28 ;) + (func $~lib/rt/pure/__collect (; 26 ;) nop ) - (func $~lib/rt/pure/decrement (; 29 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index 6f79954fa4..df997ada08 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -1,8 +1,7 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (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_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))) @@ -31,68 +30,46 @@ (global $resolve-unary/bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000000 - i32.lt_u - select + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 local.get $0 - i32.const 100000 - i32.lt_u + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -100,16 +77,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -118,42 +95,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -164,9 +112,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/util/number/itoa32 (; 4 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 2 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -188,9 +136,53 @@ i32.sub local.set $0 end - local.get $0 - call $~lib/util/number/decimalCount32 local.get $1 + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select i32.add local.tee $2 i32.const 1 @@ -228,7 +220,7 @@ end local.get $3 ) - (func $~lib/string/String#get:length (; 5 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -236,7 +228,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -312,7 +304,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -344,7 +336,7 @@ end i32.const 0 ) - (func $start:resolve-unary (; 8 ;) + (func $start:resolve-unary (; 6 ;) (local $0 i32) i32.const 544 global.set $~lib/rt/stub/startOffset @@ -624,7 +616,7 @@ unreachable end ) - (func $~start (; 9 ;) + (func $~start (; 7 ;) call $start:resolve-unary ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index fe794fc399..e5a5f6cc96 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1,9 +1,9 @@ (module (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -1282,48 +1282,9 @@ end end ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 708 i32.gt_u @@ -1331,11 +1292,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 708 i32.gt_u @@ -1346,7 +1344,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1412,7 +1410,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 21 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 20 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1454,7 +1452,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1627,7 +1625,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1640,7 +1638,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1743,7 +1741,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 24 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1802,7 +1800,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 26 ;) (param $0 i32) + (func $~lib/array/Array#push (; 25 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1825,7 +1823,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#get:length (; 27 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 26 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1833,7 +1831,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#concat (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1842,8 +1840,6 @@ local.tee $1 i32.eqz if - i32.const 480 - local.set $3 local.get $1 i32.const 480 i32.ne @@ -1854,53 +1850,51 @@ i32.const 480 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat + local.get $0 + i32.const 480 + local.get $0 + select + local.tee $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $2 local.get $1 - call $~lib/rt/pure/__release - i32.const 400 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add local.tee $0 - return + i32.eqz + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 400 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + local.get $3 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release end - local.get $2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__concat (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 480 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $start:retain-release-sanity (; 30 ;) + (func $start:retain-release-sanity (; 28 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2159,10 +2153,10 @@ call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) - (func $~start (; 31 ;) + (func $~start (; 29 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 32 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 30 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2186,7 +2180,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 31 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2199,7 +2193,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 34 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 32 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2233,7 +2227,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 35 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 33 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2266,7 +2260,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 36 ;) + (func $~lib/rt/pure/__collect (; 34 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2387,61 +2381,11 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/growRoots (; 37 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $0 - i32.const 256 - local.get $0 - i32.const 256 - i32.gt_u - select - local.tee $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $0 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onfree - local.get $0 - local.get $1 - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - if - local.get $1 - i32.const 16 - i32.sub - call $~lib/rt/rtrace/onalloc - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - end - local.get $0 - global.set $~lib/rt/pure/ROOTS - local.get $0 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $0 - local.get $3 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 35 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -2545,7 +2489,51 @@ 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 $4 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $2 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onfree + local.get $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + local.get $1 + i32.const 16 + i32.sub + call $~lib/rt/rtrace/onalloc + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + 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 $4 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -2560,7 +2548,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 36 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2663,7 +2651,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2696,7 +2684,7 @@ end end ) - (func $~lib/rt/__visit_members (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 38 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index a0026aad7b..bb79b2231a 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -57,20 +57,46 @@ (export "provideRefIndirect" (func $retain-release/provideRefIndirect)) (export "receiveRefIndirect" (func $retain-release/receiveRefIndirect)) (export "receiveRefIndirectDrop" (func $retain-release/receiveRefIndirect)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -78,16 +104,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -96,42 +122,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -142,31 +139,31 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $retain-release/returnRef (; 3 ;) (result i32) + (func $retain-release/returnRef (; 2 ;) (result i32) global.get $retain-release/REF ) - (func $retain-release/receiveRef (; 4 ;) + (func $retain-release/receiveRef (; 3 ;) nop ) - (func $retain-release/takeRef (; 5 ;) (param $0 i32) + (func $retain-release/takeRef (; 4 ;) (param $0 i32) nop ) - (func $retain-release/takeReturnRef (; 6 ;) (param $0 i32) (result i32) + (func $retain-release/takeReturnRef (; 5 ;) (param $0 i32) (result i32) local.get $0 ) - (func $retain-release/newRef (; 7 ;) + (func $retain-release/newRef (; 6 ;) i32.const 0 i32.const 3 call $~lib/rt/stub/__alloc drop ) - (func $retain-release/assignGlobal (; 8 ;) + (func $retain-release/assignGlobal (; 7 ;) global.get $retain-release/REF global.set $retain-release/glo ) - (func $retain-release/assignField (; 9 ;) + (func $retain-release/assignField (; 8 ;) (local $0 i32) (local $1 i32) global.get $retain-release/REF @@ -180,7 +177,7 @@ local.get $0 i32.store ) - (func $retain-release/scopeForComplex (; 10 ;) (param $0 i32) + (func $retain-release/scopeForComplex (; 9 ;) (param $0 i32) (local $1 i32) (local $2 i32) loop $for-loop|0 @@ -206,7 +203,7 @@ end end ) - (func $retain-release/scopeThrow (; 11 ;) (param $0 i32) + (func $retain-release/scopeThrow (; 10 ;) (param $0 i32) local.get $0 if i32.const 32 @@ -217,31 +214,31 @@ unreachable end ) - (func $retain-release/scopeUnreachable (; 12 ;) (param $0 i32) + (func $retain-release/scopeUnreachable (; 11 ;) (param $0 i32) local.get $0 if unreachable end ) - (func $~setArgumentsLength (; 13 ;) (param $0 i32) + (func $~setArgumentsLength (; 12 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $retain-release/provideRefIndirect (; 14 ;) (param $0 i32) + (func $retain-release/provideRefIndirect (; 13 ;) (param $0 i32) i32.const 1 global.set $~argumentsLength global.get $retain-release/REF local.get $0 call_indirect (type $i32_=>_none) ) - (func $retain-release/receiveRefIndirect (; 15 ;) (param $0 i32) + (func $retain-release/receiveRefIndirect (; 14 ;) (param $0 i32) i32.const 0 global.set $~argumentsLength local.get $0 call_indirect (type $none_=>_i32) drop ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) (local $0 i32) global.get $~started if diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index e44cd40436..1b4adb111f 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $none_=>_i32 (func (result 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))) @@ -726,54 +726,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -834,8 +787,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -859,8 +813,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -906,46 +901,9 @@ call $~lib/rt/tlsf/prepareBlock local.get $1 ) - (func $~lib/rt/pure/increment (; 9 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 8 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 176 i32.gt_u @@ -953,18 +911,53 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $retain-return/Ref#constructor (; 11 ;) (result i32) + (func $retain-return/Ref#constructor (; 9 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -975,12 +968,19 @@ call $~lib/rt/pure/decrement end ) - (func $~setArgumentsLength (; 13 ;) (param $0 i32) + (func $~setArgumentsLength (; 11 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:retain-return (; 14 ;) + (func $~start (; 12 ;) (local $0 i32) + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end call $retain-return/Ref#constructor call $~lib/rt/pure/__release call $retain-return/Ref#constructor @@ -1036,17 +1036,7 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start (; 15 ;) - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:retain-return - ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 7bf903065c..ff9fbe852c 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -1,7 +1,6 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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))) @@ -19,20 +18,28 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -40,16 +47,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -58,20 +65,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -86,9 +82,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $rt/instanceof/Animal#constructor (; 3 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Animal#constructor (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -98,7 +94,7 @@ end local.get $0 ) - (func $rt/instanceof/Cat#constructor (; 4 ;) (param $0 i32) (result i32) + (func $rt/instanceof/Cat#constructor (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -109,7 +105,7 @@ local.get $0 call $rt/instanceof/Animal#constructor ) - (func $~lib/rt/__instanceof (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/__instanceof (; 4 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -139,7 +135,7 @@ end i32.const 0 ) - (func $start:rt/instanceof (; 6 ;) + (func $start:rt/instanceof (; 5 ;) (local $0 i32) i32.const 128 global.set $~lib/rt/stub/startOffset @@ -406,7 +402,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 6 ;) global.get $~started if return diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 5a7324aad9..0fff930a82 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -409,51 +409,9 @@ i32.store offset=12 local.get $0 ) - (func $~lib/rt/stub/__free (; 9 ;) (param $0 i32) + (func $start:rt/stub-realloc (; 9 ;) + (local $0 i32) (local $1 i32) - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 70 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.tee $1 - i32.load offset=4 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 72 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/rt/stub/offset - local.get $0 - local.get $1 - i32.load - i32.add - i32.eq - if - local.get $1 - global.set $~lib/rt/stub/offset - end - ) - (func $start:rt/stub-realloc (; 10 ;) i32.const 10 i32.const 0 call $~lib/rt/stub/__alloc @@ -572,7 +530,47 @@ unreachable end global.get $rt/stub-realloc/ptr - call $~lib/rt/stub/__free + local.tee $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 70 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 72 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/stub/offset + local.get $0 + local.get $1 + i32.load + i32.add + i32.eq + if + local.get $1 + global.set $~lib/rt/stub/offset + end i32.const 1 i32.const 0 call $~lib/rt/stub/__alloc @@ -587,7 +585,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 10 ;) global.get $~started if return diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 7b3231905d..1874de7145 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -1050,46 +1050,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 204 i32.gt_u @@ -1097,11 +1060,46 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1112,10 +1110,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 13 ;) + (func $~lib/rt/pure/__collect (; 12 ;) nop ) - (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 4647e2d833..eab4d7d804 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -16,20 +16,46 @@ (export "__reset" (func $~lib/rt/stub/__reset)) (export "__rtti_base" (global $~lib/rt/__rtti_base)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -37,16 +63,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -55,42 +81,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -101,22 +98,22 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/rt/stub/__retain (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__retain (; 1 ;) (param $0 i32) (result i32) local.get $0 ) - (func $~lib/rt/stub/__release (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__release (; 2 ;) (param $0 i32) nop ) - (func $~lib/rt/stub/__collect (; 4 ;) + (func $~lib/rt/stub/__collect (; 3 ;) nop ) - (func $~lib/rt/stub/__reset (; 5 ;) + (func $~lib/rt/stub/__reset (; 4 ;) global.get $~lib/rt/stub/startOffset global.set $~lib/rt/stub/offset ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) i32.const 48 global.set $~lib/rt/stub/startOffset i32.const 48 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index e9369b5194..130738541b 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1104,48 +1104,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 496 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 496 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 528 i32.gt_u @@ -1153,11 +1114,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 496 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 496 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/__allocArray (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) i32.const 16 local.get $2 @@ -1183,7 +1181,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 528 i32.gt_u @@ -1194,7 +1192,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/array-literal (; 20 ;) + (func $start:std/array-literal (; 19 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1558,10 +1556,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 21 ;) + (func $~start (; 20 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1665,7 +1663,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 22 ;) (param $0 i32) local.get $0 i32.const 528 i32.lt_u @@ -1677,7 +1675,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 24 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index e04e4acd65..673622ea01 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -4,21 +4,19 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) - (type $none_=>_i32 (func (result i32))) - (type $i64_=>_i32 (func (param i64) (result i32))) + (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $i64_=>_none (func (param i64))) + (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) - (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) @@ -1495,48 +1493,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1544,11 +1503,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1559,7 +1555,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1628,7 +1624,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 22 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 21 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 3 @@ -1645,7 +1641,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Ref#constructor (; 23 ;) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 22 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 4 i32.const 4 @@ -1656,7 +1652,7 @@ i32.store local.get $1 ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1829,7 +1825,7 @@ end end ) - (func $~lib/rt/__allocArray (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1867,7 +1863,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1934,7 +1930,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1953,7 +1949,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1998,7 +1994,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2073,7 +2069,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2094,7 +2090,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2142,7 +2138,7 @@ end i32.const 1 ) - (func $std/array/internalCapacity (; 32 ;) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 31 ;) (param $0 i32) (result i32) local.get $0 i32.load i32.const 16 @@ -2151,7 +2147,7 @@ i32.const 2 i32.shr_s ) - (func $~lib/rt/tlsf/checkUsedBlock (; 33 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2193,7 +2189,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 34 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2206,7 +2202,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2309,7 +2305,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2369,7 +2365,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2392,7 +2388,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 38 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 37 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2422,7 +2418,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#concat (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 38 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2475,7 +2471,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2579,7 +2575,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2608,100 +2604,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#shift (; 42 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - i32.const 1 - i32.lt_s - if - i32.const 976 - i32.const 512 - i32.const 349 - i32.const 20 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.tee $2 - i32.load - local.get $2 - local.get $2 - i32.const 4 - i32.add - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - i32.const 2 - i32.shl - local.tee $4 - call $~lib/memory/memory.copy - local.get $2 - local.get $4 - i32.add - i32.const 0 - i32.store - local.get $0 - local.get $1 - i32.store offset=12 - ) - (func $~lib/array/Array#reverse (; 43 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.tee $1 - if - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - i32.add - local.set $1 - loop $while-continue|0 - local.get $2 - local.get $1 - i32.lt_u - if - local.get $2 - i32.load - local.set $3 - local.get $2 - local.get $1 - i32.load - i32.store - local.get $1 - local.get $3 - i32.store - local.get $2 - i32.const 4 - i32.add - local.set $2 - local.get $1 - i32.const 4 - i32.sub - local.set $1 - br $while-continue|0 - end - end - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/array/Array#indexOf (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2761,243 +2664,41 @@ end i32.const -1 ) - (func $~lib/array/Array#indexOf (; 45 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - return - end + (func $~lib/array/Array#includes (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.const nan:0x400000 - f32.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s ) - (func $~lib/array/Array#indexOf (; 46 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/array/Array#splice (; 43 ;) (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 $2 + 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 $2 - i32.ge_s + local.get $1 + i32.const 0 + i32.gt_s + select else - i32.const 1 - end - if - i32.const -1 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.const nan:0x8000000000000 - f64.eq - if - local.get $1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const -1 - ) - (func $~lib/array/Array#includes (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - ) - (func $~lib/array/Array#includes (; 48 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const 0 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f32.ne - end - if - i32.const 1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/array/Array#includes (; 49 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - local.get $0 - i32.load offset=12 - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - if - i32.const 0 - return - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f64.ne - end - if - i32.const 1 - return - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/array/Array#splice (; 50 ;) (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 + local.get $3 + local.get $1 + local.get $3 i32.lt_s select end @@ -3061,7 +2762,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 51 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3152,7 +2853,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3162,7 +2863,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 46 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3192,7 +2893,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 54 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 47 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3270,7 +2971,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3287,7 +2988,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3324,15 +3025,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 58 ;) (param $0 i32) + (func $~setArgumentsLength (; 51 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 52 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3377,17 +3078,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3395,7 +3096,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3403,12 +3104,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 65 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 58 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3454,12 +3155,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3467,12 +3168,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3480,12 +3181,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 71 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 64 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3530,12 +3231,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3543,12 +3244,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3556,13 +3257,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 77 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 70 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3602,7 +3303,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3611,7 +3312,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3620,7 +3321,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3713,67 +3414,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 82 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - local.get $0 - i32.load offset=12 - local.tee $3 - i32.const 2 - i32.const 9 - i32.const 0 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.set $5 - loop $for-loop|0 - local.get $1 - local.get $3 - local.get $0 - i32.load offset=12 - local.tee $2 - local.get $3 - local.get $2 - i32.lt_s - select - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - i32.const 2 - i32.shl - local.tee $2 - local.get $0 - i32.load offset=4 - i32.add - i32.load - f32.convert_i32_s - local.set $6 - local.get $2 - local.get $5 - i32.add - local.get $6 - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $4 - ) - (func $~lib/array/Array#__get (; 83 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 75 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3794,7 +3439,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3804,7 +3449,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 85 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 77 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3863,14 +3508,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3880,12 +3525,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 89 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 81 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3941,7 +3586,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3953,7 +3598,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -3962,7 +3607,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 92 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3974,12 +3619,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4022,7 +3667,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 95 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -4030,7 +3675,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -4038,7 +3683,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -4046,7 +3691,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -4054,7 +3699,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -4090,7 +3735,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 100 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 92 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -4111,7 +3756,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 101 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 93 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -4143,51 +3788,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 102 ;) (param $0 i64) - i32.const 1 - global.set $~lib/math/random_seeded - local.get $0 - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state0_64 - global.get $~lib/math/random_state0_64 - i64.const -1 - i64.xor - call $~lib/math/murmurHash3 - global.set $~lib/math/random_state1_64 - local.get $0 - i32.wrap_i64 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state0_32 - global.get $~lib/math/random_state0_32 - call $~lib/math/splitMix32 - global.set $~lib/math/random_state1_32 - global.get $~lib/math/random_state1_32 - i32.const 0 - i32.ne - i32.const 0 - global.get $~lib/math/random_state0_32 - i32.const 0 - global.get $~lib/math/random_state1_64 - i64.const 0 - i64.ne - i32.const 0 - global.get $~lib/math/random_state0_64 - i64.const 0 - i64.ne - select - select - select - i32.eqz - if - i32.const 0 - i32.const 4032 - i32.const 1406 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/util/sort/insertionSort (; 103 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 94 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4265,7 +3866,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 104 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 95 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -4524,73 +4125,11 @@ local.get $4 f32.store ) - (func $~lib/array/Array#sort (; 105 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 96 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) - (local $3 f32) - (local $4 f32) + (local $3 i32) local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $0 - i32.load offset=4 - local.set $1 - local.get $2 - i32.const 2 - i32.eq - if - local.get $1 - f32.load offset=4 - local.set $3 - local.get $1 - f32.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $4 - f32.store offset=4 - local.get $1 - local.get $3 - f32.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $2 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 106 ;) (param $0 f32) (param $1 f32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.reinterpret_f32 + i32.reinterpret_f32 local.tee $2 local.get $2 i32.const 31 @@ -4615,72 +4154,7 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 107 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - 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 - if - i32.const 0 - return - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (; 108 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 97 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -4758,7 +4232,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 109 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 98 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -5017,69 +4491,7 @@ local.get $4 f64.store ) - (func $~lib/array/Array#sort (; 110 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $0 - i32.load offset=4 - local.set $1 - local.get $2 - i32.const 2 - i32.eq - if - local.get $1 - f64.load offset=8 - local.set $3 - local.get $1 - f64.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $1 - local.get $4 - f64.store offset=8 - local.get $1 - local.get $3 - f64.store - end - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/util/sort/insertionSort - else - local.get $1 - local.get $2 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 111 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 99 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -5108,7 +4520,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 112 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -5129,72 +4541,7 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (; 113 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - 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 - if - i32.const 0 - return - end - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 101 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5273,7 +4620,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5534,7 +4881,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 116 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 103 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5598,12 +4945,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 117 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -5612,7 +4959,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 119 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5640,7 +4987,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 120 ;) (result f64) + (func $~lib/math/NativeMath.random (; 107 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5684,7 +5031,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 121 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 108 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5712,7 +5059,7 @@ end local.get $2 ) - (func $std/array/assertSorted (; 122 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 109 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5769,12 +5116,12 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|44 (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 110 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5822,61 +5169,16 @@ call $~lib/rt/pure/__release end ) - (func $std/array/createReverseOrderedNestedArray (; 125 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + (func $start:std/array~anonymous|47 (; 112 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 - local.get $0 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - local.get $0 - i32.sub - call $~lib/array/Array#__set - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $start:std/array~anonymous|47 (; 126 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.get $1 i32.const 0 call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 127 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 113 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5930,65 +5232,64 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/isSorted<~lib/array/Array> (; 128 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSorted<~lib/array/Array> (; 114 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 - local.set $2 - local.get $0 - i32.load offset=12 - local.set $5 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $2 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.tee $3 - local.get $0 + (local $6 i32) + block $__inlined_func$std/array/isSorted<~lib/array/Array> (result i32) + i32.const 1 + local.set $2 + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $5 + local.tee $0 + i32.load offset=12 + local.set $6 + loop $for-loop|0 local.get $2 - call $~lib/array/Array#__get - local.tee $4 - local.get $1 - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.gt_s + local.get $6 + i32.lt_s if + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $3 + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.tee $4 + local.get $1 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s + if + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isSorted<~lib/array/Array> + end local.get $3 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - i32.const 0 - return + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 1 end - i32.const 1 - ) - (func $std/array/assertSorted<~lib/array/Array> (; 129 ;) (param $0 i32) (param $1 i32) - local.get $0 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $0 - local.get $1 - call $std/array/isSorted<~lib/array/Array> i32.eqz if i32.const 0 @@ -5998,114 +5299,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedElementsArray (; 130 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 512 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 512 - i32.store offset=12 - loop $for-loop|0 - local.get $0 - i32.const 512 - i32.lt_s - if - i32.const 4 - i32.const 13 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - i32.const 511 - local.get $0 - i32.sub - i32.store - local.get $1 - local.get $0 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - ) - (func $start:std/array~anonymous|48 (; 131 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 115 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $std/array/isSorted<~lib/string/String | null> (; 132 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 1 - local.set $1 - local.get $0 - i32.load offset=12 - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 2 - global.set $~argumentsLength - local.get $0 - local.get $1 - i32.const 1 - i32.sub - call $~lib/array/Array#__get - local.tee $2 - local.get $0 - local.get $1 - call $~lib/array/Array#__get - local.tee $3 - call $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 - i32.const 0 - i32.gt_s - if - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1 - ) - (func $~lib/string/String#get:length (; 133 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 116 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -6113,7 +5317,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 134 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 117 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -6189,7 +5393,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -6243,99 +5447,125 @@ select call $~lib/util/string/compareImpl ) - (func $~lib/string/String.__eq (; 136 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - ) - (func $std/array/isArraysEqual<~lib/string/String | null> (; 137 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 119 ;) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=12 - local.tee $5 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - return + (local $6 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 55 + local.set $2 end - local.get $0 - local.get $1 - i32.eq - if + block $__inlined_func$std/array/isSorted<~lib/string/String | null> (result i32) i32.const 1 - return - end - loop $for-loop|0 + local.set $1 + local.get $0 local.get $2 - local.get $5 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $1 - local.get $2 - call $~lib/array/Array#__get - local.tee $4 - call $~lib/string/String.__eq - i32.eqz + call $~lib/array/Array<~lib/array/Array>#sort + local.tee $5 + local.tee $0 + i32.load offset=12 + local.set $6 + loop $for-loop|0 + local.get $1 + local.get $6 + i32.lt_s if + i32.const 2 + global.set $~argumentsLength + local.get $0 + local.get $1 + i32.const 1 + i32.sub + call $~lib/array/Array#__get + local.tee $3 + local.get $0 + local.get $1 + call $~lib/array/Array#__get + local.tee $4 + local.get $2 + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.gt_s + if + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isSorted<~lib/string/String | null> + end local.get $3 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - i32.const 0 - return + 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 $4 - call $~lib/rt/pure/__release - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 881 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $5 + call $~lib/rt/pure/__release + ) + (func $~lib/string/String.__eq (; 120 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return end + local.get $1 + i32.eqz i32.const 1 + local.get $0 + select + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.tee $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz ) - (func $~lib/string/String#concat (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 121 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6344,8 +5574,6 @@ local.tee $1 i32.eqz if - i32.const 5232 - local.set $3 local.get $1 i32.const 5232 i32.ne @@ -6356,53 +5584,51 @@ i32.const 5232 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat + local.get $0 + i32.const 5232 + local.get $0 + select + local.tee $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $2 local.get $1 - call $~lib/rt/pure/__release - i32.const 5120 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add local.tee $0 - return + i32.eqz + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 5120 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + local.get $3 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release end - local.get $2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__concat (; 139 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 5232 local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 140 ;) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 122 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6474,49 +5700,7 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 141 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 - i32.const 0 - i32.store offset=12 - local.get $0 - i32.const 400 - i32.store offset=12 - loop $for-loop|0 - local.get $1 - i32.const 400 - i32.lt_s - if - local.get $0 - local.get $1 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $2 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - ) - (func $~lib/string/String#substring (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 123 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6590,7 +5774,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 124 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6730,7 +5914,7 @@ end local.get $3 ) - (func $~lib/util/number/decimalCount32 (; 144 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 125 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -6778,7 +5962,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -6802,7 +5986,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 146 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 127 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6844,7 +6028,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6886,7 +6070,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6993,7 +6177,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 149 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 130 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -7001,7 +6185,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/utoa32 (; 150 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 131 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -7024,7 +6208,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -7048,7 +6232,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 152 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7155,7 +6339,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 134 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -7163,7 +6347,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 154 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 135 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -7553,7 +6737,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -7798,7 +6982,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 156 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 137 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -8107,61 +7291,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 157 ;) (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 5824 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - i32.const 5856 - return - end - i32.const 5888 - i32.const 5936 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/number/dtoa_stream (; 158 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8232,57 +7362,115 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 159 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/util/string/joinFloatArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $3 + local.tee $4 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $3 + local.get $4 i32.eqz if + block $__inlined_func$~lib/util/number/dtoa + local.get $0 + f64.load + local.tee $2 + f64.const 0 + f64.eq + if + i32.const 5824 + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + if + local.get $2 + local.get $2 + f64.ne + if + i32.const 5856 + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + i32.const 5888 + i32.const 5936 + local.get $2 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $2 + call $~lib/util/number/dtoa_core + local.tee $0 + i32.const 28 + i32.eq + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $0 + br $__inlined_func$~lib/util/number/dtoa + end + local.get $1 + local.get $0 + call $~lib/string/String#substring + local.set $0 + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + end local.get $0 - f64.load - call $~lib/util/number/dtoa return end - local.get $3 + local.get $4 i32.const 5792 call $~lib/string/String#get:length - local.tee $4 + local.tee $5 i32.const 28 i32.add i32.mul i32.const 28 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 + local.set $3 i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -8291,35 +7479,35 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if - local.get $2 + local.get $3 local.get $1 i32.const 1 i32.shl i32.add i32.const 5792 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 - local.get $2 + local.get $7 + local.get $3 local.get $1 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -8330,16 +7518,16 @@ local.tee $0 i32.gt_s if - local.get $2 + local.get $3 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $3 call $~lib/rt/pure/__release return end - local.get $2 + local.get $3 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 160 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8507,7 +7695,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 141 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -8515,7 +7703,7 @@ local.get $1 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> ) - (func $~lib/util/string/joinReferenceArray (; 162 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 142 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8667,14 +7855,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array#join (; 163 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 143 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray ) - (func $~lib/util/number/itoa_stream (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8729,7 +7917,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 165 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8832,7 +8020,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 166 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 146 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8862,7 +8050,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 167 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 147 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8969,7 +8157,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 168 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 148 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -9022,7 +8210,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 169 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 149 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -9049,50 +8237,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 170 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 171 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -9132,12 +8277,13 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 172 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 151 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -9153,19 +8299,56 @@ if local.get $0 i64.load - call $~lib/util/number/utoa64 + local.tee $4 + i64.eqz + if (result i32) + i32.const 5472 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 5360 call $~lib/string/String#get:length - local.tee $4 + local.tee $5 i32.const 20 i32.add i32.mul i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -9175,14 +8358,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -9191,7 +8374,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -9199,23 +8382,23 @@ i32.shl i32.add i32.const 5360 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 @@ -9239,71 +8422,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa64 (; 173 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 0 - i64.lt_s - local.tee $1 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.get $1 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple - end - local.get $1 - if - local.get $3 - i32.const 45 - i32.store16 - end - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 152 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -9364,41 +8483,99 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 175 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 153 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $3 + local.tee $4 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $3 + local.get $4 i32.eqz if local.get $0 i64.load - call $~lib/util/number/itoa64 - return - end - local.get $3 - i32.const 5360 - call $~lib/string/String#get:length - local.tee $4 - i32.const 21 - i32.add - i32.mul - i32.const 21 - i32.add - local.tee $6 - i32.const 1 + local.tee $3 + i64.eqz + if (result i32) + i32.const 5472 + else + local.get $3 + i64.const 0 + i64.lt_s + local.tee $0 + if + i64.const 0 + local.get $3 + i64.sub + local.set $3 + end + local.get $3 + i64.const 4294967295 + i64.le_u + if + local.get $3 + i32.wrap_i64 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.get $0 + i32.add + local.tee $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $2 + local.get $4 + call $~lib/util/number/utoa_simple + else + local.get $3 + call $~lib/util/number/decimalCount64 + local.get $0 + i32.add + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple + end + local.get $0 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain + end + return + end + local.get $4 + i32.const 5360 + call $~lib/string/String#get:length + local.tee $5 + i32.const 21 + i32.add + i32.mul + i32.const 21 + i32.add + local.tee $7 + i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc @@ -9407,14 +8584,14 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 i32.const 3 i32.shl i32.add @@ -9423,7 +8600,7 @@ local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -9431,27 +8608,27 @@ i32.shl i32.add i32.const 5360 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -9471,7 +8648,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 154 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9638,7 +8815,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -9668,7 +8845,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 178 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 156 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9771,14 +8948,14 @@ end local.get $2 ) - (func $~lib/array/Array#toString (; 179 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 157 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 180 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9942,7 +9119,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 181 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10109,14 +9286,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 182 ;) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 160 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 183 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10280,7 +9457,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $start:std/array (; 184 ;) + (func $start:std/array (; 162 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10299,10 +9476,10 @@ (local $15 i32) (local $16 i32) (local $17 i32) - (local $18 i32) + (local $18 f32) (local $19 i32) (local $20 i32) - (local $21 i32) + (local $21 f64) (local $22 i32) (local $23 i32) (local $24 i32) @@ -10317,9 +9494,9 @@ (local $33 i32) (local $34 i32) (local $35 i32) - (local $36 i32) - (local $37 i32) - (local $38 i32) + (local $36 i64) + (local $37 f32) + (local $38 f64) (local $39 i32) (local $40 i32) (local $41 i32) @@ -10337,6 +9514,11 @@ (local $53 i32) (local $54 i32) (local $55 i32) + (local $56 i32) + (local $57 i32) + (local $58 i32) + (local $59 i32) + (local $60 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -10369,20 +9551,20 @@ i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 i32.const 416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $6 call $std/array/isArraysEqual i32.eqz if @@ -10393,13 +9575,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10417,13 +9599,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10441,13 +9623,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10465,13 +9647,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 0 i32.const 6 @@ -10489,10 +9671,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -10507,20 +9689,20 @@ i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10532,13 +9714,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10557,13 +9739,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10582,13 +9764,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10607,13 +9789,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $2 + local.get $4 i32.const 5 i32.const 2 i32.const 7 @@ -10632,10 +9814,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -10903,51 +10085,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $0 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $0 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $1 i32.load offset=12 - local.tee $1 + local.tee $0 i32.const 0 i32.gt_s if - local.get $0 - i32.load offset=4 - local.tee $3 local.get $1 + i32.load offset=4 + local.tee $4 + local.get $0 i32.const 2 i32.shl i32.add - local.set $1 + local.set $0 loop $do-continue|0 - local.get $3 + local.get $4 i32.load call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 4 i32.add - local.tee $3 - local.get $1 + local.tee $4 + local.get $0 i32.lt_u br_if $do-continue|0 end else - local.get $0 + local.get $1 i32.const 0 call $~lib/array/ensureSize end - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.load offset=12 if i32.const 0 @@ -10957,7 +10139,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor @@ -11072,7 +10254,7 @@ global.get $std/array/arr local.get $5 call $~lib/array/Array#concat - local.set $4 + local.set $6 local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr @@ -11099,7 +10281,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.load offset=12 i32.const 5 i32.ne @@ -11111,7 +10293,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -11124,7 +10306,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -11137,7 +10319,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -11150,7 +10332,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -11163,7 +10345,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -11176,10 +10358,10 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 call $~lib/array/Array#pop drop - local.get $4 + local.get $6 i32.load offset=12 i32.const 4 i32.ne @@ -11211,7 +10393,7 @@ global.get $std/array/arr call $~lib/array/Array#concat local.set $1 - local.get $4 + local.get $6 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -11254,14 +10436,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $20 + local.tee $23 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11287,14 +10469,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $22 + local.tee $25 i32.const 5 i32.const 2 i32.const 3 i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11320,14 +10502,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $24 + local.tee $7 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11352,14 +10534,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $15 + local.tee $9 i32.const 5 i32.const 2 i32.const 3 i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11384,14 +10566,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $17 + local.tee $10 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11416,14 +10598,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $12 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11448,14 +10630,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $14 i32.const 5 i32.const 2 i32.const 3 i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11480,14 +10662,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $12 + local.tee $16 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11512,14 +10694,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $20 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11544,14 +10726,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $19 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11576,14 +10758,14 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $4 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11601,21 +10783,22 @@ i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $22 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $22 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11627,25 +10810,15 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $20 - call $~lib/rt/pure/__release - local.get $21 - call $~lib/rt/pure/__release local.get $22 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $16 + local.get $25 call $~lib/rt/pure/__release - local.get $17 + local.get $26 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release @@ -11653,6 +10826,8 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $11 @@ -11663,20 +10838,28 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $18 + local.get $15 call $~lib/rt/pure/__release - local.get $19 + local.get $16 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $5 + local.get $6 + call $~lib/rt/pure/__release + local.get $5 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 global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift @@ -11849,7 +11032,43 @@ unreachable end global.get $std/array/arr - call $~lib/array/Array#shift + local.tee $5 + i32.load offset=12 + local.tee $0 + i32.const 1 + i32.lt_s + if + i32.const 976 + i32.const 512 + i32.const 349 + i32.const 20 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.load offset=4 + local.tee $6 + i32.load + local.get $6 + local.get $6 + i32.const 4 + i32.add + local.get $0 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $6 + i32.add + i32.const 0 + i32.store + local.get $5 + local.get $1 + i32.store offset=12 global.set $std/array/i global.get $std/array/i i32.const 41 @@ -12016,8 +11235,49 @@ unreachable end global.get $std/array/arr - call $~lib/array/Array#reverse - call $~lib/rt/pure/__release + local.tee $1 + i32.load offset=12 + local.tee $0 + if + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=4 + local.get $0 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $2 + loop $while-continue|0 + local.get $4 + local.get $2 + i32.lt_u + if + local.get $4 + i32.load + local.set $0 + local.get $4 + local.get $2 + i32.load + i32.store + local.get $2 + local.get $0 + i32.store + local.get $4 + i32.const 4 + i32.add + local.set $4 + local.get $2 + i32.const 4 + i32.sub + local.set $2 + br $while-continue|0 + end + end + end global.get $std/array/arr i32.load offset=12 i32.const 3 @@ -12251,8 +11511,54 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#indexOf + local.tee $6 + local.set $0 + i32.const 0 + local.set $2 + block $__inlined_func$~lib/array/Array#indexOf + local.get $6 + i32.load offset=12 + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|022 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + f32.const nan:0x400000 + f32.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|022 + end + end + i32.const -1 + local.set $2 + end + local.get $2 i32.const -1 i32.ne if @@ -12269,8 +11575,54 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/array/Array#indexOf + local.tee $5 + local.set $0 + i32.const 0 + local.set $2 + block $__inlined_func$~lib/array/Array#indexOf + local.get $5 + i32.load offset=12 + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $__inlined_func$~lib/array/Array#indexOf + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|023 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + f64.const nan:0x8000000000000 + f64.eq + br_if $__inlined_func$~lib/array/Array#indexOf + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|023 + end + end + i32.const -1 + local.set $2 + end + local.get $2 i32.const -1 i32.ne if @@ -12281,9 +11633,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -12421,68 +11773,168 @@ call $~lib/builtins/abort unreachable end - i32.const 1 - i32.const 2 - i32.const 9 - i32.const 2272 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $1 - call $~lib/array/Array#includes - i32.eqz - if + block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - i32.const 304 - i32.const 343 + local.set $4 + i32.const 0 + i32.const 1 i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 9 + i32.const 2272 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + i32.load offset=12 + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $6 + i32.load offset=4 + local.set $0 + loop $while-continue|024 + local.get $4 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $0 + local.get $4 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $18 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $18 + local.get $18 + f32.ne + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $while-continue|024 + end + end + i32.const 0 end - i32.const 1 - i32.const 3 - i32.const 10 - i32.const 2304 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/array/Array#includes i32.eqz if i32.const 0 i32.const 304 - i32.const 344 + i32.const 343 i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/array/arr - i32.const 1 - i32.const 1 - call $~lib/array/Array#splice - call $~lib/rt/pure/__release - global.get $std/array/arr - i32.load offset=12 - i32.const 4 - i32.ne - if + block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - i32.const 304 - i32.const 348 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - global.get $std/array/arr - call $std/array/internalCapacity - i32.const 5 - i32.ne - if + local.set $2 i32.const 0 - i32.const 304 - i32.const 349 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1 + i32.const 3 + i32.const 10 + i32.const 2304 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + i32.load offset=12 + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $5 + i32.load offset=4 + local.set $0 + loop $while-continue|025 + local.get $2 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $21 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $21 + local.get $21 + f64.ne + end + br_if $__inlined_func$~lib/array/Array#includes + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|025 + end + end + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + i32.const 1 + i32.const 1 + call $~lib/array/Array#splice + call $~lib/rt/pure/__release + global.get $std/array/arr + i32.load offset=12 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 348 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $std/array/arr + call $std/array/internalCapacity + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 349 + i32.const 2 + call $~lib/builtins/abort + unreachable end global.get $std/array/arr i32.const 0 @@ -12510,9 +11962,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12524,14 +11976,14 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $34 + local.tee $39 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12550,7 +12002,7 @@ i32.const 2432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12568,21 +12020,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $3 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $37 + local.tee $42 i32.const 0 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12594,14 +12046,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 5 i32.const 2 i32.const 3 i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12619,20 +12071,21 @@ i32.const 2560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.set $1 + local.get $3 call $~lib/rt/pure/__release - local.tee $1 + local.get $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $40 + local.tee $45 i32.const 3 i32.const 2 i32.const 3 i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12651,7 +12104,7 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12675,14 +12128,14 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $43 + local.tee $48 i32.const 2 i32.const 2 i32.const 3 i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $49 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12701,7 +12154,7 @@ i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12725,14 +12178,14 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $46 + local.tee $51 i32.const 1 i32.const 2 i32.const 3 i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12751,7 +12204,7 @@ i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12775,14 +12228,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $49 + local.tee $54 i32.const 1 i32.const 2 i32.const 3 i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $55 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12801,7 +12254,7 @@ i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12825,14 +12278,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $52 + local.tee $57 i32.const 2 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12851,7 +12304,7 @@ i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $54 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12875,14 +12328,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $55 + local.tee $60 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $28 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12901,7 +12354,7 @@ i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $29 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12925,14 +12378,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $20 + local.tee $22 i32.const 1 i32.const 2 i32.const 3 i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12951,7 +12404,7 @@ i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12975,14 +12428,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $23 + local.tee $25 i32.const 0 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13001,7 +12454,7 @@ i32.const 3408 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13025,14 +12478,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $15 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13051,7 +12504,7 @@ i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13076,14 +12529,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $7 + local.tee $10 i32.const 0 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13102,7 +12555,7 @@ i32.const 3632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13127,14 +12580,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $10 + local.tee $13 i32.const 0 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13153,7 +12606,7 @@ i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13171,21 +12624,21 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $30 + local.set $32 local.get $1 call $~lib/rt/pure/__release - local.get $30 + local.get $32 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $13 + local.tee $16 i32.const 0 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13197,14 +12650,14 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $32 i32.const 5 i32.const 2 i32.const 3 i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13251,7 +12704,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $27 i32.load offset=4 local.tee $3 i32.const 1 @@ -13275,13 +12728,13 @@ i32.store offset=16 local.get $1 call $~lib/rt/pure/__release - local.get $25 + local.get $27 i32.const 2 call $~lib/array/Array#splice - local.set $29 + local.set $31 local.get $0 call $~lib/rt/pure/__release - local.get $29 + local.get $31 i32.load offset=12 i32.const 2 i32.ne @@ -13293,10 +12746,10 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $31 i32.const 0 call $~lib/array/Array#__get - local.tee $19 + local.tee $2 i32.load i32.const 3 i32.ne @@ -13308,10 +12761,10 @@ call $~lib/builtins/abort unreachable end - local.get $29 + local.get $31 i32.const 1 call $~lib/array/Array#__get - local.tee $2 + local.tee $4 i32.load i32.const 4 i32.ne @@ -13323,7 +12776,7 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $27 i32.load offset=12 i32.const 3 i32.ne @@ -13335,10 +12788,10 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $27 i32.const 0 call $~lib/array/Array#__get - local.tee $4 + local.tee $6 i32.load i32.const 1 i32.ne @@ -13350,7 +12803,7 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $27 i32.const 1 call $~lib/array/Array#__get local.tee $5 @@ -13365,7 +12818,7 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $27 i32.const 2 call $~lib/array/Array#__get local.tee $3 @@ -13386,7 +12839,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $30 i32.load offset=4 local.tee $0 i32.const 1 @@ -13399,9 +12852,9 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $28 + local.get $30 call $~lib/array/Array#splice - local.tee $31 + local.tee $33 i32.load offset=12 i32.const 1 i32.ne @@ -13413,11 +12866,11 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $33 i32.const 0 call $~lib/array/Array#__get - local.tee $32 - local.get $32 + local.tee $34 + local.get $34 i32.eqz if i32.const 0 @@ -13438,7 +12891,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $30 i32.load offset=12 i32.const 2 i32.ne @@ -13450,7 +12903,7 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $30 i32.const 0 call $~lib/array/Array#__get local.tee $1 @@ -13462,11 +12915,11 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $30 i32.const 1 call $~lib/array/Array#__get - local.tee $33 - local.get $33 + local.tee $35 + local.get $35 i32.eqz if i32.const 0 @@ -13487,17 +12940,7 @@ call $~lib/builtins/abort unreachable end - local.get $30 - call $~lib/rt/pure/__release - local.get $34 - call $~lib/rt/pure/__release - local.get $35 - call $~lib/rt/pure/__release - local.get $36 - call $~lib/rt/pure/__release - local.get $37 - call $~lib/rt/pure/__release - local.get $38 + local.get $32 call $~lib/rt/pure/__release local.get $39 call $~lib/rt/pure/__release @@ -13533,13 +12976,19 @@ call $~lib/rt/pure/__release local.get $55 call $~lib/rt/pure/__release - local.get $26 + local.get $56 call $~lib/rt/pure/__release - local.get $27 + local.get $57 call $~lib/rt/pure/__release - local.get $20 + local.get $58 call $~lib/rt/pure/__release - local.get $21 + local.get $59 + call $~lib/rt/pure/__release + local.get $60 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $29 call $~lib/rt/pure/__release local.get $22 call $~lib/rt/pure/__release @@ -13547,13 +12996,9 @@ call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release - local.get $16 + local.get $25 call $~lib/rt/pure/__release - local.get $17 + local.get $26 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release @@ -13561,6 +13006,8 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release + local.get $19 + call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $11 @@ -13571,23 +13018,29 @@ call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $18 + local.get $15 call $~lib/rt/pure/__release - local.get $19 + local.get $16 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $32 + local.get $34 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $33 + local.get $35 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -14061,19 +13514,19 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|0 - local.get $0 + local.get $2 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end @@ -14089,9 +13542,57 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push + i32.const 0 + local.set $2 global.get $std/array/arr - call $~lib/array/Array#map - local.tee $0 + local.tee $5 + i32.load offset=12 + local.tee $3 + i32.const 2 + i32.const 9 + i32.const 0 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + i32.load offset=4 + local.set $1 + loop $for-loop|043 + local.get $2 + local.get $3 + local.get $5 + i32.load offset=12 + local.tee $0 + local.get $3 + local.get $0 + i32.lt_s + select + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + i32.const 2 + i32.shl + local.tee $0 + local.get $5 + i32.load offset=4 + i32.add + i32.load + f32.convert_i32_s + local.set $18 + local.get $0 + local.get $1 + i32.add + local.get $18 + f32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|043 + end + end + local.get $6 i32.load offset=12 i32.const 4 i32.ne @@ -14103,7 +13604,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $6 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -14212,7 +13713,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $6 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 @@ -14630,28 +14131,185 @@ call $~lib/array/Array#push call $~lib/bindings/Math/random i64.reinterpret_f64 - call $~lib/math/NativeMath.seedRandom + local.set $36 + i32.const 1 + global.set $~lib/math/random_seeded + local.get $36 + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state0_64 + global.get $~lib/math/random_state0_64 + i64.const -1 + i64.xor + call $~lib/math/murmurHash3 + global.set $~lib/math/random_state1_64 + local.get $36 + i32.wrap_i64 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state0_32 + global.get $~lib/math/random_state0_32 + call $~lib/math/splitMix32 + global.set $~lib/math/random_state1_32 + global.get $~lib/math/random_state1_32 + i32.const 0 + i32.ne + i32.const 0 + global.get $~lib/math/random_state0_32 + i32.const 0 + global.get $~lib/math/random_state1_64 + i64.const 0 + i64.ne + i32.const 0 + global.get $~lib/math/random_state0_64 + i64.const 0 + i64.ne + select + select + select + i32.eqz + if + i32.const 0 + i32.const 4032 + i32.const 1406 + i32.const 4 + call $~lib/builtins/abort + unreachable + end i32.const 8 i32.const 2 i32.const 9 i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $15 + local.set $1 i32.const 0 global.set $~argumentsLength - local.get $15 - call $~lib/array/Array#sort + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $1 + i32.load offset=12 + local.tee $0 + i32.const 1 + i32.le_s + if + local.get $1 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $1 + i32.load offset=4 + local.set $3 + local.get $0 + i32.const 2 + i32.eq + if + local.get $3 + f32.load offset=4 + local.set $37 + local.get $3 + f32.load + local.set $18 + i32.const 2 + global.set $~argumentsLength + local.get $37 + local.get $18 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $18 + f32.store offset=4 + local.get $3 + local.get $37 + f32.store + end + local.get $1 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.const 256 + i32.lt_s + if + local.get $3 + local.get $0 + call $~lib/util/sort/insertionSort + else + local.get $3 + local.get $0 + call $~lib/util/sort/weakHeapSort + end + local.get $1 + call $~lib/rt/pure/__retain + end call $~lib/rt/pure/__release - local.get $15 - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 4320 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 4320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $8 + i32.const 0 + local.set $5 + i32.const 0 + local.get $1 + i32.load offset=12 + local.tee $0 + local.get $8 + i32.load offset=12 + i32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + i32.const 1 + local.get $1 + local.get $8 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|00 + local.get $5 + local.get $0 + i32.lt_s + if + local.get $1 + local.get $5 + call $~lib/array/Array#__get + local.tee $18 + local.get $18 + f32.ne + if (result i32) + local.get $8 + local.get $5 + call $~lib/array/Array#__get + local.tee $18 + local.get $18 + f32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + local.get $1 + local.get $5 + call $~lib/array/Array#__get + local.get $8 + local.get $5 + call $~lib/array/Array#__get + f32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end + i32.const 1 + end i32.eqz if i32.const 0 @@ -14667,51 +14325,166 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $16 + local.set $0 i32.const 0 global.set $~argumentsLength - local.get $16 - call $~lib/array/Array#sort - call $~lib/rt/pure/__release - local.get $16 - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 4448 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/array/isArraysEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 896 + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $0 + i32.load offset=12 + local.tee $3 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.load offset=4 + local.set $5 + local.get $3 i32.const 2 - call $~lib/builtins/abort - unreachable + i32.eq + if + local.get $5 + f64.load offset=8 + local.set $38 + local.get $5 + f64.load + local.set $21 + i32.const 2 + global.set $~argumentsLength + local.get $38 + local.get $21 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s + if + local.get $5 + local.get $21 + f64.store offset=8 + local.get $5 + local.get $38 + f64.store + end + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $3 + i32.const 256 + i32.lt_s + if + local.get $5 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $5 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain end - i32.const 5 + call $~lib/rt/pure/__release + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 4448 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.set $9 + i32.const 0 + local.set $2 + i32.const 0 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $9 + i32.load offset=12 + i32.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + i32.const 1 + local.get $0 + local.get $9 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual + drop + loop $for-loop|01 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.tee $21 + local.get $21 + f64.ne + if (result i32) + local.get $9 + local.get $2 + call $~lib/array/Array#__get + local.tee $21 + local.get $21 + f64.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $9 + local.get $2 + call $~lib/array/Array#__get + f64.ne + br_if $__inlined_func$std/array/isArraysEqual + drop + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|01 + end + end + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 896 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 5 i32.const 2 i32.const 3 i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $17 + local.set $19 i32.const 0 global.set $~argumentsLength - local.get $17 + local.get $19 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $17 + local.get $19 i32.const 5 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14729,21 +14502,21 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $10 i32.const 0 global.set $~argumentsLength - local.get $7 + local.get $10 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $7 + local.get $10 i32.const 5 i32.const 2 i32.const 7 i32.const 4672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14761,64 +14534,64 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $18 + local.set $20 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $11 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 + local.set $12 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $10 + local.set $13 i32.const 4 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $7 i32.const 64 call $std/array/createReverseOrderedArray - local.set $11 + local.set $14 i32.const 128 call $std/array/createReverseOrderedArray - local.set $12 + local.set $15 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $13 + local.set $16 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $14 + local.set $17 i32.const 512 call $std/array/createRandomOrderedArray - local.set $19 - local.get $18 + local.set $2 + local.get $20 i32.const 48 call $std/array/assertSorted - local.get $8 + local.get $11 i32.const 48 call $std/array/assertSorted - local.get $8 + local.get $11 i32.const 1 i32.const 2 i32.const 3 i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14830,17 +14603,17 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $12 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $12 i32.const 2 i32.const 2 i32.const 3 i32.const 4960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14852,11 +14625,11 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $10 - local.get $6 + local.get $13 + local.get $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14868,11 +14641,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $11 - local.get $6 + local.get $14 + local.get $7 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14884,11 +14657,11 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $15 i32.const 48 call $std/array/assertSorted - local.get $12 - local.get $6 + local.get $15 + local.get $7 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14900,11 +14673,11 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $13 - local.get $6 + local.get $16 + local.get $7 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14916,11 +14689,11 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $17 i32.const 48 call $std/array/assertSorted - local.get $14 - local.get $6 + local.get $17 + local.get $7 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14932,48 +14705,48 @@ call $~lib/builtins/abort unreachable end - local.get $19 + local.get $2 i32.const 48 call $std/array/assertSorted - local.get $15 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $5 + local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $18 + local.get $9 call $~lib/rt/pure/__release - local.get $8 + local.get $19 call $~lib/rt/pure/__release - local.get $9 + local.get $4 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $19 + local.get $15 call $~lib/rt/pure/__release - local.get $1 + local.get $16 call $~lib/rt/pure/__release - local.get $0 + local.get $17 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray @@ -14997,17 +14770,98 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray - local.tee $0 + i32.const 0 + local.set $2 + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 2 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 2 + i32.store offset=12 + loop $for-loop|02 + local.get $2 + 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 $2 + i32.sub + call $~lib/array/Array#__set + local.get $1 + local.get $2 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|02 + end + end + local.get $1 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 call $~lib/rt/pure/__release - call $std/array/createReverseOrderedElementsArray - local.tee $0 + i32.const 0 + local.set $2 + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 512 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $1 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 512 + i32.store offset=12 + loop $for-loop|03 + local.get $2 + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 13 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $2 + i32.sub + i32.store + local.get $1 + local.get $2 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|03 + end + end + local.get $1 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -15015,36 +14869,72 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $0 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $5 + local.set $6 i32.const 1 global.set $~argumentsLength - local.get $1 - i32.const 55 - local.tee $3 - call $~lib/array/Array<~lib/array/Array>#sort - local.tee $0 - call $std/array/isSorted<~lib/string/String | null> - i32.eqz - if + local.get $0 + call $std/array/assertSorted<~lib/string/String | null>|trampoline + block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - i32.const 304 - i32.const 881 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $4 + i32.const 0 + local.get $0 + i32.load offset=12 + local.tee $1 + local.get $6 + i32.load offset=12 + i32.ne + br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> + drop + i32.const 1 + local.get $0 + local.get $6 + i32.eq + br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> + drop + loop $for-loop|04 + local.get $4 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $4 + call $~lib/array/Array#__get + local.tee $5 + local.get $6 + local.get $4 + call $~lib/array/Array#__get + local.tee $3 + call $~lib/string/String.__eq + i32.eqz + if + local.get $5 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> + end + local.get $5 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|04 + end + end + i32.const 1 end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - local.get $5 - call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if i32.const 0 @@ -15054,18 +14944,54 @@ call $~lib/builtins/abort unreachable end - call $std/array/createRandomStringArray - local.set $0 + i32.const 0 + local.set $4 + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 400 + i32.store offset=12 + loop $for-loop|05 + local.get $4 + i32.const 400 + i32.lt_s + if + local.get $3 + local.get $4 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + local.tee $1 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $1 + call $~lib/rt/pure/__release + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|05 + end + end i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $3 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15073,9 +14999,9 @@ i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $10 i32.load offset=4 - local.get $7 + local.get $10 i32.load offset=12 call $~lib/util/string/joinBooleanArray local.tee $0 @@ -15097,10 +15023,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $15 i32.const 5120 call $~lib/array/Array#join - local.tee $13 + local.tee $16 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15118,10 +15044,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $17 i32.const 5568 call $~lib/array/Array#join - local.tee $18 + local.tee $20 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15139,10 +15065,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $2 i32.const 5632 call $~lib/array/Array#join - local.tee $2 + local.tee $4 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15160,13 +15086,13 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $11 i32.load offset=4 - local.get $8 + local.get $11 i32.load offset=12 call $~lib/util/string/joinFloatArray local.tee $0 - local.set $4 + local.set $6 local.get $0 i32.const 6944 call $~lib/string/String.__eq @@ -15206,7 +15132,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 i32.load offset=4 local.tee $0 i32.const 0 @@ -15219,7 +15145,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $9 + local.get $12 call $~lib/array/Array#join local.tee $1 i32.const 7152 @@ -15239,7 +15165,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $13 i32.load offset=4 local.tee $0 i32.const 0 @@ -15249,7 +15175,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $10 + local.get $13 call $~lib/array/Array#join local.tee $0 i32.const 7232 @@ -15263,34 +15189,34 @@ call $~lib/builtins/abort unreachable end - local.get $7 - call $~lib/rt/pure/__release + local.get $10 call $~lib/rt/pure/__release - local.get $12 call $~lib/rt/pure/__release - local.get $13 + local.get $15 call $~lib/rt/pure/__release - local.get $14 + local.get $16 call $~lib/rt/pure/__release - local.get $18 + local.get $17 call $~lib/rt/pure/__release - local.get $19 + local.get $20 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $9 + local.get $12 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15300,29 +15226,29 @@ i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $21 + local.set $23 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $22 + local.set $24 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $23 + local.set $25 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $24 - local.get $21 + local.set $26 + local.get $23 i32.const 5360 call $~lib/array/Array#join local.tee $0 @@ -15338,11 +15264,11 @@ call $~lib/builtins/abort unreachable end - local.get $22 + local.get $24 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $8 + local.set $11 local.get $0 i32.const 7040 call $~lib/string/String.__eq @@ -15355,11 +15281,11 @@ call $~lib/builtins/abort unreachable end - local.get $23 + local.get $25 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $9 + local.set $12 local.get $0 i32.const 7424 call $~lib/string/String.__eq @@ -15372,11 +15298,11 @@ call $~lib/builtins/abort unreachable end - local.get $24 + local.get $26 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $10 + local.set $13 local.get $0 i32.const 7456 call $~lib/string/String.__eq @@ -15395,13 +15321,13 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 i32.load offset=4 - local.get $6 + local.get $7 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $11 + local.set $14 local.get $0 i32.const 7520 call $~lib/string/String.__eq @@ -15420,13 +15346,13 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $8 i32.load offset=4 - local.get $15 + local.get $8 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $12 + local.set $15 local.get $0 i32.const 7584 call $~lib/string/String.__eq @@ -15445,13 +15371,13 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $9 i32.load offset=4 - local.get $16 + local.get $9 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $13 + local.set $16 local.get $0 i32.const 7680 call $~lib/string/String.__eq @@ -15470,13 +15396,13 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $19 i32.load offset=4 - local.get $17 + local.get $19 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $14 + local.set $17 local.get $0 i32.const 7792 call $~lib/string/String.__eq @@ -15495,11 +15421,11 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $20 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $19 + local.set $2 local.get $0 i32.const 7952 call $~lib/string/String.__eq @@ -15518,11 +15444,11 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $4 + local.set $6 local.get $0 i32.const 8096 call $~lib/string/String.__eq @@ -15541,7 +15467,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $28 i32.load offset=4 local.tee $0 i32.const 2 @@ -15559,9 +15485,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $26 + local.get $28 i32.load offset=4 - local.get $26 + local.get $28 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 @@ -15584,7 +15510,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $29 i32.load offset=4 local.tee $0 i32.const 2 @@ -15602,9 +15528,9 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $27 + local.get $29 i32.load offset=4 - local.get $27 + local.get $29 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 @@ -15627,7 +15553,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $22 i32.load offset=4 i32.const 1 i32.const 2 @@ -15646,9 +15572,9 @@ i32.store local.get $0 i32.store - local.get $20 + local.get $22 i32.load offset=4 - local.get $20 + local.get $22 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $1 @@ -15665,45 +15591,45 @@ call $~lib/builtins/abort unreachable end - local.get $21 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release + local.get $25 call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 + local.get $26 call $~lib/rt/pure/__release - local.get $6 call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release - local.get $15 - call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release - local.get $16 - call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $7 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $18 + local.get $8 + call $~lib/rt/pure/__release + local.get $15 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $16 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release + local.get $20 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $3 @@ -15712,22 +15638,22 @@ call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release - local.get $25 + local.get $27 call $~lib/rt/pure/__release - local.get $29 + local.get $31 call $~lib/rt/pure/__release - local.get $28 + local.get $30 call $~lib/rt/pure/__release - local.get $31 + local.get $33 call $~lib/rt/pure/__release - local.get $26 + local.get $28 call $~lib/rt/pure/__release - local.get $27 + local.get $29 call $~lib/rt/pure/__release - local.get $20 + local.get $22 call $~lib/rt/pure/__release ) - (func $~start (; 185 ;) + (func $~start (; 163 ;) global.get $~started if return @@ -15737,7 +15663,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 186 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 164 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15764,10 +15690,73 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 16 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $block$4$break + block $switch$1$default + block $switch$1$case$29 + block $switch$1$case$28 + block $switch$1$case$27 + block $switch$1$case$18 + block $switch$1$case$17 + block $switch$1$case$16 + block $switch$1$case$14 + block $switch$1$case$13 + block $switch$1$case$10 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + i32.const 8 + i32.sub + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $__inlined_func$~lib/rt/__visit_members $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + local.get $1 + call $~lib/array/Array#__visit_impl + br $block$4$break + end + unreachable + end + local.get $1 + i32.load + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + end local.get $2 i32.const -2147483648 i32.and @@ -15805,7 +15794,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 187 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 165 ;) (param $0 i32) local.get $0 i32.const 8292 i32.lt_u @@ -15817,7 +15806,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 188 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 166 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15849,73 +15838,4 @@ end end ) - (func $~lib/rt/__visit_members (; 189 ;) (param $0 i32) - block $folding-inner0 - block $block$4$break - block $switch$1$default - block $switch$1$case$29 - block $switch$1$case$28 - block $switch$1$case$27 - block $switch$1$case$18 - block $switch$1$case$17 - block $switch$1$case$16 - block $switch$1$case$14 - block $switch$1$case$13 - block $switch$1$case$10 - 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 $block$4$break $block$4$break $switch$1$case$2 $block$4$break $block$4$break $block$4$break $switch$1$case$10 $block$4$break $block$4$break $switch$1$case$13 $switch$1$case$14 $switch$1$case$2 $switch$1$case$16 $switch$1$case$17 $switch$1$case$18 $block$4$break $folding-inner0 $folding-inner0 $folding-inner0 $block$4$break $block$4$break $block$4$break $block$4$break $switch$1$case$27 $switch$1$case$28 $switch$1$case$29 $switch$1$default - end - return - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - local.get $0 - call $~lib/array/Array#__visit_impl - br $block$4$break - end - unreachable - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - end - ) ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 154202902b..6769ef2dd6 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1268,48 +1268,9 @@ end end ) - (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 432 i32.gt_u @@ -1317,11 +1278,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1494,7 +1492,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1564,7 +1562,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 432 i32.gt_u @@ -1575,7 +1573,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1644,7 +1642,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1704,11 +1702,11 @@ i32.store offset=8 local.get $2 ) - (func $~setArgumentsLength (; 22 ;) (param $0 i32) + (func $~setArgumentsLength (; 21 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 23 ;) + (func $start:std/arraybuffer (; 22 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1985,10 +1983,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 24 ;) + (func $~start (; 23 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index d48f97dadd..ed78174869 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1065,123 +1065,116 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + ) + (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) local.get $0 + i32.const 512 + i32.gt_u + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 8 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 8 i32.add - local.tee $1 + local.tee $2 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $0 + local.get $1 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 4 i32.sub i32.const 0 i32.store8 - ) - (func $~lib/rt/pure/increment (; 15 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) - local.get $0 - i32.const 512 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 8 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - call $~lib/memory/memory.fill local.get $0 i32.eqz if @@ -1225,7 +1218,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1245,7 +1238,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1309,14 +1302,14 @@ i32.store offset=8 local.get $3 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 21 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/polyfills/bswap (; 22 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -1329,7 +1322,7 @@ i32.rotr i32.or ) - (func $~lib/dataview/DataView#getFloat32 (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1365,7 +1358,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 24 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 22 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1391,7 +1384,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 25 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 23 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1417,7 +1410,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1436,7 +1429,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 27 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 25 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -1449,7 +1442,7 @@ i32.shl i32.or ) - (func $~lib/dataview/DataView#getInt16 (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1483,7 +1476,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt32 (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1517,7 +1510,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt64 (; 30 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 28 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1543,7 +1536,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1562,7 +1555,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 32 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 30 ;) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1573,7 +1566,7 @@ i32.shr_u i32.or ) - (func $~lib/dataview/DataView#getUint16 (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1607,7 +1600,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint32 (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1641,7 +1634,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint64 (; 35 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 33 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1667,7 +1660,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 36 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 34 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1695,7 +1688,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 37 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 35 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1723,7 +1716,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt16 (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1747,7 +1740,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1771,7 +1764,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 40 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 38 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1795,7 +1788,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1819,7 +1812,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1843,7 +1836,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 43 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1867,11 +1860,11 @@ end i64.store ) - (func $~setArgumentsLength (; 44 ;) (param $0 i32) + (func $~setArgumentsLength (; 42 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 45 ;) + (func $start:std/dataview (; 43 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3462,10 +3455,10 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~start (; 46 ;) + (func $~start (; 44 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 47 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 45 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index ea90a4f667..d892c94c7c 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,18 +15,26 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 3 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -37,7 +45,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -56,9 +64,26 @@ end local.get $0 global.set $~lib/rt/stub/offset + local.get $2 + i32.const 16 + i32.sub + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 + i32.const 3 + i32.store offset=8 + local.get $0 + i32.const 8 + i32.store offset=12 + local.get $2 ) (func $start:std/date (; 4 ;) - (local $0 i64) + (local $0 i32) + (local $1 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -135,31 +160,18 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - local.set $0 - i32.const 96 - call $~lib/rt/stub/maybeGrowMemory - i32.const 64 - i32.const 16 - i32.store - i32.const 68 - i32.const 1 - i32.store - i32.const 72 - i32.const 3 - i32.store - i32.const 76 - i32.const 8 - i32.store - i32.const 80 + local.set $1 + call $~lib/rt/stub/__alloc + local.tee $0 i64.const 0 i64.store - i32.const 80 local.get $0 + local.get $1 i64.store - i32.const 80 + local.get $0 global.set $std/date/date global.get $std/date/creationTime - i32.const 80 + global.get $std/date/date i64.load i64.ne if diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 13ee672f11..65b736773c 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1,6 +1,6 @@ (module - (type $f32_=>_f32 (func (param f32) (result f32))) (type $f64_=>_f64 (func (param f64) (result f64))) + (type $f32_=>_f32 (func (param f32) (result f32))) (type $f32_f32_=>_f32 (func (param f32 f32) (result f32))) (type $f64_f64_=>_f64 (func (param f64 f64) (result f64))) (type $i64_=>_i32 (func (param i64) (result i32))) @@ -659,65 +659,63 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 6 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/acosh (; 6 ;) (param $0 f64) (result f64) (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $1 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $0 - local.get $0 - local.get $0 - f64.mul - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - return - end - local.get $1 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 + block $__inlined_func$~lib/math/NativeMath.acosh (result f64) local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $1 + i64.const 1024 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $0 + local.get $0 + local.get $0 + f64.mul + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + br $__inlined_func$~lib/math/NativeMath.acosh + end + local.get $1 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + br $__inlined_func$~lib/math/NativeMath.acosh + end local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub call $~lib/math/NativeMath.log - return + f64.const 0.6931471805599453 + f64.add end - local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 - f64.add ) - (func $../../lib/libm/assembly/libm/acosh (; 7 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.acosh - ) - (func $~lib/math/NativeMath.asin (; 8 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 7 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -855,11 +853,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/asin (; 9 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asin (; 8 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 10 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 9 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -929,11 +927,11 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/asinh (; 11 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/asinh (; 10 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.asinh ) - (func $~lib/math/NativeMath.atan (; 12 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 11 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1156,18 +1154,19 @@ local.get $3 f64.copysign ) - (func $../../lib/libm/assembly/libm/atan (; 13 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 12 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $~lib/math/NativeMath.atanh (; 14 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 13 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) local.get $0 + local.tee $1 f64.abs - local.set $1 - local.get $0 + local.set $0 + local.get $1 i64.reinterpret_f64 i64.const 52 i64.shr_u @@ -1176,49 +1175,46 @@ local.tee $2 i64.const 1022 i64.lt_u - if (result f64) + if local.get $2 i64.const 991 i64.ge_u - if (result f64) + if f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.mul local.tee $3 local.get $3 - local.get $1 + local.get $0 f64.mul f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - else - local.get $1 + local.set $0 end else f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul + local.set $0 end local.get $0 + local.get $1 f64.copysign ) - (func $../../lib/libm/assembly/libm/atanh (; 15 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.atanh - ) - (func $~lib/math/NativeMath.atan2 (; 16 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 14 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1426,12 +1422,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libm/atan2 (; 17 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 15 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 18 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 16 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1553,15 +1549,15 @@ f64.mul f64.add ) - (func $../../lib/libm/assembly/libm/cbrt (; 19 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 17 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $../../lib/libm/assembly/libm/ceil (; 20 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 18 ;) (param $0 f64) (result f64) local.get $0 f64.ceil ) - (func $~lib/math/dtoi32 (; 21 ;) (param $0 f64) (result i32) + (func $~lib/math/dtoi32 (; 19 ;) (param $0 f64) (result i32) local.get $0 f64.const 4294967296 local.get $0 @@ -1573,7 +1569,7 @@ i64.trunc_f64_s i32.wrap_i64 ) - (func $../../lib/libm/assembly/libm/clz32 (; 22 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/clz32 (; 20 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -1588,7 +1584,7 @@ f64.convert_i32_s end ) - (func $~lib/math/pio2_large_quot (; 23 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 21 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1874,7 +1870,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 24 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 22 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -2212,11 +2208,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/cos (; 25 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cos (; 23 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cos ) - (func $~lib/math/NativeMath.expm1 (; 26 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 24 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2487,7 +2483,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 27 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 25 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -2564,7 +2560,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 28 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 26 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -2716,7 +2712,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 29 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 27 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -2780,28 +2776,28 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $../../lib/libm/assembly/libm/cosh (; 30 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 28 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cosh ) - (func $../../lib/libm/assembly/libm/exp (; 31 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 29 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $../../lib/libm/assembly/libm/expm1 (; 32 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 30 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $../../lib/libm/assembly/libm/floor (; 33 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 31 ;) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $../../lib/libm/assembly/libm/fround (; 34 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/fround (; 32 ;) (param $0 f64) (result f64) local.get $0 f32.demote_f64 f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 35 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 33 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -2970,12 +2966,12 @@ f64.sqrt f64.mul ) - (func $../../lib/libm/assembly/libm/hypot (; 36 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 34 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $../../lib/libm/assembly/libm/imul (; 37 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 35 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) block $__inlined_func$~lib/math/NativeMath.imul (result f64) f64.const 0 @@ -2997,11 +2993,11 @@ f64.convert_i32_s end ) - (func $../../lib/libm/assembly/libm/log (; 38 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 36 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 39 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 37 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3203,15 +3199,15 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log10 (; 40 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 38 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $../../lib/libm/assembly/libm/log1p (; 41 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 39 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 42 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 40 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3406,21 +3402,21 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log2 (; 43 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 41 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $../../lib/libm/assembly/libm/max (; 44 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 42 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $../../lib/libm/assembly/libm/min (; 45 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 43 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 46 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 44 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -4376,12 +4372,12 @@ f64.const 1e-300 f64.mul ) - (func $../../lib/libm/assembly/libm/pow (; 47 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 45 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $../../lib/libm/assembly/libm/round (; 48 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 46 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -4389,7 +4385,7 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/sign (; 49 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 47 ;) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -4402,7 +4398,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 50 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 48 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -4722,11 +4718,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/sin (; 51 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 49 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 52 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 50 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -4803,15 +4799,15 @@ f64.mul f64.mul ) - (func $../../lib/libm/assembly/libm/sinh (; 53 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 51 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $../../lib/libm/assembly/libm/sqrt (; 54 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 52 ;) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/tan_kern (; 55 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 53 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -4993,7 +4989,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 56 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 54 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -5170,11 +5166,11 @@ i32.sub call $~lib/math/tan_kern ) - (func $../../lib/libm/assembly/libm/tan (; 57 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 55 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 58 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 56 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5253,19 +5249,19 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/tanh (; 59 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 57 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $../../lib/libm/assembly/libm/trunc (; 60 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 58 ;) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $../../lib/libm/assembly/libmf/abs (; 61 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/abs (; 59 ;) (param $0 f32) (result f32) local.get $0 f32.abs ) - (func $~lib/math/Rf (; 62 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 60 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -5284,7 +5280,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 63 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 61 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5400,11 +5396,11 @@ f32.add f32.mul ) - (func $../../lib/libm/assembly/libmf/acos (; 64 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acos (; 62 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.acos ) - (func $~lib/math/NativeMathf.log1p (; 65 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 63 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5574,7 +5570,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 64 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5708,61 +5704,59 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.acosh (; 67 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acosh (; 65 ;) (param $0 f32) (result f32) (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - return - end - local.get $1 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 + block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + br $__inlined_func$~lib/math/NativeMathf.acosh + end + local.get $1 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + br $__inlined_func$~lib/math/NativeMathf.acosh + end local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub call $~lib/math/NativeMathf.log - return + f32.const 0.6931471824645996 + f32.add end - local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 - f32.add - ) - (func $../../lib/libm/assembly/libmf/acosh (; 68 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.acosh ) - (func $~lib/math/NativeMathf.asin (; 69 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 66 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -5842,11 +5836,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asin (; 70 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asin (; 67 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asin ) - (func $~lib/math/NativeMathf.asinh (; 71 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asinh (; 68 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -5911,11 +5905,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asinh (; 72 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asinh (; 69 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asinh ) - (func $~lib/math/NativeMathf.atan (; 73 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 70 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6111,63 +6105,61 @@ local.get $4 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atan (; 74 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan (; 71 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.atan ) - (func $~lib/math/NativeMathf.atanh (; 75 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atanh (; 72 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 + local.tee $1 f32.abs - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.reinterpret_f32 local.tee $2 i32.const 1056964608 i32.lt_u - if (result f32) + if local.get $2 i32.const 796917760 i32.ge_u - if (result f32) + if f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else - local.get $1 + local.set $0 end else f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul + local.set $0 end local.get $0 + local.get $1 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atanh (; 76 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.atanh - ) - (func $~lib/math/NativeMathf.atan2 (; 77 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 73 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6360,12 +6352,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libmf/atan2 (; 78 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan2 (; 74 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 ) - (func $~lib/math/NativeMathf.cbrt (; 79 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 75 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -6464,15 +6456,15 @@ f64.div f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/cbrt (; 80 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cbrt (; 76 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cbrt ) - (func $../../lib/libm/assembly/libmf/ceil (; 81 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/ceil (; 77 ;) (param $0 f32) (result f32) local.get $0 f32.ceil ) - (func $../../lib/libm/assembly/libmf/clz32 (; 82 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/clz32 (; 78 ;) (param $0 f32) (result f32) local.get $0 local.get $0 f32.sub @@ -6488,7 +6480,7 @@ f32.convert_i32_s end ) - (func $~lib/math/NativeMathf.cos (; 83 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 79 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -6757,11 +6749,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cos (; 84 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cos (; 80 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cos ) - (func $~lib/math/NativeMathf.expm1 (; 85 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 81 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7011,7 +7003,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.scalbn (; 86 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 82 ;) (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 i32.gt_s @@ -7087,7 +7079,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 87 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 83 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -7221,85 +7213,82 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 88 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cosh (; 84 ;) (param $0 f32) (result f32) (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - f32.reinterpret_i32 - local.set $0 - local.get $1 - i32.const 1060205079 - i32.lt_u - if + block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $1 + f32.reinterpret_i32 + local.set $0 local.get $1 - i32.const 964689920 + i32.const 1060205079 i32.lt_u if f32.const 1 - return + local.get $1 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.cosh + drop + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh + end + local.get $1 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh end - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - return - end - local.get $1 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 local.get $0 + f32.const 162.88958740234375 + f32.sub call $~lib/math/NativeMathf.exp - local.tee $0 + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - return end - local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - ) - (func $../../lib/libm/assembly/libmf/cosh (; 89 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.cosh ) - (func $../../lib/libm/assembly/libmf/exp (; 90 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/exp (; 85 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.exp ) - (func $../../lib/libm/assembly/libmf/expm1 (; 91 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/expm1 (; 86 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.expm1 ) - (func $../../lib/libm/assembly/libmf/floor (; 92 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/floor (; 87 ;) (param $0 f32) (result f32) local.get $0 f32.floor ) - (func $../../lib/libm/assembly/libmf/fround (; 93 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/fround (; 88 ;) (param $0 f32) (result f32) local.get $0 ) - (func $~lib/math/NativeMathf.hypot (; 94 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 89 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -7404,12 +7393,12 @@ f32.sqrt f32.mul ) - (func $../../lib/libm/assembly/libmf/hypot (; 95 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/hypot (; 90 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot ) - (func $../../lib/libm/assembly/libmf/imul (; 96 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/imul (; 91 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 f32) block $~lib/math/NativeMathf.imul|inlined.0 (result f32) f32.const 0 @@ -7433,11 +7422,11 @@ f32.convert_i32_s end ) - (func $../../lib/libm/assembly/libmf/log (; 97 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log (; 92 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log ) - (func $~lib/math/NativeMathf.log10 (; 98 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7595,15 +7584,15 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/log10 (; 99 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log10 (; 94 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log10 ) - (func $../../lib/libm/assembly/libmf/log1p (; 100 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log1p (; 95 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log1p ) - (func $~lib/math/NativeMathf.log2 (; 101 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 96 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7753,21 +7742,21 @@ f32.convert_i32_s f32.add ) - (func $../../lib/libm/assembly/libmf/log2 (; 102 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log2 (; 97 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log2 ) - (func $../../lib/libm/assembly/libmf/max (; 103 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/max (; 98 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.max ) - (func $../../lib/libm/assembly/libmf/min (; 104 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/min (; 99 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.min ) - (func $~lib/math/NativeMathf.pow (; 105 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 100 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8225,12 +8214,12 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/pow (; 106 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/pow (; 101 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow ) - (func $../../lib/libm/assembly/libmf/round (; 107 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/round (; 102 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.5 f32.add @@ -8238,7 +8227,7 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/sign (; 108 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sign (; 103 ;) (param $0 f32) (result f32) local.get $0 f32.abs f32.const 0 @@ -8251,7 +8240,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 109 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 104 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8521,11 +8510,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/sin (; 110 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sin (; 105 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sin ) - (func $~lib/math/NativeMathf.sinh (; 111 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 106 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -8597,15 +8586,15 @@ f32.mul f32.mul ) - (func $../../lib/libm/assembly/libmf/sinh (; 112 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sinh (; 107 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sinh ) - (func $../../lib/libm/assembly/libmf/sqrt (; 113 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sqrt (; 108 ;) (param $0 f32) (result f32) local.get $0 f32.sqrt ) - (func $~lib/math/NativeMathf.tan (; 114 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 109 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8859,11 +8848,11 @@ local.get $1 f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/tan (; 115 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tan (; 110 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tan ) - (func $~lib/math/NativeMathf.tanh (; 116 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 111 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -8937,11 +8926,11 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/tanh (; 117 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tanh (; 112 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tanh ) - (func $../../lib/libm/assembly/libmf/trunc (; 118 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/trunc (; 113 ;) (param $0 f32) (result f32) local.get $0 f32.trunc ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 224242158c..ea9bea6d46 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -3,20 +3,18 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_none (func (param i32))) (type $none_=>_none (func)) + (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) - (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) + (type $i32_i64_i32_=>_i32 (func (param i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) (type $i32_f32_i32_=>_i32 (func (param i32 f32 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) + (type $i32_f64_i32_=>_i32 (func (param i32 f64 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1079,48 +1077,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 556 i32.gt_u @@ -1128,11 +1087,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1343,7 +1339,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1365,7 +1361,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 556 i32.gt_u @@ -1376,7 +1372,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#clear (; 21 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 20 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1409,14 +1405,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1459,7 +1455,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1472,7 +1468,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1603,7 +1599,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1697,7 +1693,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1720,7 +1716,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1788,49 +1784,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -2003,7 +1957,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2016,7 +1970,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2119,13 +2073,15 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $2 i32.shr_u i32.gt_u @@ -2145,26 +2101,67 @@ end local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.set $3 local.get $1 local.get $2 i32.shl local.tee $2 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + local.set $6 + local.get $3 + i32.const 16 + i32.sub + local.set $1 + local.get $3 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $3 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $6 + local.get $1 + local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 i32.add local.get $2 - local.get $3 + local.get $4 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $4 + local.get $3 i32.ne if local.get $0 @@ -2179,7 +2176,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2215,7 +2212,7 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#set:length (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 33 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2227,7 +2224,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 36 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2294,7 +2291,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/array/Array#constructor (; 37 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 35 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 5 @@ -2311,7 +2308,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2349,7 +2346,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#set:length (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 37 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2361,7 +2358,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#values (; 40 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 38 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2417,7 +2414,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 41 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 39 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -2450,7 +2447,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 42 ;) (result i32) + (func $~lib/map/Map#constructor (; 40 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -2478,7 +2475,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2499,50 +2496,7 @@ i32.add i32.load ) - (func $~lib/map/Map#find (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 45 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 42 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2673,23 +2627,62 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/util/hash/hash8 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -2735,10 +2728,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -2747,7 +2740,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -2757,17 +2750,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 47 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 44 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2798,7 +2791,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2839,7 +2832,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 49 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 46 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2970,7 +2963,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3060,7 +3053,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 48 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3123,7 +3116,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 52 ;) + (func $std/map/testNumeric (; 49 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3649,7 +3642,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 50 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3660,7 +3653,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 54 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 51 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3791,7 +3784,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3883,7 +3876,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3904,7 +3897,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 57 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 54 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3971,7 +3964,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 55 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4102,21 +4095,60 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 255 i32.and call $~lib/util/hash/hash8 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load8_u + local.get $3 + i32.const 255 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store8 offset=1 else @@ -4162,10 +4194,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store8 + local.tee $1 local.get $3 + i32.store8 + local.get $1 local.get $2 i32.store8 offset=1 local.get $0 @@ -4174,7 +4206,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -4184,17 +4216,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4255,7 +4287,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 61 ;) + (func $std/map/testNumeric (; 58 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4759,7 +4791,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (; 62 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 59 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4774,7 +4806,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -4817,7 +4849,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 61 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4830,7 +4862,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4961,7 +4993,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5055,7 +5087,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5078,7 +5110,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5116,7 +5148,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 69 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 66 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -5128,7 +5160,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 70 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 67 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5195,50 +5227,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#find (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=4 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=4 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 72 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 68 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5354,38 +5343,77 @@ local.get $2 call $~lib/rt/pure/__release end - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - local.get $6 - i32.store offset=12 - local.get $0 - local.get $0 - i32.load offset=20 - i32.store offset=16 - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + local.get $6 + i32.store offset=12 + local.get $0 + local.get $0 + i32.load offset=20 + i32.store offset=16 + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $~lib/map/Map#set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + local.tee $3 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end local.get $1 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -5431,10 +5459,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -5443,7 +5471,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -5453,17 +5481,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 74 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 70 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5526,7 +5554,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 75 ;) + (func $std/map/testNumeric (; 71 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6054,7 +6082,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 76 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 72 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6065,7 +6093,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 77 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 73 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6196,7 +6224,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6288,7 +6316,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 79 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 75 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6309,7 +6337,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 80 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 76 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6376,7 +6404,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 81 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 77 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6507,21 +6535,60 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 + local.tee $3 i32.const 65535 i32.and call $~lib/util/hash/hash16 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $1 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $1 + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + i32.load16_u + local.get $3 + i32.const 65535 + i32.and + i32.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $1 + i32.load offset=4 + i32.const -2 + i32.and + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + local.set $1 + end + local.get $1 if - local.get $3 + local.get $1 local.get $2 i32.store16 offset=2 else @@ -6567,10 +6634,10 @@ i32.const 3 i32.shl i32.add - local.tee $3 - local.get $1 - i32.store16 + local.tee $1 local.get $3 + i32.store16 + local.get $1 local.get $2 i32.store16 offset=2 local.get $0 @@ -6579,7 +6646,7 @@ i32.const 1 i32.add i32.store offset=20 - local.get $3 + local.get $1 local.get $0 i32.load local.get $4 @@ -6589,17 +6656,17 @@ i32.const 2 i32.shl i32.add - local.tee $1 + local.tee $2 i32.load i32.store offset=4 + local.get $2 local.get $1 - local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 83 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 79 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6660,7 +6727,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 84 ;) + (func $std/map/testNumeric (; 80 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7166,7 +7233,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 85 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 81 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7175,7 +7242,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 86 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 82 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7194,63 +7261,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 87 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $3 - local.get $0 - i32.load offset=16 - local.tee $4 - call $~lib/array/Array#constructor - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $3 - local.get $2 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#delete (; 88 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 83 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7309,7 +7320,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 89 ;) + (func $std/map/testNumeric (; 84 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7477,24 +7488,68 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $3 + i32.load offset=8 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $6 + call $~lib/array/Array#constructor + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|01 + local.get $3 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $3 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $5 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|01 + end + end + local.get $4 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $4 - call $~lib/map/Map#constructor local.set $5 + call $~lib/map/Map#constructor + local.set $3 i32.const 0 local.set $0 loop $for-loop|2 local.get $0 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $3 + local.get $4 local.get $0 call $~lib/array/Array#__get local.set $2 @@ -7528,12 +7583,12 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 local.get $2 local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -7548,7 +7603,7 @@ br $for-loop|2 end end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -7560,7 +7615,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7721,18 +7776,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 90 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 85 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7799,7 +7854,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 91 ;) + (func $std/map/testNumeric (; 86 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8266,7 +8321,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#clear (; 92 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 87 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8299,7 +8354,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 93 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 88 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -8365,7 +8420,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 89 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8406,7 +8461,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 95 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 90 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8415,7 +8470,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 96 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 91 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8546,7 +8601,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 97 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 92 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8636,7 +8691,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 98 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 93 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8655,7 +8710,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -8693,7 +8748,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 100 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 95 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -8705,7 +8760,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 101 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 96 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8772,7 +8827,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#values (; 102 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8828,7 +8883,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 103 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 98 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8861,7 +8916,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 104 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -8882,48 +8937,7 @@ i32.add i64.load ) - (func $~lib/map/Map#find (; 105 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $1 - local.get $0 - i64.load - i64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 106 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 100 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9054,17 +9068,53 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 107 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 101 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - local.get $1 + (local $5 i32) local.get $1 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $1 + local.get $3 + i64.load + i64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -9144,7 +9194,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 108 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 102 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -9204,7 +9254,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 109 ;) + (func $std/map/testNumeric (; 103 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9677,7 +9727,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 110 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 104 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9744,7 +9794,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $std/map/testNumeric (; 111 ;) + (func $std/map/testNumeric (; 105 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -10217,7 +10267,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 112 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 106 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -10258,7 +10308,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 113 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 107 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10268,7 +10318,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 108 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10400,7 +10450,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 109 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10491,7 +10541,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 116 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 110 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10511,79 +10561,42 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 117 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/map/Map#keys (; 118 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 111 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $2 + local.set $3 i32.const 16 i32.const 27 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $2 + local.get $3 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $2 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $2 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 12 i32.mul i32.add @@ -10594,20 +10607,53 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $1 - local.get $6 local.get $5 f32.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -10616,7 +10662,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 119 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 112 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10748,7 +10794,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 120 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 113 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10839,7 +10885,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 121 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 114 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -10900,7 +10946,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 122 ;) + (func $std/map/testNumeric (; 115 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -11389,7 +11435,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 123 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 116 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11430,7 +11476,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 124 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 117 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11440,7 +11486,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 125 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 118 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11572,7 +11618,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 126 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 119 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11663,7 +11709,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 127 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 120 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11683,79 +11729,42 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 128 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 464 - i32.const 528 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/map/Map#keys (; 129 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 121 ;) (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.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $2 + local.set $3 i32.const 16 i32.const 30 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $2 + local.get $3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $2 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $2 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 4 i32.shl i32.add @@ -11766,20 +11775,53 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $1 - local.get $6 local.get $5 f64.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 464 + i32.const 528 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -11788,48 +11830,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#find (; 130 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - local.get $0 - i32.load - local.get $2 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - i32.load - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.load offset=16 - i32.const 1 - i32.and - if (result i32) - i32.const 0 - else - local.get $0 - f64.load - local.get $1 - f64.eq - end - if - local.get $0 - return - end - local.get $0 - i32.load offset=16 - i32.const -2 - i32.and - local.set $0 - br $while-continue|0 - end - end - i32.const 0 - ) - (func $~lib/map/Map#rehash (; 131 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 122 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11961,18 +11962,54 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 132 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 123 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - local.get $1 local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $4 - call $~lib/map/Map#find - local.tee $3 + local.set $4 + local.get $0 + i32.load + local.get $4 + local.get $0 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + i32.load + local.set $3 + block $__inlined_func$~lib/map/Map#find + loop $while-continue|0 + local.get $3 + if + local.get $3 + i32.load offset=16 + i32.const 1 + i32.and + if (result i32) + i32.const 0 + else + local.get $3 + f64.load + local.get $1 + f64.eq + end + br_if $__inlined_func$~lib/map/Map#find + local.get $3 + i32.load offset=16 + i32.const -2 + i32.and + local.set $3 + br $while-continue|0 + end + end + i32.const 0 + local.set $3 + end + local.get $3 if local.get $3 local.get $2 @@ -12052,7 +12089,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 133 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 124 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -12113,7 +12150,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 134 ;) + (func $std/map/testNumeric (; 125 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -12602,7 +12639,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 135 ;) + (func $~start (; 126 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -12614,7 +12651,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 136 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 127 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -12709,7 +12746,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 137 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 128 ;) (param $0 i32) local.get $0 i32.const 556 i32.lt_u diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index b405c06109..eddb1da1cb 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -11,7 +11,6 @@ (type $f64_f64_f64_f64_=>_i32 (func (param f64 f64 f64 f64) (result i32))) (type $none_=>_none (func)) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) - (type $none_=>_f64 (func (result f64))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i64_=>_none (func (param i64))) @@ -24,8 +23,8 @@ (type $f64_i32_f64_=>_i32 (func (param f64 i32 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i32_=>_i64 (func (param i64 i32) (result i64))) - (type $none_=>_f32 (func (result f32))) (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) + (type $none_=>_f64 (func (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)) @@ -1210,63 +1209,62 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.acosh (; 50 ;) (param $0 f64) (result f64) - (local $1 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.tee $1 - i64.const 1024 - i64.lt_u - if - local.get $0 - f64.const 1 - f64.sub - local.tee $0 - local.get $0 - local.get $0 - f64.mul - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.sqrt - f64.add - call $~lib/math/NativeMath.log1p - return - end - local.get $1 - i64.const 1049 - i64.lt_u - if - f64.const 2 - local.get $0 - f64.mul - f64.const 1 - local.get $0 + (func $std/math/test_acosh (; 50 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i64) + block $__inlined_func$~lib/math/NativeMath.acosh (result f64) local.get $0 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $4 + i64.const 1024 + i64.lt_u + if + local.get $0 + f64.const 1 + f64.sub + local.tee $3 + local.get $3 + local.get $3 + f64.mul + f64.const 2 + local.get $3 + f64.mul + f64.add + f64.sqrt + f64.add + call $~lib/math/NativeMath.log1p + br $__inlined_func$~lib/math/NativeMath.acosh + end + local.get $4 + i64.const 1049 + i64.lt_u + if + f64.const 2 + local.get $0 + f64.mul + f64.const 1 + local.get $0 + local.get $0 + local.get $0 + f64.mul + f64.const 1 + f64.sub + f64.sqrt + f64.add + f64.div + f64.sub + call $~lib/math/NativeMath.log + br $__inlined_func$~lib/math/NativeMath.acosh + end local.get $0 - f64.mul - f64.const 1 - f64.sub - f64.sqrt - f64.add - f64.div - f64.sub call $~lib/math/NativeMath.log - return + f64.const 0.6931471805599453 + f64.add end - local.get $0 - call $~lib/math/NativeMath.log - f64.const 0.6931471805599453 - f64.add - ) - (func $std/math/test_acosh (; 51 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.acosh local.get $1 local.get $2 call $std/math/check @@ -1280,7 +1278,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log1p (; 52 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 51 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -1450,7 +1448,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 53 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 52 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -1584,64 +1582,62 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.acosh (; 54 ;) (param $0 f32) (result f32) - (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1073741824 - i32.lt_u - if - local.get $0 - f32.const 1 - f32.sub - local.tee $0 - local.get $0 - local.get $0 - f32.const 2 - f32.add - f32.mul - f32.sqrt - f32.add - call $~lib/math/NativeMathf.log1p - return - end - local.get $1 - i32.const 1166016512 - i32.lt_u - if - f32.const 2 - local.get $0 - f32.mul - f32.const 1 - local.get $0 + (func $std/math/test_acoshf (; 53 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + f32.const 1 + f32.sub + local.tee $0 + local.get $0 + local.get $0 + f32.const 2 + f32.add + f32.mul + f32.sqrt + f32.add + call $~lib/math/NativeMathf.log1p + br $__inlined_func$~lib/math/NativeMathf.acosh + end + local.get $3 + i32.const 1166016512 + i32.lt_u + if + f32.const 2 + local.get $0 + f32.mul + f32.const 1 + local.get $0 + local.get $0 + local.get $0 + f32.mul + f32.const 1 + f32.sub + f32.sqrt + f32.add + f32.div + f32.sub + call $~lib/math/NativeMathf.log + br $__inlined_func$~lib/math/NativeMathf.acosh + end local.get $0 - f32.mul - f32.const 1 - f32.sub - f32.sqrt - f32.add - f32.div - f32.sub call $~lib/math/NativeMathf.log - return + f32.const 0.6931471824645996 + f32.add end - local.get $0 - call $~lib/math/NativeMathf.log - f32.const 0.6931471824645996 - f32.add - ) - (func $std/math/test_acoshf (; 55 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.acosh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.asin (; 56 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asin (; 54 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1779,7 +1775,7 @@ end local.get $0 ) - (func $std/math/test_asin (; 57 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asin (; 55 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 @@ -1795,7 +1791,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (; 58 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 56 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -1875,14 +1871,14 @@ local.get $0 f32.copysign ) - (func $std/math/test_asinf (; 59 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_asinf (; 57 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.asin local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.asinh (; 60 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.asinh (; 58 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) local.get $0 @@ -1952,7 +1948,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_asinh (; 61 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_asinh (; 59 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 @@ -1968,7 +1964,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asinh (; 62 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asinh (; 60 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -2033,14 +2029,14 @@ local.get $0 f32.copysign ) - (func $std/math/test_asinhf (; 63 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_asinhf (; 61 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.asinh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan (; 64 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 62 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2263,7 +2259,7 @@ local.get $3 f64.copysign ) - (func $std/math/test_atan (; 65 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atan (; 63 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 @@ -2279,7 +2275,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 64 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2475,75 +2471,73 @@ local.get $4 f32.copysign ) - (func $std/math/test_atanf (; 67 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_atanf (; 65 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.atan local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atanh (; 68 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $std/math/test_atanh (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) + (local $4 i64) + (local $5 f64) local.get $0 + local.tee $3 f64.abs - local.set $1 - local.get $0 + local.set $0 + local.get $3 i64.reinterpret_f64 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $4 i64.const 1022 i64.lt_u - if (result f64) - local.get $2 + if + local.get $4 i64.const 991 i64.ge_u - if (result f64) + if f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.mul - local.tee $3 - local.get $3 - local.get $1 + local.tee $5 + local.get $5 + local.get $0 f64.mul f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.add call $~lib/math/NativeMath.log1p f64.mul - else - local.get $1 + local.set $0 end else f64.const 0.5 f64.const 2 - local.get $1 + local.get $0 f64.const 1 - local.get $1 + local.get $0 f64.sub f64.div f64.mul call $~lib/math/NativeMath.log1p f64.mul + local.set $0 end local.get $0 + local.get $3 f64.copysign - ) - (func $std/math/test_atanh (; 69 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.atanh local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $0 + local.get $3 call $~lib/bindings/Math/atanh local.get $1 local.get $2 @@ -2552,62 +2546,60 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atanh (; 70 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_atanhf (; 67 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 f32) + (local $4 i32) local.get $0 + local.tee $3 f32.abs - local.set $1 - local.get $0 + local.set $0 + local.get $3 i32.reinterpret_f32 - local.tee $2 + local.tee $4 i32.const 1056964608 i32.lt_u - if (result f32) - local.get $2 + if + local.get $4 i32.const 796917760 i32.ge_u - if (result f32) + if f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.add f32.mul call $~lib/math/NativeMathf.log1p f32.mul - else - local.get $1 + local.set $0 end else f32.const 0.5 f32.const 2 - local.get $1 + local.get $0 f32.const 1 - local.get $1 + local.get $0 f32.sub f32.div f32.mul call $~lib/math/NativeMathf.log1p f32.mul + local.set $0 end local.get $0 + local.get $3 f32.copysign - ) - (func $std/math/test_atanhf (; 71 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.atanh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (; 72 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 68 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2815,7 +2807,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 73 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 69 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2833,7 +2825,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 74 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3026,7 +3018,7 @@ i32.and select ) - (func $std/math/test_atan2f (; 75 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_atan2f (; 71 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 @@ -3034,7 +3026,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.cbrt (; 76 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 72 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3156,7 +3148,7 @@ f64.mul f64.add ) - (func $std/math/test_cbrt (; 77 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cbrt (; 73 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 @@ -3172,7 +3164,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cbrt (; 78 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 74 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3271,14 +3263,14 @@ f64.div f32.demote_f64 ) - (func $std/math/test_cbrtf (; 79 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_cbrtf (; 75 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.cbrt local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_ceil (; 80 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_ceil (; 76 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.ceil local.get $1 @@ -3294,14 +3286,14 @@ i32.const 0 end ) - (func $std/math/test_ceilf (; 81 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_ceilf (; 77 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.ceil local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/pio2_large_quot (; 82 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 78 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3587,7 +3579,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 83 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 79 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3925,7 +3917,7 @@ end local.get $0 ) - (func $std/math/test_cos (; 84 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cos (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cos local.get $1 @@ -3941,7 +3933,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (; 85 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 81 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4210,14 +4202,14 @@ end local.get $0 ) - (func $std/math/test_cosf (; 86 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_cosf (; 82 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.cos local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.expm1 (; 87 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 83 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4488,7 +4480,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 88 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 84 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4640,7 +4632,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 89 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cosh (; 85 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) local.get $0 @@ -4704,7 +4696,7 @@ f64.const 2247116418577894884661631e283 f64.mul ) - (func $std/math/test_cosh (; 90 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cosh (; 86 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 @@ -4720,7 +4712,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 91 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 87 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4970,7 +4962,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 92 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 88 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5104,73 +5096,70 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.cosh (; 93 ;) (param $0 f32) (result f32) - (local $1 i32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - f32.reinterpret_i32 - local.set $0 - local.get $1 - i32.const 1060205079 - i32.lt_u - if - local.get $1 - i32.const 964689920 + (func $std/math/test_coshf (; 89 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 + f32.reinterpret_i32 + local.set $0 + local.get $3 + i32.const 1060205079 i32.lt_u if f32.const 1 - return + local.get $3 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.cosh + drop + f32.const 1 + local.get $0 + call $~lib/math/NativeMathf.expm1 + local.tee $0 + local.get $0 + f32.mul + f32.const 2 + f32.const 2 + local.get $0 + f32.mul + f32.add + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh + end + local.get $3 + i32.const 1118925335 + i32.lt_u + if + f32.const 0.5 + local.get $0 + call $~lib/math/NativeMathf.exp + local.tee $0 + f32.mul + f32.const 0.5 + local.get $0 + f32.div + f32.add + br $__inlined_func$~lib/math/NativeMathf.cosh end - f32.const 1 - local.get $0 - call $~lib/math/NativeMathf.expm1 - local.tee $0 - local.get $0 - f32.mul - f32.const 2 - f32.const 2 - local.get $0 - f32.mul - f32.add - f32.div - f32.add - return - end - local.get $1 - i32.const 1118925335 - i32.lt_u - if - f32.const 0.5 local.get $0 + f32.const 162.88958740234375 + f32.sub call $~lib/math/NativeMathf.exp - local.tee $0 + f32.const 1661534994731144841129758e11 + f32.mul + f32.const 1661534994731144841129758e11 f32.mul - f32.const 0.5 - local.get $0 - f32.div - f32.add - return end - local.get $0 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp - f32.const 1661534994731144841129758e11 - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul - ) - (func $std/math/test_coshf (; 94 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.cosh local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_exp (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp (; 90 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 @@ -5186,14 +5175,14 @@ i32.const 0 end ) - (func $std/math/test_expf (; 96 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_expf (; 91 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_expm1 (; 97 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_expm1 (; 92 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 @@ -5209,14 +5198,14 @@ i32.const 0 end ) - (func $std/math/test_expm1f (; 98 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_expm1f (; 93 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.expm1 local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (; 99 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp2 (; 94 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5422,7 +5411,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 100 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5439,7 +5428,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 101 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 96 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5534,14 +5523,14 @@ f32.demote_f64 end ) - (func $std/math/test_exp2f (; 102 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_exp2f (; 97 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp2 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_floor (; 103 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_floor (; 98 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.floor local.get $1 @@ -5557,14 +5546,14 @@ i32.const 0 end ) - (func $std/math/test_floorf (; 104 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_floorf (; 99 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.floor local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.hypot (; 105 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 100 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5733,7 +5722,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 106 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_hypot (; 101 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot @@ -5741,7 +5730,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.hypot (; 107 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 102 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5846,7 +5835,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 108 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_hypotf (; 103 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot @@ -5854,7 +5843,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_log (; 109 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 @@ -5870,14 +5859,14 @@ i32.const 0 end ) - (func $std/math/test_logf (; 110 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_logf (; 105 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.log10 (; 111 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 106 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6079,7 +6068,7 @@ local.get $1 f64.add ) - (func $std/math/test_log10 (; 112 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log10 (; 107 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 @@ -6095,7 +6084,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log10 (; 113 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 108 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6253,14 +6242,14 @@ f32.mul f32.add ) - (func $std/math/test_log10f (; 114 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log10f (; 109 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log10 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_log1p (; 115 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log1p (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 @@ -6276,14 +6265,14 @@ i32.const 0 end ) - (func $std/math/test_log1pf (; 116 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log1pf (; 111 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log1p local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.log2 (; 117 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 112 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6478,7 +6467,7 @@ local.get $1 f64.add ) - (func $std/math/test_log2 (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log2 (; 113 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 @@ -6494,7 +6483,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (; 119 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 114 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6644,14 +6633,14 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_log2f (; 120 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log2f (; 115 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log2 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_max (; 121 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_max (; 116 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6669,7 +6658,7 @@ i32.const 0 end ) - (func $std/math/test_maxf (; 122 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_maxf (; 117 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.max @@ -6677,7 +6666,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_min (; 123 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_min (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6695,7 +6684,7 @@ i32.const 0 end ) - (func $std/math/test_minf (; 124 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_minf (; 119 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.min @@ -6703,7 +6692,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.mod (; 125 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 120 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6906,7 +6895,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 126 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 121 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6924,7 +6913,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 127 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 122 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7116,7 +7105,7 @@ local.get $0 f32.mul ) - (func $std/math/test_modf (; 128 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_modf (; 123 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.mod @@ -7124,7 +7113,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.pow (; 129 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 124 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -8080,7 +8069,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 130 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 125 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -8098,7 +8087,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 131 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 126 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8556,7 +8545,7 @@ end local.get $0 ) - (func $std/math/test_powf (; 132 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_powf (; 127 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow @@ -8564,7 +8553,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/murmurHash3 (; 133 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 128 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8585,7 +8574,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 134 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 129 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8617,7 +8606,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 135 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 130 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8661,97 +8650,7 @@ unreachable end ) - (func $~lib/math/NativeMath.random (; 136 ;) (result f64) - (local $0 i64) - (local $1 i64) - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 1413 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_64 - local.set $0 - global.get $~lib/math/random_state1_64 - local.tee $1 - global.set $~lib/math/random_state0_64 - local.get $1 - local.get $0 - local.get $0 - i64.const 23 - i64.shl - i64.xor - local.tee $0 - local.get $0 - i64.const 17 - i64.shr_u - i64.xor - i64.xor - local.get $1 - i64.const 26 - i64.shr_u - i64.xor - global.set $~lib/math/random_state1_64 - local.get $1 - i64.const 12 - i64.shr_u - i64.const 4607182418800017408 - i64.or - f64.reinterpret_i64 - f64.const 1 - f64.sub - ) - (func $~lib/math/NativeMathf.random (; 137 ;) (result f32) - (local $0 i32) - (local $1 i32) - global.get $~lib/math/random_seeded - i32.eqz - if - i32.const 2992 - i32.const 2944 - i32.const 2606 - i32.const 24 - call $~lib/builtins/abort - unreachable - end - global.get $~lib/math/random_state0_32 - local.tee $0 - global.get $~lib/math/random_state1_32 - i32.xor - local.tee $1 - local.get $0 - i32.const 26 - i32.rotl - i32.xor - local.get $1 - i32.const 9 - i32.shl - i32.xor - global.set $~lib/math/random_state0_32 - local.get $1 - i32.const 13 - i32.rotl - global.set $~lib/math/random_state1_32 - local.get $0 - i32.const -1640531525 - i32.mul - i32.const 5 - i32.rotl - i32.const 5 - i32.mul - i32.const 9 - i32.shr_u - i32.const 1065353216 - i32.or - f32.reinterpret_i32 - f32.const 1 - f32.sub - ) - (func $std/math/test_round (; 138 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_round (; 131 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.const 0.5 f64.add @@ -8762,7 +8661,7 @@ f64.const 0 call $std/math/check ) - (func $std/math/test_roundf (; 139 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_roundf (; 132 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.const 0.5 f32.add @@ -8773,7 +8672,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_sign (; 140 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_sign (; 133 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8796,7 +8695,7 @@ i32.const 0 end ) - (func $std/math/test_signf (; 141 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_signf (; 134 ;) (param $0 f32) (param $1 f32) (result i32) f32.const 1 local.get $0 f32.copysign @@ -8810,7 +8709,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 142 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 135 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -9059,7 +8958,7 @@ end local.get $0 ) - (func $std/math/test_rem (; 143 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_rem (; 136 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.rem @@ -9067,7 +8966,7 @@ f64.const 0 call $std/math/check ) - (func $~lib/math/NativeMathf.rem (; 144 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 137 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9308,7 +9207,7 @@ end local.get $0 ) - (func $std/math/test_remf (; 145 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_remf (; 138 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.rem @@ -9316,7 +9215,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.sin (; 146 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 139 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9636,7 +9535,7 @@ end local.get $0 ) - (func $std/math/test_sin (; 147 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sin (; 140 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sin local.get $1 @@ -9652,7 +9551,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (; 148 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 141 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9922,14 +9821,14 @@ end local.get $0 ) - (func $std/math/test_sinf (; 149 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sinf (; 142 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.sin local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.sinh (; 150 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 143 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -10006,7 +9905,7 @@ f64.mul f64.mul ) - (func $std/math/test_sinh (; 151 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sinh (; 144 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 @@ -10022,7 +9921,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (; 152 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 145 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -10094,14 +9993,14 @@ f32.mul f32.mul ) - (func $std/math/test_sinhf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sinhf (; 146 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.sinh local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_sqrt (; 154 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sqrt (; 147 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 f64.sqrt local.get $1 @@ -10117,14 +10016,14 @@ i32.const 0 end ) - (func $std/math/test_sqrtf (; 155 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sqrtf (; 148 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 f32.sqrt local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/tan_kern (; 156 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 149 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -10306,7 +10205,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 157 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 150 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10483,7 +10382,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (; 158 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tan (; 151 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tan local.get $1 @@ -10499,7 +10398,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (; 159 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 152 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10753,14 +10652,14 @@ local.get $1 f32.demote_f64 ) - (func $std/math/test_tanf (; 160 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_tanf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.tan local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.tanh (; 161 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 154 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10839,7 +10738,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 162 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tanh (; 155 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 @@ -10855,7 +10754,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tanh (; 163 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tanh (; 156 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -10929,14 +10828,14 @@ local.get $0 f32.copysign ) - (func $std/math/test_tanhf (; 164 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_tanhf (; 157 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.tanh local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_trunc (; 165 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_trunc (; 158 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.trunc local.get $1 @@ -10952,14 +10851,14 @@ i32.const 0 end ) - (func $std/math/test_truncf (; 166 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_truncf (; 159 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.trunc local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.sincos (; 167 ;) (param $0 f64) + (func $~lib/math/NativeMath.sincos (; 160 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -11354,7 +11253,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 168 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 161 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -11380,7 +11279,7 @@ drop end ) - (func $~lib/math/dtoi32 (; 169 ;) (param $0 f64) (result i32) + (func $~lib/math/dtoi32 (; 162 ;) (param $0 f64) (result i32) local.get $0 f64.const 4294967296 local.get $0 @@ -11392,7 +11291,7 @@ i64.trunc_f64_s i32.wrap_i64 ) - (func $~lib/math/NativeMath.imul (; 170 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 163 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -11413,7 +11312,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 171 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 164 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -11428,7 +11327,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 172 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 165 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -11459,7 +11358,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 173 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 166 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -11505,7 +11404,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 174 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 167 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -11551,10 +11450,14 @@ end local.get $2 ) - (func $start:std/math (; 175 ;) + (func $start:std/math (; 168 ;) (local $0 f64) (local $1 f32) (local $2 i32) + (local $3 i64) + (local $4 i64) + (local $5 i32) + (local $6 i32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -36897,17 +36800,54 @@ f64.const 1e6 f64.lt if - call $~lib/math/NativeMath.random + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 1413 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_64 + local.set $3 + global.get $~lib/math/random_state1_64 + local.tee $4 + global.set $~lib/math/random_state0_64 + local.get $4 + local.get $3 + local.get $3 + i64.const 23 + i64.shl + i64.xor + local.tee $3 + local.get $3 + i64.const 17 + i64.shr_u + i64.xor + i64.xor + local.get $4 + i64.const 26 + i64.shr_u + i64.xor + global.set $~lib/math/random_state1_64 + local.get $4 + i64.const 12 + i64.shr_u + i64.const 4607182418800017408 + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub local.tee $0 + f64.const 1 + f64.lt + i32.const 0 + local.get $0 f64.const 0 f64.ge - if (result i32) - local.get $0 - f64.const 1 - f64.lt - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -36935,17 +36875,56 @@ f64.const 1e6 f64.lt if - call $~lib/math/NativeMathf.random + global.get $~lib/math/random_seeded + i32.eqz + if + i32.const 2992 + i32.const 2944 + i32.const 2606 + i32.const 24 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/math/random_state0_32 + local.tee $5 + global.get $~lib/math/random_state1_32 + i32.xor + local.tee $6 + local.get $5 + i32.const 26 + i32.rotl + i32.xor + local.get $6 + i32.const 9 + i32.shl + i32.xor + global.set $~lib/math/random_state0_32 + local.get $6 + i32.const 13 + i32.rotl + global.set $~lib/math/random_state1_32 + local.get $5 + i32.const -1640531525 + i32.mul + i32.const 5 + i32.rotl + i32.const 5 + i32.mul + i32.const 9 + i32.shr_u + i32.const 1065353216 + i32.or + f32.reinterpret_i32 + f32.const 1 + f32.sub local.tee $1 + f32.const 1 + f32.lt + i32.const 0 + local.get $1 f32.const 0 f32.ge - if (result i32) - local.get $1 - f32.const 1 - f32.lt - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -47252,7 +47231,7 @@ unreachable end ) - (func $~start (; 176 ;) + (func $~start (; 169 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index a8c58006df..ad93153023 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (memory $0 0) (global $~lib/rt/stub/startOffset (mut i32) (i32.const 0)) @@ -8,18 +7,26 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -30,7 +37,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -49,33 +56,31 @@ end local.get $0 global.set $~lib/rt/stub/offset - ) - (func $std/new/AClass#constructor (; 1 ;) (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $0 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $0 + local.get $2 i32.const 16 i32.sub - local.tee $1 + local.tee $0 i32.const 16 i32.store - local.get $1 + local.get $0 i32.const 1 i32.store offset=4 - local.get $1 + local.get $0 i32.const 3 i32.store offset=8 - local.get $1 + local.get $0 i32.const 8 i32.store offset=12 - local.get $0 + local.get $2 + ) + (func $~start (; 1 ;) + (local $0 i32) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset + call $~lib/rt/stub/__alloc + local.tee $0 i32.const 1 i32.store local.get $0 @@ -91,13 +96,6 @@ f32.const 3 f32.store offset=4 local.get $0 - ) - (func $~start (; 2 ;) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 385b2a670a..63f2ddd7ad 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (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))) @@ -12,20 +11,46 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and local.tee $2 i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add + local.tee $2 + memory.size + local.tee $5 + i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -33,16 +58,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -51,42 +76,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -97,9 +93,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -107,7 +103,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -182,8 +178,22 @@ end i32.const 0 ) - (func $std/object-literal/bar (; 5 ;) (param $0 i32) + (func $start:std/object-literal (; 4 ;) + (local $0 i32) (local $1 i32) + i32.const 128 + global.set $~lib/rt/stub/startOffset + i32.const 128 + global.set $~lib/rt/stub/offset + i32.const 8 + i32.const 3 + call $~lib/rt/stub/__alloc + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const 32 + i32.store offset=4 local.get $0 i32.load i32.const 1 @@ -200,7 +210,7 @@ i32.const 1 local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 32 i32.eq br_if $__inlined_func$~lib/string/String.__eq @@ -208,18 +218,18 @@ block $folding-inner0 i32.const 0 i32.const 1 - local.get $0 + local.get $1 select br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/string/String#get:length - local.tee $1 + local.tee $0 i32.const 32 call $~lib/string/String#get:length i32.ne br_if $folding-inner0 - local.get $0 local.get $1 + local.get $0 call $~lib/util/string/compareImpl i32.eqz br $__inlined_func$~lib/string/String.__eq @@ -235,24 +245,6 @@ call $~lib/builtins/abort unreachable end - ) - (func $start:std/object-literal (; 6 ;) - (local $0 i32) - i32.const 128 - global.set $~lib/rt/stub/startOffset - i32.const 128 - global.set $~lib/rt/stub/offset - i32.const 8 - i32.const 3 - call $~lib/rt/stub/__alloc - local.tee $0 - i32.const 1 - i32.store - local.get $0 - i32.const 32 - i32.store offset=4 - local.get $0 - call $std/object-literal/bar i32.const 4 i32.const 4 call $~lib/rt/stub/__alloc @@ -290,7 +282,7 @@ unreachable end ) - (func $~start (; 7 ;) + (func $~start (; 5 ;) call $start:std/object-literal ) ) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 46b6bcf27f..2e4ed6d68e 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,7 +1,6 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) @@ -79,20 +78,28 @@ (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 1 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -100,16 +107,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -118,20 +125,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -146,9 +142,9 @@ local.get $1 i32.const 8 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $std/operator-overloading/Tester#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 2 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 3 call $~lib/rt/stub/__alloc @@ -160,7 +156,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 4 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 3 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -237,7 +233,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 5 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 4 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1193,7 +1189,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.equals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 5 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1209,7 +1205,7 @@ i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (; 7 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 6 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -1225,7 +1221,7 @@ i32.const 0 end ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 7 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 4 call $~lib/rt/stub/__alloc @@ -1237,7 +1233,7 @@ i32.store offset=4 local.get $2 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 8 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 5 call $~lib/rt/stub/__alloc @@ -1249,7 +1245,7 @@ i32.store offset=4 local.get $2 ) - (func $start:std/operator-overloading (; 10 ;) + (func $start:std/operator-overloading (; 9 ;) (local $0 i32) (local $1 i32) i32.const 96 @@ -2426,7 +2422,7 @@ unreachable end ) - (func $~start (; 11 ;) + (func $~start (; 10 ;) call $start:std/operator-overloading ) ) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index a7a2bdb19e..ec50ee4edb 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -1,6 +1,5 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param 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))) @@ -14,51 +13,7 @@ (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/memory/memory.fill (; 1 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 8 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 1 - i32.add - i32.const 0 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - ) - (func $~lib/memory/memory.copy (; 2 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 1 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -232,7 +187,7 @@ end end ) - (func $start:std/pointer (; 3 ;) + (func $start:std/pointer (; 2 ;) (local $0 i32) (local $1 i32) i32.const 8 @@ -402,7 +357,46 @@ call $~lib/memory/memory.copy else local.get $0 - call $~lib/memory/memory.fill + i32.const 0 + i32.store8 + local.get $0 + i32.const 8 + i32.add + local.tee $1 + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 1 + i32.add + i32.const 0 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 3 + i32.sub + i32.const 0 + i32.store8 + local.get $0 + i32.const 3 + i32.add + i32.const 0 + i32.store8 + local.get $1 + i32.const 4 + i32.sub + i32.const 0 + i32.store8 end global.get $std/pointer/one global.get $std/pointer/two @@ -596,7 +590,7 @@ unreachable end ) - (func $~start (; 4 ;) + (func $~start (; 3 ;) call $start:std/pointer ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 143a48a8aa..482bd722a0 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) @@ -12,8 +12,6 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) - (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) - (type $i32_i32_f64_=>_none (func (param i32 i32 f64))) (type $i32_i64_=>_none (func (param i32 i64))) (type $i32_f32_=>_none (func (param i32 f32))) (type $i32_f64_=>_none (func (param i32 f64))) @@ -1076,48 +1074,9 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/increment (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 144 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 144 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 444 i32.gt_u @@ -1125,11 +1084,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 144 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 144 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/memory/memory.fill (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1340,7 +1336,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1362,7 +1358,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 444 i32.gt_u @@ -1373,7 +1369,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#clear (; 21 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 20 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1406,7 +1402,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 22 ;) (result i32) + (func $~lib/set/Set#constructor (; 21 ;) (result i32) (local $0 i32) i32.const 24 i32.const 3 @@ -1434,14 +1430,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 23 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1484,7 +1480,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1497,7 +1493,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1624,7 +1620,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1711,7 +1707,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1779,49 +1775,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 29 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 32 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1994,7 +1948,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2007,7 +1961,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2110,13 +2064,15 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 local.get $0 i32.load offset=8 - local.tee $3 + local.tee $4 local.get $2 i32.shr_u i32.gt_u @@ -2136,26 +2092,67 @@ end local.get $0 i32.load - local.set $4 - local.get $3 - call $~lib/rt/tlsf/maybeInitialize - local.get $4 - call $~lib/rt/tlsf/checkUsedBlock + local.set $3 local.get $1 local.get $2 i32.shl local.tee $2 + local.set $5 + call $~lib/rt/tlsf/maybeInitialize + local.set $6 + local.get $3 + i32.const 16 + i32.sub + local.set $1 + local.get $3 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $3 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 32 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + local.get $6 + local.get $1 + local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 i32.add local.get $2 - local.get $3 + local.get $4 i32.sub call $~lib/memory/memory.fill local.get $1 - local.get $4 + local.get $3 i32.ne if local.get $0 @@ -2170,7 +2167,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2206,7 +2203,7 @@ local.get $2 i32.store8 ) - (func $~lib/set/Set#values (; 35 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 33 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2270,7 +2267,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2289,7 +2286,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2352,7 +2349,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 38 ;) + (func $std/set/testNumeric (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2671,7 +2668,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 39 ;) (result i32) + (func $~lib/set/Set#constructor (; 37 ;) (result i32) (local $0 i32) i32.const 24 i32.const 5 @@ -2699,7 +2696,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 38 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2710,7 +2707,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 39 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2837,7 +2834,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 42 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 40 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2922,7 +2919,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 43 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 41 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2986,7 +2983,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 42 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3005,7 +3002,7 @@ i32.add i32.load8_u ) - (func $~lib/set/Set#delete (; 45 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 43 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3066,7 +3063,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 46 ;) + (func $std/set/testNumeric (; 44 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3377,7 +3374,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 47 ;) (result i32) + (func $~lib/set/Set#constructor (; 45 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -3405,7 +3402,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 48 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 46 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3420,7 +3417,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3463,7 +3460,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 48 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3476,7 +3473,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 49 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3603,7 +3600,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 50 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3690,7 +3687,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3728,7 +3725,7 @@ local.get $2 i32.store16 ) - (func $~lib/set/Set#values (; 54 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 52 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3792,7 +3789,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3813,7 +3810,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 56 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3876,7 +3873,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 57 ;) + (func $std/set/testNumeric (; 55 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4195,7 +4192,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 58 ;) (result i32) + (func $~lib/set/Set#constructor (; 56 ;) (result i32) (local $0 i32) i32.const 24 i32.const 9 @@ -4223,7 +4220,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 57 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4234,7 +4231,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 58 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4361,7 +4358,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4446,7 +4443,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 62 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 60 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4510,7 +4507,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 63 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 61 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -4531,7 +4528,7 @@ i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 64 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 62 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4592,7 +4589,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 65 ;) + (func $std/set/testNumeric (; 63 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4903,7 +4900,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 66 ;) (result i32) + (func $~lib/set/Set#constructor (; 64 ;) (result i32) (local $0 i32) i32.const 24 i32.const 11 @@ -4931,7 +4928,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 67 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 65 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4962,7 +4959,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5003,7 +5000,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 69 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 67 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5012,7 +5009,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 70 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 68 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5139,7 +5136,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 71 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 69 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5222,7 +5219,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5260,7 +5257,7 @@ local.get $2 i32.store ) - (func $~lib/set/Set#values (; 73 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 71 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5324,7 +5321,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 72 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5345,7 +5342,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 75 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 73 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5404,7 +5401,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 76 ;) + (func $std/set/testNumeric (; 74 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5707,7 +5704,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 77 ;) (result i32) + (func $~lib/set/Set#constructor (; 75 ;) (result i32) (local $0 i32) i32.const 24 i32.const 13 @@ -5735,7 +5732,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 78 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 76 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5799,7 +5796,7 @@ end local.get $2 ) - (func $std/set/testNumeric (; 79 ;) + (func $std/set/testNumeric (; 77 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6102,7 +6099,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#clear (; 80 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 78 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6135,7 +6132,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 81 ;) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (result i32) (local $0 i32) i32.const 24 i32.const 15 @@ -6163,7 +6160,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 82 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 80 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6229,7 +6226,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 83 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 81 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6270,7 +6267,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 84 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 82 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6279,7 +6276,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 85 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 83 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6406,7 +6403,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 86 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 84 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6489,7 +6486,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -6527,7 +6524,7 @@ local.get $2 i64.store ) - (func $~lib/set/Set#values (; 88 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 86 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6591,7 +6588,7 @@ end local.get $2 ) - (func $~lib/array/Array#__get (; 89 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 87 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -6612,7 +6609,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 90 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 88 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -6672,7 +6669,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 91 ;) + (func $std/set/testNumeric (; 89 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -6974,7 +6971,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 92 ;) (result i32) + (func $~lib/set/Set#constructor (; 90 ;) (result i32) (local $0 i32) i32.const 24 i32.const 17 @@ -7002,7 +6999,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 93 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 91 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7066,7 +7063,7 @@ end local.get $2 ) - (func $std/set/testNumeric (; 94 ;) + (func $std/set/testNumeric (; 92 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -7368,7 +7365,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 95 ;) (result i32) + (func $~lib/set/Set#constructor (; 93 ;) (result i32) (local $0 i32) i32.const 24 i32.const 19 @@ -7396,7 +7393,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 96 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 94 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -7437,7 +7434,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 97 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 95 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7447,7 +7444,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 98 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 96 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7575,7 +7572,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 99 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#add (; 97 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7659,79 +7656,42 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 100 ;) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 2 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - f32.store - ) - (func $~lib/set/Set#values (; 101 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 98 ;) (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 f32) local.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $1 + local.set $3 i32.const 16 i32.const 20 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $1 + local.get $3 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 local.get $1 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $1 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 3 i32.shl i32.add @@ -7742,26 +7702,59 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.get $6 local.get $5 f32.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 2 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 + local.get $1 ) - (func $~lib/array/Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -7782,7 +7775,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 103 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 100 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -7843,7 +7836,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 104 ;) + (func $std/set/testNumeric (; 101 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -8145,7 +8138,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 105 ;) (result i32) + (func $~lib/set/Set#constructor (; 102 ;) (result i32) (local $0 i32) i32.const 24 i32.const 21 @@ -8173,7 +8166,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 106 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 103 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8214,7 +8207,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 107 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 104 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8224,7 +8217,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 108 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 105 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8352,7 +8345,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 109 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 106 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8436,79 +8429,42 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 110 ;) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 352 - i32.const 416 - i32.const 109 - i32.const 21 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - call $~lib/array/ensureSize - local.get $0 - local.get $3 - i32.store offset=12 - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $2 - f64.store - ) - (func $~lib/set/Set#values (; 111 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 107 ;) (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.get $0 i32.load offset=8 - local.set $4 + local.set $6 local.get $0 i32.load offset=16 - local.set $1 + local.set $3 i32.const 16 i32.const 22 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $1 + local.get $3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $2 local.get $1 + local.get $3 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 + local.get $4 local.get $3 - local.get $1 i32.lt_s if + local.get $6 local.get $4 - local.get $3 i32.const 4 i32.shl i32.add @@ -8519,26 +8475,59 @@ i32.eqz if local.get $0 - local.tee $6 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.get $6 local.get $5 f64.load - call $~lib/array/Array#__set + local.set $7 + local.get $2 + local.get $1 + i32.load offset=12 + i32.ge_u + if + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 352 + i32.const 416 + i32.const 109 + i32.const 21 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + local.tee $5 + i32.const 3 + call $~lib/array/ensureSize + local.get $1 + local.get $5 + i32.store offset=12 + end + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 + local.get $1 ) - (func $~lib/array/Array#__get (; 112 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -8559,7 +8548,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 113 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 109 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -8620,7 +8609,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 114 ;) + (func $std/set/testNumeric (; 110 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -8922,7 +8911,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 115 ;) + (func $~start (; 111 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -8934,7 +8923,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 116 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 112 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9029,7 +9018,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 117 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 113 ;) (param $0 i32) local.get $0 i32.const 444 i32.lt_u diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index deb88eaed6..b16f11b7f6 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,11 +1,11 @@ (module (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (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 $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i64 (func (param i32) (result i64))) (type $i32_=>_f32 (func (param i32) (result f32))) (type $i32_=>_f64 (func (param i32) (result f64))) @@ -92,52 +92,7 @@ local.get $0 global.set $~lib/rt/stub/offset ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 - local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 - i32.const 16 - i32.sub - local.tee $2 - local.get $4 - i32.store - local.get $2 - i32.const 1 - i32.store offset=4 - local.get $2 - local.get $1 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=12 - local.get $3 - ) - (func $~lib/memory/memory.copy (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -310,11 +265,13 @@ end end ) - (func $~lib/rt/stub/__realloc (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__realloc (; 4 ;) (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.get $0 i32.const 15 i32.and @@ -334,10 +291,10 @@ local.get $0 i32.const 16 i32.sub - local.tee $3 + local.tee $4 i32.load - local.set $4 - local.get $3 + local.set $2 + local.get $4 i32.load offset=4 i32.const 1 i32.ne @@ -351,7 +308,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $4 + local.get $2 i32.add i32.eq local.set $5 @@ -360,9 +317,9 @@ i32.add i32.const -16 i32.and - local.set $2 + local.set $3 local.get $1 - local.get $4 + local.get $2 i32.gt_u if local.get $5 @@ -374,54 +331,93 @@ unreachable end local.get $0 - local.get $2 + local.get $3 i32.add call $~lib/rt/stub/maybeGrowMemory + local.get $4 local.get $3 - local.get $2 i32.store else - local.get $2 local.get $4 + i32.load offset=8 + local.set $6 + local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $4 + local.tee $2 + local.get $3 local.get $2 - local.get $4 i32.gt_u select + local.tee $5 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + local.get $5 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $7 + i32.add + call $~lib/rt/stub/maybeGrowMemory local.get $3 - i32.load offset=8 - call $~lib/rt/stub/__alloc + i32.const 16 + i32.sub local.tee $2 - local.get $0 + local.get $7 + i32.store + local.get $2 + i32.const 1 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $5 + i32.store offset=12 local.get $3 + local.get $0 + local.get $4 i32.load offset=12 call $~lib/memory/memory.copy - local.get $2 + local.get $3 local.tee $0 i32.const 16 i32.sub - local.set $3 + local.set $4 end else local.get $5 if local.get $0 - local.get $2 + local.get $3 i32.add global.set $~lib/rt/stub/offset + local.get $4 local.get $3 - local.get $2 i32.store end end - local.get $3 + local.get $4 local.get $1 i32.store offset=12 local.get $0 ) - (func $~lib/memory/memory.fill (; 6 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 5 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -632,7 +628,7 @@ end end ) - (func $~lib/array/ensureSize (; 7 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -688,7 +684,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result i64) + (func $~lib/array/Array#__get (; 7 ;) (param $0 i32) (result i64) local.get $0 i32.const 140 i32.load @@ -709,7 +705,7 @@ i32.add i64.load ) - (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f32) + (func $~lib/array/Array#__get (; 8 ;) (param $0 i32) (result f32) local.get $0 i32.const 204 i32.load @@ -730,7 +726,7 @@ i32.add f32.load ) - (func $~lib/array/Array#__get (; 10 ;) (param $0 i32) (result f64) + (func $~lib/array/Array#__get (; 9 ;) (param $0 i32) (result f64) local.get $0 i32.const 268 i32.load @@ -751,7 +747,7 @@ i32.add f64.load ) - (func $start:std/static-array (; 11 ;) + (func $start:std/static-array (; 10 ;) i32.const 76 i32.load i32.const 2 @@ -1013,7 +1009,7 @@ unreachable end ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) call $start:std/static-array ) ) diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index e859382b31..9bdbc8ac0f 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1293,48 +1293,9 @@ end local.get $1 ) - (func $~lib/rt/pure/increment (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 432 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 432 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 20 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 464 i32.gt_u @@ -1342,18 +1303,55 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 432 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 432 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $std/staticarray/test (; 21 ;) (result i32) + (func $std/staticarray/test (; 20 ;) (result i32) i32.const 12 i32.const 3 i32.const 288 call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) local.get $0 i32.const 464 i32.gt_u @@ -1364,7 +1362,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/staticarray (; 23 ;) + (func $start:std/staticarray (; 22 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1573,7 +1571,7 @@ i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 24 ;) + (func $~start (; 23 ;) global.get $~started if return @@ -1583,7 +1581,7 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1709,7 +1707,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) local.get $0 i32.const 464 i32.lt_u diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2aff4881ff..5233c42f4b 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (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_i32_=>_none (func (param i32 i32 i32))) @@ -305,48 +305,9 @@ i32.const 1 i32.shr_u ) - (func $~lib/rt/pure/increment (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 48 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 48 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 17376 i32.gt_u @@ -354,11 +315,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 48 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 48 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -524,7 +522,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -807,7 +805,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -921,7 +919,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 14 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1008,7 +1006,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1032,7 +1030,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1163,7 +1161,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 17 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1225,7 +1223,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1301,7 +1299,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1383,7 +1381,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 20 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 1 @@ -1391,7 +1389,7 @@ i32.const 16 i32.add ) - (func $~lib/util/casemap/casemap (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1542,49 +1540,7 @@ i32.and i32.add ) - (func $~lib/rt/tlsf/checkUsedBlock (; 23 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 96 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/memory/memory.copy (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1757,7 +1713,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1770,7 +1726,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1873,16 +1829,55 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 - call $~lib/rt/tlsf/checkUsedBlock + i32.const 16 + i32.sub + local.set $2 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $2 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 96 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 28 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 26 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2189,7 +2184,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 29 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 27 ;) (param $0 i32) local.get $0 i32.const 17376 i32.gt_u @@ -2200,7 +2195,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/string/compareImpl (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2276,7 +2271,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 31 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 29 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2310,7 +2305,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 30 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2335,7 +2330,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 33 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2816,7 +2811,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 34 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 32 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2866,7 +2861,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 33 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2925,7 +2920,7 @@ i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 36 ;) + (func $start:std/string-casemapping (; 34 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -4558,7 +4553,7 @@ local.get $94 call $~lib/rt/pure/__release ) - (func $~start (; 37 ;) + (func $~start (; 35 ;) global.get $~started if return @@ -4568,7 +4563,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 38 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 36 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index db802c28ec..3e687e0e0e 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -2,8 +2,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $i32_=>_i32 (func (param i32) (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))) @@ -35,48 +35,9 @@ (global $~lib/rt/tlsf/collectLock (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 64 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 64 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 21052 i32.gt_u @@ -84,11 +45,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 64 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) local.get $0 i32.const 21052 i32.gt_u @@ -99,7 +97,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 8 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -265,7 +263,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 9 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -548,7 +546,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -662,7 +660,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 11 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -749,7 +747,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -773,7 +771,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -904,7 +902,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -966,7 +964,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1042,7 +1040,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1124,7 +1122,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1132,7 +1130,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1305,7 +1303,7 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 20 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 19 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1322,7 +1320,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 21 ;) + (func $std/string-encoding/testUTF16Encode (; 20 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1485,7 +1483,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const -2 @@ -1500,7 +1498,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.decode (; 22 ;) (param $0 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -1508,7 +1506,7 @@ i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe ) - (func $~lib/string/String#get:length (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 23 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1516,7 +1514,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1592,7 +1590,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 25 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1626,7 +1624,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 27 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 26 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1771,7 +1769,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF8.byteLength (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1862,7 +1860,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2072,7 +2070,7 @@ local.get $4 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 30 ;) + (func $std/string-encoding/testUTF8Encode (; 29 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2216,7 +2214,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 31 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 30 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2370,49 +2368,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 16 - 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 - if (result i32) - local.get $1 - i32.load offset=4 - i32.const -268435456 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 176 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - ) - (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2425,7 +2381,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2528,7 +2484,7 @@ end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2553,7 +2509,7 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $6 + local.tee $5 local.set $1 loop $while-continue|0 local.get $0 @@ -2580,7 +2536,7 @@ i32.load8_u i32.const 63 i32.and - local.set $5 + local.set $6 local.get $0 i32.const 1 i32.add @@ -2592,7 +2548,7 @@ i32.eq if local.get $1 - local.get $5 + local.get $6 local.get $3 i32.const 31 i32.and @@ -2626,7 +2582,7 @@ i32.and i32.const 12 i32.shl - local.get $5 + local.get $6 i32.const 6 i32.shl i32.or @@ -2646,7 +2602,7 @@ i32.and i32.const 18 i32.shl - local.get $5 + local.get $6 i32.const 12 i32.shl i32.or @@ -2711,18 +2667,57 @@ end end end - call $~lib/rt/tlsf/maybeInitialize - local.get $6 - call $~lib/rt/tlsf/checkUsedBlock local.get $1 - local.get $6 + local.get $5 i32.sub + local.set $2 + call $~lib/rt/tlsf/maybeInitialize + local.get $5 + i32.const 16 + i32.sub + local.set $0 + local.get $5 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $5 + select + if (result i32) + local.get $0 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $0 + i32.load offset=4 + i32.const -268435456 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $2 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF8.decode (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.decode (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -2731,7 +2726,7 @@ local.get $1 call $~lib/string/String.UTF8.decodeUnsafe ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 37 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 35 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2845,7 +2840,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 38 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 36 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3042,7 +3037,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testLarge (; 39 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 37 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3090,7 +3085,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/string-encoding (; 40 ;) + (func $start:std/string-encoding (; 38 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3184,10 +3179,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 41 ;) + (func $~start (; 39 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 42 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 40 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index c8c2b7634f..0ac4bd4ecf 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -386,48 +386,9 @@ (export "_start" (func $~start)) (export "memory" (memory $0)) (export "getString" (func $std/string/getString)) - (func $~lib/rt/pure/increment (; 6 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 6 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 160 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 160 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 17000 i32.gt_u @@ -435,11 +396,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 160 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 8 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 7 ;) (param $0 i32) local.get $0 i32.const 17000 i32.gt_u @@ -450,7 +448,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/string/String#get:length (; 9 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 8 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -458,7 +456,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) local.get $0 local.get $1 @@ -538,7 +536,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -573,7 +571,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__not (; 12 ;) (param $0 i32) (result i32) + (func $~lib/string/String.__not (; 11 ;) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 @@ -583,7 +581,7 @@ i32.const 1 end ) - (func $~lib/rt/tlsf/removeBlock (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -749,7 +747,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1032,7 +1030,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -1146,7 +1144,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 16 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 15 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1233,7 +1231,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/prepareSize (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.const 1073741808 i32.ge_u @@ -1257,7 +1255,7 @@ i32.gt_u select ) - (func $~lib/rt/tlsf/searchBlock (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 17 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -1388,7 +1386,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 19 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) (local $2 i32) memory.size local.tee $2 @@ -1450,7 +1448,7 @@ i32.shl call $~lib/rt/tlsf/addMemory ) - (func $~lib/rt/tlsf/prepareBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1526,7 +1524,7 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) global.get $~lib/rt/tlsf/collectLock @@ -1608,7 +1606,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1616,7 +1614,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String.fromCharCode (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 2 @@ -1639,7 +1637,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 24 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 23 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1658,11 +1656,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 25 ;) (param $0 i32) + (func $~setArgumentsLength (; 24 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 25 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1713,53 +1711,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#startsWith (; 27 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 608 - local.tee $1 - i32.eqz - if - i32.const 640 - local.set $2 - i32.const 608 - call $~lib/rt/pure/__release - i32.const 640 - local.set $1 - end - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $3 - i32.const 0 - local.get $3 - i32.lt_s - select - local.tee $4 - local.get $1 - call $~lib/string/String#get:length - local.tee $2 - i32.add - local.get $3 - i32.gt_s - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $0 - local.get $4 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/string/String#indexOf (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1819,7 +1771,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1992,7 +1944,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -2017,7 +1969,7 @@ end end ) - (func $~lib/string/String#padStart (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2098,7 +2050,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2180,7 +2132,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2240,7 +2192,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 32 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2278,7 +2230,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 35 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 33 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2342,7 +2294,7 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 36 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2400,7 +2352,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 37 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 35 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2454,7 +2406,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 38 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2541,7 +2493,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 39 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 37 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2758,7 +2710,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 40 ;) (result i32) + (func $~lib/util/string/strtol (; 38 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2976,7 +2928,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 41 ;) (result i64) + (func $~lib/util/string/strtol (; 39 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3196,7 +3148,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 42 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 40 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3230,7 +3182,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 43 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 41 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3307,7 +3259,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 44 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 42 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -4055,7 +4007,7 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String#concat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4064,8 +4016,6 @@ local.tee $1 i32.eqz if - i32.const 640 - local.set $3 local.get $1 i32.const 640 i32.ne @@ -4076,53 +4026,51 @@ i32.const 640 local.set $1 end - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat + local.get $0 + i32.const 640 + local.get $0 + select + local.tee $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $2 local.get $1 - call $~lib/rt/pure/__release - i32.const 272 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add local.tee $0 - return + i32.eqz + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 272 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $0 + local.get $3 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release end - local.get $2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.tee $2 - local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $~lib/string/String.__concat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 640 local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $~lib/string/String.__gt (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4169,7 +4117,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 45 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4216,7 +4164,7 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4275,7 +4223,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4372,7 +4320,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 51 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 48 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4414,7 +4362,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 52 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 49 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -4427,7 +4375,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4530,7 +4478,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 51 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -4539,7 +4487,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#replaceAll (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4832,7 +4780,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 call $~lib/string/String#get:length @@ -4906,7 +4854,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -4963,7 +4911,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -5042,7 +4990,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 59 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 56 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5070,7 +5018,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 60 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5281,19 +5229,29 @@ end end ) - (func $~lib/array/ensureSize (; 61 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 58 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 + (local $5 i32) + (local $6 i32) + (local $7 i32) + local.get $0 + i32.load offset=12 + local.tee $6 + i32.const 1 + i32.add + local.tee $3 + local.set $2 + local.get $3 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 i32.const 2 i32.shr_u i32.gt_u if - local.get $1 + local.get $2 i32.const 268435452 i32.gt_u if @@ -5304,51 +5262,39 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 local.get $0 i32.load - local.tee $4 - local.get $1 + local.tee $7 + local.get $2 i32.const 2 i32.shl - local.tee $3 + local.tee $5 call $~lib/rt/tlsf/__realloc - local.tee $1 + local.tee $2 i32.add - local.get $3 - local.get $2 + local.get $5 + local.get $4 i32.sub call $~lib/memory/memory.fill - local.get $1 - local.get $4 + local.get $2 + local.get $7 i32.ne if local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 end local.get $0 - local.get $3 + local.get $5 i32.store offset=8 end - ) - (func $~lib/array/Array<~lib/string/String>#push (; 62 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - local.get $0 - i32.load offset=12 - local.tee $2 - i32.const 1 - i32.add - local.tee $3 - call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $2 + local.get $6 i32.const 2 i32.shl i32.add @@ -5359,7 +5305,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5571,7 +5517,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5606,7 +5552,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 65 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 61 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5654,7 +5600,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5678,7 +5624,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 67 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 63 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5720,7 +5666,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 68 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 64 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5743,7 +5689,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 69 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 65 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -5796,7 +5742,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 70 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -5823,7 +5769,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 71 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 67 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5866,7 +5812,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 72 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 68 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5930,7 +5876,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 73 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 69 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6320,7 +6266,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6565,7 +6511,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 75 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 71 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -6874,7 +6820,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 76 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 72 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6929,7 +6875,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 77 ;) + (func $start:std/string (; 73 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7264,7 +7210,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode|trampoline - local.tee $5 + local.tee $6 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7280,7 +7226,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode|trampoline - local.tee $6 + local.tee $7 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7296,7 +7242,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode|trampoline - local.tee $7 + local.tee $8 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7311,7 +7257,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $8 + local.tee $9 i32.const 496 call $~lib/string/String.__eq i32.eqz @@ -7325,7 +7271,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $9 + local.tee $10 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7339,7 +7285,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $10 + local.tee $11 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7353,7 +7299,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $11 + local.tee $12 i32.const 576 call $~lib/string/String.__eq i32.eqz @@ -7366,7 +7312,52 @@ unreachable end global.get $std/string/str - call $~lib/string/String#startsWith + local.set $5 + i32.const 608 + local.tee $2 + i32.eqz + if + i32.const 640 + local.set $1 + i32.const 608 + call $~lib/rt/pure/__release + i32.const 640 + local.set $2 + end + block $__inlined_func$~lib/string/String#startsWith + i32.const 0 + local.get $5 + call $~lib/string/String#get:length + local.tee $0 + i32.const 0 + local.get $0 + i32.lt_s + select + local.tee $4 + local.get $2 + call $~lib/string/String#get:length + local.tee $1 + i32.add + local.get $0 + i32.gt_s + if + local.get $2 + call $~lib/rt/pure/__release + i32.const 0 + local.set $1 + br $__inlined_func$~lib/string/String#startsWith + end + local.get $5 + local.get $4 + local.get $2 + local.get $1 + call $~lib/util/string/compareImpl + i32.eqz + local.set $1 + local.get $2 + call $~lib/rt/pure/__release + end + local.get $1 i32.eqz if i32.const 0 @@ -7430,7 +7421,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padStart - local.tee $12 + local.tee $13 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7446,7 +7437,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padStart - local.tee $13 + local.tee $14 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7462,7 +7453,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padStart - local.tee $14 + local.tee $15 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7478,7 +7469,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padStart - local.tee $15 + local.tee $16 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7494,7 +7485,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padStart - local.tee $16 + local.tee $17 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7510,7 +7501,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padStart - local.tee $17 + local.tee $18 i32.const 832 call $~lib/string/String.__eq i32.eqz @@ -7526,7 +7517,7 @@ i32.const 6 i32.const 864 call $~lib/string/String#padStart - local.tee $18 + local.tee $19 i32.const 896 call $~lib/string/String.__eq i32.eqz @@ -7542,7 +7533,7 @@ i32.const 8 i32.const 864 call $~lib/string/String#padStart - local.tee $19 + local.tee $20 i32.const 928 call $~lib/string/String.__eq i32.eqz @@ -7558,7 +7549,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padEnd - local.tee $20 + local.tee $21 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7574,7 +7565,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padEnd - local.tee $21 + local.tee $22 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7590,7 +7581,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padEnd - local.tee $22 + local.tee $23 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7606,7 +7597,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padEnd - local.tee $23 + local.tee $24 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7622,7 +7613,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padEnd - local.tee $24 + local.tee $25 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7638,7 +7629,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padEnd - local.tee $25 + local.tee $26 i32.const 960 call $~lib/string/String.__eq i32.eqz @@ -7654,7 +7645,7 @@ i32.const 6 i32.const 800 call $~lib/string/String#padEnd - local.tee $26 + local.tee $27 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -7670,7 +7661,7 @@ i32.const 8 i32.const 800 call $~lib/string/String#padEnd - local.tee $27 + local.tee $28 i32.const 1024 call $~lib/string/String.__eq i32.eqz @@ -8093,7 +8084,7 @@ end i32.const 272 call $~lib/string/String#trimStart - local.tee $28 + local.tee $29 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8107,7 +8098,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $29 + local.tee $30 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8121,7 +8112,7 @@ end i32.const 1312 call $~lib/string/String#trimStart - local.tee $30 + local.tee $31 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8135,7 +8126,7 @@ end i32.const 272 call $~lib/string/String#trimEnd - local.tee $31 + local.tee $32 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8149,7 +8140,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $32 + local.tee $33 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8163,7 +8154,7 @@ end i32.const 1312 call $~lib/string/String#trimEnd - local.tee $33 + local.tee $34 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -8177,7 +8168,7 @@ end i32.const 272 call $~lib/string/String#trim - local.tee $34 + local.tee $35 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8191,7 +8182,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $35 + local.tee $36 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8205,7 +8196,7 @@ end i32.const 1312 call $~lib/string/String#trim - local.tee $36 + local.tee $37 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -9882,16 +9873,16 @@ i32.const 6864 i32.const 7024 call $~lib/string/String.__concat - local.tee $37 + local.tee $38 i32.const 7184 call $~lib/string/String.__concat - local.tee $38 + local.tee $39 i32.const 7344 call $~lib/string/String.__concat - local.tee $39 + local.tee $40 i32.const 7504 call $~lib/string/String.__concat - local.tee $40 + local.tee $41 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10616,7 +10607,7 @@ i32.const 272 i32.const 100 call $~lib/string/String#repeat - local.tee $41 + local.tee $42 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10631,7 +10622,7 @@ i32.const 320 i32.const 0 call $~lib/string/String#repeat - local.tee $42 + local.tee $43 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10646,7 +10637,7 @@ i32.const 320 i32.const 1 call $~lib/string/String#repeat - local.tee $43 + local.tee $44 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -10661,7 +10652,7 @@ i32.const 320 i32.const 2 call $~lib/string/String#repeat - local.tee $44 + local.tee $45 i32.const 10864 call $~lib/string/String.__eq i32.eqz @@ -10676,7 +10667,7 @@ i32.const 320 i32.const 3 call $~lib/string/String#repeat - local.tee $45 + local.tee $46 i32.const 10944 call $~lib/string/String.__eq i32.eqz @@ -10691,7 +10682,7 @@ i32.const 10448 i32.const 4 call $~lib/string/String#repeat - local.tee $46 + local.tee $47 i32.const 10976 call $~lib/string/String.__eq i32.eqz @@ -10706,7 +10697,7 @@ i32.const 320 i32.const 5 call $~lib/string/String#repeat - local.tee $47 + local.tee $48 i32.const 11008 call $~lib/string/String.__eq i32.eqz @@ -10721,7 +10712,7 @@ i32.const 320 i32.const 6 call $~lib/string/String#repeat - local.tee $48 + local.tee $49 i32.const 11040 call $~lib/string/String.__eq i32.eqz @@ -10736,7 +10727,7 @@ i32.const 320 i32.const 7 call $~lib/string/String#repeat - local.tee $49 + local.tee $50 i32.const 11072 call $~lib/string/String.__eq i32.eqz @@ -10752,7 +10743,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $50 + local.tee $51 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10768,7 +10759,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $51 + local.tee $52 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10784,7 +10775,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replace - local.tee $52 + local.tee $53 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10800,7 +10791,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $53 + local.tee $54 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10816,7 +10807,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $54 + local.tee $55 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10832,7 +10823,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replace - local.tee $55 + local.tee $56 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10848,7 +10839,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replace - local.tee $56 + local.tee $57 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10864,7 +10855,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replace - local.tee $57 + local.tee $58 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10880,7 +10871,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $58 + local.tee $59 i32.const 11136 call $~lib/string/String.__eq i32.eqz @@ -10896,7 +10887,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $59 + local.tee $60 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10912,7 +10903,7 @@ i32.const 11232 i32.const 4576 call $~lib/string/String#replace - local.tee $60 + local.tee $61 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10928,7 +10919,7 @@ i32.const 11264 i32.const 11296 call $~lib/string/String#replace - local.tee $61 + local.tee $62 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -10944,7 +10935,7 @@ i32.const 11264 i32.const 272 call $~lib/string/String#replace - local.tee $62 + local.tee $63 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10960,7 +10951,7 @@ i32.const 272 i32.const 800 call $~lib/string/String#replaceAll - local.tee $63 + local.tee $64 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10976,7 +10967,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $64 + local.tee $65 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10992,7 +10983,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $65 + local.tee $66 i32.const 11296 call $~lib/string/String.__eq i32.eqz @@ -11008,7 +10999,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $66 + local.tee $67 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -11024,7 +11015,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replaceAll - local.tee $67 + local.tee $68 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -11040,7 +11031,7 @@ i32.const 320 i32.const 11408 call $~lib/string/String#replaceAll - local.tee $68 + local.tee $69 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -11056,7 +11047,7 @@ i32.const 10448 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $69 + local.tee $70 i32.const 11520 call $~lib/string/String.__eq i32.eqz @@ -11072,7 +11063,7 @@ i32.const 11584 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $70 + local.tee $71 i32.const 11616 call $~lib/string/String.__eq i32.eqz @@ -11088,7 +11079,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $71 + local.tee $72 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11104,7 +11095,7 @@ i32.const 11648 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $72 + local.tee $73 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11120,7 +11111,7 @@ i32.const 11680 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $73 + local.tee $74 i32.const 11712 call $~lib/string/String.__eq i32.eqz @@ -11136,7 +11127,7 @@ i32.const 10448 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $74 + local.tee $75 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11152,7 +11143,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $75 + local.tee $76 i32.const 11744 call $~lib/string/String.__eq i32.eqz @@ -11168,7 +11159,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $76 + local.tee $77 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11184,7 +11175,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $77 + local.tee $78 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11200,7 +11191,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replaceAll - local.tee $78 + local.tee $79 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11216,7 +11207,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $79 + local.tee $80 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11232,7 +11223,7 @@ i32.const 800 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $80 + local.tee $81 i32.const 4608 call $~lib/string/String.__eq i32.eqz @@ -11248,7 +11239,7 @@ i32.const 1216 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $81 + local.tee $82 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11264,7 +11255,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $82 + local.tee $83 i32.const 11776 call $~lib/string/String.__eq i32.eqz @@ -11280,7 +11271,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $83 + local.tee $84 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11300,7 +11291,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $84 + local.tee $85 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11316,7 +11307,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $85 + local.tee $86 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11332,7 +11323,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $86 + local.tee $87 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11348,7 +11339,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $87 + local.tee $88 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11364,7 +11355,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - local.tee $88 + local.tee $89 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -11380,7 +11371,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $89 + local.tee $90 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11396,7 +11387,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $90 + local.tee $91 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -11412,7 +11403,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $91 + local.tee $92 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11428,7 +11419,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $92 + local.tee $93 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11444,7 +11435,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $93 + local.tee $94 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11460,7 +11451,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $94 + local.tee $95 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -11476,7 +11467,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $95 + local.tee $96 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11492,7 +11483,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $96 + local.tee $97 i32.const 12064 call $~lib/string/String.__eq i32.eqz @@ -11508,7 +11499,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $97 + local.tee $98 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11524,7 +11515,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $98 + local.tee $99 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11540,7 +11531,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $99 + local.tee $100 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -11556,7 +11547,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $100 + local.tee $101 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11572,7 +11563,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $101 + local.tee $102 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11588,7 +11579,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $102 + local.tee $103 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11604,7 +11595,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $103 + local.tee $104 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11620,7 +11611,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $104 + local.tee $105 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11636,7 +11627,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $105 + local.tee $106 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11652,7 +11643,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $106 + local.tee $107 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -11668,7 +11659,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $107 + local.tee $108 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11684,7 +11675,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $108 + local.tee $109 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11700,7 +11691,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $109 + local.tee $110 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11716,7 +11707,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $110 + local.tee $111 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -12557,7 +12548,7 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/util/number/itoa32 - local.tee $111 + local.tee $112 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12571,7 +12562,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $112 + local.tee $113 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -12585,7 +12576,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $113 + local.tee $114 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -12599,7 +12590,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $114 + local.tee $115 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12613,7 +12604,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $115 + local.tee $116 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12627,7 +12618,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $116 + local.tee $117 i32.const 12640 call $~lib/string/String.__eq i32.eqz @@ -12641,7 +12632,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $117 + local.tee $118 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12655,7 +12646,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $118 + local.tee $119 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12669,7 +12660,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $119 + local.tee $120 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12683,7 +12674,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $120 + local.tee $121 i32.const 12768 call $~lib/string/String.__eq i32.eqz @@ -12697,7 +12688,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $121 + local.tee $122 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12711,7 +12702,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $122 + local.tee $123 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -12725,7 +12716,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $123 + local.tee $124 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -12739,7 +12730,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $124 + local.tee $125 i32.const 12912 call $~lib/string/String.__eq i32.eqz @@ -12753,7 +12744,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $125 + local.tee $126 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12767,7 +12758,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $126 + local.tee $127 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -12781,7 +12772,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $127 + local.tee $128 i32.const 13056 call $~lib/string/String.__eq i32.eqz @@ -12795,7 +12786,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $128 + local.tee $129 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12809,7 +12800,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $129 + local.tee $130 i32.const 13088 call $~lib/string/String.__eq i32.eqz @@ -12823,7 +12814,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $130 + local.tee $131 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12837,7 +12828,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $131 + local.tee $132 i32.const 13120 call $~lib/string/String.__eq i32.eqz @@ -12851,7 +12842,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $132 + local.tee $133 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12865,7 +12856,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $133 + local.tee $134 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12879,7 +12870,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $134 + local.tee $135 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12893,7 +12884,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $135 + local.tee $136 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12907,7 +12898,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $136 + local.tee $137 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12921,7 +12912,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $137 + local.tee $138 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12935,7 +12926,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $138 + local.tee $139 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12949,7 +12940,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $139 + local.tee $140 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12963,7 +12954,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $140 + local.tee $141 i32.const 13216 call $~lib/string/String.__eq i32.eqz @@ -12977,7 +12968,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $141 + local.tee $142 i32.const 13248 call $~lib/string/String.__eq i32.eqz @@ -12991,7 +12982,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $142 + local.tee $143 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13005,7 +12996,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $143 + local.tee $144 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13019,7 +13010,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $144 + local.tee $145 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13033,7 +13024,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $145 + local.tee $146 i32.const 13392 call $~lib/string/String.__eq i32.eqz @@ -13047,7 +13038,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $146 + local.tee $147 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -13061,7 +13052,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $147 + local.tee $148 i32.const 13488 call $~lib/string/String.__eq i32.eqz @@ -13075,7 +13066,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $148 + local.tee $149 i32.const 13536 call $~lib/string/String.__eq i32.eqz @@ -13089,7 +13080,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $149 + local.tee $150 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -13103,7 +13094,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $150 + local.tee $151 i32.const 13632 call $~lib/string/String.__eq i32.eqz @@ -13117,7 +13108,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $151 + local.tee $152 i32.const 13696 call $~lib/string/String.__eq i32.eqz @@ -13131,7 +13122,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $152 + local.tee $153 i32.const 13760 call $~lib/string/String.__eq i32.eqz @@ -13145,7 +13136,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $153 + local.tee $154 i32.const 13824 call $~lib/string/String.__eq i32.eqz @@ -13159,7 +13150,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $154 + local.tee $155 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13173,7 +13164,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $155 + local.tee $156 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -13187,7 +13178,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $156 + local.tee $157 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13201,7 +13192,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $157 + local.tee $158 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13215,7 +13206,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $158 + local.tee $159 i32.const 13920 call $~lib/string/String.__eq i32.eqz @@ -13229,7 +13220,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $159 + local.tee $160 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13243,7 +13234,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $160 + local.tee $161 i32.const 13968 call $~lib/string/String.__eq i32.eqz @@ -13257,7 +13248,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $161 + local.tee $162 i32.const 14016 call $~lib/string/String.__eq i32.eqz @@ -13271,7 +13262,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $162 + local.tee $163 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -13285,7 +13276,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $163 + local.tee $164 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -13299,7 +13290,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $164 + local.tee $165 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -13313,7 +13304,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $165 + local.tee $166 i32.const 14240 call $~lib/string/String.__eq i32.eqz @@ -13327,7 +13318,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $166 + local.tee $167 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13341,7 +13332,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $167 + local.tee $168 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13355,7 +13346,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $168 + local.tee $169 i32.const 4832 call $~lib/string/String.__eq i32.eqz @@ -13369,7 +13360,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $169 + local.tee $170 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13383,7 +13374,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $170 + local.tee $171 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13397,7 +13388,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $171 + local.tee $172 i32.const 5344 call $~lib/string/String.__eq i32.eqz @@ -13411,7 +13402,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $172 + local.tee $173 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -13425,7 +13416,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $173 + local.tee $174 i32.const 5408 call $~lib/string/String.__eq i32.eqz @@ -13439,7 +13430,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $174 + local.tee $175 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -13453,7 +13444,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $175 + local.tee $176 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -13467,7 +13458,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $176 + local.tee $177 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -13481,7 +13472,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $177 + local.tee $178 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -13495,7 +13486,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $178 + local.tee $179 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -13509,7 +13500,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $179 + local.tee $180 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -13523,7 +13514,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $180 + local.tee $181 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -13537,7 +13528,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $181 + local.tee $182 i32.const 5472 call $~lib/string/String.__eq i32.eqz @@ -13551,7 +13542,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $182 + local.tee $183 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13565,7 +13556,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $183 + local.tee $184 i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -13579,7 +13570,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $184 + local.tee $185 i32.const 15872 call $~lib/string/String.__eq i32.eqz @@ -13593,7 +13584,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $185 + local.tee $186 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -13607,7 +13598,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $186 + local.tee $187 i32.const 15936 call $~lib/string/String.__eq i32.eqz @@ -13621,7 +13612,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $187 + local.tee $188 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -13635,7 +13626,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $188 + local.tee $189 i32.const 16016 call $~lib/string/String.__eq i32.eqz @@ -13649,7 +13640,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $189 + local.tee $190 i32.const 16064 call $~lib/string/String.__eq i32.eqz @@ -13663,7 +13654,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $190 + local.tee $191 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -13677,7 +13668,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $191 + local.tee $192 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -13691,7 +13682,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $192 + local.tee $193 i32.const 2704 call $~lib/string/String.__eq i32.eqz @@ -13705,7 +13696,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $193 + local.tee $194 i32.const 16192 call $~lib/string/String.__eq i32.eqz @@ -13719,7 +13710,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $194 + local.tee $195 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13733,7 +13724,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $195 + local.tee $196 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13747,7 +13738,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $196 + local.tee $197 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -13761,7 +13752,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $197 + local.tee $198 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -13775,7 +13766,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $198 + local.tee $199 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -13789,7 +13780,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $199 + local.tee $200 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -13803,7 +13794,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $200 + local.tee $201 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13817,7 +13808,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $201 + local.tee $202 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -13831,7 +13822,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $202 + local.tee $203 i32.const 16400 call $~lib/string/String.__eq i32.eqz @@ -13845,7 +13836,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $203 + local.tee $204 i32.const 16464 call $~lib/string/String.__eq i32.eqz @@ -13859,7 +13850,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $204 + local.tee $205 i32.const 16528 call $~lib/string/String.__eq i32.eqz @@ -13873,7 +13864,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $205 + local.tee $206 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13887,7 +13878,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $206 + local.tee $207 i32.const 16592 call $~lib/string/String.__eq i32.eqz @@ -13901,7 +13892,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $207 + local.tee $208 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13915,7 +13906,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $208 + local.tee $209 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -13929,7 +13920,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $209 + local.tee $210 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13943,7 +13934,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $210 + local.tee $211 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -13957,7 +13948,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $211 + local.tee $5 i32.const 16832 call $~lib/string/String.__eq i32.eqz @@ -14027,8 +14018,6 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $7 @@ -14099,17 +14088,17 @@ call $~lib/rt/pure/__release local.get $40 call $~lib/rt/pure/__release - local.get $44 + local.get $41 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release - local.get $43 + local.get $46 call $~lib/rt/pure/__release - local.get $42 + local.get $44 call $~lib/rt/pure/__release - local.get $41 + local.get $43 call $~lib/rt/pure/__release - local.get $46 + local.get $42 call $~lib/rt/pure/__release local.get $47 call $~lib/rt/pure/__release @@ -14241,12 +14230,12 @@ call $~lib/rt/pure/__release local.get $111 call $~lib/rt/pure/__release - local.get $113 - call $~lib/rt/pure/__release local.get $112 call $~lib/rt/pure/__release local.get $114 call $~lib/rt/pure/__release + local.get $113 + call $~lib/rt/pure/__release local.get $115 call $~lib/rt/pure/__release local.get $116 @@ -14441,6 +14430,8 @@ call $~lib/rt/pure/__release local.get $211 call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $4 @@ -14450,11 +14441,11 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 78 ;) (result i32) + (func $std/string/getString (; 74 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 79 ;) + (func $~start (; 75 ;) global.get $~started if return @@ -14464,7 +14455,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 80 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 76 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14584,7 +14575,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 81 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 77 ;) (param $0 i32) local.get $0 i32.const 17000 i32.lt_u diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index c858d7e0c5..0a25108c6a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,11 +1,11 @@ (module - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (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))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -66,20 +66,46 @@ end local.get $0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (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 $0 - memory.size + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $4 + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u + select + local.tee $6 + i32.add local.tee $2 + memory.size + local.tee $5 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if + local.get $5 local.get $2 - local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -87,16 +113,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 - local.get $2 - local.get $1 + local.tee $3 + local.get $5 + local.get $3 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -105,42 +131,13 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 3 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $2 - i32.const 16 local.get $2 - i32.const 16 - i32.gt_u - select - local.tee $4 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $3 + global.set $~lib/rt/stub/offset + local.get $4 i32.const 16 i32.sub local.tee $2 - local.get $4 + local.get $6 i32.store local.get $2 i32.const 1 @@ -151,9 +148,9 @@ local.get $2 local.get $0 i32.store offset=12 - local.get $3 + local.get $4 ) - (func $~lib/memory/memory.fill (; 4 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -364,7 +361,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -385,7 +382,7 @@ call $~lib/memory/memory.fill local.get $1 ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (param $0 i32) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -418,7 +415,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/string/String#get:length (; 7 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -426,7 +423,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/hash/hashStr (; 8 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -466,7 +463,7 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -542,7 +539,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -574,7 +571,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 10 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 @@ -615,7 +612,7 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 12 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -728,7 +725,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 13 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 12 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -815,7 +812,7 @@ i32.store end ) - (func $~lib/util/hash/hash32 (; 14 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -846,7 +843,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -887,7 +884,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1000,7 +997,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1094,7 +1091,7 @@ i32.store end ) - (func $~lib/symbol/_Symbol.for (; 18 ;) (result i32) + (func $~lib/symbol/_Symbol.for (; 17 ;) (result i32) (local $0 i32) global.get $~lib/symbol/stringToId if @@ -1191,7 +1188,7 @@ call $~lib/map/Map#set local.get $0 ) - (func $~lib/map/Map#has (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1200,7 +1197,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1219,7 +1216,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/symbol/_Symbol.keyFor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.keyFor (; 20 ;) (param $0 i32) (result i32) global.get $~lib/symbol/idToString if (result i32) global.get $~lib/symbol/idToString @@ -1236,7 +1233,7 @@ i32.const 0 end ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1409,55 +1406,54 @@ end end ) - (func $~lib/string/String#concat (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 22 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $3 - local.get $1 - i32.const 832 - local.get $1 - select - local.tee $1 - call $~lib/string/String#get:length - i32.const 1 - i32.shl - local.tee $4 - i32.add - local.tee $2 - i32.eqz - if - i32.const 336 - return + block $__inlined_func$~lib/string/String#concat + local.get $0 + i32.const 832 + local.get $0 + select + local.tee $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $2 + local.get $1 + i32.const 832 + local.get $1 + select + local.tee $1 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.tee $4 + i32.add + local.tee $0 + i32.eqz + if + i32.const 336 + local.set $0 + br $__inlined_func$~lib/string/String#concat + end + local.get $0 + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $3 + local.get $2 + call $~lib/memory/memory.copy + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $4 + call $~lib/memory/memory.copy end - local.get $2 - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 local.get $0 - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - local.get $3 - i32.add - local.get $1 - local.get $4 - call $~lib/memory/memory.copy - local.get $2 - ) - (func $~lib/string/String.__concat (; 24 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.const 832 - local.get $0 - select - local.get $1 - call $~lib/string/String#concat ) - (func $~lib/symbol/_Symbol#toString (; 25 ;) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 23 ;) (param $0 i32) (result i32) i32.const 800 block $break|0 (result i32) block $case11|0 @@ -1533,7 +1529,7 @@ i32.const 864 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 26 ;) + (func $start:std/symbol (; 24 ;) (local $0 i32) call $~lib/symbol/Symbol global.set $std/symbol/sym1 @@ -1702,7 +1698,7 @@ unreachable end ) - (func $~start (; 27 ;) + (func $~start (; 25 ;) call $start:std/symbol ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 82ae054006..ab31da3a0b 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.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_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (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))) @@ -11,7 +11,6 @@ (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) - (type $i64_=>_i32 (func (param i64) (result i32))) (type $i64_i64_i32_i32_=>_i64 (func (param i64 i64 i32 i32) (result i64))) (type $i32_i32_i64_=>_none (func (param i32 i32 i64))) (type $i64_i32_i32_=>_none (func (param i64 i32 i32))) @@ -32,6 +31,7 @@ (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f32_=>_i32 (func (param i32 f32) (result i32))) + (type $i64_=>_i32 (func (param i64) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_i32_i32_=>_i64 (func (param i64 i32 i32) (result i64))) @@ -1465,48 +1465,9 @@ end end ) - (func $~lib/rt/pure/increment (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 256 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 256 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (local $2 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1514,11 +1475,48 @@ local.get $0 i32.const 16 i32.sub - call $~lib/rt/pure/increment + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 256 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $1 + call $~lib/rt/rtrace/onincrement + local.get $1 + i32.load + i32.const 1 + i32.and + if + i32.const 0 + i32.const 256 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable + end end local.get $0 ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1529,7 +1527,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1598,7 +1596,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 22 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 21 ;) (param $0 i32) (result i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1607,14 +1605,14 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 23 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/typedarray/Uint8Array#constructor (; 24 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 23 ;) (param $0 i32) (result i32) i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -1623,7 +1621,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 25 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (param $0 i32) (result i32) i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -1632,7 +1630,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 26 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 25 ;) (param $0 i32) (result i32) i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -1641,7 +1639,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 27 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 26 ;) (param $0 i32) (result i32) i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc @@ -1650,7 +1648,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 28 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 27 ;) (param $0 i32) (result i32) i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc @@ -1659,7 +1657,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 29 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 28 ;) (param $0 i32) (result i32) i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -1668,7 +1666,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 30 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 29 ;) (param $0 i32) (result i32) i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -1677,7 +1675,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 31 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (param $0 i32) (result i32) i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc @@ -1686,7 +1684,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (param $0 i32) (result i32) i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -1695,7 +1693,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 33 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (param $0 i32) (result i32) i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -1704,7 +1702,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 34 ;) (param $0 i32) + (func $std/typedarray/testInstantiate (; 33 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2167,7 +2165,7 @@ local.get $11 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#__set (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2191,7 +2189,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 36 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2214,7 +2212,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2298,7 +2296,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 38 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2322,7 +2320,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2406,11 +2404,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 40 ;) (param $0 i32) + (func $~setArgumentsLength (; 39 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 41 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2488,7 +2486,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 42 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 41 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2530,7 +2528,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 42 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2543,7 +2541,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/util/sort/weakHeapSort (; 44 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 43 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2802,68 +2800,7 @@ local.get $4 f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 45 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 f64) - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $1 - i32.const 1 - i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.load offset=4 - local.set $0 - local.get $1 - i32.const 2 - i32.eq - if - local.get $0 - f64.load offset=8 - local.set $3 - local.get $0 - f64.load - local.set $4 - i32.const 2 - global.set $~argumentsLength - local.get $3 - local.get $4 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.get $4 - f64.store offset=8 - local.get $0 - local.get $3 - f64.store - end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $1 - i32.const 256 - i32.lt_s - if - local.get $0 - local.get $1 - call $~lib/util/sort/insertionSort - else - local.get $0 - local.get $1 - call $~lib/util/sort/weakHeapSort - end - end - local.get $2 - ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 46 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 44 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2892,7 +2829,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 47 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 45 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2915,7 +2852,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2947,7 +2884,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 47 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2966,7 +2903,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2986,7 +2923,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3055,7 +2992,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3228,7 +3165,7 @@ end end ) - (func $~lib/rt/__allocArray (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3266,7 +3203,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 52 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3285,14 +3222,14 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 55 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 54 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3347,7 +3284,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3425,7 +3362,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3506,7 +3443,7 @@ end local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3515,7 +3452,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3532,7 +3469,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 59 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3576,7 +3513,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3655,7 +3592,7 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3763,12 +3700,12 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3788,7 +3725,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 66 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 64 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3825,7 +3762,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3849,7 +3786,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3873,7 +3810,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int32Array#reduce (; 69 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 67 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3914,7 +3851,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint32Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3938,7 +3875,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int64Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3962,12 +3899,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 72 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 70 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 73 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 71 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4008,7 +3945,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint64Array#__set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4032,7 +3969,7 @@ local.get $2 i64.store ) - (func $~lib/typedarray/Float32Array#__set (; 75 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -4056,17 +3993,17 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 76 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 74 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 77 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 75 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 76 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4104,7 +4041,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int32Array#reduceRight (; 79 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 77 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4146,7 +4083,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (; 80 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4188,89 +4125,84 @@ end local.get $3 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 82 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 80 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc local.set $0 - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_s - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_s + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 83 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - 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 $0 i32.const 0 call $~lib/typedarray/Int8Array#__get @@ -4315,103 +4247,98 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#map (; 84 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 368 + i32.const 432 + i32.const 152 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 82 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc local.set $0 - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_u - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 152 - i32.const 44 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_u - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 86 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get @@ -4456,84 +4383,79 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 87 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 83 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 + (local $6 i32) + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 + local.get $1 i32.load offset=8 - local.set $2 - local.get $0 + local.set $3 + local.get $1 i32.load offset=4 - local.set $4 + local.set $5 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc local.set $0 - local.get $2 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $4 loop $for-loop|0 - local.get $1 local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - local.get $1 + local.get $2 local.get $4 i32.add - i32.load8_u - local.tee $5 + local.get $2 local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 i32.mul i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 88 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 $0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get @@ -4578,7 +4500,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#map (; 89 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 84 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4648,7 +4570,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4671,7 +4593,7 @@ i32.add i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 91 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 86 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4735,7 +4657,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#map (; 92 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 87 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4805,7 +4727,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint16Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 88 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4828,7 +4750,7 @@ i32.add i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 94 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 89 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -4892,7 +4814,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#map (; 95 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 90 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4962,7 +4884,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 96 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 91 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5026,7 +4948,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#map (; 97 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 92 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5096,7 +5018,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint32Array#__get (; 98 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -5119,7 +5041,7 @@ i32.add i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 99 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 94 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5183,12 +5105,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 100 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 95 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 101 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 96 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -5258,7 +5180,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#__get (; 102 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5281,7 +5203,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 103 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 98 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5345,7 +5267,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#map (; 104 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 99 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i64) @@ -5415,7 +5337,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint64Array#__get (; 105 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Uint64Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -5438,7 +5360,7 @@ i32.add i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 106 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 101 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5502,12 +5424,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 107 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 108 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5577,7 +5499,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float32Array#__get (; 109 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 104 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -5600,7 +5522,7 @@ i32.add f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 110 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 105 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5664,12 +5586,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 111 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 106 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 112 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 107 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -5739,7 +5661,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 113 ;) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 108 ;) (local $0 i32) (local $1 i32) i32.const 3 @@ -5803,7 +5725,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 109 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -5812,7 +5734,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/rt/tlsf/reallocateBlock (; 115 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5915,7 +5837,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 116 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 111 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -5924,7 +5846,7 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (; 117 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#filter (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5998,7 +5920,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 118 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 113 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6091,14 +6013,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 120 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#filter (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6172,7 +6094,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 121 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 116 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6265,7 +6187,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 122 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 117 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6339,7 +6261,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 123 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 118 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6432,7 +6354,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -6441,7 +6363,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 125 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 120 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6526,7 +6448,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 126 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 121 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6621,14 +6543,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 128 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 123 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6713,7 +6635,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 129 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 124 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6808,12 +6730,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 125 ;) (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 (; 131 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 126 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6896,7 +6818,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 132 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 127 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6991,12 +6913,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 134 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 129 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7079,7 +7001,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 135 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 130 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7174,12 +7096,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 136 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 137 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 132 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7262,7 +7184,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 138 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 133 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7357,12 +7279,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 139 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 134 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 140 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 135 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7445,7 +7367,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 141 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 136 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7540,12 +7462,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 142 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 137 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 143 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 138 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7628,7 +7550,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 144 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 139 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7723,12 +7645,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 145 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 140 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 146 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 141 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7811,7 +7733,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 147 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 142 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -7906,14 +7828,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 148 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 149 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7952,57 +7874,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 151 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - 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 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 47 - call $~lib/typedarray/Int8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#some (; 152 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 146 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8041,102 +7919,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 153 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 154 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 156 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8179,57 +7969,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 158 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 53 - call $~lib/typedarray/Int16Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#some (; 159 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 150 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8272,56 +8018,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 160 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 162 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8364,104 +8066,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 163 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 164 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - 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 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 57 - call $~lib/typedarray/Int32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 165 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 58 - call $~lib/typedarray/Int32Array#some i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 59 - call $~lib/typedarray/Int32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 154 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 167 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8504,104 +8118,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 168 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 156 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 169 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 61 - call $~lib/typedarray/Int64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 170 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 63 - call $~lib/typedarray/Int64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 171 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 157 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 172 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8644,61 +8170,17 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 173 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 159 ;) (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/Float32Array,f32> (; 174 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - 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 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 65 - call $~lib/typedarray/Float32Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 175 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 160 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 176 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 161 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8741,59 +8223,15 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 177 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 162 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 178 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - 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 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 415 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 67 - call $~lib/typedarray/Float64Array#some - if - i32.const 0 - i32.const 304 - i32.const 417 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#findIndex (; 179 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Int8Array#findIndex (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=4 local.set $3 @@ -8829,61 +8267,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 180 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 181 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - 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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#findIndex (; 182 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 165 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8922,101 +8313,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 183 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 184 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#findIndex (; 185 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 166 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9059,61 +8356,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 186 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 187 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#findIndex (; 188 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9156,54 +8406,7 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 189 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array#findIndex (; 190 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 169 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9246,114 +8449,20 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 191 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 170 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 192 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set + i32.load offset=4 + local.set $3 local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 193 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#findIndex (; 194 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 + i32.load offset=8 i32.const 3 i32.shr_u local.set $4 @@ -9388,106 +8497,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 195 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 172 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 196 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 197 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#findIndex (; 198 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 173 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9530,59 +8545,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 199 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 174 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 200 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - 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 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#findIndex (; 201 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 175 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9625,59 +8593,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 202 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 176 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 203 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - 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 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 438 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 440 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 204 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9687,7 +8608,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 205 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 178 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9727,57 +8648,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 206 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) 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 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 91 - call $~lib/typedarray/Int8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 207 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 1 - i32.and + i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 208 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 180 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9817,95 +8694,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 209 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - 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 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 210 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - 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 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 211 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 181 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9915,7 +8704,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 212 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 182 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9959,51 +8748,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 213 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 97 - call $~lib/typedarray/Int16Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#every (; 214 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 183 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10047,57 +8792,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 215 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 216 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 184 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 217 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 185 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10141,101 +8842,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 218 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - 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 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 101 - call $~lib/typedarray/Int32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 219 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - 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 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 103 - call $~lib/typedarray/Int32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 220 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 186 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 221 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 187 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10279,106 +8892,18 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 222 ;) - (local $0 i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 188 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 2 + i64.rem_u + i64.eqz + ) + (func $~lib/math/NativeMathf.mod (; 189 ;) (param $0 f32) (result f32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - 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 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 105 - call $~lib/typedarray/Int64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 223 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 2 - i64.rem_u - i64.eqz - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 224 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - 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 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 107 - call $~lib/typedarray/Int64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/math/NativeMathf.mod (; 225 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 1 + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 1 i32.const 0 local.get $0 i32.reinterpret_f32 @@ -10520,13 +9045,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 226 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 190 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 227 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 191 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10570,51 +9095,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 228 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - 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 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 109 - call $~lib/typedarray/Float32Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/math/NativeMath.mod (; 229 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 192 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -10768,13 +9249,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 230 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 193 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 231 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 194 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10818,51 +9299,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 232 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - 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 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 461 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 111 - call $~lib/typedarray/Float64Array#every - if - i32.const 0 - i32.const 304 - i32.const 463 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 233 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 195 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -10907,91 +9344,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 234 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - 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.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $3 - i32.add - i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#forEach (; 235 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 196 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11024,117 +9377,56 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 236 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 197 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 i32.const 1696 - i32.const 1 + local.get $1 call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 113 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 490 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 237 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 114 - call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount - i32.const 3 + local.get $1 i32.ne if i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 491 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 65535 - i32.and + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 198 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get - i32.const 65535 - i32.and + local.get $0 i32.ne if i32.const 0 @@ -11171,182 +9463,171 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 239 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 199 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - 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.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $4 loop $for-loop|0 - local.get $1 + local.get $2 local.get $4 i32.lt_s if i32.const 3 global.set $~argumentsLength local.get $3 - local.get $1 - i32.const 1 + local.get $2 + i32.const 2 i32.shl i32.add - i32.load16_s - local.get $1 + i32.load + local.get $2 local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 200 ;) (param $0 i64) (param $1 i32) (param $2 i32) + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + local.get $0 + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $std/typedarray/forEachCallCount - i32.const 3 + local.get $1 i32.ne if i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 491 + i32.const 4 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachSelf local.get $2 - call $~lib/rt/pure/__release + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 240 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 201 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $4 loop $for-loop|0 - local.get $1 + local.get $2 local.get $4 i32.lt_s if i32.const 3 global.set $~argumentsLength local.get $3 - local.get $1 - i32.const 1 + local.get $2 + i32.const 3 i32.shl i32.add - i32.load16_u - local.get $1 + i64.load + local.get $2 local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 + call_indirect (type $i64_i32_i32_=>_none) + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 202 ;) (param $0 f32) (param $1 i32) (param $2 i32) + local.get $0 + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $std/typedarray/forEachCallCount - i32.const 3 + local.get $1 i32.ne if i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 491 + i32.const 4 call $~lib/builtins/abort unreachable end + global.get $std/typedarray/forEachSelf local.get $2 - call $~lib/rt/pure/__release + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 203 ;) (param $0 f64) (param $1 i32) (param $2 i32) + local.get $0 i32.const 1696 local.get $1 call $~lib/array/Array#__get - local.get $0 - i32.ne + f64.convert_i32_s + f64.ne if i32.const 0 i32.const 304 @@ -11382,551 +9663,687 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 242 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#reverse (; 204 ;) (param $0 i32) (result 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.tee $3 i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u local.set $4 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + local.get $0 + local.get $1 + i32.lt_u if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 2 - i32.shl + local.get $0 + local.get $4 i32.add - i32.load + local.tee $2 + i32.load8_s + local.set $5 local.get $2 - local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_none) + local.get $4 + i32.add + local.tee $2 + i32.load8_s + i32.store8 local.get $2 + local.get $5 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 br $for-loop|0 end end + local.get $3 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 243 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 205 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 + 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 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $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.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Int8Array#reverse + call $~lib/rt/pure/__release i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor + 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/Int8Array#__get + i32.const 1792 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + 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 4 + i32.const 8 + call $~lib/typedarray/Int8Array#subarray local.tee $1 + call $~lib/typedarray/Int8Array#reverse local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 117 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 529 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 244 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 118 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 530 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 245 ;) (param $0 i64) (param $1 i32) (param $2 i32) - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s local.get $0 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 490 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - local.get $1 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 491 - i32.const 4 + i32.const 531 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 492 - i32.const 4 + i32.const 532 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#forEach (; 246 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#reverse (; 206 ;) (param $0 i32) (result 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.tee $3 i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u local.set $4 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + local.get $0 + local.get $1 + i32.lt_u if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 3 - i32.shl + local.get $0 + local.get $4 i32.add - i64.load + local.tee $2 + i32.load8_u + local.set $5 local.get $2 - local.get $0 local.get $1 - call_indirect (type $i64_i32_i32_=>_none) + local.get $4 + i32.add + local.tee $2 + i32.load8_u + i32.store8 local.get $2 + local.get $5 + i32.store8 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 br $for-loop|0 end end + local.get $3 + ) + (func $~lib/typedarray/Uint8Array#subarray (; 207 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.set $1 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 247 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 208 ;) (local $0 i32) (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + 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 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Uint8Array#reverse + call $~lib/rt/pure/__release i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor + 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/Uint8Array#__get + i32.const 1792 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + 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/Uint8Array#subarray local.tee $1 + call $~lib/typedarray/Uint8Array#reverse local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 529 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 248 ;) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 530 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 249 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 6 + i32.ne if i32.const 0 i32.const 304 - i32.const 490 - i32.const 4 + i32.const 531 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 491 - i32.const 4 + i32.const 532 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 209 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + local.tee $2 + i32.const 4 local.get $2 - i32.ne - if + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 304 - i32.const 492 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - global.get $std/typedarray/forEachCallCount - i32.const 1 + local.set $1 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + local.get $0 + i32.load offset=4 i32.add - global.set $std/typedarray/forEachCallCount + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 250 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 210 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.load offset=4 + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $5 local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 loop $for-loop|0 + local.get $0 local.get $1 - local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $3 - local.get $1 - i32.const 2 - i32.shl + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 i32.add - f32.load - local.get $1 + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Uint8Array#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 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 1792 local.get $1 i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 i32.add - local.set $1 - br $for-loop|0 + local.set $0 + br $for-loop|1 end end - global.get $std/typedarray/forEachCallCount - i32.const 3 + local.get $3 + i32.const 8 + call $~lib/typedarray/Uint8ClampedArray#subarray + local.tee $1 + call $~lib/typedarray/Uint8Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 8 i32.ne if i32.const 0 i32.const 304 - i32.const 495 + i32.const 529 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 251 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 + i32.ne if i32.const 0 i32.const 304 - i32.const 490 - i32.const 4 + i32.const 530 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 491 - i32.const 4 + i32.const 531 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 492 - i32.const 4 + i32.const 532 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 252 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.load offset=4 - local.set $3 + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 495 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (; 253 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 211 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11942,6 +10359,8 @@ local.get $3 i32.load offset=8 i32.const 1 + i32.shr_u + i32.const 1 i32.sub local.set $1 loop $for-loop|0 @@ -11949,22 +10368,26 @@ local.get $1 i32.lt_u if - local.get $0 local.get $4 + local.get $0 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_s + i32.load16_s local.set $5 local.get $2 - local.get $1 local.get $4 + local.get $1 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_s - i32.store8 + i32.load16_s + i32.store16 local.get $2 local.get $5 - i32.store8 + i32.store16 local.get $0 i32.const 1 i32.add @@ -11978,7 +10401,74 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 254 ;) + (func $~lib/typedarray/Int16Array#subarray (; 212 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.set $1 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 1 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 213 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11988,11 +10478,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -12005,21 +10495,21 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.add @@ -12028,7 +10518,7 @@ end end local.get $2 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Int16Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -12039,7 +10529,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -12047,9 +10537,9 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s i32.ne if @@ -12068,14 +10558,13 @@ end end local.get $3 - i32.const 4 i32.const 8 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Int16Array#subarray local.tee $1 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Int16Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 8 i32.ne if @@ -12088,7 +10577,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 7 i32.ne if @@ -12101,7 +10590,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 6 i32.ne if @@ -12114,7 +10603,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.ne if @@ -12134,7 +10623,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 255 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 214 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12150,6 +10639,8 @@ local.get $3 i32.load offset=8 i32.const 1 + i32.shr_u + i32.const 1 i32.sub local.set $1 loop $for-loop|0 @@ -12157,22 +10648,26 @@ local.get $1 i32.lt_u if - local.get $0 local.get $4 + local.get $0 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_u + i32.load16_u local.set $5 local.get $2 - local.get $1 local.get $4 + local.get $1 + i32.const 1 + i32.shl i32.add local.tee $2 - i32.load8_u - i32.store8 + i32.load16_u + i32.store16 local.get $2 local.get $5 - i32.store8 + i32.store16 local.get $0 i32.const 1 i32.add @@ -12186,12 +10681,14 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 256 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 215 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -12221,7 +10718,7 @@ end local.set $1 i32.const 12 - i32.const 4 + i32.const 7 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -12229,9 +10726,11 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $3 local.get $0 i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl i32.add i32.store offset=4 local.get $2 @@ -12243,11 +10742,13 @@ select local.get $3 i32.sub + i32.const 1 + i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 257 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 216 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12257,11 +10758,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -12274,17 +10775,17 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.add @@ -12293,7 +10794,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Uint16Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -12304,7 +10805,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -12312,7 +10813,7 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and i32.ne if @@ -12332,12 +10833,12 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Uint16Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.ne if @@ -12350,7 +10851,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.ne if @@ -12363,7 +10864,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.ne if @@ -12376,7 +10877,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne if @@ -12396,68 +10897,65 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 217 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.set $1 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $2 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 - local.get $0 + local.tee $3 i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select + local.set $4 + i32.const 0 + local.set $0 local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 i32.sub - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.tee $2 + i32.load + local.set $5 + local.get $2 + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $2 + i32.load + i32.store + local.get $2 + local.get $5 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|0 + end + end + local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 259 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 218 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12467,11 +10965,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -12484,17 +10982,13 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -12503,7 +10997,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -12514,7 +11008,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -12522,8 +11016,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne if i32.const 0 @@ -12541,13 +11033,14 @@ end end local.get $3 + i32.const 4 i32.const 8 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne if @@ -12560,7 +11053,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne if @@ -12573,7 +11066,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne if @@ -12586,7 +11079,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if @@ -12606,71 +11099,13 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 260 ;) (param $0 i32) (result 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.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - i32.store16 - local.get $2 - local.get $5 - i32.store16 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Int16Array#subarray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 219 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.tee $2 i32.const 4 @@ -12701,7 +11136,7 @@ end local.set $1 i32.const 12 - i32.const 6 + i32.const 9 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -12712,7 +11147,7 @@ local.get $0 i32.load offset=4 local.get $3 - i32.const 1 + i32.const 2 i32.shl i32.add i32.store offset=4 @@ -12725,13 +11160,13 @@ select local.get $3 i32.sub - i32.const 1 + i32.const 2 i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 262 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 220 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12741,11 +11176,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -12758,21 +11193,13 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.add @@ -12781,7 +11208,7 @@ end end local.get $2 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/Int32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -12792,7 +11219,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -12800,10 +11227,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s i32.ne if i32.const 0 @@ -12822,12 +11245,12 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Uint32Array#subarray local.tee $1 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne if @@ -12840,7 +11263,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne if @@ -12853,7 +11276,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne if @@ -12866,7 +11289,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if @@ -12886,12 +11309,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 263 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 221 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -12901,7 +11324,7 @@ local.set $0 local.get $3 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.const 1 i32.sub @@ -12913,24 +11336,24 @@ if local.get $4 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add local.tee $2 - i32.load16_u + i64.load local.set $5 local.get $2 local.get $4 local.get $1 - i32.const 1 + i32.const 3 i32.shl i32.add local.tee $2 - i32.load16_u - i32.store16 + i64.load + i64.store local.get $2 local.get $5 - i32.store16 + i64.store local.get $0 i32.const 1 i32.add @@ -12944,13 +11367,13 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 222 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.tee $2 i32.const 4 @@ -12981,7 +11404,7 @@ end local.set $1 i32.const 12 - i32.const 7 + i32.const 10 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -12992,7 +11415,7 @@ local.get $0 i32.load offset=4 local.get $3 - i32.const 1 + i32.const 3 i32.shl i32.add i32.store offset=4 @@ -13005,13 +11428,13 @@ select local.get $3 i32.sub - i32.const 1 + i32.const 3 i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 265 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 223 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13021,11 +11444,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -13038,17 +11461,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i32.add @@ -13057,7 +11478,7 @@ end end local.get $2 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/Int64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -13068,7 +11489,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Int64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -13076,9 +11497,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne + i64.extend_i32_s + i64.ne if i32.const 0 i32.const 304 @@ -13096,14 +11516,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Int64Array#subarray local.tee $1 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/Int64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 304 @@ -13114,9 +11534,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 304 @@ -13127,9 +11547,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 304 @@ -13140,9 +11560,9 @@ end local.get $0 i32.const 3 - 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 304 @@ -13160,65 +11580,74 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 266 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint64Array#subarray (; 224 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 4 local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $2 - i32.load - i32.store - local.get $2 - local.get $5 - i32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end + local.set $1 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select local.get $3 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 267 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 225 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13228,11 +11657,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -13245,13 +11674,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i32.add @@ -13260,7 +11691,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Int64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -13271,7 +11702,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Uint64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -13279,7 +11710,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.ne + i64.extend_i32_s + i64.ne if i32.const 0 i32.const 304 @@ -13296,16 +11728,15 @@ end end local.get $3 - i32.const 4 i32.const 8 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Uint64Array#subarray local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Int64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 304 @@ -13316,9 +11747,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 304 @@ -13329,9 +11760,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 304 @@ -13342,9 +11773,9 @@ end local.get $0 i32.const 3 - 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 304 @@ -13362,58 +11793,116 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 268 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 226 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.set $1 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $2 + (local $4 i32) + (local $5 f32) local.get $0 - i32.load call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 + local.tee $3 i32.load offset=4 + local.set $4 + i32.const 0 + local.set $0 local.get $3 + i32.load offset=8 i32.const 2 - i32.shl - i32.add - i32.store offset=4 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.tee $2 + f32.load + local.set $5 + local.get $2 + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $2 + f32.load + f32.store + local.get $2 + local.get $5 + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/Float32Array#subarray (; 227 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.set $1 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 local.get $2 local.get $1 local.get $3 @@ -13429,7 +11918,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 269 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 228 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13439,11 +11928,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -13456,13 +11945,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -13471,7 +11962,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Float32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -13482,7 +11973,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Float32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -13490,7 +11981,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.ne + f32.convert_i32_s + f32.ne if i32.const 0 i32.const 304 @@ -13508,14 +12000,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Float32Array#subarray local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Float32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 8 + f32.ne if i32.const 0 i32.const 304 @@ -13526,9 +12018,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne if i32.const 0 i32.const 304 @@ -13539,9 +12031,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne if i32.const 0 i32.const 304 @@ -13552,9 +12044,9 @@ end local.get $0 i32.const 3 - 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 304 @@ -13572,12 +12064,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 270 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 229 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) + (local $5 f64) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -13603,7 +12095,7 @@ i32.shl i32.add local.tee $2 - i64.load + f64.load local.set $5 local.get $2 local.get $4 @@ -13612,11 +12104,11 @@ i32.shl i32.add local.tee $2 - i64.load - i64.store + f64.load + f64.store local.get $2 local.get $5 - i64.store + f64.store local.get $0 i32.const 1 i32.add @@ -13630,74 +12122,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 271 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - end - local.set $1 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 272 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 230 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13707,11 +12132,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -13724,15 +12149,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 i32.add @@ -13741,7 +12166,7 @@ end end local.get $2 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Float64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -13752,7 +12177,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int64Array#__get + call $~lib/typedarray/Float64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -13760,8 +12185,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne + f64.convert_i32_s + f64.ne if i32.const 0 i32.const 304 @@ -13778,15 +12203,16 @@ end end local.get $3 + i32.const 4 i32.const 8 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Float64Array#subarray local.tee $1 - call $~lib/typedarray/Int64Array#reverse + call $~lib/typedarray/Float64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Float64Array#__get + f64.const 8 + f64.ne if i32.const 0 i32.const 304 @@ -13797,9 +12223,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne if i32.const 0 i32.const 304 @@ -13810,11 +12236,11 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne - if - i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne + if + i32.const 0 i32.const 304 i32.const 531 i32.const 2 @@ -13823,9 +12249,9 @@ end local.get $0 i32.const 3 - 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 304 @@ -13843,948 +12269,677 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 273 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/typedarray/Int8Array#indexOf (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $2 - i32.const 4 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $0 + i32.load offset=8 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 232 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $0 + i32.load offset=8 + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + end local.get $2 + 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 + i32.const 1 + i32.sub local.get $2 - local.get $1 local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 i32.lt_s select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 end - local.set $1 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store local.get $2 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 233 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + local.set $2 + end local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 local.get $2 - call $~lib/rt/pure/__retain + call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 274 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 234 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 + i32.const 1900 i32.load - local.tee $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $4 + local.tee $0 local.set $2 - local.get $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#constructor + local.tee $3 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $2 i32.lt_s if - local.get $2 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $3 - local.get $0 - i32.const 1792 local.get $0 + local.get $1 + i32.const 1888 + local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/Int64Array#reverse - call $~lib/rt/pure/__release + local.get $0 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/Uint64Array#__get - i32.const 1792 - 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 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 8 - call $~lib/typedarray/Uint64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse - local.tee $0 + local.get $0 + i32.const 11 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 558 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 7 - i64.ne + i32.const -1 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 559 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 560 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 3 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 6 - i64.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 561 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + i32.const 3 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 562 i32.const 2 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 local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#reverse (; 275 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f32) + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 563 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.tee $2 - f32.load - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $2 - f32.load - f32.store - local.get $2 - local.get $5 - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end + i32.const 10 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 564 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - ) - (func $~lib/typedarray/Float32Array#subarray (; 276 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 + i32.const 1 + i32.const -100 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 565 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~argumentsLength + local.get $0 i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + if i32.const 0 - local.get $1 + i32.const 304 + i32.const 567 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~argumentsLength + local.get $0 + i32.const 11 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne + if i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select + i32.const 304 + i32.const 568 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.set $1 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $2 + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 + i32.const -1 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 569 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 2 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 277 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 - i32.load - local.tee $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - 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 1792 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $3 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 570 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $2 - call $~lib/typedarray/Float32Array#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/Float32Array#__get - i32.const 1792 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 571 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 8 - call $~lib/typedarray/Float32Array#subarray - local.tee $1 - call $~lib/typedarray/Float32Array#reverse - local.tee $0 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 8 - f32.ne + local.get $0 + i32.const 3 + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 572 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 2 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 573 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 7 - f32.ne + i32.const 100 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 574 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 6 - f32.ne + i32.const 1 + i32.const -10 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 575 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const -11 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 576 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 4 + i32.const 9 + call $~lib/typedarray/Int8Array#subarray + local.tee $0 i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 580 i32.const 2 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 local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#reverse (; 278 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) + i32.const 4 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 581 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 + i32.const 5 i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u + call $~lib/typedarray/Int8Array#indexOf i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - f64.store - local.get $2 - local.get $5 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 582 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 583 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 10 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 584 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 585 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 1 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 586 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 2 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 587 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 279 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 235 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 + i32.const 1900 i32.load - local.tee $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $4 + local.tee $0 local.set $2 - local.get $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - local.set $3 + local.get $0 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $2 i32.lt_s if - local.get $2 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $3 - local.get $0 - i32.const 1792 local.get $0 + local.get $1 + i32.const 1888 + local.get $1 call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/Float64Array#reverse - call $~lib/rt/pure/__release + local.get $0 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/Float64Array#__get - i32.const 1792 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Float64Array#subarray - local.tee $1 - call $~lib/typedarray/Float64Array#reverse - local.tee $0 + local.get $0 + i32.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 8 - f64.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 558 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.ne + i32.const -1 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 559 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 3 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 560 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 561 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + i32.const 3 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 - i32.const 2 - 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 - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#indexOf (; 280 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 281 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 282 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Int8Array#lastIndexOf - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 283 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int8Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const -1 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 559 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 0 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 560 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 2 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 561 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - i32.const 3 - call $~lib/typedarray/Int8Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 562 + i32.const 562 i32.const 2 call $~lib/builtins/abort unreachable @@ -14974,9 +13129,8 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Uint8Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -15092,7 +13246,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 284 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15102,7 +13256,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15117,7 +13271,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.add @@ -15393,7 +13547,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $0 i32.const 3 i32.const 0 @@ -15509,8 +13663,158 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 285 ;) - (local $0 i32) + (func $~lib/typedarray/Int16Array#indexOf (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 239 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Int16Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 240 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15519,7 +13823,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15532,9 +13836,11 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 i32.add @@ -15545,7 +13851,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -15557,7 +13863,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15571,7 +13877,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15585,7 +13891,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15599,7 +13905,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15613,7 +13919,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -15627,7 +13933,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15641,7 +13947,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15655,7 +13961,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15670,7 +13976,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -15683,7 +13989,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15698,7 +14004,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15713,7 +14019,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -15727,7 +14033,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -15741,7 +14047,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -15755,7 +14061,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -15769,7 +14075,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -15783,7 +14089,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -15797,7 +14103,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -15810,11 +14116,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Int16Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15828,7 +14134,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -15840,7 +14146,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15854,7 +14160,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15868,7 +14174,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15882,7 +14188,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15896,7 +14202,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -15910,7 +14216,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -15926,171 +14232,21 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 286 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 241 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 287 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 288 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Int16Array#lastIndexOf - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 289 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint16Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $2 i32.lt_s if @@ -16099,11 +14255,9 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $1 i32.const 1 i32.add @@ -16379,7 +14533,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -16495,70 +14649,214 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 290 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int32Array#indexOf (; 242 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint16Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + end local.get $2 + i32.const 0 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 + local.get $2 + local.get $3 i32.add - local.set $1 - br $for-loop|0 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int16Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/Int16Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 558 + local.get $2 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 243 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const -1 - i32.const 0 - call $~lib/typedarray/Int16Array#indexOf - i32.const -1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + i32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 244 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Int32Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 245 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int32Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + i32.const 0 + i32.const 0 + call $~lib/typedarray/Int32Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 558 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const -1 + i32.const 0 + call $~lib/typedarray/Int32Array#indexOf + i32.const -1 i32.ne if i32.const 0 @@ -16571,7 +14869,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -16585,7 +14883,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -16599,7 +14897,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -16613,7 +14911,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16627,7 +14925,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16641,7 +14939,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -16656,7 +14954,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -16669,7 +14967,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -16684,7 +14982,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -16699,7 +14997,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -16713,7 +15011,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -16727,7 +15025,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -16741,7 +15039,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -16755,7 +15053,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -16769,7 +15067,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -16783,7 +15081,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -16795,12 +15093,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16814,7 +15113,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 304 @@ -16826,7 +15125,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -16840,7 +15139,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16854,7 +15153,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16868,7 +15167,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16882,7 +15181,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -16896,7 +15195,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -16912,181 +15211,35 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 291 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 246 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint32Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $2 - i32.const 0 i32.lt_s if - local.get $2 - local.get $3 + local.get $0 + local.get $1 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 292 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 293 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Int32Array#lastIndexOf - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 294 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int32Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + local.set $1 + br $for-loop|0 end end local.get $0 @@ -17356,9 +15509,8 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Uint32Array#subarray local.tee $0 i32.const 3 i32.const 0 @@ -17474,67 +15626,214 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 295 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Int64Array#indexOf (; 247 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint32Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + end local.get $2 + i32.const 0 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 + local.get $2 + local.get $3 i32.add - local.set $1 - br $for-loop|0 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 end - local.get $0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 11 - i32.const 0 - call $~lib/typedarray/Int32Array#indexOf - i32.const -1 - i32.ne - if + local.get $2 + ) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 248 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const -1 - i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $1 + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + i64.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 249 ;) (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Int64Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 250 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + i64.const 0 + i32.const 0 + call $~lib/typedarray/Int64Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64.const 11 + i32.const 0 + call $~lib/typedarray/Int64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 558 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i64.const -1 + i32.const 0 + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17546,9 +15845,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -17560,9 +15859,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -17574,9 +15873,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -17588,9 +15887,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17602,9 +15901,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17616,9 +15915,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -17632,8 +15931,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -17645,8 +15944,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -17660,8 +15959,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -17675,8 +15974,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -17688,9 +15987,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -17702,9 +16001,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -17716,9 +16015,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -17730,9 +16029,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -17744,9 +16043,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -17758,9 +16057,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -17773,11 +16072,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Int64Array#subarray local.tee $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17789,9 +16088,9 @@ unreachable end local.get $0 - i32.const 4 + i64.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 304 @@ -17801,9 +16100,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -17815,9 +16114,9 @@ unreachable end local.get $0 - i32.const 9 + i64.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17829,9 +16128,9 @@ unreachable end local.get $0 - i32.const 10 + i64.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17843,9 +16142,9 @@ unreachable end local.get $0 - i32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17857,9 +16156,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -17871,9 +16170,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -17889,179 +16188,33 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 296 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 251 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint64Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 local.get $2 - i32.const 0 i32.lt_s if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 297 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - i64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 298 ;) (param $0 i32) (param $1 i64) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Int64Array#lastIndexOf - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 299 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Int64Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 + local.get $0 + local.get $1 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 i32.add local.set $1 br $for-loop|0 @@ -18335,7 +16488,7 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Uint64Array#subarray local.tee $0 i64.const 3 i32.const 0 @@ -18451,68 +16604,214 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 300 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/typedarray/Float32Array#indexOf (; 252 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Uint64Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + end local.get $2 + i32.const 0 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 + local.get $2 + local.get $3 i32.add - local.set $1 - br $for-loop|0 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + f32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 end - local.get $0 - i64.const 0 - i32.const 0 - call $~lib/typedarray/Int64Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i64.const 11 - i32.const 0 - call $~lib/typedarray/Int64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 558 + local.get $2 + ) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 253 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i64.const -1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + f32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 254 ;) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Float32Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 255 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1900 + i32.load + local.tee $0 + local.set $2 + local.get $0 + call $~lib/typedarray/Float32Array#constructor + local.tee $3 + local.set $0 + loop $for-loop|0 + local.get $1 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + local.get $0 + f32.const 0 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32.const 11 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 558 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + f32.const -1 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18524,9 +16823,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -18538,9 +16837,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -18552,9 +16851,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -18566,9 +16865,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18580,9 +16879,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18594,9 +16893,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -18610,8 +16909,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 0 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -18623,8 +16922,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 11 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -18638,8 +16937,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const -1 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -18653,8 +16952,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 3 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -18666,9 +16965,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -18680,9 +16979,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -18694,9 +16993,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -18708,9 +17007,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -18722,9 +17021,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -18736,9 +17035,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -18751,11 +17050,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint64Array#subarray + call $~lib/typedarray/Float32Array#subarray local.tee $0 - i64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18767,9 +17066,9 @@ unreachable end local.get $0 - i64.const 4 + f32.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf if i32.const 0 i32.const 304 @@ -18779,9 +17078,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -18793,9 +17092,9 @@ unreachable end local.get $0 - i64.const 9 + f32.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18807,9 +17106,9 @@ unreachable end local.get $0 - i64.const 10 + f32.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18821,9 +17120,9 @@ unreachable end local.get $0 - i64.const 11 + f32.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18835,9 +17134,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -18849,9 +17148,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -18867,12 +17166,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 301 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 256 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.tee $3 if (result i32) @@ -18885,7 +17184,7 @@ if i32.const -1 local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end local.get $2 i32.const 0 @@ -18912,13 +17211,13 @@ if local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - f32.load + f64.load local.get $1 - f32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + f64.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 i32.const 1 i32.add @@ -18931,19 +17230,19 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 302 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 257 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.tee $3 i32.eqz if i32.const -1 local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 end local.get $2 local.get $3 @@ -18971,13 +17270,13 @@ if local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - f32.load + f64.load local.get $1 - f32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + f64.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $2 i32.const 1 i32.sub @@ -18990,7 +17289,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 303 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 258 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -19004,16 +17303,16 @@ end local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $2 end local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 304 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 259 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19023,7 +17322,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -19036,8 +17335,8 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $1 i32.const 1 i32.add @@ -19046,9 +17345,9 @@ end end local.get $0 - f32.const 0 + f64.const 0 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf if i32.const 0 i32.const 304 @@ -19058,9 +17357,9 @@ unreachable end local.get $0 - f32.const 11 + f64.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19072,9 +17371,9 @@ unreachable end local.get $0 - f32.const -1 + f64.const -1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19086,9 +17385,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -19100,9 +17399,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -19114,9 +17413,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -19128,9 +17427,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19142,9 +17441,9 @@ unreachable end local.get $0 - f32.const 1 + f64.const 1 i32.const 10 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19156,9 +17455,9 @@ unreachable end local.get $0 - f32.const 1 + f64.const 1 i32.const -100 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -19172,8 +17471,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 0 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + f64.const 0 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -19185,8 +17484,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 11 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + f64.const 11 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -19200,8 +17499,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const -1 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + f64.const -1 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -19215,8 +17514,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - f32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + f64.const 3 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -19228,9 +17527,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 4 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 3 i32.ne if @@ -19242,9 +17541,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 3 i32.ne if @@ -19256,9 +17555,9 @@ unreachable end local.get $0 - f32.const 3 + f64.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const -1 i32.ne if @@ -19270,9 +17569,9 @@ unreachable end local.get $0 - f32.const 1 + f64.const 1 i32.const 100 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 1 i32.ne if @@ -19284,9 +17583,9 @@ unreachable end local.get $0 - f32.const 1 + f64.const 1 i32.const -10 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 1 i32.ne if @@ -19298,9 +17597,9 @@ unreachable end local.get $0 - f32.const 1 + f64.const 1 i32.const -11 - call $~lib/typedarray/Float32Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const -1 i32.ne if @@ -19312,12 +17611,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/Float32Array#subarray + call $~lib/typedarray/Float64Array#subarray local.tee $0 - f32.const 3 + f64.const 3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19329,9 +17629,9 @@ unreachable end local.get $0 - f32.const 4 + f64.const 4 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf if i32.const 0 i32.const 304 @@ -19341,9 +17641,9 @@ unreachable end local.get $0 - f32.const 5 + f64.const 5 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -19355,9 +17655,9 @@ unreachable end local.get $0 - f32.const 9 + f64.const 9 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19369,9 +17669,9 @@ unreachable end local.get $0 - f32.const 10 + f64.const 10 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19383,9 +17683,9 @@ unreachable end local.get $0 - f32.const 11 + f64.const 11 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19397,9 +17697,9 @@ unreachable end local.get $0 - f32.const 5 + f64.const 5 i32.const 1 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -19411,9 +17711,9 @@ unreachable end local.get $0 - f32.const 5 + f64.const 5 i32.const 2 - call $~lib/typedarray/Float32Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -19429,806 +17729,827 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 305 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 + (func $~lib/util/number/decimalCount32 (; 260 ;) (param $0 i32) (result i32) + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 306 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/util/number/utoa_simple (; 261 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + loop $do-continue|0 + local.get $1 + i32.const 10 + i32.div_u local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end local.get $2 - local.get $3 - i32.add - local.get $3 i32.const 1 i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 307 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $1 + br_if $do-continue|0 end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 308 ;) - (local $0 i32) + (func $~lib/util/number/itoa32 (; 262 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Float64Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end local.get $0 - f64.const 0 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1936 + return end local.get $0 - f64.const 11 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.lt_s + local.tee $1 if i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.sub + local.set $0 end local.get $0 - f64.const -1 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 559 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 if - i32.const 0 - i32.const 304 - i32.const 560 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.const 45 + i32.store16 end + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/string/String#get:length (; 263 ;) (param $0 i32) (result i32) local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/number/itoa_stream (; 264 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 255 + i32.and + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 561 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end - local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 0 + i32.lt_s + local.tee $1 if i32.const 0 - i32.const 304 - i32.const 562 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.sub + local.set $2 end + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $2 local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple + local.get $1 if - i32.const 0 - i32.const 304 - i32.const 563 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 end + local.get $2 + ) + (func $~lib/string/String#substring (; 265 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 0 local.get $0 - f64.const 1 - i32.const 10 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 564 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const -100 - call $~lib/typedarray/Float64Array#indexOf + call $~lib/string/String#get:length + local.tee $2 + i32.const 0 + local.get $2 + i32.lt_s + select + local.tee $3 + local.get $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + local.tee $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + local.tee $1 + local.get $3 + local.get $1 + i32.gt_s + select i32.const 1 - i32.ne + i32.shl + local.tee $4 + local.get $3 + local.get $1 + local.get $3 + local.get $1 + i32.lt_s + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 565 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end + i32.const 0 + local.get $4 + local.get $2 i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline + i32.shl + i32.eq + local.get $1 + select if - i32.const 0 - i32.const 304 - i32.const 567 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + call $~lib/rt/pure/__retain + return end + local.get $3 i32.const 1 - global.set $~argumentsLength + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne + local.get $1 + i32.add + local.get $3 + call $~lib/memory/memory.copy + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/string/joinIntegerArray (; 266 ;) (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 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 568 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const -1 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 569 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load8_s + call $~lib/util/number/itoa32 + return end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add + local.tee $6 i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $5 + i32.add + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne + local.get $3 + i32.add + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 571 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Int8Array#join (; 267 ;) (param $0 i32) (result i32) local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 572 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 573 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/string/compareImpl (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) local.get $0 - f64.const 1 - i32.const 100 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne + 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 - i32.const 0 - i32.const 304 - i32.const 574 - i32.const 2 - call $~lib/builtins/abort - unreachable + 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 (; 269 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - f64.const 1 - i32.const -10 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne + local.get $1 + i32.eq if - i32.const 0 - i32.const 304 - i32.const 575 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1 + return end + local.get $1 + i32.eqz + i32.const 1 local.get $0 - f64.const 1 - i32.const -11 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne + select if i32.const 0 - i32.const 304 - i32.const 576 - i32.const 2 - call $~lib/builtins/abort - unreachable + return end local.get $0 - i32.const 4 - i32.const 9 - call $~lib/typedarray/Float64Array#subarray - local.tee $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 + call $~lib/string/String#get:length + local.tee $2 + local.get $1 + call $~lib/string/String#get:length i32.ne if i32.const 0 - i32.const 304 - i32.const 580 - i32.const 2 - call $~lib/builtins/abort - unreachable + return end local.get $0 - f64.const 4 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 581 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 270 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 local.get $0 - f64.const 5 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 582 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/typedarray/Int8Array#__set local.get $0 - f64.const 9 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + 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 2000 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 304 - i32.const 583 - i32.const 2 + i32.const 629 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $0 - f64.const 10 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + call $~lib/typedarray/Int8Array#join + local.tee $1 + local.get $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 304 - i32.const 584 - i32.const 2 + i32.const 630 + i32.const 4 call $~lib/builtins/abort unreachable end + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - f64.const 11 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + call $~lib/rt/pure/__release + ) + (func $~lib/util/number/utoa32 (; 271 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 585 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1936 + return end local.get $0 - f64.const 5 + call $~lib/util/number/decimalCount32 + local.tee $1 i32.const 1 - call $~lib/typedarray/Float64Array#indexOf + i32.shl i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 586 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f64.const 5 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + local.get $1 + call $~lib/util/number/utoa_simple + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 255 + i32.and + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 587 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end - local.get $3 - call $~lib/rt/pure/__release + local.get $2 + i32.const 255 + i32.and + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $1 local.get $0 - call $~lib/rt/pure/__release + local.get $2 + local.get $1 + call $~lib/util/number/utoa_simple + local.get $1 ) - (func $~lib/typedarray/Float64Array#includes (; 309 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (; 273 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 f64) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s + if + i32.const 1920 + return + end + local.get $3 + i32.eqz + if local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $2 - if (result i32) - i32.const 0 + i32.load8_u + call $~lib/util/number/utoa32 + return + end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 10 + i32.add + i32.mul + i32.const 10 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 local.get $1 - local.get $2 - i32.lt_s + local.get $0 + local.get $5 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 if - i32.const 1 - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f64.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop + local.get $2 local.get $1 i32.const 1 + i32.shl i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - ) - (func $~lib/typedarray/Float32Array#includes (; 310 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if + i32.const 1968 + local.get $4 i32.const 1 - local.get $0 - local.get $1 - i32.const 2 i32.shl - i32.add - f32.load - local.tee $3 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop + call $~lib/memory/memory.copy local.get $1 - i32.const 1 + local.get $4 i32.add local.set $1 - br $while-continue|0 end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end - i32.const 0 end + local.get $6 + local.get $2 + local.get $1 + local.get $0 + local.get $3 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s + if + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return + end + local.get $2 + ) + (func $~lib/typedarray/Uint8Array#join (; 274 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount32 (; 311 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 275 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + local.get $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 10 - i32.lt_u - select + i32.const 2 i32.const 3 - i32.const 4 - i32.const 5 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 10000 - i32.lt_u - select + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 312 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa32 (; 313 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq i32.eqz if - i32.const 1936 - return + i32.const 0 + i32.const 304 + i32.const 629 + i32.const 4 + call $~lib/builtins/abort + unreachable end - local.get $0 - i32.const 0 - i32.lt_s + call $~lib/typedarray/Uint8Array#join local.tee $1 + local.get $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 - local.get $0 - i32.sub - local.set $0 + i32.const 304 + i32.const 630 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 276 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $0 + local.get $0 + i32.const 0 i32.const 1 - i32.shl + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple + 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 2000 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 629 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + call $~lib/typedarray/Uint8Array#join + local.tee $1 local.get $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz if - local.get $2 - i32.const 45 - i32.store16 + i32.const 0 + i32.const 304 + i32.const 630 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#get:length (; 314 ;) (param $0 i32) (result i32) + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u + call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 277 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -20237,7 +18558,7 @@ i32.add local.set $0 local.get $2 - i32.const 255 + i32.const 65535 i32.and i32.eqz if @@ -20248,9 +18569,9 @@ return end local.get $2 - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s i32.const 0 i32.lt_s @@ -20262,9 +18583,9 @@ local.set $2 end local.get $2 - i32.const 24 + i32.const 16 i32.shl - i32.const 24 + i32.const 16 i32.shr_s local.tee $3 call $~lib/util/number/decimalCount32 @@ -20283,81 +18604,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 316 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $3 - local.get $1 - i32.gt_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 - select - i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz - if - i32.const 1920 - return - end - i32.const 0 - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $3 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/string/joinIntegerArray (; 317 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 278 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20377,7 +18624,7 @@ i32.eqz if local.get $0 - i32.load8_s + i32.load16_s call $~lib/util/number/itoa32 return end @@ -20408,9 +18655,11 @@ local.get $1 local.get $0 local.get $5 + i32.const 1 + i32.shl i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i32.load16_s + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 @@ -20443,9 +18692,11 @@ local.get $1 local.get $0 local.get $3 + i32.const 1 + i32.shl i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i32.load16_s + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -20460,153 +18711,45 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#join (; 318 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (; 279 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/string/compareImpl (; 319 ;) (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 (; 320 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.eqz i32.const 1 - local.get $0 - select - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz + i32.shr_u + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 321 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 280 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 local.get $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 4 i32.const 5 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int8Array#join + call $~lib/typedarray/Int16Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -20619,7 +18762,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int8Array#join + call $~lib/typedarray/Int16Array#join local.tee $1 local.get $1 i32.const 2000 @@ -20639,30 +18782,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/utoa32 (; 322 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 1936 - return - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 323 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 281 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -20670,7 +18790,7 @@ i32.add local.set $0 local.get $2 - i32.const 255 + i32.const 65535 i32.and i32.eqz if @@ -20681,7 +18801,7 @@ return end local.get $2 - i32.const 255 + i32.const 65535 i32.and local.tee $2 call $~lib/util/number/decimalCount32 @@ -20692,7 +18812,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 324 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 282 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20712,7 +18832,7 @@ i32.eqz if local.get $0 - i32.load8_u + i32.load16_u call $~lib/util/number/utoa32 return end @@ -20743,9 +18863,11 @@ local.get $1 local.get $0 local.get $5 + i32.const 1 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 @@ -20778,9 +18900,11 @@ local.get $1 local.get $0 local.get $3 + i32.const 1 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -20795,105 +18919,45 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#join (; 325 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (; 283 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 326 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + i32.shr_u + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 327 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 284 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 local.get $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 4 i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint8Array#join + call $~lib/typedarray/Uint16Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -20906,7 +18970,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint8Array#join + call $~lib/typedarray/Uint16Array#join local.tee $1 local.get $1 i32.const 2000 @@ -20926,8 +18990,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 328 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + (func $~lib/util/number/itoa_stream (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -20935,8 +18998,6 @@ i32.add local.set $0 local.get $2 - i32.const 65535 - i32.and i32.eqz if local.get $0 @@ -20945,11 +19006,8 @@ i32.const 1 return end + local.get $0 local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s i32.const 0 i32.lt_s local.tee $1 @@ -20960,18 +19018,11 @@ local.set $2 end local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.tee $3 + local.get $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add - local.set $2 - local.get $0 - local.get $3 - local.get $2 + local.tee $2 call $~lib/util/number/utoa_simple local.get $1 if @@ -20981,7 +19032,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 329 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 286 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21001,7 +19052,7 @@ i32.eqz if local.get $0 - i32.load16_s + i32.load call $~lib/util/number/itoa32 return end @@ -21032,11 +19083,11 @@ local.get $1 local.get $0 local.get $5 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s - call $~lib/util/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 @@ -21069,11 +19120,11 @@ local.get $1 local.get $0 local.get $3 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s - call $~lib/util/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -21088,45 +19139,45 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#join (; 330 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#join (; 287 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 331 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 288 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 local.get $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 4 i32.const 5 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Int16Array#join + call $~lib/typedarray/Int32Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21139,7 +19190,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int16Array#join + call $~lib/typedarray/Int32Array#join local.tee $1 local.get $1 i32.const 2000 @@ -21159,7 +19210,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 332 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 289 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -21167,8 +19218,6 @@ i32.add local.set $0 local.get $2 - i32.const 65535 - i32.and i32.eqz if local.get $0 @@ -21177,19 +19226,15 @@ i32.const 1 return end - local.get $2 - i32.const 65535 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 local.get $0 local.get $2 - local.get $1 + local.get $2 + call $~lib/util/number/decimalCount32 + local.tee $0 call $~lib/util/number/utoa_simple - local.get $1 + local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 333 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 290 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21209,7 +19254,7 @@ i32.eqz if local.get $0 - i32.load16_u + i32.load call $~lib/util/number/utoa32 return end @@ -21240,11 +19285,11 @@ local.get $1 local.get $0 local.get $5 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u - call $~lib/util/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 @@ -21277,11 +19322,11 @@ local.get $1 local.get $0 local.get $3 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u - call $~lib/util/number/itoa_stream + i32.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -21296,45 +19341,45 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#join (; 334 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#join (; 291 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 335 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 292 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 local.get $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 4 i32.const 5 - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#join + call $~lib/typedarray/Uint32Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21347,7 +19392,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint16Array#join + call $~lib/typedarray/Uint32Array#join local.tee $1 local.get $1 i32.const 2000 @@ -21367,7 +19412,89 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 336 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/decimalCount64 (; 293 ;) (param $0 i64) (result i32) + i32.const 10 + i32.const 11 + i32.const 12 + local.get $0 + i64.const 100000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000 + i64.lt_u + select + i32.const 13 + i32.const 14 + i32.const 15 + local.get $0 + i64.const 100000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + i32.const 16 + i32.const 17 + local.get $0 + i64.const 10000000000000000 + i64.lt_u + select + i32.const 18 + i32.const 19 + i32.const 20 + local.get $0 + i64.const -8446744073709551616 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000000 + i64.lt_u + select + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select + ) + (func $~lib/util/number/utoa_simple (; 294 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (local $3 i64) + loop $do-continue|0 + local.get $1 + i64.const 10 + i64.div_u + local.get $0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 + i32.const 48 + i32.add + i32.store16 + local.tee $1 + i64.const 0 + i64.ne + br_if $do-continue|0 + end + ) + (func $~lib/util/number/itoa_stream (; 295 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.const 1 @@ -21375,7 +19502,7 @@ i32.add local.set $0 local.get $2 - i32.eqz + i64.eqz if local.get $0 i32.const 48 @@ -21383,92 +19510,167 @@ i32.const 1 return end - local.get $0 local.get $2 - i32.const 0 - i32.lt_s + i64.const 0 + i64.lt_s local.tee $1 if - i32.const 0 + i64.const 0 local.get $2 - i32.sub + i64.sub local.set $2 end local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $2 - call $~lib/util/number/utoa_simple + i64.const 4294967295 + i64.le_u + if + local.get $2 + i32.wrap_i64 + local.tee $4 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $3 + local.get $0 + local.get $4 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64 + local.get $1 + i32.add + local.tee $3 + call $~lib/util/number/utoa_simple + end local.get $1 if local.get $0 i32.const 45 i32.store16 end - local.get $2 + local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 337 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 296 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $3 + local.tee $4 i32.const 0 i32.lt_s if i32.const 1920 return end - local.get $3 + local.get $4 i32.eqz if local.get $0 - i32.load - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 + i64.load + local.tee $3 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $3 + i64.const 0 + i64.lt_s + local.tee $0 + if + i64.const 0 + local.get $3 + i64.sub + local.set $3 + end + local.get $3 + i64.const 4294967295 + i64.le_u + if + local.get $3 + i32.wrap_i64 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.get $0 + i32.add + local.tee $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $2 + local.get $4 + call $~lib/util/number/utoa_simple + else + local.get $3 + call $~lib/util/number/decimalCount64 + local.get $0 + i32.add + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple + end + local.get $0 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain + end + return + end + local.get $4 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $5 + i32.const 21 + i32.add + i32.mul + i32.const 21 + i32.add + local.tee $7 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $6 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $6 + i32.const 3 + i32.shl + i32.add + i64.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $5 if local.get $2 local.get $1 @@ -21476,32 +19678,32 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 - local.get $3 - i32.const 2 + local.get $4 + i32.const 3 i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -21516,45 +19718,45 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#join (; 338 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 297 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 339 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 298 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $0 local.get $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set + i64.const 4 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set + i64.const 5 + call $~lib/typedarray/Int64Array#__set local.get $0 - call $~lib/typedarray/Int32Array#join + call $~lib/typedarray/Int64Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21567,7 +19769,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Int32Array#join + call $~lib/typedarray/Int64Array#join local.tee $1 local.get $1 i32.const 2000 @@ -21587,7 +19789,8 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 340 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 299 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (local $3 i32) local.get $0 local.get $1 i32.const 1 @@ -21595,7 +19798,7 @@ i32.add local.set $0 local.get $2 - i32.eqz + i64.eqz if local.get $0 i32.const 48 @@ -21603,20 +19806,36 @@ i32.const 1 return end - local.get $0 local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $0 + i64.const 4294967295 + i64.le_u + if + local.get $2 + i32.wrap_i64 + local.tee $3 + call $~lib/util/number/decimalCount32 + local.set $1 + local.get $0 + local.get $3 + local.get $1 + call $~lib/util/number/utoa_simple + else + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64 + local.tee $1 + call $~lib/util/number/utoa_simple + end + local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 341 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 300 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -21631,20 +19850,57 @@ i32.eqz if local.get $0 - i32.load - call $~lib/util/number/utoa32 + i64.load + local.tee $4 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $4 - i32.const 10 + local.tee $5 + i32.const 20 i32.add i32.mul - i32.const 10 + i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -21654,23 +19910,23 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 - i32.const 2 + local.get $6 + i32.const 3 i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -21678,32 +19934,32 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 local.get $3 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -21718,45 +19974,45 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#join (; 342 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 301 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 343 ;) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 302 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const 5 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 local.get $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set + i64.const 4 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - call $~lib/typedarray/Uint32Array#join + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#join local.tee $2 i32.const 2000 call $~lib/string/String.__eq @@ -21769,7 +20025,7 @@ call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint32Array#join + call $~lib/typedarray/Uint64Array#join local.tee $1 local.get $1 i32.const 2000 @@ -21789,5442 +20045,1650 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount64 (; 344 ;) (param $0 i64) (result i32) - i32.const 10 - i32.const 11 - i32.const 12 - local.get $0 - i64.const 100000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 - local.get $0 - i64.const 100000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - i32.const 16 - i32.const 17 - local.get $0 - i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 - local.get $0 - i64.const -8446744073709551616 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000000 - i64.lt_u - select - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 345 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - loop $do-continue|0 - local.get $1 - i64.const 10 - i64.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - i32.const 48 - i32.add - i32.store16 - local.tee $1 - i64.const 0 - i64.ne - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa64 (; 346 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i64.eqz - if - i32.const 1936 - return - end - local.get $0 - i64.const 0 - i64.lt_s - local.tee $1 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64 - local.get $1 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple - end - local.get $1 - if - local.get $3 - i32.const 45 - i32.store16 - end + (func $~lib/util/number/genDigits (; 303 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i64) local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 347 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i64.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 - i64.const 0 - i64.lt_s - local.tee $1 - if - i64.const 0 - local.get $2 - i64.sub - local.set $2 - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $4 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $3 - local.get $0 - local.get $4 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64 - local.get $1 - i32.add - local.tee $3 - call $~lib/util/number/utoa_simple - end local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end + i64.sub + local.set $9 local.get $3 - ) - (func $~lib/util/string/joinIntegerArray (; 348 ;) (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 1 - i32.sub - local.tee $3 + i64.const 1 i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i64.load - call $~lib/util/number/itoa64 - return - end + local.get $4 + i32.sub + local.tee $10 + i64.extend_i32_s + i64.shl + local.tee $11 + i64.const 1 + i64.sub + local.tee $13 + i64.and + local.set $12 local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 21 - i32.add - i32.mul - i32.const 21 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s + local.get $10 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $7 + call $~lib/util/number/decimalCount32 + local.set $4 + loop $while-continue|0 + local.get $4 + i32.const 0 + i32.gt_s if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $4 + i32.const 10 + i32.ne + if + local.get $4 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 + end + local.get $7 + i32.const 1000000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 100000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 10000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 1000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100000 + i32.div_u + local.set $8 + local.get $7 + i32.const 100000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10000 + i32.div_u + local.set $8 + local.get $7 + i32.const 10000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 1000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100 + i32.div_u + local.set $8 + local.get $7 + i32.const 100 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10 + i32.div_u + local.set $8 + local.get $7 + i32.const 10 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + local.set $8 + i32.const 0 + local.set $7 + br $break|1 + end + i32.const 0 + local.set $8 + end + local.get $6 + local.get $8 + i32.or if + local.get $6 + local.tee $2 + i32.const 1 + i32.add + local.set $6 + local.get $0 local.get $2 - local.get $1 i32.const 1 i32.shl i32.add - i32.const 1968 + local.get $8 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $12 + local.get $7 + i64.extend_i32_u + local.get $10 + i64.extend_i32_s + i64.shl + i64.add + local.tee $1 + local.get $5 + i64.le_u + if + local.get $4 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K local.get $4 + i32.const 2 + i32.shl + i32.const 3104 + i32.add + i64.load32_u + local.get $10 + i64.extend_i32_s + i64.shl + local.set $3 + local.get $0 + local.get $6 + i32.const 1 + i32.sub i32.const 1 i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Int64Array#join (; 349 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 350 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int64Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/utoa64 (; 351 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 1936 - return + local.tee $2 + i32.load16_u + local.set $4 + loop $while-continue|3 + i32.const 1 + local.get $9 + local.get $1 + i64.sub + local.get $1 + local.get $3 + i64.add + local.get $9 + i64.sub + i64.gt_u + local.get $1 + local.get $3 + i64.add + local.get $9 + i64.lt_u + select + i32.const 0 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 + local.get $1 + local.get $9 + i64.lt_u + select + select + if + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $1 + local.get $3 + i64.add + local.set $1 + br $while-continue|3 + end + end + local.get $2 + local.get $4 + i32.store16 + local.get $6 + return + end + br $while-continue|0 + end end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 + loop $while-continue|4 (result i32) + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $12 + i64.const 10 + i64.mul local.tee $3 + local.get $10 + i64.extend_i32_s + i64.shr_u + local.tee $1 + local.get $6 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $6 + local.tee $2 + i32.const 1 + i32.add + local.set $6 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + end + local.get $4 i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 + i32.sub + local.set $4 local.get $3 - call $~lib/util/number/utoa_simple - else + local.get $13 + i64.and + local.tee $12 + local.get $5 + i64.ge_u + br_if $while-continue|4 + local.get $4 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $12 + local.set $1 + local.get $9 + i32.const 0 + local.get $4 + i32.sub + i32.const 2 + i32.shl + i32.const 3104 + i32.add + i64.load32_u + i64.mul + local.set $3 local.get $0 - call $~lib/util/number/decimalCount64 - local.tee $1 + local.get $6 i32.const 1 - i32.shl + i32.sub i32.const 1 - call $~lib/rt/tlsf/__alloc + i32.shl + i32.add local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple + i32.load16_u + local.set $4 + loop $while-continue|6 + i32.const 1 + local.get $3 + local.get $1 + i64.sub + local.get $1 + local.get $11 + i64.add + local.get $3 + i64.sub + i64.gt_u + local.get $1 + local.get $11 + i64.add + local.get $3 + i64.lt_u + select + i32.const 0 + local.get $5 + local.get $1 + i64.sub + local.get $11 + i64.ge_u + i32.const 0 + local.get $1 + local.get $3 + i64.lt_u + select + select + if + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $1 + local.get $11 + i64.add + local.set $1 + br $while-continue|6 + end + end + local.get $2 + local.get $4 + i32.store16 + local.get $6 end - local.get $2 - call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 352 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/prettify (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 local.get $2 - i64.eqz + i32.eqz if local.get $0 - i32.const 48 - i32.store16 + local.get $1 i32.const 1 - return - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $3 + i32.shl + i32.add + i32.const 3145774 + i32.store local.get $1 - call $~lib/util/number/utoa_simple - else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64 - local.tee $1 - call $~lib/util/number/utoa_simple + i32.const 2 + i32.add + return end local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 353 ;) (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 1 - i32.sub + local.get $2 + i32.add local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return + i32.le_s + if (result i32) + local.get $3 + i32.const 21 + i32.le_s + else + i32.const 0 end - local.get $3 - i32.eqz - if + if (result i32) + loop $for-loop|0 + local.get $1 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end local.get $0 - i64.load - call $~lib/util/number/utoa64 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 20 - i32.add - i32.mul - i32.const 20 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 + local.get $3 + i32.const 0 + i32.gt_s + select + if (result i32) local.get $0 - local.get $5 - i32.const 3 + local.get $3 + i32.const 1 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 local.get $1 + i32.const 1 i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 i32.const 1 i32.shl i32.add - i32.const 1968 - local.get $4 + local.get $0 + local.get $1 i32.const 1 i32.shl call $~lib/memory/memory.copy + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end local.get $1 - local.get $4 + local.get $3 i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint64Array#join (; 354 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 355 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint64Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $1 + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple + local.get $1 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $0 + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $2 + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple + local.get $2 + i32.const 45 + i32.const 43 + local.get $3 + select + i32.store16 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release ) - (func $~lib/util/number/genDigits (; 356 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i32) + (func $~lib/util/number/dtoa_core (; 305 ;) (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 i64) + (local $8 i64) (local $9 i64) (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) - local.get $3 + (local $14 i64) + (local $15 i64) + (local $16 i64) + (local $17 i64) + (local $18 i64) local.get $1 - i64.sub - local.set $9 - local.get $3 - i64.const 1 + f64.const 0 + f64.lt + local.tee $10 + if (result f64) + local.get $0 + i32.const 45 + i32.store16 + local.get $1 + f64.neg + else + local.get $1 + end + i64.reinterpret_f64 + local.tee $2 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $5 + local.get $2 + i64.const 4503599627370495 + i64.and + local.get $5 i32.const 0 - local.get $4 + i32.ne + local.tee $6 + i64.extend_i32_u + i64.const 52 + i64.shl + i64.add + local.tee $2 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $7 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $7 + local.get $3 + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $6 + select + i32.const 1075 i32.sub - local.tee $10 + local.tee $5 + i32.const 1 + i32.sub + local.get $3 + i32.sub + local.set $3 + local.get $2 + local.get $2 + i64.const 4503599627370496 + i64.eq + i32.const 1 + i32.add + local.tee $6 i64.extend_i32_s i64.shl - local.tee $11 i64.const 1 i64.sub - local.tee $13 - i64.and - local.set $12 + local.get $5 + local.get $6 + i32.sub local.get $3 - local.get $10 + i32.sub i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.tee $7 - call $~lib/util/number/decimalCount32 - local.set $4 - loop $while-continue|0 - local.get $4 - i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $4 - i32.const 10 - i32.ne - if - local.get $4 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 - end - local.get $7 - i32.const 1000000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100 - i32.div_u - local.set $8 - local.get $7 - i32.const 100 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10 - i32.div_u - local.set $8 - local.get $7 - i32.const 10 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - local.set $8 - i32.const 0 - local.set $7 - br $break|1 - end - i32.const 0 - local.set $8 - end - local.get $6 - local.get $8 - i32.or - if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $12 - local.get $7 - i64.extend_i32_u - local.get $10 - i64.extend_i32_s - i64.shl - i64.add - local.tee $1 - local.get $5 - i64.le_u - if - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $4 - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - local.get $10 - i64.extend_i32_s - i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - return - end - br $while-continue|0 - end - end - loop $while-continue|4 (result i32) - local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $12 - i64.const 10 - i64.mul - local.tee $3 - local.get $10 - i64.extend_i32_s - i64.shr_u - local.tee $1 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $3 - local.get $13 - i64.and - local.tee $12 - local.get $5 - i64.ge_u - br_if $while-continue|4 - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $12 - local.set $1 - local.get $9 - i32.const 0 - local.get $4 - i32.sub - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - end - ) - (func $~lib/util/number/prettify (; 357 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $2 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end - end - ) - (func $~lib/util/number/dtoa_core (; 358 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $10 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $2 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 - i32.const 0 - i32.ne - local.tee $6 - i64.extend_i32_u - i64.const 52 - i64.shl - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $7 - i64.clz - i32.wrap_i64 - local.set $3 - local.get $7 - local.get $3 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $5 - i32.const 1 - local.get $6 - select - i32.const 1075 - i32.sub - local.tee $5 - i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 - local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $6 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $5 - local.get $6 - i32.sub - local.get $3 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $3 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $3 - local.get $3 - f64.convert_i32_s - local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - i32.shl - local.tee $6 - i32.sub - global.set $~lib/util/number/_K - local.get $6 - i32.const 2192 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $3 - i32.const 1 - i32.shl - i32.const 2912 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $3 - i64.extend_i32_s - i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 - i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $9 - i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $9 - local.get $8 - i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - local.tee $9 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $9 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $17 - local.get $15 - i64.const 32 - i64.shr_u - local.tee $9 - i64.mul - local.get $18 - i64.const 32 - i64.shr_u - i64.add - local.tee $12 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.add - i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $11 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - i64.mul - local.get $13 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $14 - i64.const 32 - i64.shr_u - i64.add - local.tee $11 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub - local.get $8 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 - call $~lib/util/number/genDigits - local.get $10 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $10 - i32.add - ) - (func $~lib/util/number/dtoa (; 359 ;) (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 2048 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - i32.const 2080 - return - end - i32.const 2112 - i32.const 2160 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize - local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/number/dtoa_stream (; 360 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - f64.const 0 - f64.eq - if - local.get $0 - i32.const 48 - i32.store16 - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - i32.const 48 - i32.store16 offset=4 - i32.const 3 - return - end - local.get $2 - local.get $2 - f64.sub - f64.const 0 - f64.ne - if - local.get $2 - local.get $2 - f64.ne - if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 - i32.const 3 - return - else - local.get $2 - f64.const 0 - f64.lt - local.tee $3 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 2112 - i32.const 2160 - local.get $3 - select - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - return - end - unreachable - end - local.get $0 - local.get $2 - call $~lib/util/number/dtoa_core - ) - (func $~lib/util/string/joinFloatArray (; 361 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Float32Array#join (; 362 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 363 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - local.get $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 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 626 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Float32Array#join - local.tee $1 - local.get $1 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/string/joinFloatArray (; 364 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - f64.load - call $~lib/util/number/dtoa - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Float64Array#join (; 365 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 366 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - local.get $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 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 626 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Float64Array#join - local.tee $1 - local.get $1 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 367 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - i32.const 32 - i32.const 80 - i32.const 54 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array.wrap (; 368 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $1 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $3 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - i32.const -1 - i32.eq - if (result i32) - local.get $3 - local.get $1 - i32.sub - else - i32.const 32 - i32.const 432 - i32.const 1750 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.set $2 - else - local.get $1 - local.get $2 - i32.add - local.get $3 - i32.gt_s - if - i32.const 32 - i32.const 432 - i32.const 1755 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - end - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $2 - i32.store offset=8 - local.get $3 - local.get $0 - local.get $1 - i32.add - i32.store offset=4 - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 369 ;) (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 (; 370 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.const 16 - i32.sub - 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 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $1 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 371 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $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.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int8Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 372 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 373 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $6 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $6 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $5 - 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.wrap (; 374 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 375 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $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.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Int16Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Int16Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Int16Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array.wrap (; 376 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 377 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Uint16Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int32Array.wrap (; 378 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 379 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Int32Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Int32Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Int32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array.wrap (; 380 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 381 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Uint32Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint32Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array.wrap (; 382 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 383 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - 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 $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Int64Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Int64Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Int64Array#__get - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array.wrap (; 384 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 385 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Uint64Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint64Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint64Array#__get - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array.wrap (; 386 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 3 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 387 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Float32Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Float32Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Float32Array#__get - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array.wrap (; 388 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $2 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $2 - i32.store offset=8 - local.get $1 - local.get $0 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 389 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - call $~lib/typedarray/Float64Array.wrap - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Float64Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Float64Array#__get - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 390 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 391 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 3632 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 392 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 393 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 394 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 395 ;) (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - 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 - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 396 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 397 ;) (param $0 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 7 - i32.add - i32.const 3572 - i32.load - i32.const 3576 - i32.load - call $~lib/memory/memory.copy - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 398 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3600 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 14 - i32.const 3680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 14 - i32.const 3712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 14 - i32.const 3744 - call $~lib/rt/__allocArray - 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 $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 14 - i32.const 3776 - call $~lib/rt/__allocArray - 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 $0 - 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 - ) - (func $~lib/array/Array#__unchecked_get (; 399 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_u - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 400 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 3840 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 401 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 402 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 403 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3808 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 21 - i32.const 3888 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 21 - i32.const 3920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 21 - i32.const 3952 - call $~lib/rt/__allocArray - 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 21 - i32.const 3984 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - 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 - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 404 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - i32.const 3364 - i32.load - local.set $3 - i32.const 3372 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - 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 - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 405 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8ClampedArray#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 4048 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 406 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $1 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add i32.const 3 + i32.shr_s + i32.const 1 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + local.tee $3 i32.const 3 + i32.shl + local.tee $6 + i32.sub + global.set $~lib/util/number/_K + local.get $6 + i32.const 2192 i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $1 - 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|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 407 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) + i64.load + global.set $~lib/util/number/_frc_pow + local.get $3 + i32.const 1 + i32.shl + i32.const 2912 + i32.add + i32.load16_s + global.set $~lib/util/number/_exp_pow local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 368 - i32.const 432 - i32.const 1774 - i32.const 18 - call $~lib/builtins/abort - unreachable - end local.get $2 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u + i64.clz + i32.wrap_i64 + local.tee $3 + i64.extend_i32_s + i64.shl + local.tee $7 + i64.const 4294967295 + i64.and + local.tee $11 + global.get $~lib/util/number/_frc_pow + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $13 + i64.mul + local.set $14 + global.get $~lib/util/number/_frc_plus + local.tee $8 + i64.const 4294967295 + i64.and + local.tee $4 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $9 + i64.mul + local.set $12 + global.get $~lib/util/number/_frc_minus + local.tee $15 + i64.const 4294967295 + i64.and + local.tee $16 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $17 + i64.mul + local.set $18 + local.get $4 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $4 + i64.mul + local.get $9 + local.get $8 + i64.const 32 + i64.shr_u + local.tee $8 + i64.mul + local.get $12 + i64.const 32 + i64.shr_u + i64.add + local.tee $9 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $4 + local.get $8 + i64.mul + local.get $9 + i64.const 32 + i64.shr_u + i64.add + i64.add + i64.const 1 + i64.sub + local.tee $8 + local.get $16 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $4 + i64.mul + local.get $17 + local.get $15 + i64.const 32 + i64.shr_u + local.tee $9 + i64.mul + local.get $18 + i64.const 32 + i64.shr_u + i64.add + local.tee $12 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $4 + local.get $9 + i64.mul + local.get $12 + i64.const 32 + i64.shr_u + i64.add + i64.add + i64.const 1 + i64.add + i64.sub + local.set $4 + local.get $0 + local.get $10 + i32.const 1 + i32.shl i32.add local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end + local.get $11 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $2 + i64.mul + local.get $13 + local.get $7 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $14 + i64.const 32 + i64.shr_u + i64.add + local.tee $11 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u local.get $2 + local.get $7 + i64.mul + local.get $11 + i64.const 32 + i64.shr_u + i64.add + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $0 + local.get $5 + local.get $3 + i32.sub + i32.add + i32.const -64 + i32.sub + local.get $8 local.get $0 - i32.load offset=4 + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub + local.get $4 + local.get $10 + call $~lib/util/number/genDigits + local.get $10 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $10 i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - local.tee $3 - i32.wrap_i64 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i64.extend_i32_s - local.get $3 - i32.const 255 - local.get $3 - i32.wrap_i64 - i32.sub - i32.const 31 - i32.shr_s - i64.extend_i32_s - i64.or - i64.and - i64.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 408 ;) (param $0 i32) - (local $1 f64) + (func $~lib/util/number/dtoa (; 306 ;) (param $0 f64) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add local.get $0 - i32.load offset=8 - i32.gt_s + f64.const 0 + f64.eq if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + i32.const 2048 + return end local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if local.get $0 - local.get $4 - i32.lt_s + local.get $0 + f64.ne if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $1 - 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|0 + i32.const 2080 + return end + i32.const 2112 + i32.const 2160 + local.get $0 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + return end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 409 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 368 - i32.const 432 - i32.const 1774 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.load offset=8 + i32.const 56 i32.const 1 - i32.shr_u - i32.add + call $~lib/rt/tlsf/__alloc + local.tee $1 local.get $0 - i32.load offset=8 - i32.gt_s + call $~lib/util/number/dtoa_core + local.tee $2 + i32.const 28 + i32.eq if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + local.get $1 + call $~lib/rt/pure/__retain + return end + local.get $1 local.get $2 - local.get $0 - i32.load offset=4 - i32.add - local.set $2 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize local.get $1 - i32.load offset=4 - local.set $3 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/util/number/dtoa_stream (; 307 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + local.get $0 local.get $1 - i32.load offset=8 i32.const 1 - i32.shr_u - local.set $4 - i32.const 0 + i32.shl + i32.add local.set $0 - loop $for-loop|0 + local.get $2 + f64.const 0 + f64.eq + if local.get $0 - local.get $4 - i32.lt_s + i32.const 48 + i32.store16 + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + i32.const 48 + i32.store16 offset=4 + i32.const 3 + return + end + local.get $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + if + local.get $2 + local.get $2 + f64.ne if local.get $0 + i32.const 78 + i32.store16 + local.get $0 + i32.const 97 + i32.store16 offset=2 + local.get $0 + i32.const 78 + i32.store16 offset=4 + i32.const 3 + return + else local.get $2 + f64.const 0 + f64.lt + local.tee $3 + i32.const 8 i32.add - local.get $3 + local.set $1 local.get $0 + i32.const 2112 + i32.const 2160 + local.get $3 + select + local.get $1 i32.const 1 i32.shl - i32.add - i32.load16_s - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 + call $~lib/memory/memory.copy local.get $1 - 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 + return end + unreachable end + local.get $0 + local.get $2 + call $~lib/util/number/dtoa_core ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 410 ;) (param $0 i32) - (local $1 i32) + (func $~lib/util/string/joinFloatArray (; 308 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - i32.load offset=4 - i32.const 7 + local.get $3 + i32.eqz + if + local.get $0 + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa + return + end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain local.set $2 - i32.const 3572 - i32.load - local.set $3 - i32.const 3580 - i32.load - local.set $4 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if - local.get $0 local.get $2 - i32.add + local.get $1 local.get $0 - local.get $3 + local.get $5 + i32.const 2 + i32.shl i32.add - i32.load8_s - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream local.get $1 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $0 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0 end end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 411 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set + local.get $6 local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set + local.get $0 local.get $3 i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor + i32.shl + i32.add + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream + local.get $1 + i32.add local.tee $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4016 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> + i32.gt_s + if + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return + end + local.get $2 + ) + (func $~lib/typedarray/Float32Array#join (; 309 ;) (param $0 i32) (result i32) local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4112 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.load offset=4 local.get $0 - local.get $2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinFloatArray + ) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 310 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 local.get $0 - i32.const 10 i32.const 0 - i32.const 21 - i32.const 4144 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4176 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $4 - call $~lib/rt/pure/__release + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set local.get $0 - local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set local.get $0 - local.get $3 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> + f32.const 5 + call $~lib/typedarray/Float32Array#__set local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4208 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + call $~lib/typedarray/Float32Array#join + local.tee $2 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 626 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + call $~lib/typedarray/Float32Array#join + local.tee $1 local.get $1 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 627 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 call $~lib/rt/pure/__release - local.get $3 call $~lib/rt/pure/__release local.get $0 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 ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 412 ;) (param $0 i32) - (local $1 i32) + (func $~lib/util/string/joinFloatArray (; 311 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 i32.const 1 - i32.shr_u - i32.gt_s + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load + local.get $3 + i32.eqz + if + local.get $0 + f64.load + call $~lib/util/number/dtoa + return + end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 28 + i32.add + i32.mul + i32.const 28 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain local.set $2 - i32.const 3372 - i32.load - local.set $3 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $0 + local.get $5 local.get $3 i32.lt_s if + local.get $2 local.get $1 local.get $0 - i32.const 1 + local.get $5 + i32.const 3 i32.shl i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl + f64.load + call $~lib/util/number/dtoa_stream + local.get $1 i32.add - i32.load - i32.store16 - local.get $0 + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|0 end end + local.get $6 + local.get $2 + local.get $1 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + call $~lib/util/number/dtoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s + if + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return + end + local.get $2 + ) + (func $~lib/typedarray/Float64Array#join (; 312 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 413 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 313 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + local.get $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.load offset=8 i32.const 1 - i32.shr_u - local.tee $4 + 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 3168 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 626 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + call $~lib/typedarray/Float64Array#join + local.tee $1 local.get $1 - i32.load offset=12 - i32.ne + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz if i32.const 0 i32.const 304 - i32.const 712 - i32.const 2 + i32.const 627 + i32.const 4 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#__get - local.set $3 - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.tee $5 - local.set $6 - local.get $3 - local.get $5 - i32.ne - if - i32.const 4288 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $3 - f64.convert_i32_s - local.get $6 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 314 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 32 + i32.const 80 + i32.const 54 + i32.const 42 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.tee $1 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 414 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) + (func $~lib/typedarray/Uint8Array.wrap (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add + local.get $1 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $3 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 + local.get $2 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add + i32.lt_s + if + local.get $2 + i32.const -1 + i32.eq + if (result i32) local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 + i32.sub + else + i32.const 32 + i32.const 432 + i32.const 1750 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.set $2 + else + local.get $1 + local.get $2 + i32.add + local.get $3 + i32.gt_s + if + i32.const 32 + i32.const 432 + i32.const 1755 + i32.const 6 + call $~lib/builtins/abort + unreachable end end + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $2 + i32.store offset=8 + local.get $3 + local.get $0 + local.get $1 + i32.add + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 415 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 316 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 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 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add + local.get $2 + call $~lib/typedarray/Uint8Array.wrap + ) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 317 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable + i32.const 16 + i32.sub + 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.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u local.set $1 + local.get $2 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 + 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 - if - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store16 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + 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 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + local.get $1 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $3 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 416 ;) (param $0 i32) - (local $1 f64) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 318 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 + (local $5 i32) + (local $6 i32) + i32.const 3308 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 + i32.const 3296 local.get $0 - i32.const 3 + call $~lib/array/Array#__get + i32.const 24 i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store16 + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.add @@ -27232,123 +21696,97 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 417 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 i32.load offset=8 - local.get $0 - i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.shr_u - i32.gt_s + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $6 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 + loop $for-loop|1 + local.get $3 + local.get $4 i32.lt_s if + local.get $1 + local.get $3 + call $~lib/typedarray/Int8Array#__get local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $0 local.get $3 - i32.add - i32.load8_u - i32.store16 - local.get $0 + call $~lib/typedarray/Int8Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 418 ;) (param $0 i32) (param $1 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end + local.get $5 + call $~lib/rt/pure/__release 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 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 419 ;) (param $0 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 319 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 3580 + (local $4 i32) + (local $5 i32) + i32.const 3308 i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 14 - i32.add + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 - i32.load - local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $0 local.get $3 @@ -27356,14 +21794,12 @@ if local.get $1 local.get $0 - i32.const 1 - i32.shl - i32.add + i32.const 3296 local.get $0 - local.get $2 - i32.add - i32.load8_s - i32.store16 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.add @@ -27371,278 +21807,198 @@ br $for-loop|0 end end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 420 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set + i32.load local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 4240 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 22 - i32.const 4336 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 22 - i32.const 4384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 22 - i32.const 4432 - call $~lib/rt/__allocArray - 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset 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.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.const 22 - i32.const 4480 - call $~lib/rt/__allocArray - 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 + global.set $~argumentsLength local.get $0 - call $~lib/rt/pure/__release + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $4 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $2 + call $~lib/typedarray/Uint8Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint8Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $4 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 421 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 320 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $5 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.tee $4 - local.get $1 + i32.const 16 + i32.sub i32.load offset=12 - i32.ne + local.tee $6 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint16Array#__get - local.set $3 local.get $1 - i32.load offset=4 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#__get local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.tee $5 - local.set $6 local.get $3 - local.get $5 + call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if - i32.const 4576 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $3 - f64.convert_i32_u - local.get $6 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace i32.const 0 i32.const 304 - i32.const 718 - i32.const 6 + i32.const 684 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 422 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 321 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 + (local $5 i32) + (local $6 i32) + i32.const 3308 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 + i32.const 3296 local.get $0 - i32.const 2 + call $~lib/array/Array#__get + i32.const 16 i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store16 + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.add @@ -27650,70 +22006,122 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 423 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 + local.get $1 i32.load - i32.const 2 - i32.add - local.get $0 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.shr_u - i32.gt_s + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 1 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - i32.const 4 - i32.add + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Int16Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Int16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 322 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Uint16Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 + i32.const 3296 local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store16 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.add @@ -27721,311 +22129,120 @@ br $for-loop|0 end end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 424 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set + i32.load local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 23 - i32.const 4528 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 23 - i32.const 4624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 23 - i32.const 4672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 23 - i32.const 4720 - call $~lib/rt/__allocArray - 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 $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset 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.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.const 23 - i32.const 4768 - call $~lib/rt/__allocArray - 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 $0 - 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 - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 425 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 + global.set $~argumentsLength i32.const 0 - i32.lt_s + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1774 - i32.const 18 + i32.const 1741 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $2 - local.get $1 - i32.load offset=12 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + local.get $5 + i32.const 1 + i32.and if - i32.const 368 + i32.const 32 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 426 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) 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 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#__get - local.tee $4 local.get $1 + local.get $3 + call $~lib/typedarray/Uint16Array#__get local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 + local.get $3 + call $~lib/typedarray/Uint16Array#__get i32.ne if - i32.const 4880 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace i32.const 0 i32.const 304 - i32.const 718 - i32.const 6 + i32.const 684 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 427 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 323 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 + (local $6 i32) + i32.const 3308 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Int32Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 - i32.add - f32.load - local.tee $1 local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -28033,61 +22250,120 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 428 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - i32.const 24 - i32.add + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Int32Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Int32Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 324 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $6 local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 + i32.const 3296 local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store32 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.add @@ -28095,122 +22371,121 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 429 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 + local.get $1 i32.load - i32.const 2 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and if - i32.const 368 + i32.const 32 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - i32.const 8 - i32.add + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 + loop $for-loop|1 + local.get $3 local.get $4 i32.lt_s if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint32Array#__get local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_s - else + call $~lib/typedarray/Uint32Array#__get + i32.ne + if i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 430 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 325 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Int64Array#constructor + local.tee $6 local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 2 - i32.shl - i32.add + i32.const 3296 local.get $0 - local.get $3 - i32.add - i32.load8_u - i32.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i32.add @@ -28218,118 +22493,121 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 431 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 7 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - i32.const 16 - i32.add + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 + loop $for-loop|1 + local.get $3 + local.get $4 i32.lt_s if + local.get $1 + local.get $3 + call $~lib/typedarray/Int64Array#__get local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.store - local.get $0 + call $~lib/typedarray/Int64Array#__get + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 432 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end + local.get $6 + call $~lib/rt/pure/__release local.get $0 - i32.load offset=4 - i32.const 28 - i32.add - local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 326 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 i32.load - local.set $3 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Uint64Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $1 local.get $0 - i32.const 2 - i32.shl - i32.add + i32.const 3296 local.get $0 - local.get $2 - i32.add - i32.load8_s - i32.store + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i32.add @@ -28337,272 +22615,121 @@ br $for-loop|0 end end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 433 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set + i32.load local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - i32.const 3360 + global.set $~argumentsLength i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 4816 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain + i32.const 16 + i32.sub + i32.load offset=12 local.tee $5 - 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 15 - i32.const 4928 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 15 - i32.const 4992 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 15 - i32.const 5056 - call $~lib/rt/__allocArray - 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 $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 15 - i32.const 5120 - call $~lib/rt/__allocArray - 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 $0 - call $~lib/rt/pure/__release + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 434 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - 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 + i32.const 7 + i32.and if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $0 - local.get $2 - call $~lib/typedarray/Uint32Array#__get - local.tee $4 local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 5248 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace + local.get $3 + call $~lib/typedarray/Uint64Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + i64.ne + if i32.const 0 i32.const 304 - i32.const 718 - i32.const 6 + i32.const 684 + i32.const 4 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 435 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 327 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 + (local $6 i32) + i32.const 3308 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.tee $4 + call $~lib/typedarray/Float32Array#constructor + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 - i32.add - f32.load - local.tee $1 local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -28610,79 +22737,96 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 436 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 + local.get $1 i32.load - i32.const 2 + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if i32.const 368 i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.load offset=4 - i32.const 8 - i32.add + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 + loop $for-loop|1 + local.get $3 local.get $4 i32.lt_s if + local.get $1 + local.get $3 + call $~lib/typedarray/Float32Array#__get local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_u - else + call $~lib/typedarray/Float32Array#__get + f32.ne + if i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 437 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 328 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -28690,139 +22834,121 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 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 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set + i32.load local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - i32.const 3360 + global.set $~argumentsLength i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.const 10 - i32.const 2 - i32.const 24 - i32.const 5184 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain + i32.const 16 + i32.sub + i32.load offset=12 local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - call $~lib/typedarray/Uint32Array#set<~lib/array/Array> + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 7 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i32.const 10 - i32.const 2 - i32.const 24 - i32.const 5296 - call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 + i32.store + local.get $2 + local.get $5 + i32.store offset=8 local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 24 - i32.const 5360 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 24 - i32.const 5424 - call $~lib/rt/__allocArray + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $4 + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Float64Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Float64Array#__get + f64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 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 24 - i32.const 5488 - call $~lib/rt/__allocArray - 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 $0 - 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 ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 438 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 329 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -28830,8 +22956,6 @@ i32.load local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -28857,18 +22981,16 @@ local.get $3 i32.lt_s if - local.get $1 local.get $0 - i32.const 3 - i32.shl + local.get $1 i32.add local.get $2 local.get $0 i32.const 2 i32.shl i32.add - i64.load32_s - i64.store + i32.load + i32.store8 local.get $0 i32.const 1 i32.add @@ -28877,24 +22999,13 @@ end end ) - (func $~lib/array/Array#__unchecked_get (; 439 ;) (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 440 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 330 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -28914,22 +23025,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#__get + call $~lib/typedarray/Int8Array#__get local.tee $4 local.get $1 local.get $2 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.tee $5 - i64.ne + i32.ne if - i32.const 5648 + i32.const 3632 i32.const 3 local.get $2 f64.convert_i32_s local.get $4 - f64.convert_i64_s + f64.convert_i32_s local.get $5 - f64.convert_i64_s + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -28948,7 +23059,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 441 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 331 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -28959,8 +23070,6 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -28972,7 +23081,7 @@ end local.get $0 i32.load offset=4 - i32.const 24 + i32.const 3 i32.add local.set $2 i32.const 3428 @@ -28988,10 +23097,8 @@ local.get $4 i32.lt_s if - local.get $2 local.get $0 - i32.const 3 - i32.shl + local.get $2 i32.add local.get $3 local.get $0 @@ -29004,13 +23111,13 @@ f32.sub f32.const 0 f32.eq - if (result i64) + if (result i32) local.get $1 - i64.trunc_f32_s + i32.trunc_f32_s else - i64.const 0 + i32.const 0 end - i64.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -29019,7 +23126,9 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 442 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 332 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -29028,8 +23137,6 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29041,28 +23148,53 @@ end local.get $0 i32.load offset=4 - i32.const 48 + i32.const 6 i32.add + local.set $2 local.get $1 i32.load offset=4 + local.set $3 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy + i32.const 3 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 443 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 333 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 3516 i32.load i32.const 2 i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29074,7 +23206,7 @@ end local.get $0 i32.load offset=4 - i32.const 16 + i32.const 2 i32.add local.set $2 i32.const 3508 @@ -29090,14 +23222,13 @@ local.get $4 i32.lt_s if + local.get $0 local.get $2 + i32.add + local.get $3 local.get $0 i32.const 3 i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 i32.add f64.load local.tee $1 @@ -29105,13 +23236,13 @@ f64.sub f64.const 0 f64.eq - if (result i64) + if (result i32) local.get $1 - i64.trunc_f64_s + i32.trunc_f64_s else - i64.const 0 + i32.const 0 end - i64.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -29120,15 +23251,11 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 444 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 334 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29140,39 +23267,13 @@ end local.get $0 i32.load offset=4 - local.set $2 local.get $1 i32.load offset=4 - local.set $3 local.get $1 i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $3 - i32.add - i64.load8_u - i64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end + call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 445 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 335 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -29183,8 +23284,6 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29196,7 +23295,7 @@ end local.get $0 i32.load offset=4 - i32.const 32 + i32.const 4 i32.add local.set $2 local.get $1 @@ -29214,18 +23313,16 @@ local.get $1 i32.lt_s if - local.get $2 local.get $0 - i32.const 3 - i32.shl + local.get $2 i32.add local.get $3 local.get $0 i32.const 1 i32.shl i32.add - i64.load16_s - i64.store + i32.load16_s + i32.store8 local.get $0 i32.const 1 i32.add @@ -29234,18 +23331,13 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 446 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 336 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29257,41 +23349,15 @@ end local.get $0 i32.load offset=4 - i32.const 56 + i32.const 7 i32.add - local.set $1 i32.const 3572 i32.load - local.set $2 - i32.const 3580 + i32.const 3576 i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $2 - i32.add - i64.load8_s - i64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end + call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 447 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 337 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29347,71 +23413,71 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Int8Array#constructor local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5552 + i32.const 0 + i32.const 14 + i32.const 3600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5696 + i32.const 0 + i32.const 14 + i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5792 + i32.const 0 + i32.const 14 + i32.const 3712 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5888 + i32.const 0 + i32.const 14 + i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $4 call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $0 local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5984 + i32.const 0 + i32.const 14 + i32.const 3776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> local.get $4 call $~lib/rt/pure/__release local.get $2 @@ -29429,15 +23495,20 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 448 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_get (; 338 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 339 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 i64) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -29457,22 +23528,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Uint64Array#__get + call $~lib/typedarray/Uint8Array#__get local.tee $4 local.get $1 local.get $2 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.tee $5 - i64.ne + i32.ne if - i32.const 6176 + i32.const 3840 i32.const 3 local.get $2 f64.convert_i32_s local.get $4 - f64.convert_i64_u + f64.convert_i32_u local.get $5 - f64.convert_i64_u + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -29491,7 +23562,7 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 449 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 340 ;) (param $0 i32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -29502,8 +23573,6 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29515,7 +23584,7 @@ end local.get $0 i32.load offset=4 - i32.const 24 + i32.const 3 i32.add local.set $2 i32.const 3428 @@ -29531,10 +23600,8 @@ local.get $4 i32.lt_s if - local.get $2 local.get $0 - i32.const 3 - i32.shl + local.get $2 i32.add local.get $3 local.get $0 @@ -29547,13 +23614,13 @@ f32.sub f32.const 0 f32.eq - if (result i64) + if (result i32) local.get $1 - i64.trunc_f32_u + i32.trunc_f32_u else - i64.const 0 + i32.const 0 end - i64.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -29562,20 +23629,17 @@ end end ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 450 ;) (param $0 i32) + (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 341 ;) (param $0 i32) (local $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 3516 i32.load i32.const 2 i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -29587,7 +23651,7 @@ end local.get $0 i32.load offset=4 - i32.const 16 + i32.const 2 i32.add local.set $2 i32.const 3508 @@ -29603,14 +23667,13 @@ local.get $4 i32.lt_s if + local.get $0 local.get $2 + i32.add + local.get $3 local.get $0 i32.const 3 i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 i32.add f64.load local.tee $1 @@ -29618,13 +23681,13 @@ f64.sub f64.const 0 f64.eq - if (result i64) + if (result i32) local.get $1 - i64.trunc_f64_u + i32.trunc_f64_u else - i64.const 0 + i32.const 0 end - i64.store + i32.store8 local.get $0 i32.const 1 i32.add @@ -29633,7 +23696,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 451 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -29689,71 +23752,71 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6080 + i32.const 0 + i32.const 21 + i32.const 3808 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> + call $~lib/typedarray/Uint8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6224 + i32.const 0 + i32.const 21 + i32.const 3888 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6320 + i32.const 0 + i32.const 21 + i32.const 3920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> + call $~lib/typedarray/Uint8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6416 + i32.const 0 + i32.const 21 + i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $4 call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $0 local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int8Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6512 + i32.const 0 + i32.const 21 + i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> local.get $4 call $~lib/rt/pure/__release local.get $2 @@ -29771,7 +23834,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 452 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 343 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -29780,8 +23843,6 @@ i32.load local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 368 @@ -29793,32 +23854,43 @@ end local.get $0 i32.load offset=4 - local.set $1 + local.set $2 i32.const 3364 i32.load - local.set $2 + local.set $3 i32.const 3372 i32.load - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if - local.get $1 + local.get $0 + local.get $2 + i32.add + local.get $3 local.get $0 i32.const 2 i32.shl - local.tee $4 - i32.add - local.get $2 - local.get $4 i32.add i32.load - f32.convert_i32_s - f32.store + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 local.get $0 i32.const 1 i32.add @@ -29827,17 +23899,14 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 453 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 344 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) - (local $5 f32) - (local $6 f32) + (local $5 i32) local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -29851,34 +23920,27 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Float32Array#__get - local.set $3 + call $~lib/typedarray/Uint8ClampedArray#__get + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 - f32.ne + i32.ne if - i32.const 6672 + i32.const 4048 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 - f64.promote_f32 - local.get $6 - f64.promote_f32 + local.get $4 + f64.convert_i32_u + local.get $5 + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -29897,19 +23959,99 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 454 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 345 ;) (param $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) + (local $4 i32) + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 3 + i32.add + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $1 + 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|0 + end + end + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i64) + (local $4 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 368 + i32.const 432 + i32.const 1774 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $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 368 @@ -29919,14 +24061,14 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - i32.const 24 i32.add local.set $2 local.get $1 i32.load offset=4 - local.set $3 + local.set $4 local.get $1 i32.load offset=8 i32.const 3 @@ -29939,19 +24081,33 @@ local.get $1 i32.lt_s if - local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $2 i32.add - local.get $3 + local.get $4 local.get $0 i32.const 3 i32.shl i32.add i64.load - f32.convert_i64_s - f32.store + local.tee $3 + i32.wrap_i64 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i64.extend_i32_s + local.get $3 + i32.const 255 + local.get $3 + i32.wrap_i64 + i32.sub + i32.const 31 + i32.shr_s + i64.extend_i32_s + i64.or + i64.and + i64.store8 local.get $0 i32.const 1 i32.add @@ -29960,15 +24116,17 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> (; 455 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 347 ;) (param $0 i32) + (local $1 f64) (local $2 i32) (local $3 i32) - local.get $1 - i32.load offset=8 + (local $4 i32) + i32.const 3516 + i32.load + i32.const 2 + i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 368 @@ -29980,31 +24138,47 @@ end local.get $0 i32.load offset=4 + i32.const 2 + i32.add local.set $2 - local.get $1 - i32.load offset=4 + i32.const 3508 + i32.load local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 + i32.const 3516 + i32.load + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $2 i32.add - local.get $0 local.get $3 + local.get $0 + i32.const 3 + i32.shl i32.add - i32.load8_u - f32.convert_i32_u - f32.store + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + f64.const 0 + f64.const 255 + local.get $1 + f64.min + f64.max + i32.trunc_f64_u + else + i32.const 0 + end + i32.store8 local.get $0 i32.const 1 i32.add @@ -30012,20 +24186,29 @@ br $for-loop|0 end end - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 456 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 348 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 368 + i32.const 432 + i32.const 1774 + i32.const 18 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $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 2 - i32.shr_u i32.gt_s if i32.const 368 @@ -30035,9 +24218,9 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - i32.const 16 i32.add local.set $2 local.get $1 @@ -30047,18 +24230,16 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $2 i32.add local.get $3 local.get $0 @@ -30066,8 +24247,20 @@ i32.shl i32.add i32.load16_s - f32.convert_i32_s - f32.store + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 local.get $0 i32.const 1 i32.add @@ -30076,18 +24269,17 @@ end end ) - (func $~lib/typedarray/Float32Array#set<~lib/array/Array> (; 457 ;) (param $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 349 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 3580 i32.load i32.const 7 i32.add local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u i32.gt_s if i32.const 368 @@ -30099,33 +24291,43 @@ end local.get $0 i32.load offset=4 - i32.const 28 + i32.const 7 i32.add - local.set $1 + local.set $2 i32.const 3572 i32.load - local.set $2 + local.set $3 i32.const 3580 i32.load - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if - local.get $1 local.get $0 - i32.const 2 - i32.shl + local.get $2 i32.add local.get $0 - local.get $2 + local.get $3 i32.add i32.load8_s - f32.convert_i32_s - f32.store + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 local.get $0 i32.const 1 i32.add @@ -30134,7 +24336,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 458 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 350 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30190,61 +24392,74 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Float32Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $0 - call $~lib/typedarray/Float32Array#set<~lib/array/Array> + call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6608 + i32.const 0 + i32.const 21 + i32.const 4016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 - i32.const 3424 - i32.const 3 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> + call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6720 + i32.const 0 + i32.const 21 + i32.const 4112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $0 local.get $2 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> local.get $0 i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6784 + i32.const 0 + i32.const 21 + i32.const 4144 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.tee $7 + 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 21 + i32.const 4176 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $4 + call $~lib/rt/pure/__release local.get $0 local.get $1 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $0 local.get $3 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> local.get $0 - call $~lib/typedarray/Float32Array#set<~lib/array/Array> + call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6848 + i32.const 0 + i32.const 21 + i32.const 4208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $7 + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $4 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -30254,14 +24469,14 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $4 - 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 ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 459 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 351 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30269,7 +24484,7 @@ i32.load local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30298,7 +24513,7 @@ if local.get $1 local.get $0 - i32.const 3 + i32.const 1 i32.shl i32.add local.get $2 @@ -30307,8 +24522,7 @@ i32.shl i32.add i32.load - f64.convert_i32_s - f64.store + i32.store16 local.get $0 i32.const 1 i32.add @@ -30317,15 +24531,15 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 460 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 352 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) - (local $5 f64) - (local $6 f64) + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.tee $4 local.get $1 @@ -30346,27 +24560,29 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Float64Array#__get + call $~lib/typedarray/Int16Array#__get local.set $3 local.get $1 i32.load offset=4 local.get $2 - i32.const 3 + i32.const 1 i32.shl i32.add - f64.load + i32.load16_s local.tee $5 local.set $6 local.get $3 local.get $5 - f64.ne + i32.ne if - i32.const 7008 + i32.const 4288 i32.const 3 local.get $2 f64.convert_i32_s local.get $3 + f64.convert_i32_s local.get $6 + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -30385,17 +24601,18 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 461 ;) (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 353 ;) (param $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 3436 i32.load i32.const 3 i32.add local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30408,35 +24625,45 @@ end local.get $0 i32.load offset=4 - i32.const 24 + i32.const 6 i32.add - local.set $1 + local.set $2 i32.const 3428 i32.load - local.set $2 + local.set $3 i32.const 3436 i32.load - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 - i32.const 3 + i32.const 1 i32.shl i32.add - local.get $2 + local.get $3 local.get $0 i32.const 2 i32.shl i32.add f32.load - f64.promote_f32 - f64.store + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store16 local.get $0 i32.const 1 i32.add @@ -30445,10 +24672,9 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 462 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 354 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -30457,7 +24683,7 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30470,36 +24696,107 @@ end local.get $0 i32.load offset=4 - i32.const 48 + i32.const 12 i32.add local.set $2 local.get $1 i32.load offset=4 local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 355 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if local.get $2 local.get $0 - i32.const 3 + i32.const 1 i32.shl - local.tee $4 i32.add local.get $3 - local.get $4 + local.get $0 + i32.const 3 + i32.shl i32.add - i64.load - f64.convert_i64_s - f64.store + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store16 local.get $0 i32.const 1 i32.add @@ -30508,14 +24805,14 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> (; 463 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 356 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 i32.load offset=8 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30544,15 +24841,14 @@ if local.get $2 local.get $0 - i32.const 3 + i32.const 1 i32.shl i32.add local.get $0 local.get $3 i32.add i32.load8_u - f64.convert_i32_u - f64.store + i32.store16 local.get $0 i32.const 1 i32.add @@ -30561,9 +24857,7 @@ end end ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 464 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 357 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -30572,7 +24866,7 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30585,46 +24879,15 @@ end local.get $0 i32.load offset=4 - i32.const 32 + i32.const 8 i32.add - local.set $2 local.get $1 i32.load offset=4 - local.set $3 local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 - 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|0 - end - end + call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Float64Array#set<~lib/array/Array> (; 465 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 358 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -30634,7 +24897,7 @@ i32.add local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u i32.gt_s if @@ -30647,7 +24910,7 @@ end local.get $0 i32.load offset=4 - i32.const 56 + i32.const 14 i32.add local.set $1 i32.const 3572 @@ -30665,15 +24928,14 @@ if local.get $1 local.get $0 - i32.const 3 + i32.const 1 i32.shl i32.add local.get $0 local.get $2 i32.add i32.load8_s - f64.convert_i32_s - f64.store + i32.store16 local.get $0 i32.const 1 i32.add @@ -30682,7 +24944,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 466 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 359 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -30738,59 +25000,72 @@ i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Float64Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 6912 + i32.const 1 + i32.const 22 + i32.const 4240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7056 + i32.const 1 + i32.const 22 + i32.const 4336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> local.get $0 local.get $2 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7152 + i32.const 1 + i32.const 22 + i32.const 4384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.tee $7 + 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 22 + i32.const 4432 + call $~lib/rt/__allocArray + 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 $0 local.get $1 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Uint8Array> + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> local.get $0 local.get $3 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> local.get $0 - call $~lib/typedarray/Float64Array#set<~lib/array/Array> + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7248 + i32.const 1 + i32.const 22 + i32.const 4480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $7 + 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 @@ -30800,169 +25075,96 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $4 - 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 ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 467 ;) (param $0 i32) (param $1 i32) - (local $2 f32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 360 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 i32.const 1 - i32.add - local.set $3 - local.get $1 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=8 - i32.const 2 i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $3 - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $2 - local.get $2 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $2 - 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|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 468 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + local.tee $4 local.get $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 + i32.load offset=12 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - i32.const 0 - local.set $0 + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 + call $~lib/builtins/abort + unreachable + end loop $for-loop|0 - local.get $0 + local.get $2 local.get $4 i32.lt_s if local.get $0 local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 + call $~lib/typedarray/Uint16Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 1 i32.shl i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $0 + i32.load16_u + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + i32.ne + if + i32.const 4576 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.convert_i32_u + local.get $6 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 469 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 361 ;) (param $0 i32) + (local $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.const 3436 + i32.load + i32.const 3 + i32.add local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -30974,38 +25176,45 @@ end local.get $0 i32.load offset=4 + i32.const 6 + i32.add local.set $2 - local.get $1 - i32.load offset=4 + i32.const 3428 + i32.load local.set $3 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 + i32.const 3436 + i32.load + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $0 local.get $2 + local.get $0 + i32.const 1 + i32.shl i32.add - i32.const 255 local.get $3 local.get $0 i32.const 2 i32.shl i32.add - i32.load - local.tee $4 - i32.const 255 - local.get $4 - i32.lt_u - select - i32.store8 + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store16 local.get $0 i32.const 1 i32.add @@ -31014,2934 +25223,7813 @@ end end ) - (func $start:std/typedarray (; 470 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) + (local $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 f32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - i32.const 0 - call $std/typedarray/testInstantiate - i32.const 5 - call $std/typedarray/testInstantiate - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 95 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 96 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 97 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 98 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 99 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 100 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#subarray - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 + i32.const 3516 + i32.load i32.const 2 - i32.shr_u - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 103 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 104 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=8 + local.get $0 + i32.load offset=4 i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 105 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + 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|0 + end end - local.get $1 + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 363 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 i32.const 0 - call $~lib/typedarray/Int32Array#__get + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 106 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set local.get $1 - call $~lib/rt/pure/__release - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 2 - f64.const 7 - call $~lib/typedarray/Float64Array#__set + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint16Array#constructor + local.tee $0 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 - i32.const 3 - f64.const 6 - call $~lib/typedarray/Float64Array#__set + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4528 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set + call $~lib/typedarray/Uint16Array#set<~lib/array/Array> local.get $0 - i32.const 5 - f64.const 4 - call $~lib/typedarray/Float64Array#__set + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4624 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 - i32.const 6 - f64.const 3 - call $~lib/typedarray/Float64Array#__set + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> local.get $0 - i32.const 7 - f64.const 8 - call $~lib/typedarray/Float64Array#__set + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4672 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Float64Array#subarray - local.set $1 + call $~lib/typedarray/Uint16Array#set<~lib/array/Array> local.get $0 + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4720 + call $~lib/rt/__allocArray + 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 $0 local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 122 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 16 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 123 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 32 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 124 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - global.set $~argumentsLength - local.get $1 - call $~lib/typedarray/Float64Array#sort + 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 23 + i32.const 4768 + call $~lib/rt/__allocArray + 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 $0 + 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 + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.eq - if (result i32) - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.eq - else - i32.const 0 - end - i32.eqz + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 126 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1774 + i32.const 18 call $~lib/builtins/abort unreachable end + local.get $2 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 - i32.const 0 - i32.const -32 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.load offset=12 + i32.add local.get $0 + i32.load offset=8 i32.const 2 - i32.const 256 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 135 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 365 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + 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 304 - i32.const 136 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable end + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i32.ne + if + i32.const 4880 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i32_s + local.get $5 + f64.convert_i32_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 366 ;) (param $0 i32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3436 + i32.load + i32.const 3 + i32.add local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 255 - i32.ne + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 137 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 1 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 + i32.load offset=4 + i32.const 12 + i32.add + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 i32.const 0 - i32.const 14 - i32.const 496 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 149 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + local.tee $5 + i32.add + local.get $3 + local.get $5 + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + 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 + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 367 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add local.get $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 576 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 152 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 + i32.load offset=4 + i32.const 24 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 i32.const 0 - i32.const 14 - i32.const 608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 155 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store32 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - local.get $0 + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 368 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3516 + i32.load i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + i32.add local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 640 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 158 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + 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|0 + end + end + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 369 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 161 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray - local.tee $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 local.get $1 i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 165 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.add + i32.load8_u + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end + ) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 370 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.load offset=8 i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 166 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i32.shr_u + i32.const 4 + i32.add + local.get $0 i32.load offset=8 - i32.const 3 - i32.ne + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 167 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 local.get $1 - i32.const 3 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 i32.const 0 - i32.const 14 - i32.const 704 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 168 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3580 + i32.load + i32.const 7 + i32.add local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 736 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 169 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - 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 - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - 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 - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $1 + i32.const 3572 + i32.load + local.set $2 + i32.const 3580 + i32.load + local.set $3 i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $2 + i32.add + i32.load8_s + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 372 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $2 i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set 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 - i32.const 1 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 2 - i32.const 15 - i32.const 768 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 181 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + i32.const 3360 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.const 5 + i32.const 10 i32.const 2 i32.const 15 - i32.const 816 + i32.const 4816 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 184 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $0 - i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.const 5 + i32.const 10 i32.const 2 i32.const 15 - i32.const 864 + i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 187 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $0 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + local.get $2 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> local.get $0 - i32.const 5 + i32.const 10 i32.const 2 i32.const 15 - i32.const 912 + i32.const 4992 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 190 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $0 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release + call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 - i32.const 5 + i32.const 10 i32.const 2 i32.const 15 - i32.const 960 + i32.const 5056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 193 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $4 call $~lib/rt/pure/__release + local.get $0 local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 197 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 198 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 199 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 3 - i32.const 2 - i32.const 15 - i32.const 1008 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 200 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> local.get $0 - i32.const 5 + 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 15 - i32.const 1040 + i32.const 5120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 201 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 + 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 $4 + local.get $0 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $6 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 - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 5 - i32.const 6 - call $~lib/typedarray/Int8Array#__set + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 373 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 1 - i32.const 6 - call $~lib/typedarray/Int8Array#subarray - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 222 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 223 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 1 + i32.const 2 + i32.shr_u + local.tee $3 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 i32.const 304 - i32.const 224 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint32Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i32.ne + if + i32.const 5248 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i32_u + local.get $5 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 374 ;) (param $0 i32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 i32.load offset=8 - i32.const 5 - i32.ne + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 225 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 1 - i32.const 5 - call $~lib/typedarray/Int8Array#subarray - local.tee $2 + local.get $0 + i32.load offset=4 + i32.const 12 + i32.add + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 228 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + local.tee $5 + i32.add + local.get $3 + local.get $5 + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $1 + 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 $2 + ) + (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 375 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 i32.load offset=8 - i32.const 4 - i32.ne + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 229 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $1 + 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|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 376 ;) + (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 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/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + i32.const 3360 + i32.const 0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 230 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 24 + i32.const 5184 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + 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 24 + i32.const 5296 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 local.get $2 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 231 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 24 + i32.const 5360 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + 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 24 + i32.const 5424 + call $~lib/rt/__allocArray + 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 $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 24 + i32.const 5488 + call $~lib/rt/__allocArray + 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 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray - local.tee $3 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 234 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 + call $~lib/rt/pure/__release + local.get $0 + 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 + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 377 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3372 + i32.load + local.get $0 i32.load offset=8 i32.const 3 - i32.ne + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 235 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 236 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load offset=4 + local.set $1 + i32.const 3364 + i32.load + local.set $2 + i32.const 3372 + i32.load + local.set $3 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + i64.load32_s + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - local.get $3 + ) + (func $~lib/array/Array#__unchecked_get (; 378 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 379 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i64) + 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 304 - i32.const 237 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i64.ne + if + i32.const 5648 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i64_s + local.get $5 + f64.convert_i64_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 380 ;) (param $0 i32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3436 + i32.load i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $2 - local.get $1 - i32.const 0 + i32.add + local.get $0 + i32.load offset=8 i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $3 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1088 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 248 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $1 + 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 + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 381 ;) (param $0 i32) (param $1 i32) local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 1 + i32.load offset=8 i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $5 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1136 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + 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 0 - i32.const 304 - i32.const 250 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + local.get $0 + i32.load offset=4 + i32.const 48 + i32.add local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 1 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $7 - i32.const 5 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 382 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3516 + i32.load i32.const 2 - i32.const 15 - i32.const 1184 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 252 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 2 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $11 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1232 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $12 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 254 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + local.tee $5 + i32.add + local.get $3 + local.get $5 + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $1 + 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|0 + end end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 383 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 0 + i32.load offset=8 + local.get $0 + i32.load offset=8 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $13 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $14 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 256 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.add + i64.load8_u + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 384 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + i32.load offset=8 i32.const 1 - i32.const 3 + i32.shr_u i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1328 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $16 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 258 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + local.get $0 + i32.load offset=4 + i32.const 32 + i32.add + local.set $2 local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 i32.const 1 - i32.const 2 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i64.load16_s + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 385 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3580 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 260 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 + local.get $0 + i32.load offset=4 + i32.const 56 + i32.add + local.set $1 + i32.const 3572 + i32.load + local.set $2 + i32.const 3580 + i32.load + local.set $3 i32.const 0 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1424 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $20 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 262 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $2 + i32.add + i64.load8_s + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 386 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set local.get $2 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set local.get $1 - call $~lib/rt/pure/__release - local.get $0 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 - i32.const -2 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 - i32.const 5 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 2 - i32.const 15 - i32.const 1472 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Int64Array#constructor + local.tee $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 264 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $1 + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const -4 - i32.const -3 - i32.const -2 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1520 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5696 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 266 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> local.get $0 - i32.const -4 - i32.const -3 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1568 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 268 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $1 + local.tee $7 + 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 25 + i32.const 5888 + call $~lib/rt/__allocArray + 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 - i32.const -4 - i32.const -3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1616 + 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 25 + i32.const 5984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 270 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 + local.tee $4 + 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 $4 + local.get $0 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 $10 - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $15 - 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 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 387 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i64) + (local $5 i64) local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $2 i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 + i32.shr_u + local.tee $3 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 i32.const 304 - i32.const 282 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 283 - i32.const 2 - call $~lib/builtins/abort - unreachable + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint64Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i64.ne + if + i32.const 6176 + 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 304 + i32.const 718 + i32.const 6 + 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 $2 + ) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) + (local $1 f32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 i32.load offset=8 - i32.const 12 - i32.ne + i32.const 3 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 284 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#slice - local.tee $1 + i32.load offset=4 + i32.const 24 + i32.add + local.set $2 + i32.const 3428 + i32.load + local.set $3 + i32.const 3436 + i32.load + local.set $4 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 287 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 288 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $1 + local.get $1 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $1 + 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 end - local.get $1 - i32.load offset=8 + ) + (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 389 ;) (param $0 i32) + (local $1 f64) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 3516 + i32.load i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 i32.shr_u - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 289 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 290 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $1 - i32.load offset=8 - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 291 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 + i32.const 3508 + i32.load + local.set $3 + i32.const 3516 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + local.tee $5 + i32.add + local.get $3 + local.get $5 + i32.add + f64.load + local.tee $1 + local.get $1 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $1 + 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|0 + end end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 390 ;) + (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 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $2 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set local.get $2 i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $2 i32.const 2 - call $~lib/typedarray/Int32Array#slice - local.tee $3 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 i32.const 0 - call $~lib/typedarray/Int32Array#__get + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $1 i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 294 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 295 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 1001 + call $~lib/typedarray/Int16Array#__set local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 296 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 26 + i32.const 6080 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + 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 26 + i32.const 6224 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + 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 26 + i32.const 6320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + 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 26 + i32.const 6416 + call $~lib/rt/__allocArray + 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 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 297 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> local.get $0 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice + i32.const 10 + i32.const 3 + i32.const 26 + i32.const 6512 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain local.tee $4 - i32.eq - if - i32.const 0 - i32.const 304 - i32.const 300 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u + 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 $0 + 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 + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 391 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 f32) + (local $4 i32) + (local $5 f32) + (local $6 f32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u + local.tee $4 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 i32.const 304 - i32.const 301 + i32.const 712 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $4 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 302 - i32.const 2 - call $~lib/builtins/abort - unreachable + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Float32Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + f32.ne + if + i32.const 6672 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.promote_f32 + local.get $6 + f64.promote_f32 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + 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 $4 + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 392 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add local.get $0 i32.load offset=8 - i32.ne + i32.const 2 + i32.shr_u + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 303 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.load offset=4 + i32.const 24 + i32.add + local.set $2 local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $2 i32.load offset=4 local.set $3 - local.get $2 + local.get $1 i32.load offset=8 - local.set $4 + i32.const 3 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $3 - i32.add - i32.load8_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - block $folding-inner1 - block $folding-inner0 - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|00 - local.get $0 - local.get $4 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|01 - local.get $0 - local.get $4 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 + if + local.get $2 local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 + i32.shl + i32.add + local.get $3 local.get $0 - call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + i32.shl + i32.add + i64.load + f32.convert_i64_s + f32.store local.get $0 i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 393 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 2 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 local.get $0 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set + i32.shl + i32.add + local.get $3 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 + i32.shl + i32.add + i32.load16_s + f32.convert_i32_s + f32.store local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - loop $for-loop|02 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $8 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $8 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 + i32.add local.set $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $3 - loop $for-loop|03 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $9 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 394 ;) + (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) + (local $9 i32) + (local $10 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $3 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $3 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $3 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $8 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $8 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + local.set $2 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 3364 + i32.load + local.set $4 + i32.const 3372 + i32.load + local.set $5 + loop $for-loop|0 + local.get $6 + local.get $5 + i32.lt_s + if + local.get $9 + local.get $6 + i32.const 2 + i32.shl + local.tee $2 + i32.add + local.get $2 + local.get $4 + i32.add + i32.load + f32.convert_i32_s + f32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 end - local.get $9 - f64.const 6 - f64.ne - br_if $folding-inner0 + end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6608 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + i32.const 3424 + i32.const 3 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + local.get $7 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6784 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $3 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=4 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $2 + loop $for-loop|00 local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 local.get $2 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|04 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $3 - i32.add - i32.load8_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|04 - end + i32.lt_s + if + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 end + end + local.get $0 + local.get $8 + call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + i32.const 3580 + i32.load + i32.const 7 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 28 + i32.add + local.set $4 + i32.const 3572 + i32.load + local.set $5 + i32.const 3580 + i32.load + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|01 local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 + i32.lt_s + if + local.get $4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $1 + local.get $5 + i32.add + i32.load8_s + f32.convert_i32_s + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|01 + end + end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6848 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $2 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 395 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + (local $5 f64) + (local $6 f64) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $4 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if local.get $0 - i32.const 2 + local.get $2 + call $~lib/typedarray/Float64Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 + i32.shl + i32.add + f64.load + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + f64.ne + if + i32.const 7008 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + local.get $6 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 396 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 48 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 local.get $0 - i32.load offset=4 - local.set $3 + i32.const 3 + i32.shl + local.tee $4 + i32.add + local.get $3 + local.get $4 + i32.add + i64.load + f64.convert_i64_s + f64.store local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u i32.const 1 - i32.sub - local.set $1 - loop $for-loop|05 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|05 - end - end + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 397 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 32 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if local.get $2 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 local.get $0 - call $~lib/rt/pure/__release i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 - i32.const 0 + i32.shl + i32.add + local.get $3 + local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__set + i32.shl + i32.add + i32.load16_s + f64.convert_i32_s + f64.store local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 398 ;) + (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) + (local $9 i32) + (local $10 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $6 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $6 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $6 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $7 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $7 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $7 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + local.set $0 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.set $8 + i32.const 3364 + i32.load + local.set $3 + i32.const 3372 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $2 + local.get $4 + i32.lt_s + if + local.get $8 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 6912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 3436 + i32.load + i32.const 3 + 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 24 + i32.add + local.set $3 + i32.const 3428 + i32.load + local.set $4 + i32.const 3436 + i32.load + local.set $5 + i32.const 0 + local.set $0 + loop $for-loop|00 local.get $0 - i32.load offset=4 - local.set $3 + local.get $5 + i32.lt_s + if + local.get $3 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $4 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7056 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7152 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $2 + i32.load offset=8 + 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 + local.set $5 + local.get $2 + i32.load offset=4 + local.set $9 + local.get $2 + i32.load offset=8 + local.set $10 + i32.const 0 + local.set $0 + loop $for-loop|01 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|06 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $2 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|06 - end + local.get $10 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $9 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 end - local.get $2 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 + end + local.get $1 + local.get $7 + call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> + i32.const 3580 + i32.load + i32.const 7 + 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 56 + i32.add + local.set $5 + i32.const 3572 + i32.load + local.set $9 + i32.const 3580 + i32.load + local.set $10 + i32.const 0 + local.set $0 + loop $for-loop|02 local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + local.get $10 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $9 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 399 ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + local.set $3 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set + local.get $3 + i32.add + local.get $4 local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set + i32.shl + i32.add + f32.load + local.tee $2 + local.get $2 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $2 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 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 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 400 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.add + local.get $3 local.get $0 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set + i32.shl + i32.add + i32.load + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 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 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 401 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set + local.get $2 + i32.add + i32.const 255 + local.get $3 local.get $0 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - f32.const 0 - local.set $8 - local.get $0 - i32.load offset=4 - local.set $2 + i32.shl + i32.add + i32.load + local.tee $4 + i32.const 255 + local.get $4 + i32.lt_u + select + i32.store8 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 1 - i32.sub - local.set $1 - loop $for-loop|07 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $8 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $8 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|07 - end - end - local.get $8 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $start:std/typedarray (; 402 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 f32) + (local $8 f64) + (local $9 i32) + (local $10 i32) + (local $11 f64) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) + i32.const 0 + call $std/typedarray/testInstantiate + i32.const 5 + call $std/typedarray/testInstantiate + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 95 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 96 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 97 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 98 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 99 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 100 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#subarray + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 103 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 104 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 105 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 106 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + 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 7 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Float64Array#subarray + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 122 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 16 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 123 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 32 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 124 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + global.set $~argumentsLength + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + i32.const 1 + i32.le_s + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $3 + i32.load offset=4 + local.set $0 + local.get $2 + i32.const 2 + i32.eq + if local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set + f64.load offset=8 + local.set $11 local.get $0 + f64.load + local.set $12 i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - f64.const 0 - local.set $9 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|08 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $2 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $9 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|08 - end - end - local.get $9 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - 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> - call $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> - 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 $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 + global.set $~argumentsLength + local.get $11 + local.get $12 + call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 607 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $12 + f64.store offset=8 + local.get $0 + local.get $11 + f64.store end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $2 + call $~lib/util/sort/weakHeapSort + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $0 + i32.const 0 + i32.const -32 + 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 256 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + if + i32.const 0 + i32.const 304 + i32.const 135 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 136 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 255 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 137 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 496 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 149 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 576 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 152 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 608 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 155 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 640 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 158 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 672 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 161 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 165 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 166 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 167 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 3 + i32.const 0 + i32.const 14 + i32.const 704 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 168 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 736 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 169 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + 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 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 768 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 181 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 816 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 184 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 864 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 187 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 190 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 193 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#subarray + local.tee $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 197 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 198 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 199 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 3 + i32.const 2 + i32.const 15 + i32.const 1008 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 200 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1040 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 201 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + 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 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + 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 + i32.const 5 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 6 + call $~lib/typedarray/Int8Array#subarray + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 222 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 223 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 224 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 225 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 5 + call $~lib/typedarray/Int8Array#subarray + local.tee $2 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 228 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 229 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 230 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 231 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $3 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 234 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 235 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 236 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 237 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $2 + local.get $0 + i32.const 0 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $3 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1088 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 248 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const 1 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $5 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1136 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 250 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 1 + i32.const 2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $9 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1184 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 252 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 2 + i32.const 2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $13 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1232 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $14 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 254 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $15 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $16 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 256 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $17 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1328 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $18 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 258 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 1 + i32.const 2 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $19 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 260 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $21 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1424 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 262 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const -2 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $23 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1472 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $24 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 264 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const -4 + i32.const -3 + i32.const -2 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $25 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1520 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 266 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + i32.const -4 + i32.const -3 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $27 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1568 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 268 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const -4 + i32.const -3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $29 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 270 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + 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 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $15 + 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 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $23 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#subarray + local.tee $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 282 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 283 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 284 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#slice + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 287 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 288 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 289 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 290 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 291 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#slice + local.tee $3 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 294 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 295 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 296 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 297 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.tee $4 + i32.eq + if + i32.const 0 + i32.const 304 + i32.const 300 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 301 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 302 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 303 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + 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 $4 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength local.get $0 - call $~lib/typedarray/Float64Array#includes - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 608 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 613 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $0 local.get $1 - call $~lib/typedarray/Float32Array#includes - i32.const 0 - i32.ne i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> - 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|trampoline - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor + i32.add 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|trampoline - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - if + br $for-loop|0 + end + end + 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 $0 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|00 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|01 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|01 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|02 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $7 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $7 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $7 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $for-loop|03 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $8 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $8 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|04 + local.get $0 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $0 + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|04 + end + end + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|05 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|06 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + f32.const 0 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|07 + local.get $1 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $7 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $7 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|07 + end + end + local.get $7 + f32.const 6 + f32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + f64.const 0 + local.set $8 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|08 + local.get $1 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $8 + local.get $2 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $8 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|08 + end + end + local.get $8 + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> + 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 $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 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 52 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 54 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 56 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 58 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 60 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 62 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 64 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 66 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner2 + local.get $0 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner3 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 74 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 76 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 78 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 80 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 82 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 84 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 86 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 88 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner4 + local.get $0 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner5 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 96 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 98 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 100 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 102 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 104 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 106 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 108 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner7 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 110 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner6 + local.get $0 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner7 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + 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 $1 + i32.const 1 + i32.const 1696 + 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 $1 + i32.const 2 + i32.const 1696 + 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 $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + loop $for-loop|09 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $2 + i32.add + i32.load8_s + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|09 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 113 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 114 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + 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 $1 + i32.const 1 + i32.const 1696 + 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 $1 + i32.const 2 + i32.const 1696 + 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 $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + loop $for-loop|010 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|010 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + loop $for-loop|011 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|011 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 117 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 118 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 119 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 120 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|012 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $for-loop|013 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|013 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner8 + local.get $1 + 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 $0 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $0 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $8 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $8 + local.get $8 + f64.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 608 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $1 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $2 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + if (result i32) + i32.const 0 + local.get $4 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $1 + i32.load offset=4 + local.set $6 + loop $while-continue|014 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $7 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $7 + local.get $7 + f32.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|014 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> + 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|trampoline + local.tee $2 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 691 + i32.const 2 + 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|trampoline + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + 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 21 + i32.const 7344 + call $~lib/rt/__allocArray + 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 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 21 + i32.const 7376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + 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 $9 + call $~lib/rt/pure/__release + return + end + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 415 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 417 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 438 + i32.const 2 + call $~lib/builtins/abort + unreachable + end i32.const 0 i32.const 304 - i32.const 695 + i32.const 440 i32.const 2 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 21 - i32.const 7344 - call $~lib/rt/__allocArray - 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 304 + i32.const 461 i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $3 - 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 21 - i32.const 7376 - call $~lib/rt/__allocArray - 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 304 - i32.const 323 + i32.const 463 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 344 + i32.const 495 i32.const 2 call $~lib/builtins/abort unreachable ) - (func $~start (; 471 ;) + (func $~start (; 403 ;) global.get $~started if return @@ -33951,7 +33039,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 472 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 404 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index 88a77a791b..b4bc9fb7be 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,7 @@ (module (type $none_=>_none (func)) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result 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))) @@ -137,18 +137,26 @@ end i32.const 0 ) - (func $~lib/rt/stub/maybeGrowMemory (; 4 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 4 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - memory.size + (local $3 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add local.tee $2 i32.const 16 + i32.add + local.tee $0 + memory.size + local.tee $3 + i32.const 16 i32.shl local.tee $1 i32.gt_u if - local.get $2 + local.get $3 local.get $0 local.get $1 i32.sub @@ -159,7 +167,7 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 + local.get $3 local.get $1 i32.gt_s select @@ -178,6 +186,22 @@ end local.get $0 global.set $~lib/rt/stub/offset + local.get $2 + i32.const 16 + i32.sub + local.tee $0 + i32.const 16 + i32.store + local.get $0 + i32.const 1 + i32.store offset=4 + local.get $0 + i32.const 3 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $2 ) (func $start:typeof (; 5 ;) i32.const 64 @@ -400,21 +424,7 @@ global.set $~lib/rt/stub/startOffset i32.const 304 global.set $~lib/rt/stub/offset - i32.const 336 - call $~lib/rt/stub/maybeGrowMemory - i32.const 304 - i32.const 16 - i32.store - i32.const 308 - i32.const 1 - i32.store - i32.const 312 - i32.const 3 - i32.store - i32.const 316 - i32.const 0 - i32.store - i32.const 320 + call $~lib/rt/stub/__alloc global.set $typeof/c i32.const 64 i32.const 64 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 3a0a1a95fd..9b72fcf65f 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -22,49 +22,7 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $while/testSimple (; 5 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 10 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 11 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNested (; 6 ;) + (func $while/testNested (; 5 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -152,103 +110,7 @@ i32.const 1 global.set $while/ran ) - (func $while/testEmpty (; 7 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 1 - local.set $0 - loop $while-continue|0 - local.get $0 - local.tee $2 - i32.const 1 - i32.sub - local.set $0 - local.get $2 - if (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $1 - else - i32.const 0 - end - br_if $while-continue|0 - end - local.get $0 - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 45 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 46 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNestedContinue (; 8 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - i32.const 10 - local.set $1 - loop $while-continue|0 - local.get $0 - if - loop $while-continue|1 - local.get $1 - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|1 - end - end - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 126 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 32 - i32.const 127 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 9 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -414,7 +276,7 @@ end end ) - (func $~lib/rt/tlsf/insertBlock (; 10 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/insertBlock (; 7 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -697,7 +559,7 @@ i32.or i32.store offset=4 ) - (func $~lib/rt/tlsf/addMemory (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/addMemory (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -811,7 +673,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/maybeInitialize (; 12 ;) (result i32) + (func $~lib/rt/tlsf/maybeInitialize (; 9 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -898,7 +760,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,54 +817,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - memory.size - local.tee $1 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $1 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - i32.const 65551 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $2 - local.get $1 - local.get $2 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $2 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $1 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -1063,8 +878,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1088,8 +904,49 @@ local.tee $1 i32.eqz if + memory.size + local.tee $1 + i32.const 16 + local.get $0 + i32.load offset=1568 + local.get $1 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + i32.const 65551 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $2 + local.get $1 + local.get $2 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $2 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end local.get $0 - call $~lib/rt/tlsf/growMemory + local.get $1 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 call $~lib/rt/tlsf/searchBlock local.tee $1 @@ -1137,245 +994,187 @@ call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/increment (; 17 ;) (param $0 i32) - (local $1 i32) - local.get $0 - i32.load offset=4 - local.tee $1 - i32.const -268435456 - i32.and - local.get $1 - i32.const 1 - i32.add - i32.const -268435456 - i32.and - i32.ne - if - i32.const 0 - i32.const 176 - i32.const 109 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 - local.get $0 - call $~lib/rt/rtrace/onincrement - local.get $0 - i32.load - i32.const 1 - i32.and - if - i32.const 0 - i32.const 176 - i32.const 112 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - ) - (func $while/Ref#constructor (; 18 ;) (result i32) + (func $while/Ref#constructor (; 13 ;) (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - local.tee $0 - i32.const 208 - i32.gt_u - if - local.get $0 - i32.const 16 - i32.sub - call $~lib/rt/pure/increment - end - local.get $0 - ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) - local.get $0 + local.tee $1 i32.const 208 i32.gt_u if - local.get $0 + local.get $1 i32.const 16 i32.sub - call $~lib/rt/pure/decrement - end - ) - (func $while/testRef (; 20 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $while/Ref#constructor - local.set $0 - loop $while-continue|0 + local.tee $0 + i32.load offset=4 + local.tee $2 + i32.const -268435456 + i32.and + local.get $2 + i32.const 1 + i32.add + i32.const -268435456 + i32.and + i32.ne + if + i32.const 0 + i32.const 176 + i32.const 109 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 + local.get $2 + i32.const 1 + i32.add + i32.store offset=4 + local.get $0 + call $~lib/rt/rtrace/onincrement + local.get $0 + i32.load + i32.const 1 + i32.and if - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $2 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - else - call $while/Ref#constructor - local.set $2 - local.get $0 - call $~lib/rt/pure/__release - end - local.get $2 - local.set $0 - br $while-continue|0 + i32.const 0 + i32.const 176 + i32.const 112 + i32.const 13 + call $~lib/builtins/abort + unreachable end end local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 142 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + ) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 + i32.const 208 + i32.gt_u if - i32.const 0 - i32.const 32 - i32.const 143 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement end - i32.const 1 - global.set $while/ran - local.get $0 - call $~lib/rt/pure/__release ) - (func $while/testRefAutorelease (; 21 ;) + (func $start:while (; 15 ;) (local $0 i32) (local $1 i32) (local $2 i32) - call $while/Ref#constructor + i32.const 0 + global.set $while/ran + i32.const 10 local.set $0 loop $while-continue|0 - block $while-break|0 - call $while/Ref#constructor - local.tee $1 - call $~lib/rt/pure/__release + local.get $0 + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 local.get $1 - if - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $1 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $0 - br $while-break|0 - end - br $while-continue|0 - end + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 end end - local.get $2 - i32.const 10 - i32.ne + local.get $0 if i32.const 0 i32.const 32 - i32.const 162 + i32.const 10 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 + i32.const 10 + i32.ne if i32.const 0 i32.const 32 - i32.const 163 + i32.const 11 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 1 global.set $while/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $start:while (; 22 ;) - (local $0 i32) i32.const 0 global.set $while/ran - call $while/testSimple + call $while/testNested global.get $while/ran i32.eqz if i32.const 0 i32.const 32 - i32.const 16 + i32.const 39 i32.const 0 call $~lib/builtins/abort unreachable end i32.const 0 global.set $while/ran - call $while/testNested - global.get $while/ran - i32.eqz + i32.const 1 + local.set $0 + loop $while-continue|00 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + if (result i32) + local.get $2 + i32.const 1 + i32.add + local.tee $2 + else + i32.const 0 + end + br_if $while-continue|00 + end + local.get $0 + i32.const -1 + i32.ne if i32.const 0 i32.const 32 - i32.const 39 - i32.const 0 + i32.const 45 + i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 0 - global.set $while/ran - call $while/testEmpty - global.get $while/ran - i32.eqz + local.get $2 + i32.const 1 + i32.ne if i32.const 0 i32.const 32 - i32.const 51 - i32.const 0 + i32.const 46 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran - loop $while-continue|0 + i32.const 0 + local.set $0 + loop $while-continue|01 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $while-continue|0 + br_if $while-continue|01 end local.get $0 i32.const 10 @@ -1406,14 +1205,14 @@ global.set $while/ran i32.const 10 local.set $0 - loop $while-continue|00 + loop $while-continue|02 local.get $0 if local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|00 + br $while-continue|02 end end local.get $0 @@ -1429,20 +1228,108 @@ global.set $while/ran i32.const 0 global.set $while/ran - call $while/testNestedContinue - global.get $while/ran - i32.eqz + i32.const 10 + local.set $0 + i32.const 10 + local.set $1 + loop $while-continue|03 + local.get $0 + if + loop $while-continue|1 + local.get $1 + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|1 + end + end + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $while-continue|03 + end + end + local.get $0 if i32.const 0 i32.const 32 - i32.const 132 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + if i32.const 0 + i32.const 32 + i32.const 127 + i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $while/ran i32.const 0 global.set $while/ran - call $while/testRef + i32.const 0 + local.set $2 + call $while/Ref#constructor + local.set $0 + loop $while-continue|04 + local.get $0 + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + i32.const 0 + local.set $1 + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + else + call $while/Ref#constructor + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + end + local.get $1 + local.set $0 + br $while-continue|04 + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 142 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 143 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + local.get $0 + call $~lib/rt/pure/__release global.get $while/ran i32.eqz if @@ -1455,7 +1342,61 @@ end i32.const 0 global.set $while/ran - call $while/testRefAutorelease + i32.const 0 + local.set $1 + call $while/Ref#constructor + local.set $0 + loop $while-continue|05 + block $while-break|0 + call $while/Ref#constructor + local.tee $2 + call $~lib/rt/pure/__release + local.get $2 + if + local.get $1 + i32.const 1 + i32.add + local.tee $1 + i32.const 10 + i32.eq + if + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 0 + local.set $0 + br $while-break|0 + end + br $while-continue|05 + end + end + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 162 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 163 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $while/ran + local.get $0 + call $~lib/rt/pure/__release global.get $while/ran i32.eqz if @@ -1467,7 +1408,7 @@ unreachable end ) - (func $~start (; 23 ;) + (func $~start (; 16 ;) global.get $~started if return @@ -1477,7 +1418,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From f4c70ae4ce35ab95c566b8be2e750ccbe5d5dd1a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 04:58:49 +0200 Subject: [PATCH 14/51] better --- cli/asc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 4824544e83..e002762ddb 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -646,8 +646,8 @@ exports.main = function main(argv, options, callback) { // enchance options for inline passes if (optimizeLevel >= 2 && shrinkLevel === 0) { module.setAlwaysInlineMaxSize(12); - module.setFlexibleInlineMaxSize(80); - module.setOneCallerInlineMaxSize(80); + module.setFlexibleInlineMaxSize(70); + module.setOneCallerInlineMaxSize(90); } else { module.setAlwaysInlineMaxSize(4); // default: 2 module.setFlexibleInlineMaxSize(55); // default: 20 From f179890a5e0c9217bcaf8d35f3af0745348ebc3a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 05:30:49 +0200 Subject: [PATCH 15/51] more --- cli/asc.js | 6 +- tests/compiler/do.optimized.wat | 144 +- .../extends-baseaggregate.optimized.wat | 161 +- tests/compiler/for.optimized.wat | 300 +- tests/compiler/getter-call.optimized.wat | 15 +- .../implicit-getter-setter.optimized.wat | 147 +- tests/compiler/issues/1095.optimized.wat | 144 +- tests/compiler/managed-cast.optimized.wat | 135 +- tests/compiler/number.optimized.wat | 181 +- tests/compiler/rc/local-init.optimized.wat | 138 +- .../rc/logical-and-mismatch.optimized.wat | 146 +- .../rc/logical-or-mismatch.optimized.wat | 146 +- tests/compiler/rc/optimize.optimized.wat | 145 +- tests/compiler/rc/rereturn.optimized.wat | 137 +- .../rc/ternary-mismatch.optimized.wat | 148 +- tests/compiler/resolve-new.optimized.wat | 6 +- tests/compiler/resolve-ternary.optimized.wat | 249 +- tests/compiler/retain-i32.optimized.wat | 5 +- .../retain-release-sanity.optimized.wat | 196 +- tests/compiler/retain-return.optimized.wat | 148 +- tests/compiler/runtime-full.optimized.wat | 137 +- .../compiler/std/array-literal.optimized.wat | 145 +- tests/compiler/std/array.optimized.wat | 2723 +- tests/compiler/std/arraybuffer.optimized.wat | 215 +- tests/compiler/std/dataview.optimized.wat | 193 +- tests/compiler/std/date.optimized.wat | 131 +- tests/compiler/std/libm.optimized.wat | 429 +- tests/compiler/std/map.optimized.wat | 1415 +- tests/compiler/std/math.optimized.wat | 486 +- tests/compiler/std/new.optimized.wat | 46 +- tests/compiler/std/set.optimized.wat | 1391 +- tests/compiler/std/staticarray.optimized.wat | 145 +- .../std/string-casemapping.optimized.wat | 159 +- .../std/string-encoding.optimized.wat | 175 +- tests/compiler/std/string.optimized.wat | 262 +- tests/compiler/std/trace.optimized.wat | 19 +- tests/compiler/std/typedarray.optimized.wat | 37502 ++++++++-------- tests/compiler/typeof.optimized.wat | 119 +- tests/compiler/while.optimized.wat | 176 +- 39 files changed, 23733 insertions(+), 24832 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index e002762ddb..970c8f387f 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -647,11 +647,11 @@ exports.main = function main(argv, options, callback) { if (optimizeLevel >= 2 && shrinkLevel === 0) { module.setAlwaysInlineMaxSize(12); module.setFlexibleInlineMaxSize(70); - module.setOneCallerInlineMaxSize(90); + module.setOneCallerInlineMaxSize(120); } else { module.setAlwaysInlineMaxSize(4); // default: 2 - module.setFlexibleInlineMaxSize(55); // default: 20 - module.setOneCallerInlineMaxSize(55); // default: 15 + module.setFlexibleInlineMaxSize(65); // default: 20 + module.setOneCallerInlineMaxSize(70); // default: 15 } // Optimize the module if requested diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 84f472a5d2..95e8066adc 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -812,70 +812,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -900,11 +840,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -917,16 +857,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -935,7 +875,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -982,14 +922,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $do/Ref#constructor (; 13 ;) (result i32) + (func $do/Ref#constructor (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1045,7 +1039,7 @@ end local.get $1 ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1056,7 +1050,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:do (; 15 ;) + (func $start:do (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1381,7 +1375,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) global.get $~started if return @@ -1391,7 +1385,7 @@ end call $start:do ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 467da2da8b..7cfea5a2bc 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -835,69 +835,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 7 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -973,9 +911,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1004,9 +943,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1054,7 +1049,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 10 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1062,7 +1057,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1111,7 +1106,7 @@ end local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1153,7 +1148,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1326,7 +1321,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 13 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1337,7 +1332,7 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/reallocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1437,7 +1432,7 @@ end local.get $3 ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1648,7 +1643,7 @@ end end ) - (func $start:extends-baseaggregate (; 17 ;) + (func $start:extends-baseaggregate (; 16 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1761,10 +1756,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 18 ;) + (func $~start (; 17 ;) call $start:extends-baseaggregate ) - (func $~lib/rt/pure/markGray (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 18 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1788,7 +1783,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 19 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -1801,7 +1796,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 20 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1835,7 +1830,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 21 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -1868,7 +1863,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 23 ;) + (func $~lib/rt/pure/__collect (; 22 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1989,7 +1984,7 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2146,7 +2141,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 24 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 556 i32.lt_u @@ -2249,7 +2244,7 @@ unreachable end ) - (func $~lib/array/Array#__visit_impl (; 26 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__visit_impl (; 25 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2282,7 +2277,7 @@ end end ) - (func $~lib/rt/__visit_members (; 27 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 26 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$10 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 1500761820..180de5abe5 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -809,70 +809,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -897,11 +837,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -914,16 +854,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -932,7 +872,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -979,14 +919,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $for/Ref#constructor (; 13 ;) (result i32) + (func $for/Ref#constructor (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1042,7 +1036,7 @@ end local.get $1 ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1053,73 +1047,7 @@ call $~lib/rt/pure/decrement end ) - (func $for/testRefAutorelease (; 15 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $for/Ref#constructor - call $for/Ref#constructor - local.set $0 - call $~lib/rt/pure/__release - loop $for-loop|0 - block $for-break0 - call $for/Ref#constructor - local.tee $1 - call $~lib/rt/pure/__release - local.get $1 - if - local.get $2 - i32.const 1 - i32.add - local.tee $2 - i32.const 10 - i32.eq - if - i32.const 0 - local.set $1 - local.get $0 - if - local.get $0 - call $~lib/rt/pure/__release - end - i32.const 0 - local.set $0 - br $for-break0 - end - call $for/Ref#constructor - local.get $0 - call $~lib/rt/pure/__release - local.set $0 - br $for-loop|0 - end - end - end - local.get $2 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 157 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 158 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $start:for (; 16 ;) + (func $start:for (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1340,36 +1268,36 @@ i32.const 0 global.set $for/ran call $for/Ref#constructor - local.set $0 + local.set $1 loop $for-loop|06 - local.get $0 + local.get $1 if - local.get $1 + local.get $2 i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 10 i32.eq if i32.const 0 - local.set $2 - local.get $0 + local.set $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end else call $for/Ref#constructor - local.set $2 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $2 - local.set $0 + local.get $0 + local.set $1 br $for-loop|06 end end - local.get $1 + local.get $2 i32.const 10 i32.ne if @@ -1380,7 +1308,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1391,7 +1319,7 @@ end i32.const 1 global.set $for/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $for/ran i32.eqz @@ -1405,7 +1333,67 @@ end i32.const 0 global.set $for/ran - call $for/testRefAutorelease + i32.const 0 + local.set $2 + call $for/Ref#constructor + call $for/Ref#constructor + local.set $0 + call $~lib/rt/pure/__release + loop $for-loop|07 + block $for-break0 + call $for/Ref#constructor + local.tee $1 + call $~lib/rt/pure/__release + local.get $1 + if + local.get $2 + i32.const 1 + i32.add + local.tee $2 + i32.const 10 + i32.eq + if + local.get $0 + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 0 + local.set $0 + br $for-break0 + end + call $for/Ref#constructor + local.get $0 + call $~lib/rt/pure/__release + local.set $0 + br $for-loop|07 + end + end + end + local.get $2 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 157 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if + i32.const 0 + i32.const 32 + i32.const 158 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran + local.get $0 + call $~lib/rt/pure/__release global.get $for/ran i32.eqz if @@ -1417,7 +1405,7 @@ unreachable end ) - (func $~start (; 17 ;) + (func $~start (; 15 ;) global.get $~started if return @@ -1427,7 +1415,7 @@ end call $start:for ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 31848c9a8a..580033e382 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -10,7 +10,11 @@ (export "memory" (memory $0)) (export "test" (func $getter-call/test)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) + (func $~setArgumentsLength (; 0 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $getter-call/test (; 1 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -74,18 +78,11 @@ local.get $0 i32.const 0 i32.store offset=12 - ) - (func $~setArgumentsLength (; 1 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $getter-call/test (; 2 ;) (result i32) - call $~lib/rt/stub/__alloc i32.const 0 global.set $~argumentsLength i32.const 42 ) - (func $~start (; 3 ;) + (func $~start (; 2 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 986725a1da..112190e49e 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -818,69 +818,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -956,9 +894,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1006,9 +945,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1058,7 +1053,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1066,7 +1061,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1117,7 +1112,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 220 i32.gt_u @@ -1128,7 +1123,7 @@ call $~lib/rt/pure/decrement end ) - (func $implicit-getter-setter/Basic#constructor (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Basic#constructor (; 15 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1143,16 +1138,16 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Basic#get:val (; 17 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Basic#get:val (; 16 ;) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $implicit-getter-setter/Basic#set:val (; 18 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Basic#set:val (; 17 ;) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $implicit-getter-setter/Managed#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $implicit-getter-setter/Managed#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if @@ -1168,12 +1163,12 @@ i32.store local.get $0 ) - (func $implicit-getter-setter/Managed#get:foo (; 20 ;) (param $0 i32) (result i32) + (func $implicit-getter-setter/Managed#get:foo (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.load call $~lib/rt/pure/__retain ) - (func $implicit-getter-setter/Managed#set:foo (; 21 ;) (param $0 i32) (param $1 i32) + (func $implicit-getter-setter/Managed#set:foo (; 20 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -1191,10 +1186,10 @@ local.get $1 i32.store ) - (func $~lib/rt/pure/__collect (; 22 ;) + (func $~lib/rt/pure/__collect (; 21 ;) nop ) - (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 602fb2f36b..9bb6db40b1 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_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))) @@ -728,70 +728,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -816,11 +756,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -833,16 +773,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -851,7 +791,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -898,14 +838,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -956,7 +950,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 12 ;) (param $0 i32) local.get $0 i32.const 252 i32.gt_u @@ -967,7 +961,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 14 ;) + (func $~start (; 13 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1009,7 +1003,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 14 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index d7ccffd387..20eba61b7c 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -730,68 +730,7 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) global.get $~lib/rt/tlsf/collectLock @@ -900,21 +839,75 @@ local.get $0 local.get $2 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $1 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $2 + local.get $1 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $2 + i32.const 32 + i32.add + local.tee $1 + local.get $3 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + else + local.get $2 + local.get $1 + i32.const -2 + i32.and + i32.store + local.get $2 + i32.const 16 + i32.add + local.tee $0 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $2 call $~lib/rt/rtrace/onalloc local.get $2 ) - (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 11 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -965,7 +958,7 @@ end local.get $0 ) - (func $managed-cast/Cat#constructor (; 14 ;) (result i32) + (func $managed-cast/Cat#constructor (; 13 ;) (result i32) (local $0 i32) i32.const 3 call $~lib/rt/tlsf/__alloc @@ -980,7 +973,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 268 i32.gt_u @@ -991,7 +984,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/__instanceof (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/__instanceof (; 15 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1021,7 +1014,7 @@ end i32.const 0 ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1126,7 +1119,7 @@ local.get $7 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 74c9eba0fa..b6b9c702c0 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -2,12 +2,12 @@ (type $i32_=>_i32 (func (param i32) (result 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_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (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 (func (param i32 i32) (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -1299,101 +1299,99 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $3 - local.get $1 - i32.gt_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 - select - i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz - if - i32.const 1264 - return - end - i32.const 0 - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select - if - local.get $0 - return - end - local.get $3 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $1 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - ) - (func $~lib/util/number/dtoa (; 13 ;) (result i32) + (func $~lib/util/number/dtoa (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) i32.const 56 call $~lib/rt/stub/__alloc - local.tee $0 + local.tee $2 call $~lib/util/number/dtoa_core - local.tee $1 + local.tee $0 i32.const 28 i32.eq if - local.get $0 + local.get $2 return end - local.get $0 - local.get $1 - call $~lib/string/String#substring - local.get $0 + local.get $2 + local.set $4 + block $__inlined_func$~lib/string/String#substring + i32.const 0 + local.get $2 + call $~lib/string/String#get:length + local.tee $1 + i32.const 0 + local.get $1 + i32.lt_s + select + local.tee $3 + local.get $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $0 + local.get $1 + local.get $0 + local.get $1 + i32.lt_s + select + local.tee $0 + local.get $3 + local.get $0 + i32.gt_s + select + i32.const 1 + i32.shl + local.tee $5 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.lt_s + select + i32.const 1 + i32.shl + local.tee $3 + i32.sub + local.tee $0 + i32.eqz + if + i32.const 1264 + local.set $4 + br $__inlined_func$~lib/string/String#substring + end + i32.const 0 + local.get $5 + local.get $1 + i32.const 1 + i32.shl + i32.eq + local.get $3 + select + br_if $__inlined_func$~lib/string/String#substring + local.get $0 + call $~lib/rt/stub/__alloc + local.tee $1 + local.get $3 + local.get $4 + i32.add + local.get $0 + call $~lib/memory/memory.copy + local.get $1 + local.set $4 + end + local.get $2 i32.const 15 i32.and i32.eqz i32.const 0 - local.get $0 + local.get $2 select i32.eqz if @@ -1404,10 +1402,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 16 i32.sub - local.tee $2 + local.tee $1 i32.load offset=4 i32.const 1 i32.ne @@ -1420,17 +1418,18 @@ unreachable end global.get $~lib/rt/stub/offset - local.get $0 local.get $2 + local.get $1 i32.load i32.add i32.eq if - local.get $2 + local.get $1 global.set $~lib/rt/stub/offset end + local.get $4 ) - (func $~lib/number/F32.isSafeInteger (; 14 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isSafeInteger (; 13 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1442,7 +1441,7 @@ f32.le select ) - (func $~lib/number/F32.isInteger (; 15 ;) (param $0 f32) (result i32) + (func $~lib/number/F32.isInteger (; 14 ;) (param $0 f32) (result i32) local.get $0 f32.trunc local.get $0 @@ -1455,7 +1454,7 @@ f32.eq select ) - (func $~lib/number/F64.isSafeInteger (; 16 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isSafeInteger (; 15 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1467,7 +1466,7 @@ f64.le select ) - (func $~lib/number/F64.isInteger (; 17 ;) (param $0 f64) (result i32) + (func $~lib/number/F64.isInteger (; 16 ;) (param $0 f64) (result i32) local.get $0 f64.trunc local.get $0 @@ -1480,7 +1479,7 @@ f64.eq select ) - (func $start:number (; 18 ;) + (func $start:number (; 17 ;) (local $0 i32) i32.const 1536 global.set $~lib/rt/stub/startOffset @@ -2085,7 +2084,7 @@ unreachable end ) - (func $~start (; 19 ;) + (func $~start (; 18 ;) call $start:number ) ) diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 6a1c66e835..2f611c71ce 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -968,7 +962,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 7379549f3d..08c13c1897 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,14 +949,14 @@ end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (; 13 ;) (result i32) + (func $rc/logical-and-mismatch/Ref#constructor (; 12 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -973,7 +967,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 15 ;) + (func $~start (; 14 ;) (local $0 i32) call $rc/logical-and-mismatch/Ref#constructor global.set $rc/logical-and-mismatch/gloRef @@ -1010,7 +1004,7 @@ global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 2b7007c6a8..d425f1eb8e 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -727,70 +727,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -815,11 +755,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -832,16 +772,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -850,7 +790,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -897,14 +837,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -955,14 +949,14 @@ end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (; 13 ;) (result i32) + (func $rc/logical-or-mismatch/Ref#constructor (; 12 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -973,7 +967,7 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 15 ;) + (func $~start (; 14 ;) (local $0 i32) call $rc/logical-or-mismatch/Ref#constructor global.set $rc/logical-or-mismatch/gloRef @@ -1012,7 +1006,7 @@ global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 15 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 52ebcbea6f..31953b8931 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -892,69 +892,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 15 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1030,9 +968,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1080,9 +1019,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1132,7 +1127,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 18 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1140,13 +1135,13 @@ i32.const 16 i32.add ) - (func $rc/optimize/getRef (; 19 ;) (result i32) + (func $rc/optimize/getRef (; 18 ;) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1157,13 +1152,13 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/eliminated_rr (; 21 ;) (param $0 i32) (result i32) + (func $rc/optimize/eliminated_rr (; 20 ;) (param $0 i32) (result i32) i32.const 0 i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1175,7 +1170,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 23 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 if (result i32) local.get $0 @@ -1185,7 +1180,7 @@ end call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1198,16 +1193,16 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 25 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 24 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 26 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 25 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 32be45ee8e..c5017d8041 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -804,69 +804,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -942,9 +880,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -992,9 +931,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1042,7 +1037,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1050,7 +1045,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1099,7 +1094,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 212 i32.gt_u @@ -1110,10 +1105,10 @@ call $~lib/rt/pure/decrement end ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 88d8cd40f7..15def55ded 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -729,70 +729,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 11 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -817,11 +757,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -834,16 +774,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -852,7 +792,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -899,14 +839,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/pure/__retain (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -957,14 +951,14 @@ end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (; 13 ;) (result i32) + (func $rc/ternary-mismatch/Ref#constructor (; 12 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $rc/ternary-mismatch/test1 (; 14 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test1 (; 13 ;) (param $0 i32) (result i32) local.get $0 if (result i32) call $rc/ternary-mismatch/Ref#constructor @@ -973,7 +967,7 @@ call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -984,7 +978,7 @@ call $~lib/rt/pure/decrement end ) - (func $rc/ternary-mismatch/test2 (; 16 ;) (param $0 i32) (result i32) + (func $rc/ternary-mismatch/test2 (; 15 ;) (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef @@ -993,7 +987,7 @@ call $rc/ternary-mismatch/Ref#constructor end ) - (func $~start (; 17 ;) + (func $~start (; 16 ;) call $rc/ternary-mismatch/Ref#constructor global.set $rc/ternary-mismatch/gloRef i32.const 1 @@ -1011,7 +1005,7 @@ global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index e217064f83..86408cc663 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -7,7 +7,7 @@ (global $resolve-new/foo (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (func $resolve-new/Foo#constructor (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -78,9 +78,9 @@ global.set $~lib/rt/stub/startOffset i32.const 16 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor global.set $resolve-new/foo - call $~lib/rt/stub/__alloc + call $resolve-new/Foo#constructor drop ) ) diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index a5f5cbbc4e..0a31841912 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1,13 +1,13 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $none_=>_none (func)) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_i64_i32_i64_i32_i64_=>_i32 (func (param i32 i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -826,69 +826,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -964,9 +902,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1014,9 +953,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1064,7 +1059,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1072,7 +1067,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1121,7 +1116,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 1524 i32.gt_u @@ -1132,7 +1127,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 11 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -1180,7 +1175,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1204,7 +1199,7 @@ br_if $do-continue|0 end ) - (func $~lib/string/String#get:length (; 14 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 13 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1212,7 +1207,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1288,7 +1283,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 15 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1322,7 +1317,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/genDigits (; 17 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) + (func $~lib/util/number/genDigits (; 16 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) (local $7 i32) (local $8 i64) @@ -1713,7 +1708,7 @@ i32.store16 local.get $2 ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1886,7 +1881,7 @@ end end ) - (func $~lib/util/number/prettify (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2131,7 +2126,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 20 ;) (param $0 i32) (result i32) + (func $~lib/util/number/dtoa_core (; 19 ;) (param $0 i32) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -2269,7 +2264,7 @@ global.get $~lib/util/number/_K call $~lib/util/number/prettify ) - (func $~lib/string/String#substring (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2343,7 +2338,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 21 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2354,11 +2349,41 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/number/F64#toString (; 23 ;) (result i32) + (func $~setArgumentsLength (; 22 ;) (param $0 i32) + local.get $0 + global.set $~argumentsLength + ) + (func $start:resolve-ternary (; 23 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + i32.const 1 + call $~lib/util/number/decimalCount32 + local.tee $0 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + i32.const 1 + local.get $0 + call $~lib/util/number/utoa_simple + local.get $1 + call $~lib/rt/pure/__retain + local.tee $3 + i32.const 224 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 256 + i32.const 5 + i32.const 0 + call $~lib/builtins/abort + unreachable + end block $__inlined_func$~lib/util/number/dtoa i32.const 56 i32.const 1 @@ -2371,18 +2396,18 @@ if local.get $0 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 br $__inlined_func$~lib/util/number/dtoa end local.get $0 local.get $1 call $~lib/string/String#substring - local.set $2 + local.set $1 call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 16 i32.sub - local.set $1 + local.set $2 local.get $0 i32.const 15 i32.and @@ -2391,7 +2416,7 @@ local.get $0 select if (result i32) - local.get $1 + local.get $2 i32.load i32.const 1 i32.and @@ -2400,7 +2425,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $2 i32.load offset=4 i32.const -268435456 i32.and @@ -2417,46 +2442,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/tlsf/freeBlock end - local.get $2 - ) - (func $~setArgumentsLength (; 24 ;) (param $0 i32) - local.get $0 - global.set $~argumentsLength - ) - (func $~start (; 25 ;) - (local $0 i32) - (local $1 i32) - i32.const 1 - call $~lib/util/number/decimalCount32 - local.tee $0 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 1 - local.get $0 - call $~lib/util/number/utoa_simple local.get $1 - call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 - i32.const 224 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 256 - i32.const 5 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - call $~lib/number/F64#toString - local.tee $0 i32.const 1456 call $~lib/string/String.__eq i32.eqz @@ -2474,14 +2463,18 @@ global.set $~argumentsLength i32.const 1 global.set $~argumentsLength + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/__collect (; 26 ;) + (func $~start (; 24 ;) + call $start:resolve-ternary + ) + (func $~lib/rt/pure/__collect (; 25 ;) nop ) - (func $~lib/rt/pure/decrement (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index b27a25c7be..c765419766 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -7,7 +7,7 @@ (global $retain-i32/ri (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:retain-i32 (; 0 ;) + (func $~start (; 0 ;) (local $0 i32) i32.const -128 local.set $0 @@ -66,7 +66,4 @@ i32.load8_s drop ) - (func $~start (; 1 ;) - call $start:retain-i32 - ) ) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index e5a5f6cc96..f6984adf75 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -842,69 +842,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -980,9 +918,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1011,9 +950,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1063,7 +1058,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1071,7 +1066,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 15 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1282,7 +1277,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1333,7 +1328,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 708 i32.gt_u @@ -1344,7 +1339,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1410,7 +1405,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/rt/tlsf/checkUsedBlock (; 20 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 19 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -1452,7 +1447,7 @@ end local.get $1 ) - (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1625,7 +1620,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 21 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1638,7 +1633,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1741,7 +1736,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 23 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1800,7 +1795,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 25 ;) (param $0 i32) + (func $~lib/array/Array#push (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1823,7 +1818,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/string/String#get:length (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 25 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1831,15 +1826,22 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String.__concat (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + local.get $0 + i32.const 480 + local.get $0 + select + local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 i32.eqz if + i32.const 480 + local.set $0 local.get $1 i32.const 480 i32.ne @@ -1851,15 +1853,11 @@ local.set $1 end block $__inlined_func$~lib/string/String#concat - local.get $0 - i32.const 480 - local.get $0 - select - local.tee $3 + local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl - local.tee $2 + local.tee $3 local.get $1 call $~lib/string/String#get:length i32.const 1 @@ -1869,10 +1867,10 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 400 local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end local.get $0 @@ -1880,11 +1878,11 @@ call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 - local.get $3 local.get $2 + local.get $3 call $~lib/memory/memory.copy local.get $0 - local.get $2 + local.get $3 i32.add local.get $1 local.get $4 @@ -1894,7 +1892,7 @@ end local.get $0 ) - (func $start:retain-release-sanity (; 28 ;) + (func $start:retain-release-sanity (; 27 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2153,10 +2151,10 @@ call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) - (func $~start (; 29 ;) + (func $~start (; 28 ;) call $start:retain-release-sanity ) - (func $~lib/rt/pure/markGray (; 30 ;) (param $0 i32) + (func $~lib/rt/pure/markGray (; 29 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2180,7 +2178,7 @@ call $~lib/rt/__visit_members end ) - (func $~lib/rt/pure/scanBlack (; 31 ;) (param $0 i32) + (func $~lib/rt/pure/scanBlack (; 30 ;) (param $0 i32) local.get $0 local.get $0 i32.load offset=4 @@ -2193,7 +2191,7 @@ i32.const 4 call $~lib/rt/__visit_members ) - (func $~lib/rt/pure/scan (; 32 ;) (param $0 i32) + (func $~lib/rt/pure/scan (; 31 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2227,7 +2225,7 @@ end end ) - (func $~lib/rt/pure/collectWhite (; 33 ;) (param $0 i32) + (func $~lib/rt/pure/collectWhite (; 32 ;) (param $0 i32) (local $1 i32) local.get $0 i32.load offset=4 @@ -2260,7 +2258,7 @@ call $~lib/rt/tlsf/freeBlock end ) - (func $~lib/rt/pure/__collect (; 34 ;) + (func $~lib/rt/pure/__collect (; 33 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2381,7 +2379,7 @@ local.get $5 global.set $~lib/rt/pure/CUR ) - (func $~lib/rt/pure/decrement (; 35 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 34 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2548,7 +2546,7 @@ end end ) - (func $~lib/rt/pure/__visit (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/pure/__visit (; 35 ;) (param $0 i32) (param $1 i32) local.get $0 i32.const 708 i32.lt_u @@ -2651,7 +2649,7 @@ unreachable end ) - (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#__visit_impl (; 36 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2684,7 +2682,7 @@ end end ) - (func $~lib/rt/__visit_members (; 38 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/__visit_members (; 37 ;) (param $0 i32) (param $1 i32) block $block$4$break block $switch$1$default block $switch$1$case$7 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 1b4adb111f..5ec23bbfd8 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,7 +1,7 @@ (module (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_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) @@ -726,70 +726,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 6 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -814,11 +754,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -831,16 +771,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -849,7 +789,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -896,12 +836,66 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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/__retain (; 8 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 7 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -950,14 +944,14 @@ end local.get $0 ) - (func $retain-return/Ref#constructor (; 9 ;) (result i32) + (func $retain-return/Ref#constructor (; 8 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 9 ;) (param $0 i32) local.get $0 i32.const 176 i32.gt_u @@ -968,11 +962,11 @@ call $~lib/rt/pure/decrement end ) - (func $~setArgumentsLength (; 11 ;) (param $0 i32) + (func $~setArgumentsLength (; 10 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~start (; 12 ;) + (func $~start (; 11 ;) (local $0 i32) global.get $~started if @@ -1036,7 +1030,7 @@ i32.const 0 global.set $retain-return/ref ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 1874de7145..07837e56f8 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -1,6 +1,6 @@ (module - (type $i32_i32_=>_none (func (param i32 i32))) (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 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) @@ -804,69 +804,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -942,9 +880,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -992,9 +931,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1042,7 +1037,7 @@ call $~lib/rt/tlsf/prepareBlock local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 9 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 8 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1050,7 +1045,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 10 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1099,7 +1094,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 11 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 10 ;) (param $0 i32) local.get $0 i32.const 204 i32.gt_u @@ -1110,10 +1105,10 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/rt/pure/__collect (; 12 ;) + (func $~lib/rt/pure/__collect (; 11 ;) nop ) - (func $~lib/rt/pure/decrement (; 13 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 12 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 130738541b..3fb3bb3088 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 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 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -856,69 +856,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -994,9 +932,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1044,9 +983,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1096,7 +1091,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1104,7 +1099,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1155,7 +1150,7 @@ end local.get $0 ) - (func $~lib/rt/__allocArray (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocArray (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) i32.const 16 local.get $2 @@ -1181,7 +1176,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 528 i32.gt_u @@ -1192,7 +1187,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/array-literal (; 19 ;) + (func $start:std/array-literal (; 18 ;) (local $0 i32) (local $1 i32) i32.const 76 @@ -1556,10 +1551,10 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~start (; 20 ;) + (func $~start (; 19 ;) call $start:std/array-literal ) - (func $~lib/rt/pure/decrement (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 20 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1663,7 +1658,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 22 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 21 ;) (param $0 i32) local.get $0 i32.const 528 i32.lt_u @@ -1675,7 +1670,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 23 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 22 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 673622ea01..ec464424cc 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,22 +2,22 @@ (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_=>_none (func (param i32 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 $i32_i32_=>_none (func (param i32 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_=>_i32 (func (result i32))) (type $i32_i32_i64_=>_i32 (func (param i32 i32 i64) (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) - (type $none_=>_i32 (func (result i32))) (type $i32_i32_f64_=>_i32 (func (param i32 i32 f64) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i64_=>_i32 (func (param i64) (result i32))) - (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) - (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $i64_=>_i64 (func (param i64) (result i64))) (type $i32_i32_=>_f32 (func (param i32 i32) (result f32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) @@ -1040,69 +1040,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1178,9 +1116,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1208,9 +1147,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1260,7 +1255,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1268,7 +1263,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1493,7 +1488,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1544,7 +1539,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 8292 i32.gt_u @@ -1555,7 +1550,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1624,7 +1619,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/array/Array#constructor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 20 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 3 @@ -1641,7 +1636,7 @@ i32.store offset=12 local.get $1 ) - (func $std/array/Ref#constructor (; 22 ;) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 21 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 4 i32.const 4 @@ -1652,7 +1647,7 @@ i32.store local.get $1 ) - (func $~lib/memory/memory.copy (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1825,7 +1820,7 @@ end end ) - (func $~lib/rt/__allocArray (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1863,7 +1858,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#fill (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -1930,7 +1925,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -1949,7 +1944,7 @@ i32.add i32.load8_u ) - (func $std/array/isArraysEqual (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -1994,7 +1989,7 @@ end i32.const 1 ) - (func $~lib/array/Array#fill (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 @@ -2069,7 +2064,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 28 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2090,7 +2085,7 @@ i32.add i32.load ) - (func $std/array/isArraysEqual (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -2138,7 +2133,7 @@ end i32.const 1 ) - (func $std/array/internalCapacity (; 31 ;) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 30 ;) (param $0 i32) (result i32) local.get $0 i32.load i32.const 16 @@ -2147,7 +2142,7 @@ i32.const 2 i32.shr_s ) - (func $~lib/rt/tlsf/checkUsedBlock (; 32 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 31 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2189,7 +2184,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 32 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2202,7 +2197,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2305,7 +2300,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureSize (; 34 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2365,7 +2360,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#push (; 36 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#push (; 35 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2388,7 +2383,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/array/Array#pop (; 37 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2418,7 +2413,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/array/Array#concat (; 38 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 37 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2471,7 +2466,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/array/Array#copyWithin (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $3 @@ -2575,7 +2570,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#unshift (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 39 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2604,7 +2599,7 @@ local.get $2 i32.store offset=12 ) - (func $~lib/array/Array#indexOf (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -2664,7 +2659,7 @@ end i32.const -1 ) - (func $~lib/array/Array#includes (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 local.get $2 @@ -2672,7 +2667,7 @@ i32.const 0 i32.ge_s ) - (func $~lib/array/Array#splice (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#splice (; 42 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2762,7 +2757,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#splice (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2853,7 +2848,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 44 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -2863,7 +2858,7 @@ i32.load call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__get (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 45 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2893,7 +2888,7 @@ end local.get $0 ) - (func $~lib/array/Array#splice (; 47 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#splice (; 46 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2971,7 +2966,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#__get (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 47 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2988,7 +2983,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__set (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3025,15 +3020,15 @@ local.get $2 i32.store ) - (func $start:std/array~anonymous|0 (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~setArgumentsLength (; 51 ;) (param $0 i32) + (func $~setArgumentsLength (; 50 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/array/Array#findIndex (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 51 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3078,17 +3073,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3096,7 +3091,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3104,12 +3099,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 57 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3155,12 +3150,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3168,12 +3163,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3181,12 +3176,12 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 63 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3231,12 +3226,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3244,12 +3239,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3257,13 +3252,13 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 70 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 69 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3303,7 +3298,7 @@ end end ) - (func $start:std/array~anonymous|17 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3312,7 +3307,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3321,7 +3316,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3414,11 +3409,11 @@ end end ) - (func $start:std/array~anonymous|21 (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#__get (; 75 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 74 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -3439,7 +3434,7 @@ i32.add f32.load ) - (func $start:std/array~anonymous|22 (; 76 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 75 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3449,7 +3444,7 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 77 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 76 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3508,14 +3503,14 @@ end local.get $5 ) - (func $start:std/array~anonymous|23 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 77 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3525,12 +3520,12 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 80 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 80 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3586,7 +3581,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 81 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3598,7 +3593,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 82 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 global.get $std/array/i i32.add @@ -3607,7 +3602,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 83 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3619,12 +3614,12 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 84 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3667,7 +3662,7 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 86 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 2 @@ -3675,7 +3670,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|32 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 87 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) i32.const 1 local.get $1 i32.const 100 @@ -3683,7 +3678,7 @@ local.get $0 select ) - (func $start:std/array~anonymous|33 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3691,7 +3686,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 89 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3699,7 +3694,7 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 91 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.load offset=12 @@ -3735,7 +3730,7 @@ end local.get $2 ) - (func $~lib/math/murmurHash3 (; 92 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 91 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -3756,7 +3751,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 93 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 92 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3788,91 +3783,92 @@ i32.shr_u i32.xor ) - (func $~lib/util/sort/insertionSort (; 94 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/insertionSort (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f32) + (local $4 i32) (local $5 f32) - (local $6 i32) + (local $6 f32) + (local $7 i32) loop $for-loop|0 - local.get $3 + local.get $4 local.get $1 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.set $4 - local.get $3 + local.set $5 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add f32.load - local.set $5 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $4 local.get $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $6 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $2 - local.tee $6 + local.get $3 + local.tee $7 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 f32.store br $while-continue|1 end end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end ) - (func $~lib/util/sort/weakHeapSort (; 95 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/weakHeapSort (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 f32) - (local $7 i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) + (local $8 i32) local.get $1 i32.const 31 i32.add @@ -3880,37 +3876,37 @@ i32.shr_s i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $5 + local.tee $6 i32.const 0 - local.get $2 + local.get $3 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|0 - local.get $3 + local.get $4 i32.const 0 i32.gt_s if - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 1 i32.and - local.get $5 - local.get $2 + local.get $6 + local.get $3 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $2 + local.get $3 i32.const 1 i32.shr_s i32.const 31 @@ -3920,92 +3916,93 @@ i32.and i32.eq if - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.set $2 + local.set $3 br $while-continue|1 end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.tee $2 + local.tee $3 i32.const 2 i32.shl i32.add f32.load - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $7 - local.get $7 + local.tee $8 + local.get $8 i32.load i32.const 1 - local.get $3 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store local.get $0 - local.get $2 + local.get $3 i32.const 2 i32.shl i32.add - local.get $6 + local.get $7 f32.store end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|2 - local.get $3 + local.get $4 i32.const 2 i32.ge_s if local.get $0 f32.load - local.set $4 + local.set $5 local.get $0 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add @@ -4013,12 +4010,12 @@ f32.load f32.store local.get $1 - local.get $4 + local.get $5 f32.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s @@ -4036,11 +4033,11 @@ i32.const 1 i32.shl i32.add - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.set $1 br $while-continue|3 end @@ -4052,31 +4049,32 @@ if local.get $0 f32.load - local.set $4 + local.set $5 local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 i32.load i32.const 1 local.get $1 @@ -4090,10 +4088,10 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $5 f32.store local.get $0 - local.get $6 + local.get $7 f32.store end local.get $1 @@ -4103,29 +4101,29 @@ br $while-continue|4 end end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|2 end end call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $6 call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock local.get $0 f32.load offset=4 - local.set $4 + local.set $5 local.get $0 local.get $0 f32.load f32.store offset=4 local.get $0 - local.get $4 + local.get $5 f32.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 96 ;) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 95 ;) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4154,91 +4152,171 @@ i32.lt_s i32.sub ) - (func $~lib/util/sort/insertionSort (; 97 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort|trampoline (; 96 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 f32) + (local $5 f32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 44 + local.set $3 + end + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f32.load offset=4 + local.set $4 + local.get $1 + f32.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 + local.get $3 + call_indirect (type $f32_f32_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $5 + f32.store offset=4 + local.get $1 + local.get $4 + f32.store + end + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + end + ) + (func $~lib/util/sort/insertionSort (; 97 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) (local $5 f64) - (local $6 i32) + (local $6 f64) + (local $7 i32) loop $for-loop|0 - local.get $3 + local.get $4 local.get $1 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $4 - local.get $3 + local.set $5 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $5 + local.set $6 i32.const 2 global.set $~argumentsLength - local.get $4 local.get $5 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $6 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $2 - local.tee $6 + local.get $3 + local.tee $7 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 f64.store br $while-continue|1 end end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end ) - (func $~lib/util/sort/weakHeapSort (; 98 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + (func $~lib/util/sort/weakHeapSort (; 98 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) + (local $4 i32) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) local.get $1 i32.const 31 i32.add @@ -4246,37 +4324,37 @@ i32.shr_s i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $5 + local.tee $6 i32.const 0 - local.get $2 + local.get $3 call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|0 - local.get $3 + local.get $4 i32.const 0 i32.gt_s if - local.get $3 - local.set $2 + local.get $4 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 1 i32.and - local.get $5 - local.get $2 + local.get $6 + local.get $3 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $2 + local.get $3 i32.const 1 i32.shr_s i32.const 31 @@ -4286,92 +4364,93 @@ i32.and i32.eq if - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.set $2 + local.set $3 br $while-continue|1 end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.shr_s - local.tee $2 + local.tee $3 i32.const 3 i32.shl i32.add f64.load - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $7 - local.get $7 + local.tee $8 + local.get $8 i32.load i32.const 1 - local.get $3 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store local.get $0 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add - local.get $6 + local.get $7 f64.store end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|0 end end local.get $1 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $for-loop|2 - local.get $3 + local.get $4 i32.const 2 i32.ge_s if local.get $0 f64.load - local.set $4 + local.set $5 local.get $0 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add @@ -4379,12 +4458,12 @@ f64.load f64.store local.get $1 - local.get $4 + local.get $5 f64.store i32.const 1 local.set $1 loop $while-continue|3 - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s @@ -4402,11 +4481,11 @@ i32.const 1 i32.shl i32.add - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 i32.lt_s if - local.get $2 + local.get $3 local.set $1 br $while-continue|3 end @@ -4418,31 +4497,32 @@ if local.get $0 f64.load - local.set $4 + local.set $5 local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $4 - local.get $6 - call $~lib/util/sort/COMPARATOR~anonymous|0 + local.get $5 + local.get $7 + local.get $2 + call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $5 + local.get $6 local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 i32.load i32.const 1 local.get $1 @@ -4456,10 +4536,10 @@ i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store local.get $0 - local.get $6 + local.get $7 f64.store end local.get $1 @@ -4469,26 +4549,26 @@ br $while-continue|4 end end - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $for-loop|2 end end call $~lib/rt/tlsf/maybeInitialize - local.get $5 + local.get $6 call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock local.get $0 f64.load offset=8 - local.set $4 + local.set $5 local.get $0 local.get $0 f64.load f64.store offset=8 local.get $0 - local.get $4 + local.get $5 f64.store ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 99 ;) (param $0 f64) (param $1 f64) (result i32) @@ -4520,20 +4600,99 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result f64) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 448 - i32.const 512 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 + (func $~lib/array/Array#sort|trampoline (; 100 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 f64) + (local $5 f64) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 45 + local.set $3 + end + block $__inlined_func$~lib/array/Array#sort (result i32) + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.le_s + if + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $0 + i32.load offset=4 + local.set $1 + local.get $2 + i32.const 2 + i32.eq + if + local.get $1 + f64.load offset=8 + local.set $4 + local.get $1 + f64.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 + local.get $3 + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.lt_s + if + local.get $1 + local.get $5 + f64.store offset=8 + local.get $1 + local.get $4 + f64.store + end + local.get $0 + call $~lib/rt/pure/__retain + br $__inlined_func$~lib/array/Array#sort + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/insertionSort + else + local.get $1 + local.get $2 + local.get $3 + call $~lib/util/sort/weakHeapSort + end + local.get $0 + call $~lib/rt/pure/__retain + end + ) + (func $~lib/array/Array#__get (; 101 ;) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 448 + i32.const 512 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.load offset=4 local.get $1 i32.const 3 @@ -4541,7 +4700,7 @@ i32.add f64.load ) - (func $~lib/util/sort/insertionSort (; 101 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4620,7 +4779,7 @@ end end ) - (func $~lib/util/sort/weakHeapSort (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 103 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4881,7 +5040,7 @@ local.get $1 i32.store ) - (func $~lib/array/Array#sort (; 103 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 104 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4945,12 +5104,12 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 104 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 106 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -4959,7 +5118,7 @@ i32.lt_u i32.sub ) - (func $std/array/createReverseOrderedArray (; 106 ;) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 107 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -4987,7 +5146,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.random (; 107 ;) (result f64) + (func $~lib/math/NativeMath.random (; 108 ;) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded @@ -5031,7 +5190,7 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 108 ;) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5059,7 +5218,7 @@ end local.get $2 ) - (func $std/array/assertSorted (; 109 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 110 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5116,12 +5275,12 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|44 (; 110 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 111 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 111 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 112 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5169,7 +5328,7 @@ call $~lib/rt/pure/__release end ) - (func $start:std/array~anonymous|47 (; 112 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 113 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -5178,7 +5337,7 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 113 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 114 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5232,7 +5391,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/array/assertSorted<~lib/array/Array> (; 114 ;) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 115 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5302,14 +5461,14 @@ local.get $5 call $~lib/rt/pure/__release ) - (func $start:std/array~anonymous|48 (; 115 ;) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 116 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/string/String#get:length (; 116 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 117 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -5317,7 +5476,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 117 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 118 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -5393,7 +5552,7 @@ end i32.const 0 ) - (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 118 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -5447,7 +5606,7 @@ select call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 119 ;) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 120 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5531,7 +5690,7 @@ local.get $5 call $~lib/rt/pure/__release ) - (func $~lib/string/String.__eq (; 120 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 121 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5565,15 +5724,22 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/string/String.__concat (; 121 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 122 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + local.get $0 + i32.const 5232 + local.get $0 + select + local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 i32.eqz if + i32.const 5232 + local.set $0 local.get $1 i32.const 5232 i32.ne @@ -5585,15 +5751,11 @@ local.set $1 end block $__inlined_func$~lib/string/String#concat - local.get $0 - i32.const 5232 - local.get $0 - select - local.tee $3 + local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl - local.tee $2 + local.tee $3 local.get $1 call $~lib/string/String#get:length i32.const 1 @@ -5603,10 +5765,10 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 5120 local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end local.get $0 @@ -5614,11 +5776,11 @@ call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 - local.get $3 local.get $2 + local.get $3 call $~lib/memory/memory.copy local.get $0 - local.get $2 + local.get $3 i32.add local.get $1 local.get $4 @@ -5628,79 +5790,122 @@ end local.get $0 ) - (func $std/array/createRandomString (; 122 ;) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 123 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 5120 - local.set $1 + (local $7 i32) + (local $8 i32) + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + i32.const 400 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 400 + i32.store offset=12 loop $for-loop|0 - local.get $3 - local.get $0 + local.get $1 + i32.const 400 i32.lt_s if local.get $1 - local.tee $4 - local.tee $5 - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 5120 - call $~lib/math/NativeMath.random - i32.const 4080 - call $~lib/string/String#get:length - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $1 - i32.const 4080 - call $~lib/string/String#get:length - i32.ge_u - br_if $__inlined_func$~lib/string/String#charAt - drop - i32.const 2 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - i32.const 1 - i32.shl - i32.const 4080 - i32.add - i32.load16_u - i32.store16 - local.get $2 - call $~lib/rt/pure/__retain - end - local.tee $2 - call $~lib/string/String.__concat - local.tee $6 - local.tee $1 - local.get $5 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $4 - call $~lib/rt/pure/__release + local.set $5 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + local.set $6 + i32.const 0 + local.set $3 + i32.const 5120 + local.set $0 + loop $for-loop|00 + local.get $3 + local.get $6 + i32.lt_s + if + local.get $0 + local.tee $1 + local.tee $7 + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 5120 + call $~lib/math/NativeMath.random + i32.const 4080 + call $~lib/string/String#get:length + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $0 + i32.const 4080 + call $~lib/string/String#get:length + i32.ge_u + br_if $__inlined_func$~lib/string/String#charAt + drop + i32.const 2 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.const 1 + i32.shl + i32.const 4080 + i32.add + i32.load16_u + i32.store16 + local.get $4 + call $~lib/rt/pure/__retain + end + local.tee $8 + call $~lib/string/String.__concat + local.tee $4 + local.tee $0 + local.get $7 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $1 + call $~lib/rt/pure/__release + end + local.get $8 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|00 + end end local.get $2 + local.get $5 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $3 + local.get $5 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $2 ) - (func $~lib/string/String#substring (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 124 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5774,7 +5979,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinBooleanArray (; 124 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinBooleanArray (; 125 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5914,7 +6119,7 @@ end local.get $3 ) - (func $~lib/util/number/decimalCount32 (; 125 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 126 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5962,7 +6167,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5986,7 +6191,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 127 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 128 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6028,7 +6233,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6070,7 +6275,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6177,7 +6382,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 130 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 131 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -6185,7 +6390,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/utoa32 (; 131 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 132 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6208,7 +6413,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 132 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -6232,7 +6437,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 134 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6339,7 +6544,7 @@ end local.get $3 ) - (func $~lib/array/Array#join (; 134 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join (; 135 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -6347,7 +6552,7 @@ local.get $1 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 135 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 136 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6737,7 +6942,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 136 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 137 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6982,7 +7187,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 137 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 138 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -7291,7 +7496,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa_stream (; 138 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 139 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -7362,7 +7567,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 139 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 140 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7527,7 +7732,7 @@ end local.get $3 ) - (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 140 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7695,7 +7900,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/string/String | null>#join (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join (; 142 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -7703,7 +7908,7 @@ local.get $1 call $~lib/util/string/joinReferenceArray<~lib/string/String | null> ) - (func $~lib/util/string/joinReferenceArray (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7855,14 +8060,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array#join (; 143 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#join (; 144 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray ) - (func $~lib/util/number/itoa_stream (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -7917,7 +8122,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 145 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 146 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8020,7 +8225,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 146 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8050,7 +8255,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 147 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8157,7 +8362,7 @@ end local.get $2 ) - (func $~lib/util/number/decimalCount64 (; 148 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 149 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -8210,7 +8415,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 149 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 150 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -8237,7 +8442,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8277,7 +8482,7 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -8422,7 +8627,7 @@ end local.get $2 ) - (func $~lib/util/number/itoa_stream (; 152 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -8483,7 +8688,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 154 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i64) (local $4 i32) @@ -8648,7 +8853,7 @@ end local.get $2 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 154 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8815,7 +9020,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/number/itoa_stream (; 155 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8845,7 +9050,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 156 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 157 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8948,14 +9153,14 @@ end local.get $2 ) - (func $~lib/array/Array#toString (; 157 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 158 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 158 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9119,7 +9324,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 159 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 160 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9286,14 +9491,14 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#toString (; 160 ;) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 161 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> ) - (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9457,7 +9662,7 @@ call $~lib/rt/pure/__release local.get $1 ) - (func $start:std/array (; 162 ;) + (func $start:std/array (; 163 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9479,10 +9684,10 @@ (local $18 f32) (local $19 i32) (local $20 i32) - (local $21 f64) + (local $21 i32) (local $22 i32) (local $23 i32) - (local $24 i32) + (local $24 f64) (local $25 i32) (local $26 i32) (local $27 i32) @@ -9491,12 +9696,12 @@ (local $30 i32) (local $31 i32) (local $32 i32) - (local $33 i32) + (local $33 i64) (local $34 i32) (local $35 i32) - (local $36 i64) - (local $37 f32) - (local $38 f64) + (local $36 i32) + (local $37 i32) + (local $38 i32) (local $39 i32) (local $40 i32) (local $41 i32) @@ -9517,8 +9722,6 @@ (local $56 i32) (local $57 i32) (local $58 i32) - (local $59 i32) - (local $60 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -9531,7 +9734,7 @@ i32.const 1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $0 + local.set $1 global.get $std/array/arr i32.eqz if @@ -9543,7 +9746,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9551,20 +9754,20 @@ i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -9575,20 +9778,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -9599,13 +9802,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 0 i32.const 6 @@ -9623,20 +9826,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -9647,20 +9850,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 0 i32.const 6 i32.const 656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 call $std/array/isArraysEqual i32.eqz if @@ -9671,17 +9874,17 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9689,20 +9892,20 @@ i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9714,20 +9917,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9739,13 +9942,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 2 i32.const 7 @@ -9764,20 +9967,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9789,20 +9992,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 5 i32.const 2 i32.const 7 i32.const 928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9814,17 +10017,17 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $4 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10085,51 +10288,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 local.tee $0 + i32.load offset=4 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $0 + local.tee $2 i32.const 0 i32.gt_s if - local.get $1 - i32.load offset=4 - local.tee $4 local.get $0 + i32.load offset=4 + local.tee $1 + local.get $2 i32.const 2 i32.shl i32.add - local.set $0 + local.set $2 loop $do-continue|0 - local.get $4 + local.get $1 i32.load call $~lib/rt/pure/__release - local.get $4 + local.get $1 i32.const 4 i32.add - local.tee $4 - local.get $0 + local.tee $1 + local.get $2 i32.lt_u br_if $do-continue|0 end else - local.get $1 + local.get $0 i32.const 0 call $~lib/array/ensureSize end - local.get $1 + local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 i32.load offset=12 if i32.const 0 @@ -10139,15 +10342,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $5 + local.set $1 global.get $std/array/arr - local.get $5 + local.get $1 call $~lib/array/Array#concat - local.set $1 + local.set $2 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10172,7 +10375,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=12 i32.const 3 i32.ne @@ -10184,14 +10387,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 2 i32.const 3 i32.const 1024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $5 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10206,7 +10409,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10219,7 +10422,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10232,7 +10435,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10245,17 +10448,17 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 46 call $~lib/array/Array#push - local.get $5 + local.get $1 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $5 - call $~lib/array/Array#concat - local.set $6 local.get $1 + call $~lib/array/Array#concat + local.set $0 + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10269,7 +10472,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.load offset=12 i32.const 2 i32.ne @@ -10281,7 +10484,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.load offset=12 i32.const 5 i32.ne @@ -10293,7 +10496,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10306,7 +10509,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10319,7 +10522,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10332,7 +10535,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10345,7 +10548,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10358,10 +10561,10 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $0 call $~lib/array/Array#pop drop - local.get $6 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -10379,7 +10582,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 if i32.const 0 @@ -10389,13 +10592,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 global.get $std/array/arr call $~lib/array/Array#concat - local.set $1 - local.get $6 + local.set $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -10407,7 +10610,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.load offset=12 if i32.const 0 @@ -10417,14 +10620,14 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 3 @@ -10436,14 +10639,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $23 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10469,14 +10672,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $25 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10494,22 +10697,21 @@ i32.const 1248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.tee $1 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $7 + local.tee $6 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10527,21 +10729,21 @@ i32.const 1344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $9 + local.tee $7 i32.const 5 i32.const 2 i32.const 3 i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $8 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10559,21 +10761,21 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $9 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10591,21 +10793,21 @@ i32.const 1536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $12 + local.tee $11 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10623,9 +10825,9 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 1 i32.const 2 i32.const 4 @@ -10655,9 +10857,9 @@ i32.const 1728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 0 i32.const -2 i32.const 2147483647 @@ -10669,7 +10871,7 @@ i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $28 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10687,21 +10889,21 @@ i32.const 1824 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $20 + local.tee $17 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10719,21 +10921,21 @@ i32.const 1920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $4 + local.tee $19 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10751,21 +10953,22 @@ i32.const 2016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $0 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $21 i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10783,22 +10986,22 @@ i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $22 + local.set $1 local.get $0 call $~lib/rt/pure/__release - local.get $22 + local.get $1 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $1 + local.tee $0 i32.const 5 i32.const 2 i32.const 3 i32.const 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10810,15 +11013,19 @@ call $~lib/builtins/abort unreachable end - local.get $22 + local.get $1 call $~lib/rt/pure/__release - local.get $23 + local.get $2 call $~lib/rt/pure/__release - local.get $24 + local.get $3 call $~lib/rt/pure/__release - local.get $25 + local.get $5 call $~lib/rt/pure/__release - local.get $26 + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $23 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release @@ -10826,40 +11033,36 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $20 + local.get $28 call $~lib/rt/pure/__release - local.get $2 + local.get $17 call $~lib/rt/pure/__release - local.get $4 + local.get $13 call $~lib/rt/pure/__release - local.get $6 + local.get $19 call $~lib/rt/pure/__release - local.get $5 + local.get $20 call $~lib/rt/pure/__release - local.get $3 + local.get $21 call $~lib/rt/pure/__release - local.get $1 + local.get $22 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift @@ -11032,9 +11235,9 @@ unreachable end global.get $std/array/arr - local.tee $5 + local.tee $1 i32.load offset=12 - local.tee $0 + local.tee $2 i32.const 1 i32.lt_s if @@ -11045,29 +11248,29 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.load offset=4 - local.tee $6 + local.tee $0 i32.load - local.get $6 - local.get $6 + local.get $0 + local.get $0 i32.const 4 i32.add - local.get $0 + local.get $2 i32.const 1 i32.sub - local.tee $1 + local.tee $2 i32.const 2 i32.shl - local.tee $0 + local.tee $5 call $~lib/memory/memory.copy local.get $0 - local.get $6 + local.get $5 i32.add i32.const 0 i32.store - local.get $5 local.get $1 + local.get $2 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11235,14 +11438,14 @@ unreachable end global.get $std/array/arr - local.tee $1 + local.tee $2 i32.load offset=12 local.tee $0 if - local.get $1 + local.get $2 i32.load offset=4 - local.set $4 - local.get $1 + local.set $1 + local.get $2 i32.load offset=4 local.get $0 i32.const 1 @@ -11250,30 +11453,30 @@ i32.const 2 i32.shl i32.add - local.set $2 + local.set $0 loop $while-continue|0 - local.get $4 - local.get $2 + local.get $1 + local.get $0 i32.lt_u if - local.get $4 + local.get $1 i32.load - local.set $0 - local.get $4 - local.get $2 + local.set $3 + local.get $1 + local.get $0 i32.load i32.store - local.get $2 local.get $0 + local.get $3 i32.store - local.get $4 + local.get $1 i32.const 4 i32.add - local.set $4 - local.get $2 + local.set $1 + local.get $0 i32.const 4 i32.sub - local.set $2 + local.set $0 br $while-continue|0 end end @@ -11511,36 +11714,36 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - local.set $0 + local.tee $1 + local.set $5 i32.const 0 - local.set $2 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $6 + local.get $1 i32.load offset=12 - local.tee $3 + local.tee $2 if (result i32) i32.const 0 - local.get $3 + local.get $2 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $2 + local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $0 + local.get $5 i32.load offset=4 - local.set $0 + local.set $3 loop $while-continue|022 + local.get $0 local.get $2 - local.get $3 i32.lt_s if + local.get $3 local.get $0 - local.get $2 i32.const 2 i32.shl i32.add @@ -11548,17 +11751,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $while-continue|022 end end i32.const -1 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.const -1 i32.ne if @@ -11575,12 +11778,12 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - local.set $0 + local.tee $2 + local.set $4 i32.const 0 - local.set $2 + local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $5 + local.get $2 i32.load offset=12 local.tee $3 if (result i32) @@ -11592,19 +11795,19 @@ end if i32.const -1 - local.set $2 + local.set $0 br $__inlined_func$~lib/array/Array#indexOf end - local.get $0 + local.get $4 i32.load offset=4 - local.set $0 + local.set $5 loop $while-continue|023 - local.get $2 + local.get $0 local.get $3 i32.lt_s if + local.get $5 local.get $0 - local.get $2 i32.const 3 i32.shl i32.add @@ -11612,17 +11815,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $while-continue|023 end end i32.const -1 - local.set $2 + local.set $0 end - local.get $2 + local.get $0 i32.const -1 i32.ne if @@ -11633,9 +11836,9 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11775,7 +11978,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $4 + local.set $1 i32.const 0 i32.const 1 i32.const 2 @@ -11783,7 +11986,7 @@ i32.const 2272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $2 i32.load offset=12 local.tee $3 if (result i32) @@ -11795,17 +11998,17 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $6 + local.get $2 i32.load offset=4 - local.set $0 + local.set $4 loop $while-continue|024 - local.get $4 + local.get $1 local.get $3 i32.lt_s if i32.const 1 - local.get $0 local.get $4 + local.get $1 i32.const 2 i32.shl i32.add @@ -11822,10 +12025,10 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $while-continue|024 end end @@ -11842,7 +12045,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $2 + local.set $0 i32.const 0 i32.const 1 i32.const 3 @@ -11850,49 +12053,49 @@ i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - i32.load offset=12 local.tee $3 + i32.load offset=12 + local.tee $5 if (result i32) i32.const 0 - local.get $3 + local.get $5 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $5 + local.get $3 i32.load offset=4 - local.set $0 + local.set $6 loop $while-continue|025 - local.get $2 - local.get $3 + local.get $0 + local.get $5 i32.lt_s if i32.const 1 + local.get $6 local.get $0 - local.get $2 i32.const 3 i32.shl i32.add f64.load - local.tee $21 + local.tee $24 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $21 - local.get $21 + local.get $24 + local.get $24 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $while-continue|025 end end @@ -11962,9 +12165,9 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 call $~lib/rt/pure/__release - local.get $5 + local.get $3 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11972,18 +12175,18 @@ i32.const 2336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $39 + local.tee $4 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11995,14 +12198,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 2432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12020,21 +12223,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $42 + local.tee $8 i32.const 0 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12046,14 +12249,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12072,20 +12275,20 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $45 + local.tee $11 i32.const 3 i32.const 2 i32.const 3 i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12104,7 +12307,7 @@ i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12122,20 +12325,21 @@ i32.const 2672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $48 + local.tee $15 i32.const 2 i32.const 2 i32.const 3 i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12147,14 +12351,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $17 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12172,20 +12376,20 @@ i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $51 + local.tee $13 i32.const 1 i32.const 2 i32.const 3 i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $52 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12197,14 +12401,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12222,20 +12426,20 @@ i32.const 2896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $54 + local.tee $21 i32.const 1 i32.const 2 i32.const 3 i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12247,14 +12451,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12272,20 +12476,20 @@ i32.const 3008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $57 + local.tee $29 i32.const 2 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $30 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12297,14 +12501,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 3 i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $59 + local.tee $31 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12322,20 +12526,20 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $60 + local.tee $32 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $26 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12347,14 +12551,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12372,20 +12576,20 @@ i32.const 3232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $22 + local.tee $34 i32.const 1 i32.const 2 i32.const 3 i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12397,14 +12601,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 4 i32.const 2 i32.const 3 i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12422,20 +12626,20 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $25 + local.tee $37 i32.const 0 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12447,14 +12651,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 3408 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12472,20 +12676,20 @@ i32.const 3456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $8 + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12497,14 +12701,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12522,21 +12726,20 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.tee $0 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $10 + local.tee $43 i32.const 0 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12555,7 +12758,7 @@ i32.const 3632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12580,14 +12783,14 @@ i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $13 + local.tee $46 i32.const 0 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12606,7 +12809,7 @@ i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12624,21 +12827,21 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $32 + local.set $2 local.get $1 call $~lib/rt/pure/__release - local.get $32 + local.get $2 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $16 + local.tee $49 i32.const 0 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12650,14 +12853,14 @@ call $~lib/builtins/abort unreachable end - local.get $32 + local.get $2 i32.const 5 i32.const 2 i32.const 3 i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12675,10 +12878,10 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.const 1 call $~lib/array/Array#splice - local.tee $0 + local.tee $5 i32.load offset=12 if i32.const 0 @@ -12688,7 +12891,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 if i32.const 0 @@ -12704,37 +12907,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $1 i32.load offset=4 - local.tee $3 + local.tee $0 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $3 + local.get $0 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $3 + local.get $0 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $3 + local.get $0 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $3 + local.get $0 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $1 + local.get $3 call $~lib/rt/pure/__release - local.get $27 + local.get $1 i32.const 2 call $~lib/array/Array#splice - local.set $31 - local.get $0 + local.set $23 + local.get $5 call $~lib/rt/pure/__release - local.get $31 + local.get $23 i32.load offset=12 i32.const 2 i32.ne @@ -12746,10 +12949,10 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $23 i32.const 0 call $~lib/array/Array#__get - local.tee $2 + local.tee $52 i32.load i32.const 3 i32.ne @@ -12761,10 +12964,10 @@ call $~lib/builtins/abort unreachable end - local.get $31 + local.get $23 i32.const 1 call $~lib/array/Array#__get - local.tee $4 + local.tee $53 i32.load i32.const 4 i32.ne @@ -12776,7 +12979,7 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -12788,10 +12991,10 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $1 i32.const 0 call $~lib/array/Array#__get - local.tee $6 + local.tee $54 i32.load i32.const 1 i32.ne @@ -12803,10 +13006,10 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $1 i32.const 1 call $~lib/array/Array#__get - local.tee $5 + local.tee $55 i32.load i32.const 2 i32.ne @@ -12818,10 +13021,10 @@ call $~lib/builtins/abort unreachable end - local.get $27 + local.get $1 i32.const 2 call $~lib/array/Array#__get - local.tee $3 + local.tee $56 i32.load i32.const 5 i32.ne @@ -12839,7 +13042,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $30 + local.tee $5 i32.load offset=4 local.tee $0 i32.const 1 @@ -12852,9 +13055,9 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $30 + local.get $5 call $~lib/array/Array#splice - local.tee $33 + local.tee $28 i32.load offset=12 i32.const 1 i32.ne @@ -12866,11 +13069,11 @@ call $~lib/builtins/abort unreachable end - local.get $33 + local.get $28 i32.const 0 call $~lib/array/Array#__get - local.tee $34 - local.get $34 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -12891,7 +13094,7 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $5 i32.load offset=12 i32.const 2 i32.ne @@ -12903,10 +13106,10 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $5 i32.const 0 call $~lib/array/Array#__get - local.tee $1 + local.tee $57 if i32.const 0 i32.const 304 @@ -12915,11 +13118,11 @@ call $~lib/builtins/abort unreachable end - local.get $30 + local.get $5 i32.const 1 call $~lib/array/Array#__get - local.tee $35 - local.get $35 + local.tee $3 + local.get $3 i32.eqz if i32.const 0 @@ -12940,107 +13143,107 @@ call $~lib/builtins/abort unreachable end - local.get $32 + local.get $2 call $~lib/rt/pure/__release - local.get $39 + local.get $4 call $~lib/rt/pure/__release - local.get $40 + local.get $6 call $~lib/rt/pure/__release - local.get $41 + local.get $7 call $~lib/rt/pure/__release - local.get $42 + local.get $8 call $~lib/rt/pure/__release - local.get $43 + local.get $9 call $~lib/rt/pure/__release - local.get $44 + local.get $10 call $~lib/rt/pure/__release - local.get $45 + local.get $11 call $~lib/rt/pure/__release - local.get $46 + local.get $12 call $~lib/rt/pure/__release - local.get $47 + local.get $14 call $~lib/rt/pure/__release - local.get $48 + local.get $15 call $~lib/rt/pure/__release - local.get $49 + local.get $16 call $~lib/rt/pure/__release - local.get $50 + local.get $17 call $~lib/rt/pure/__release - local.get $51 + local.get $13 call $~lib/rt/pure/__release - local.get $52 + local.get $19 call $~lib/rt/pure/__release - local.get $53 + local.get $20 call $~lib/rt/pure/__release - local.get $54 + local.get $21 call $~lib/rt/pure/__release - local.get $55 + local.get $22 call $~lib/rt/pure/__release - local.get $56 + local.get $25 call $~lib/rt/pure/__release - local.get $57 + local.get $29 call $~lib/rt/pure/__release - local.get $58 + local.get $30 call $~lib/rt/pure/__release - local.get $59 + local.get $31 call $~lib/rt/pure/__release - local.get $60 + local.get $32 call $~lib/rt/pure/__release - local.get $28 + local.get $26 call $~lib/rt/pure/__release - local.get $29 + local.get $27 call $~lib/rt/pure/__release - local.get $22 + local.get $34 call $~lib/rt/pure/__release - local.get $23 + local.get $35 call $~lib/rt/pure/__release - local.get $24 + local.get $36 call $~lib/rt/pure/__release - local.get $25 + local.get $37 call $~lib/rt/pure/__release - local.get $26 + local.get $38 call $~lib/rt/pure/__release - local.get $7 + local.get $39 call $~lib/rt/pure/__release - local.get $8 + local.get $40 call $~lib/rt/pure/__release - local.get $9 + local.get $41 call $~lib/rt/pure/__release - local.get $19 + local.get $42 call $~lib/rt/pure/__release - local.get $10 + local.get $43 call $~lib/rt/pure/__release - local.get $11 + local.get $44 call $~lib/rt/pure/__release - local.get $12 + local.get $45 call $~lib/rt/pure/__release - local.get $13 + local.get $46 call $~lib/rt/pure/__release - local.get $14 + local.get $47 call $~lib/rt/pure/__release - local.get $15 + local.get $48 call $~lib/rt/pure/__release - local.get $16 + local.get $49 call $~lib/rt/pure/__release - local.get $17 + local.get $50 call $~lib/rt/pure/__release - local.get $20 + local.get $51 call $~lib/rt/pure/__release - local.get $2 + local.get $52 call $~lib/rt/pure/__release - local.get $4 + local.get $53 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release - local.get $5 + local.get $55 call $~lib/rt/pure/__release - local.get $3 + local.get $56 call $~lib/rt/pure/__release - local.get $34 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $57 call $~lib/rt/pure/__release - local.get $35 + local.get $3 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -13514,19 +13717,19 @@ unreachable end i32.const 0 - local.set $2 + local.set $0 loop $for-loop|0 - local.get $2 + local.get $0 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|0 end end @@ -13543,56 +13746,56 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $2 + local.set $0 global.get $std/array/arr - local.tee $5 - i32.load offset=12 local.tee $3 + i32.load offset=12 + local.tee $4 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $2 i32.load offset=4 - local.set $1 + local.set $6 loop $for-loop|043 - local.get $2 + local.get $0 + local.get $4 local.get $3 - local.get $5 i32.load offset=12 - local.tee $0 - local.get $3 - local.get $0 + local.tee $7 + local.get $4 + local.get $7 i32.lt_s select i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 + local.get $0 i32.const 2 i32.shl - local.tee $0 - local.get $5 + local.tee $7 + local.get $3 i32.load offset=4 i32.add i32.load f32.convert_i32_s local.set $18 - local.get $0 - local.get $1 + local.get $6 + local.get $7 i32.add local.get $18 f32.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|043 end end - local.get $6 + local.get $2 i32.load offset=12 i32.const 4 i32.ne @@ -13604,7 +13807,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $2 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13713,7 +13916,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $6 + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 @@ -14131,10 +14334,10 @@ call $~lib/array/Array#push call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $36 + local.set $33 i32.const 1 global.set $~lib/math/random_seeded - local.get $36 + local.get $33 call $~lib/math/murmurHash3 global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 @@ -14142,7 +14345,7 @@ i64.xor call $~lib/math/murmurHash3 global.set $~lib/math/random_state1_64 - local.get $36 + local.get $33 i32.wrap_i64 call $~lib/math/splitMix32 global.set $~lib/math/random_state0_32 @@ -14180,67 +14383,11 @@ i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $2 i32.const 0 global.set $~argumentsLength - block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $1 - i32.load offset=12 - local.tee $0 - i32.const 1 - i32.le_s - if - local.get $1 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $1 - i32.load offset=4 - local.set $3 - local.get $0 - i32.const 2 - i32.eq - if - local.get $3 - f32.load offset=4 - local.set $37 - local.get $3 - f32.load - local.set $18 - i32.const 2 - global.set $~argumentsLength - local.get $37 - local.get $18 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $3 - local.get $18 - f32.store offset=4 - local.get $3 - local.get $37 - f32.store - end - local.get $1 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $0 - i32.const 256 - i32.lt_s - if - local.get $3 - local.get $0 - call $~lib/util/sort/insertionSort - else - local.get $3 - local.get $0 - call $~lib/util/sort/weakHeapSort - end - local.get $1 - call $~lib/rt/pure/__retain - end + local.get $2 + call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14249,38 +14396,38 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $4 i32.const 0 - local.set $5 + local.set $0 i32.const 0 - local.get $1 + local.get $2 i32.load offset=12 - local.tee $0 - local.get $8 + local.tee $6 + local.get $4 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $1 - local.get $8 + local.get $2 + local.get $4 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|00 - local.get $5 local.get $0 + local.get $6 i32.lt_s if - local.get $1 - local.get $5 + local.get $2 + local.get $0 call $~lib/array/Array#__get local.tee $18 local.get $18 f32.ne if (result i32) - local.get $8 - local.get $5 + local.get $4 + local.get $0 call $~lib/array/Array#__get local.tee $18 local.get $18 @@ -14291,20 +14438,20 @@ i32.eqz if i32.const 0 - local.get $1 - local.get $5 + local.get $2 + local.get $0 call $~lib/array/Array#__get - local.get $8 - local.get $5 + local.get $4 + local.get $0 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $5 + local.get $0 i32.const 1 i32.add - local.set $5 + local.set $0 br $for-loop|00 end end @@ -14325,67 +14472,11 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $3 i32.const 0 global.set $~argumentsLength - block $__inlined_func$~lib/array/Array#sort (result i32) - local.get $0 - i32.load offset=12 - local.tee $3 - i32.const 1 - i32.le_s - if - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $0 - i32.load offset=4 - local.set $5 - local.get $3 - i32.const 2 - i32.eq - if - local.get $5 - f64.load offset=8 - local.set $38 - local.get $5 - f64.load - local.set $21 - i32.const 2 - global.set $~argumentsLength - local.get $38 - local.get $21 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $5 - local.get $21 - f64.store offset=8 - local.get $5 - local.get $38 - f64.store - end - local.get $0 - call $~lib/rt/pure/__retain - br $__inlined_func$~lib/array/Array#sort - end - local.get $3 - i32.const 256 - i32.lt_s - if - local.get $5 - local.get $3 - call $~lib/util/sort/insertionSort - else - local.get $5 - local.get $3 - call $~lib/util/sort/weakHeapSort - end - local.get $0 - call $~lib/rt/pure/__retain - end + local.get $3 + call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) i32.const 8 @@ -14394,41 +14485,41 @@ i32.const 4448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 + local.set $6 i32.const 0 - local.set $2 + local.set $0 i32.const 0 - local.get $0 + local.get $3 i32.load offset=12 - local.tee $3 - local.get $9 + local.tee $8 + local.get $6 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $0 - local.get $9 + local.get $3 + local.get $6 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 - local.get $2 - local.get $3 + local.get $0 + local.get $8 i32.lt_s if + local.get $3 local.get $0 - local.get $2 call $~lib/array/Array#__get - local.tee $21 - local.get $21 + local.tee $24 + local.get $24 f64.ne if (result i32) - local.get $9 - local.get $2 + local.get $6 + local.get $0 call $~lib/array/Array#__get - local.tee $21 - local.get $21 + local.tee $24 + local.get $24 f64.ne else i32.const 0 @@ -14436,20 +14527,20 @@ i32.eqz if i32.const 0 + local.get $3 local.get $0 - local.get $2 call $~lib/array/Array#__get - local.get $9 - local.get $2 + local.get $6 + local.get $0 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|01 end end @@ -14470,21 +14561,21 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $19 + local.set $7 i32.const 0 global.set $~argumentsLength - local.get $19 + local.get $7 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $19 + local.get $7 i32.const 5 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14502,21 +14593,21 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $10 + local.set $8 i32.const 0 global.set $~argumentsLength - local.get $10 + local.get $8 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $10 + local.get $8 i32.const 5 i32.const 2 i32.const 7 i32.const 4672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14534,64 +14625,64 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $20 + local.set $17 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $11 + local.set $9 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $12 + local.set $10 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $13 + local.set $11 i32.const 4 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $0 i32.const 64 call $std/array/createReverseOrderedArray - local.set $14 + local.set $12 i32.const 128 call $std/array/createReverseOrderedArray - local.set $15 + local.set $14 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $16 + local.set $15 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $17 + local.set $16 i32.const 512 call $std/array/createRandomOrderedArray - local.set $2 - local.get $20 + local.set $13 + local.get $17 i32.const 48 call $std/array/assertSorted - local.get $11 + local.get $9 i32.const 48 call $std/array/assertSorted - local.get $11 + local.get $9 i32.const 1 i32.const 2 i32.const 3 i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14603,17 +14694,17 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $10 i32.const 48 call $std/array/assertSorted - local.get $12 + local.get $10 i32.const 2 i32.const 2 i32.const 3 i32.const 4960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14625,11 +14716,11 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $11 i32.const 48 call $std/array/assertSorted - local.get $13 - local.get $7 + local.get $11 + local.get $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14641,11 +14732,11 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $12 i32.const 48 call $std/array/assertSorted - local.get $14 - local.get $7 + local.get $12 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14657,11 +14748,11 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $14 i32.const 48 call $std/array/assertSorted - local.get $15 - local.get $7 + local.get $14 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14673,11 +14764,11 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $15 i32.const 48 call $std/array/assertSorted - local.get $16 - local.get $7 + local.get $15 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14689,11 +14780,11 @@ call $~lib/builtins/abort unreachable end - local.get $17 + local.get $16 i32.const 48 call $std/array/assertSorted - local.get $17 - local.get $7 + local.get $16 + local.get $0 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14705,34 +14796,36 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $13 i32.const 48 call $std/array/assertSorted - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $8 + local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $9 + local.get $6 + call $~lib/rt/pure/__release + local.get $7 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $4 + local.get $8 call $~lib/rt/pure/__release - local.get $10 + local.get $20 call $~lib/rt/pure/__release - local.get $6 + local.get $17 call $~lib/rt/pure/__release - local.get $20 + local.get $9 call $~lib/rt/pure/__release - local.get $11 + local.get $10 call $~lib/rt/pure/__release - local.get $12 + local.get $11 call $~lib/rt/pure/__release - local.get $13 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $12 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -14740,38 +14833,36 @@ call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $2 + local.get $13 call $~lib/rt/pure/__release - local.get $5 + local.get $21 call $~lib/rt/pure/__release - local.get $3 + local.get $22 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray - local.set $1 + local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $0 - local.get $1 + local.set $2 + local.get $0 i32.const 49 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 50 call $std/array/assertSorted - local.get $0 + local.get $2 i32.const 51 call $std/array/assertSorted - local.get $0 + local.get $2 i32.const 52 call $std/array/assertSorted - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release i32.const 0 - local.set $2 + local.set $0 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -14779,45 +14870,45 @@ i32.const 2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 i32.const 2 i32.store offset=12 loop $for-loop|02 - local.get $2 + local.get $0 i32.const 2 i32.lt_s if i32.const 1 call $~lib/array/Array#constructor - local.tee $0 + local.tee $3 i32.const 0 i32.const 1 - local.get $2 + local.get $0 i32.sub call $~lib/array/Array#__set - local.get $1 local.get $2 local.get $0 + local.get $3 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|02 end end - local.get $1 + local.get $2 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 0 - local.set $2 + local.set $0 i32.const 16 i32.const 14 call $~lib/rt/tlsf/__alloc @@ -14825,14 +14916,14 @@ i32.const 512 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 i32.const 512 i32.store offset=12 loop $for-loop|03 - local.get $2 + local.get $0 i32.const 512 i32.lt_s if @@ -14840,28 +14931,28 @@ i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 511 - local.get $2 + local.get $0 i32.sub i32.store - local.get $1 local.get $2 local.get $0 + local.get $3 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|03 end end - local.get $1 + local.get $2 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $2 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14869,143 +14960,107 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $2 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $3 i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $2 call $std/array/assertSorted<~lib/string/String | null>|trampoline block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $4 + local.set $0 i32.const 0 - local.get $0 + local.get $2 i32.load offset=12 - local.tee $1 - local.get $6 + local.tee $7 + local.get $3 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $0 - local.get $6 + local.get $2 + local.get $3 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 - local.get $4 - local.get $1 + local.get $0 + local.get $7 i32.lt_s if + local.get $2 local.get $0 - local.get $4 call $~lib/array/Array#__get - local.tee $5 - local.get $6 - local.get $4 + local.tee $4 + local.get $3 + local.get $0 call $~lib/array/Array#__get - local.tee $3 + local.tee $6 call $~lib/string/String.__eq i32.eqz if - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $0 i32.const 1 i32.add - local.set $4 + local.set $0 br $for-loop|04 - end - end - i32.const 1 - end - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 979 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $4 - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - i32.const 400 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 - i32.const 0 - i32.store offset=12 - local.get $3 - i32.const 400 - i32.store offset=12 - loop $for-loop|05 - local.get $4 - i32.const 400 - i32.lt_s - if - local.get $3 - local.get $4 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - local.tee $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|05 + end end + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 979 + i32.const 2 + call $~lib/builtins/abort + unreachable end + call $std/array/createRandomStringArray + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $0 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $6 + local.get $2 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 2 i32.const 0 i32.const 17 i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $0 i32.load offset=4 - local.get $10 + local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $0 - local.get $0 + local.tee $2 + local.get $2 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -15023,10 +15078,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $7 i32.const 5120 call $~lib/array/Array#join - local.tee $16 + local.tee $8 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15044,10 +15099,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $9 i32.const 5568 call $~lib/array/Array#join - local.tee $20 + local.tee $10 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15065,10 +15120,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $11 i32.const 5632 call $~lib/array/Array#join - local.tee $4 + local.tee $12 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15086,14 +15141,14 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $2 i32.load offset=4 - local.get $11 + local.get $2 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $0 - local.set $6 - local.get $0 + local.tee $3 + local.set $14 + local.get $3 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -15111,10 +15166,10 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $15 i32.const 5120 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $3 + local.tee $16 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15132,22 +15187,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $3 i32.load offset=4 - local.tee $0 + local.tee $4 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $4 i32.const 0 i32.store offset=4 - local.get $0 + local.get $4 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $12 + local.get $3 call $~lib/array/Array#join - local.tee $1 + local.tee $17 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -15165,19 +15220,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $4 i32.load offset=4 - local.tee $0 + local.tee $13 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $13 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $13 + local.get $4 call $~lib/array/Array#join - local.tee $0 + local.tee $13 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -15189,66 +15244,66 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $0 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $15 + local.get $7 call $~lib/rt/pure/__release - local.get $16 + local.get $8 call $~lib/rt/pure/__release - local.get $17 + local.get $9 call $~lib/rt/pure/__release - local.get $20 + local.get $10 call $~lib/rt/pure/__release - local.get $2 + local.get $11 call $~lib/rt/pure/__release - local.get $4 + local.get $12 call $~lib/rt/pure/__release - local.get $11 + local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $14 call $~lib/rt/pure/__release - local.get $5 + local.get $15 + call $~lib/rt/pure/__release + local.get $16 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $12 + local.get $17 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release local.get $13 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release i32.const 0 i32.const 2 i32.const 3 i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $23 + local.set $4 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $24 + local.set $6 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $25 + local.set $7 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $26 - local.get $23 + local.set $8 + local.get $4 i32.const 5360 call $~lib/array/Array#join local.tee $0 @@ -15264,11 +15319,11 @@ call $~lib/builtins/abort unreachable end - local.get $24 + local.get $6 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $11 + local.set $15 local.get $0 i32.const 7040 call $~lib/string/String.__eq @@ -15281,11 +15336,11 @@ call $~lib/builtins/abort unreachable end - local.get $25 + local.get $7 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $12 + local.set $16 local.get $0 i32.const 7424 call $~lib/string/String.__eq @@ -15298,11 +15353,11 @@ call $~lib/builtins/abort unreachable end - local.get $26 + local.get $8 i32.const 5360 call $~lib/array/Array#join local.tee $0 - local.set $13 + local.set $17 local.get $0 i32.const 7456 call $~lib/string/String.__eq @@ -15321,13 +15376,13 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $9 i32.load offset=4 - local.get $7 + local.get $9 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $14 + local.set $13 local.get $0 i32.const 7520 call $~lib/string/String.__eq @@ -15346,13 +15401,13 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 i32.load offset=4 - local.get $8 + local.get $10 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $15 + local.set $19 local.get $0 i32.const 7584 call $~lib/string/String.__eq @@ -15371,13 +15426,13 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $11 i32.load offset=4 - local.get $9 + local.get $11 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $16 + local.set $20 local.get $0 i32.const 7680 call $~lib/string/String.__eq @@ -15396,13 +15451,13 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $12 i32.load offset=4 - local.get $19 + local.get $12 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $0 - local.set $17 + local.set $21 local.get $0 i32.const 7792 call $~lib/string/String.__eq @@ -15421,11 +15476,11 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $22 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $2 + local.set $25 local.get $0 i32.const 7952 call $~lib/string/String.__eq @@ -15444,11 +15499,11 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $29 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $0 - local.set $6 + local.set $30 local.get $0 i32.const 8096 call $~lib/string/String.__eq @@ -15467,9 +15522,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 - i32.load offset=4 local.tee $0 + i32.load offset=4 + local.tee $2 i32.const 2 i32.const 2 i32.const 3 @@ -15477,7 +15532,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $0 + local.get $2 i32.const 2 i32.const 2 i32.const 3 @@ -15485,14 +15540,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $28 + local.get $0 i32.load offset=4 - local.get $28 + local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $0 - local.set $5 - local.get $0 + local.tee $2 + local.set $31 + local.get $2 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15510,9 +15565,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $2 i32.load offset=4 - local.tee $0 + local.tee $3 i32.const 2 i32.const 0 i32.const 6 @@ -15520,7 +15575,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $0 + local.get $3 i32.const 2 i32.const 0 i32.const 6 @@ -15528,14 +15583,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $29 + local.get $2 i32.load offset=4 - local.get $29 + local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $0 - local.set $3 - local.get $0 + local.tee $3 + local.set $32 + local.get $3 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15553,7 +15608,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $3 i32.load offset=4 i32.const 1 i32.const 2 @@ -15561,7 +15616,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $27 i32.load offset=4 i32.const 1 i32.const 2 @@ -15570,16 +15625,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $0 + local.get $27 i32.store - local.get $22 + local.get $3 i32.load offset=4 - local.get $22 + local.get $3 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $1 - local.set $0 - local.get $1 + local.tee $26 + local.set $27 + local.get $26 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15591,69 +15646,69 @@ call $~lib/builtins/abort unreachable end - local.get $23 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $11 - call $~lib/rt/pure/__release - local.get $12 + local.get $4 call $~lib/rt/pure/__release - local.get $13 + local.get $6 call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release + call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $17 + call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $16 + local.get $13 + call $~lib/rt/pure/__release + local.get $10 call $~lib/rt/pure/__release local.get $19 call $~lib/rt/pure/__release - local.get $17 + local.get $11 call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release - local.get $2 + local.get $12 call $~lib/rt/pure/__release - local.get $4 + local.get $21 call $~lib/rt/pure/__release - local.get $6 + local.get $22 call $~lib/rt/pure/__release - local.get $5 + local.get $25 call $~lib/rt/pure/__release - local.get $3 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $30 call $~lib/rt/pure/__release - global.get $std/array/arr + local.get $31 + call $~lib/rt/pure/__release + local.get $32 call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $31 + global.get $std/array/arr call $~lib/rt/pure/__release - local.get $30 + local.get $1 call $~lib/rt/pure/__release - local.get $33 + local.get $23 + call $~lib/rt/pure/__release + local.get $5 call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release - local.get $29 + local.get $0 call $~lib/rt/pure/__release - local.get $22 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release ) - (func $~start (; 163 ;) + (func $~start (; 164 ;) global.get $~started if return @@ -15663,7 +15718,7 @@ end call $start:std/array ) - (func $~lib/rt/pure/decrement (; 164 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 165 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -15794,7 +15849,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 165 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 166 ;) (param $0 i32) local.get $0 i32.const 8292 i32.lt_u @@ -15806,7 +15861,7 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/array/Array#__visit_impl (; 166 ;) (param $0 i32) + (func $~lib/array/Array#__visit_impl (; 167 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 6769ef2dd6..0d6dcfffcf 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,13 +1,13 @@ (module (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param 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_=>_i32 (func (param i32 i32) (result 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_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) @@ -809,69 +809,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -947,9 +885,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -997,9 +936,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1049,7 +1044,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1057,7 +1052,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 14 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 13 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1268,7 +1263,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1319,7 +1314,7 @@ end local.get $0 ) - (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1492,7 +1487,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -1562,7 +1557,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 432 i32.gt_u @@ -1573,7 +1568,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1642,14 +1637,32 @@ i32.store offset=8 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#constructor|trampoline (; 19 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 + block $2of2 + block $1of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $1of2 $1of2 $2of2 $outOfRange + end + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.set $2 + end + local.get $2 + local.tee $3 i32.const 1073741808 i32.gt_u - local.get $1 + local.get $2 local.get $0 i32.const 16 i32.sub @@ -1668,52 +1681,51 @@ i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.const 0 i32.store - local.get $2 + local.get $1 i32.const 0 i32.store offset=4 - local.get $2 + local.get $1 i32.const 0 i32.store offset=8 local.get $0 - local.set $3 + local.set $2 local.get $0 - local.get $2 + local.get $1 i32.load local.tee $4 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $4 call $~lib/rt/pure/__release end + local.get $1 local.get $2 - local.get $3 i32.store - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 ) - (func $~setArgumentsLength (; 21 ;) (param $0 i32) + (func $~setArgumentsLength (; 20 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/arraybuffer (; 22 ;) + (func $start:std/arraybuffer (; 21 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc @@ -1957,20 +1969,13 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $6 + local.set $3 i32.const 1 global.set $~argumentsLength local.get $4 i32.load - local.tee $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.set $3 - local.get $0 - local.get $3 - call $~lib/dataview/DataView#constructor - local.set $0 + call $~lib/dataview/DataView#constructor|trampoline + local.set $5 local.get $2 call $~lib/rt/pure/__release local.get $1 @@ -1978,15 +1983,15 @@ local.get $4 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release ) - (func $~start (; 23 ;) + (func $~start (; 22 ;) call $start:std/arraybuffer ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index ed78174869..30ec2116a7 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -4,8 +4,8 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i64_i32_=>_none (func (param i32 i64 i32))) (type $i32_i32_=>_i64 (func (param i32 i32) (result i64))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -817,69 +817,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 10 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -955,9 +893,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1005,9 +944,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1057,7 +1052,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 13 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 12 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1065,7 +1060,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 14 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 13 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1116,7 +1111,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 15 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) local.get $0 i32.const 512 i32.gt_u @@ -1127,7 +1122,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 16 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1218,7 +1213,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#__set (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1238,7 +1233,7 @@ local.get $2 i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1302,14 +1297,14 @@ i32.store offset=8 local.get $3 ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 19 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 18 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/polyfills/bswap (; 20 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 19 ;) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -1322,7 +1317,7 @@ i32.rotr i32.or ) - (func $~lib/dataview/DataView#getFloat32 (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $~lib/dataview/DataView#getFloat32 (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $1 i32.const 31 i32.shr_u @@ -1358,7 +1353,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 22 ;) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 21 ;) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -1384,7 +1379,7 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 23 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 22 ;) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 @@ -1410,7 +1405,7 @@ f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getInt8 (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1429,7 +1424,7 @@ i32.add i32.load8_s ) - (func $~lib/polyfills/bswap (; 25 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 24 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -1442,7 +1437,7 @@ i32.shl i32.or ) - (func $~lib/dataview/DataView#getInt16 (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1476,7 +1471,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt32 (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1510,7 +1505,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getInt64 (; 28 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 27 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1536,7 +1531,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/dataview/DataView#getUint8 (; 28 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1555,7 +1550,7 @@ i32.add i32.load8_u ) - (func $~lib/polyfills/bswap (; 30 ;) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 29 ;) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1566,7 +1561,7 @@ i32.shr_u i32.or ) - (func $~lib/dataview/DataView#getUint16 (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1600,7 +1595,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint32 (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 31 i32.shr_u @@ -1634,7 +1629,7 @@ end local.get $0 ) - (func $~lib/dataview/DataView#getUint64 (; 33 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getUint64 (; 32 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -1660,7 +1655,7 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 34 ;) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#setFloat32 (; 33 ;) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1688,7 +1683,7 @@ i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 35 ;) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 34 ;) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1716,7 +1711,7 @@ i64.store end ) - (func $~lib/dataview/DataView#setInt16 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1740,7 +1735,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1764,7 +1759,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 38 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1788,7 +1783,7 @@ end i64.store ) - (func $~lib/dataview/DataView#setUint16 (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 @@ -1812,7 +1807,7 @@ end i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 40 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint32 (; 39 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 @@ -1836,7 +1831,7 @@ end i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 41 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setUint64 (; 40 ;) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 @@ -1860,11 +1855,11 @@ end i64.store ) - (func $~setArgumentsLength (; 42 ;) (param $0 i32) + (func $~setArgumentsLength (; 41 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $start:std/dataview (; 43 ;) + (func $start:std/dataview (; 42 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3455,10 +3450,10 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~start (; 44 ;) + (func $~start (; 43 ;) call $start:std/dataview ) - (func $~lib/rt/pure/decrement (; 45 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 44 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index d892c94c7c..30c081c913 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,7 +1,6 @@ (module (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $none_=>_i32 (func (result i32))) (type $none_=>_f64 (func (result f64))) (type $i32_i32_i32_i32_i32_i32_f64_=>_f64 (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) @@ -15,75 +14,10 @@ (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 3 ;) (result i32) + (func $start:std/date (; 3 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 - memory.size - local.tee $3 - i32.const 16 - i32.shl - local.tee $1 - i32.gt_u - if - local.get $3 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $3 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 3 - i32.store offset=8 - local.get $0 - i32.const 8 - i32.store offset=12 - local.get $2 - ) - (func $start:std/date (; 4 ;) - (local $0 i32) - (local $1 i64) + (local $2 i64) i32.const 1970 i32.const 0 i32.const 1 @@ -160,18 +94,65 @@ i32.const 64 global.set $~lib/rt/stub/offset global.get $std/date/creationTime - local.set $1 - call $~lib/rt/stub/__alloc + local.set $2 + i32.const 96 + memory.size + local.tee $1 + i32.const 16 + i32.shl local.tee $0 + i32.gt_u + if + local.get $1 + i32.const 65631 + local.get $0 + i32.sub + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $0 + local.get $1 + local.get $0 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $0 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + i32.const 96 + global.set $~lib/rt/stub/offset + i32.const 64 + i32.const 16 + i32.store + i32.const 68 + i32.const 1 + i32.store + i32.const 72 + i32.const 3 + i32.store + i32.const 76 + i32.const 8 + i32.store + i32.const 80 i64.const 0 i64.store - local.get $0 - local.get $1 + i32.const 80 + local.get $2 i64.store - local.get $0 + i32.const 80 global.set $std/date/date global.get $std/date/creationTime - global.get $std/date/date + i32.const 80 i64.load i64.ne if @@ -202,7 +183,7 @@ unreachable end ) - (func $~start (; 5 ;) + (func $~start (; 4 ;) call $start:std/date ) ) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 65b736773c..fdcac55bfb 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -857,60 +857,63 @@ local.get $0 call $~lib/math/NativeMath.asin ) - (func $~lib/math/NativeMath.asinh (; 9 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $../../lib/libm/assembly/libm/asinh (; 9 ;) (param $0 f64) (result f64) + (local $1 i64) + (local $2 f64) local.get $0 - i64.reinterpret_f64 local.tee $2 + i64.reinterpret_f64 + local.tee $1 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $1 - local.get $2 + local.set $0 + local.get $1 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $1 i64.const 1049 i64.ge_u - if (result f64) - local.get $1 + if + local.get $0 call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add + local.set $0 else - local.get $2 + local.get $1 i64.const 1024 i64.ge_u - if (result f64) + if f64.const 2 - local.get $1 + local.get $0 f64.mul f64.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f64.mul f64.const 1 f64.add f64.sqrt - local.get $1 + local.get $0 f64.add f64.div f64.add call $~lib/math/NativeMath.log + local.set $0 else - local.get $2 + local.get $1 i64.const 997 i64.ge_u - if (result f64) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.const 1 f64.add f64.sqrt @@ -919,19 +922,15 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $2 f64.copysign ) - (func $../../lib/libm/assembly/libm/asinh (; 10 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.asinh - ) - (func $~lib/math/NativeMath.atan (; 11 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 10 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1154,11 +1153,11 @@ local.get $3 f64.copysign ) - (func $../../lib/libm/assembly/libm/atan (; 12 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan (; 11 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.atan ) - (func $../../lib/libm/assembly/libm/atanh (; 13 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/atanh (; 12 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 f64) @@ -1214,7 +1213,7 @@ local.get $1 f64.copysign ) - (func $~lib/math/NativeMath.atan2 (; 14 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 13 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1422,12 +1421,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libm/atan2 (; 15 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/atan2 (; 14 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 ) - (func $~lib/math/NativeMath.cbrt (; 16 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 15 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -1549,15 +1548,15 @@ f64.mul f64.add ) - (func $../../lib/libm/assembly/libm/cbrt (; 17 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cbrt (; 16 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cbrt ) - (func $../../lib/libm/assembly/libm/ceil (; 18 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/ceil (; 17 ;) (param $0 f64) (result f64) local.get $0 f64.ceil ) - (func $~lib/math/dtoi32 (; 19 ;) (param $0 f64) (result i32) + (func $~lib/math/dtoi32 (; 18 ;) (param $0 f64) (result i32) local.get $0 f64.const 4294967296 local.get $0 @@ -1569,7 +1568,7 @@ i64.trunc_f64_s i32.wrap_i64 ) - (func $../../lib/libm/assembly/libm/clz32 (; 20 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/clz32 (; 19 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -1584,7 +1583,7 @@ f64.convert_i32_s end ) - (func $~lib/math/pio2_large_quot (; 21 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 20 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1870,7 +1869,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 22 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 21 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -2208,11 +2207,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/cos (; 23 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cos (; 22 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.cos ) - (func $~lib/math/NativeMath.expm1 (; 24 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 23 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2483,7 +2482,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.scalbn (; 25 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 24 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -2560,7 +2559,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.exp (; 26 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 25 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -2712,92 +2711,89 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 27 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/cosh (; 26 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - f64.reinterpret_i64 - local.set $0 - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 1072049730 - i32.lt_u - if + block $__inlined_func$~lib/math/NativeMath.cosh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $2 + f64.reinterpret_i64 + local.set $0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1072049730 + i32.lt_u + if + f64.const 1 + local.get $1 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.cosh + drop + f64.const 1 + local.get $0 + call $~lib/math/NativeMath.expm1 + local.tee $0 + local.get $0 + f64.mul + f64.const 2 + f64.const 2 + local.get $0 + f64.mul + f64.add + f64.div + f64.add + br $__inlined_func$~lib/math/NativeMath.cosh + end local.get $1 - i32.const 1045430272 + i32.const 1082535490 i32.lt_u if + f64.const 0.5 + local.get $0 + call $~lib/math/NativeMath.exp + local.tee $0 f64.const 1 - return + local.get $0 + f64.div + f64.add + f64.mul + br $__inlined_func$~lib/math/NativeMath.cosh end - f64.const 1 - local.get $0 - call $~lib/math/NativeMath.expm1 - local.tee $0 - local.get $0 - f64.mul - f64.const 2 - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.div - f64.add - return - end - local.get $1 - i32.const 1082535490 - i32.lt_u - if - f64.const 0.5 local.get $0 + f64.const 1416.0996898839683 + f64.sub call $~lib/math/NativeMath.exp - local.tee $0 - f64.const 1 - local.get $0 - f64.div - f64.add + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 f64.mul - return end - local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $../../lib/libm/assembly/libm/cosh (; 28 ;) (param $0 f64) (result f64) - local.get $0 - call $~lib/math/NativeMath.cosh ) - (func $../../lib/libm/assembly/libm/exp (; 29 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/exp (; 27 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.exp ) - (func $../../lib/libm/assembly/libm/expm1 (; 30 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/expm1 (; 28 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.expm1 ) - (func $../../lib/libm/assembly/libm/floor (; 31 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/floor (; 29 ;) (param $0 f64) (result f64) local.get $0 f64.floor ) - (func $../../lib/libm/assembly/libm/fround (; 32 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/fround (; 30 ;) (param $0 f64) (result f64) local.get $0 f32.demote_f64 f64.promote_f32 ) - (func $~lib/math/NativeMath.hypot (; 33 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 31 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -2966,12 +2962,12 @@ f64.sqrt f64.mul ) - (func $../../lib/libm/assembly/libm/hypot (; 34 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/hypot (; 32 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot ) - (func $../../lib/libm/assembly/libm/imul (; 35 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/imul (; 33 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) block $__inlined_func$~lib/math/NativeMath.imul (result f64) f64.const 0 @@ -2993,11 +2989,11 @@ f64.convert_i32_s end ) - (func $../../lib/libm/assembly/libm/log (; 36 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log (; 34 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log ) - (func $~lib/math/NativeMath.log10 (; 37 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 35 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3199,15 +3195,15 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log10 (; 38 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log10 ) - (func $../../lib/libm/assembly/libm/log1p (; 39 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log1p (; 37 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log1p ) - (func $~lib/math/NativeMath.log2 (; 40 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 38 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -3402,21 +3398,21 @@ local.get $1 f64.add ) - (func $../../lib/libm/assembly/libm/log2 (; 41 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.log2 ) - (func $../../lib/libm/assembly/libm/max (; 42 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/max (; 40 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.max ) - (func $../../lib/libm/assembly/libm/min (; 43 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/min (; 41 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 f64.min ) - (func $~lib/math/NativeMath.pow (; 44 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 42 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -4372,12 +4368,12 @@ f64.const 1e-300 f64.mul ) - (func $../../lib/libm/assembly/libm/pow (; 45 ;) (param $0 f64) (param $1 f64) (result f64) + (func $../../lib/libm/assembly/libm/pow (; 43 ;) (param $0 f64) (param $1 f64) (result f64) local.get $0 local.get $1 call $~lib/math/NativeMath.pow ) - (func $../../lib/libm/assembly/libm/round (; 46 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/round (; 44 ;) (param $0 f64) (result f64) local.get $0 f64.const 0.5 f64.add @@ -4385,7 +4381,7 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/sign (; 47 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sign (; 45 ;) (param $0 f64) (result f64) local.get $0 f64.abs f64.const 0 @@ -4398,7 +4394,7 @@ end local.get $0 ) - (func $~lib/math/NativeMath.sin (; 48 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 46 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -4718,11 +4714,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libm/sin (; 49 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sin (; 47 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sin ) - (func $~lib/math/NativeMath.sinh (; 50 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 48 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -4799,15 +4795,15 @@ f64.mul f64.mul ) - (func $../../lib/libm/assembly/libm/sinh (; 51 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sinh (; 49 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.sinh ) - (func $../../lib/libm/assembly/libm/sqrt (; 52 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/sqrt (; 50 ;) (param $0 f64) (result f64) local.get $0 f64.sqrt ) - (func $~lib/math/tan_kern (; 53 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 51 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -4989,7 +4985,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 54 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 52 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -5166,11 +5162,11 @@ i32.sub call $~lib/math/tan_kern ) - (func $../../lib/libm/assembly/libm/tan (; 55 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tan (; 53 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tan ) - (func $~lib/math/NativeMath.tanh (; 56 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 54 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -5249,19 +5245,19 @@ local.get $0 f64.copysign ) - (func $../../lib/libm/assembly/libm/tanh (; 57 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/tanh (; 55 ;) (param $0 f64) (result f64) local.get $0 call $~lib/math/NativeMath.tanh ) - (func $../../lib/libm/assembly/libm/trunc (; 58 ;) (param $0 f64) (result f64) + (func $../../lib/libm/assembly/libm/trunc (; 56 ;) (param $0 f64) (result f64) local.get $0 f64.trunc ) - (func $../../lib/libm/assembly/libmf/abs (; 59 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/abs (; 57 ;) (param $0 f32) (result f32) local.get $0 f32.abs ) - (func $~lib/math/Rf (; 60 ;) (param $0 f32) (result f32) + (func $~lib/math/Rf (; 58 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.16666586697101593 local.get $0 @@ -5280,7 +5276,7 @@ f32.add f32.div ) - (func $~lib/math/NativeMathf.acos (; 61 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.acos (; 59 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5396,11 +5392,11 @@ f32.add f32.mul ) - (func $../../lib/libm/assembly/libmf/acos (; 62 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acos (; 60 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.acos ) - (func $~lib/math/NativeMathf.log1p (; 63 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log1p (; 61 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) @@ -5570,7 +5566,7 @@ f32.mul f32.add ) - (func $~lib/math/NativeMathf.log (; 64 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log (; 62 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -5704,7 +5700,7 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/acosh (; 65 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/acosh (; 63 ;) (param $0 f32) (result f32) (local $1 i32) block $__inlined_func$~lib/math/NativeMathf.acosh (result f32) local.get $0 @@ -5756,7 +5752,7 @@ f32.add end ) - (func $~lib/math/NativeMathf.asin (; 66 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.asin (; 64 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f64) @@ -5836,59 +5832,62 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asin (; 67 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/asin (; 65 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.asin ) - (func $~lib/math/NativeMathf.asinh (; 68 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $../../lib/libm/assembly/libmf/asinh (; 66 ;) (param $0 f32) (result f32) + (local $1 i32) + (local $2 f32) local.get $0 + local.tee $2 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $1 f32.reinterpret_i32 - local.set $1 - local.get $2 + local.set $0 + local.get $1 i32.const 1166016512 i32.ge_u - if (result f32) - local.get $1 + if + local.get $0 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add + local.set $0 else - local.get $2 + local.get $1 i32.const 1073741824 i32.ge_u - if (result f32) + if f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f32.mul f32.const 1 f32.add f32.sqrt - local.get $1 + local.get $0 f32.add f32.div f32.add call $~lib/math/NativeMathf.log + local.set $0 else - local.get $2 + local.get $1 i32.const 964689920 i32.ge_u - if (result f32) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.const 1 f32.add f32.sqrt @@ -5897,19 +5896,15 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $2 f32.copysign ) - (func $../../lib/libm/assembly/libmf/asinh (; 69 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.asinh - ) - (func $~lib/math/NativeMathf.atan (; 70 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 67 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6105,11 +6100,11 @@ local.get $4 f32.copysign ) - (func $../../lib/libm/assembly/libmf/atan (; 71 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan (; 68 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.atan ) - (func $../../lib/libm/assembly/libmf/atanh (; 72 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atanh (; 69 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -6159,7 +6154,7 @@ local.get $1 f32.copysign ) - (func $~lib/math/NativeMathf.atan2 (; 73 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6352,12 +6347,12 @@ i32.and select ) - (func $../../lib/libm/assembly/libmf/atan2 (; 74 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/atan2 (; 71 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 ) - (func $~lib/math/NativeMathf.cbrt (; 75 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 72 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -6456,15 +6451,15 @@ f64.div f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/cbrt (; 76 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cbrt (; 73 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cbrt ) - (func $../../lib/libm/assembly/libmf/ceil (; 77 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/ceil (; 74 ;) (param $0 f32) (result f32) local.get $0 f32.ceil ) - (func $../../lib/libm/assembly/libmf/clz32 (; 78 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/clz32 (; 75 ;) (param $0 f32) (result f32) local.get $0 local.get $0 f32.sub @@ -6480,7 +6475,7 @@ f32.convert_i32_s end ) - (func $~lib/math/NativeMathf.cos (; 79 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -6749,11 +6744,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cos (; 80 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cos (; 77 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.cos ) - (func $~lib/math/NativeMathf.expm1 (; 81 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 78 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7003,7 +6998,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.scalbn (; 82 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 79 ;) (param $0 f32) (param $1 i32) (result f32) local.get $1 i32.const 127 i32.gt_s @@ -7079,7 +7074,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 83 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 80 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -7213,7 +7208,7 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/cosh (; 84 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/cosh (; 81 ;) (param $0 f32) (result f32) (local $1 i32) block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) local.get $0 @@ -7273,22 +7268,22 @@ f32.mul end ) - (func $../../lib/libm/assembly/libmf/exp (; 85 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/exp (; 82 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.exp ) - (func $../../lib/libm/assembly/libmf/expm1 (; 86 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/expm1 (; 83 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.expm1 ) - (func $../../lib/libm/assembly/libmf/floor (; 87 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/floor (; 84 ;) (param $0 f32) (result f32) local.get $0 f32.floor ) - (func $../../lib/libm/assembly/libmf/fround (; 88 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/fround (; 85 ;) (param $0 f32) (result f32) local.get $0 ) - (func $~lib/math/NativeMathf.hypot (; 89 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -7393,12 +7388,12 @@ f32.sqrt f32.mul ) - (func $../../lib/libm/assembly/libmf/hypot (; 90 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/hypot (; 87 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot ) - (func $../../lib/libm/assembly/libmf/imul (; 91 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/imul (; 88 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 f32) block $~lib/math/NativeMathf.imul|inlined.0 (result f32) f32.const 0 @@ -7422,11 +7417,11 @@ f32.convert_i32_s end ) - (func $../../lib/libm/assembly/libmf/log (; 92 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log (; 89 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log ) - (func $~lib/math/NativeMathf.log10 (; 93 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7584,15 +7579,15 @@ f32.mul f32.add ) - (func $../../lib/libm/assembly/libmf/log10 (; 94 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log10 (; 91 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log10 ) - (func $../../lib/libm/assembly/libmf/log1p (; 95 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log1p (; 92 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log1p ) - (func $~lib/math/NativeMathf.log2 (; 96 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -7742,21 +7737,21 @@ f32.convert_i32_s f32.add ) - (func $../../lib/libm/assembly/libmf/log2 (; 97 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/log2 (; 94 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.log2 ) - (func $../../lib/libm/assembly/libmf/max (; 98 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/max (; 95 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.max ) - (func $../../lib/libm/assembly/libmf/min (; 99 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/min (; 96 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 f32.min ) - (func $~lib/math/NativeMathf.pow (; 100 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 97 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8214,12 +8209,12 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/pow (; 101 ;) (param $0 f32) (param $1 f32) (result f32) + (func $../../lib/libm/assembly/libmf/pow (; 98 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow ) - (func $../../lib/libm/assembly/libmf/round (; 102 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/round (; 99 ;) (param $0 f32) (result f32) local.get $0 f32.const 0.5 f32.add @@ -8227,7 +8222,7 @@ local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/sign (; 103 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sign (; 100 ;) (param $0 f32) (result f32) local.get $0 f32.abs f32.const 0 @@ -8240,7 +8235,7 @@ end local.get $0 ) - (func $~lib/math/NativeMathf.sin (; 104 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 101 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8510,11 +8505,11 @@ end local.get $0 ) - (func $../../lib/libm/assembly/libmf/sin (; 105 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sin (; 102 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sin ) - (func $~lib/math/NativeMathf.sinh (; 106 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 103 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -8586,15 +8581,15 @@ f32.mul f32.mul ) - (func $../../lib/libm/assembly/libmf/sinh (; 107 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sinh (; 104 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.sinh ) - (func $../../lib/libm/assembly/libmf/sqrt (; 108 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/sqrt (; 105 ;) (param $0 f32) (result f32) local.get $0 f32.sqrt ) - (func $~lib/math/NativeMathf.tan (; 109 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 106 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -8848,11 +8843,11 @@ local.get $1 f32.demote_f64 ) - (func $../../lib/libm/assembly/libmf/tan (; 110 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tan (; 107 ;) (param $0 f32) (result f32) local.get $0 call $~lib/math/NativeMathf.tan ) - (func $~lib/math/NativeMathf.tanh (; 111 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/tanh (; 108 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) local.get $0 @@ -8865,7 +8860,7 @@ local.get $2 i32.const 1057791828 i32.gt_u - if + if (result f32) local.get $2 i32.const 1092616192 i32.gt_u @@ -8887,12 +8882,11 @@ f32.div f32.sub end - local.set $1 else local.get $2 i32.const 1048757624 i32.gt_u - if + if (result f32) f32.const 2 local.get $1 f32.mul @@ -8902,12 +8896,11 @@ f32.const 2 f32.add f32.div - local.set $1 else local.get $2 i32.const 8388608 i32.ge_u - if + if (result f32) f32.const -2 local.get $1 f32.mul @@ -8918,19 +8911,15 @@ f32.const 2 f32.add f32.div - local.set $1 + else + local.get $1 end end end - local.get $1 local.get $0 f32.copysign ) - (func $../../lib/libm/assembly/libmf/tanh (; 112 ;) (param $0 f32) (result f32) - local.get $0 - call $~lib/math/NativeMathf.tanh - ) - (func $../../lib/libm/assembly/libmf/trunc (; 113 ;) (param $0 f32) (result f32) + (func $../../lib/libm/assembly/libmf/trunc (; 109 ;) (param $0 f32) (result f32) local.get $0 f32.trunc ) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ea9bea6d46..ec32c47d57 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) @@ -849,69 +849,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -987,9 +925,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1017,9 +956,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1069,7 +1064,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1077,7 +1072,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1128,7 +1123,7 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1339,7 +1334,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1361,7 +1356,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 556 i32.gt_u @@ -1372,7 +1367,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/map/Map#clear (; 20 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 19 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1405,14 +1400,14 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash8 (; 21 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 20 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1455,7 +1450,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 22 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1468,7 +1463,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 24 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 23 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1599,7 +1594,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1693,7 +1688,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 25 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1716,7 +1711,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1784,7 +1779,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1957,7 +1952,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 28 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1970,7 +1965,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2073,7 +2068,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2176,7 +2171,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2212,7 +2207,7 @@ local.get $2 i32.store8 ) - (func $~lib/array/Array#set:length (; 33 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 32 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2224,74 +2219,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 34 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/array/Array#constructor (; 35 ;) (param $0 i32) (result i32) + (func $~lib/array/Array#constructor (; 33 ;) (param $0 i32) (result i32) (local $1 i32) i32.const 16 i32.const 5 @@ -2308,7 +2236,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/array/Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2346,7 +2274,7 @@ local.get $2 i32.store ) - (func $~lib/array/Array#set:length (; 37 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 35 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -2358,7 +2286,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#values (; 38 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 36 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2414,7 +2342,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 39 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 37 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -2447,7 +2375,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 40 ;) (result i32) + (func $~lib/map/Map#constructor (; 38 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -2475,7 +2403,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/array/Array#__get (; 41 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 39 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2496,7 +2424,7 @@ i32.add i32.load ) - (func $~lib/map/Map#rehash (; 42 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 40 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2627,7 +2555,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2760,7 +2688,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/util/hash/hash32 (; 44 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 42 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2791,7 +2719,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 43 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -2832,7 +2760,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 46 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 44 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2963,7 +2891,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3053,7 +2981,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 48 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 46 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3116,7 +3044,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 49 ;) + (func $std/map/testNumeric (; 47 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3334,8 +3262,63 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $5 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 @@ -3364,18 +3347,18 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if local.get $0 local.tee $5 - local.get $3 + local.get $4 i32.load offset=12 i32.ge_u if @@ -3387,7 +3370,7 @@ unreachable end local.get $5 - local.get $3 + local.get $4 i32.load offset=4 i32.add i32.load8_s @@ -3427,7 +3410,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -3454,7 +3437,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3631,18 +3614,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 48 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3653,7 +3636,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 51 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 49 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3784,7 +3767,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3876,7 +3859,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 51 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3897,81 +3880,14 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 54 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/map/Map#rehash (; 52 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 9 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#rehash (; 55 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.const 1 i32.add @@ -4095,7 +4011,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4226,7 +4142,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 57 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4287,7 +4203,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 58 ;) + (func $std/map/testNumeric (; 55 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -4491,8 +4407,63 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + i32.const 16 + i32.const 9 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $5 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 @@ -4521,18 +4492,18 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if local.get $0 local.tee $5 - local.get $3 + local.get $4 i32.load offset=12 i32.ge_u if @@ -4544,7 +4515,7 @@ unreachable end local.get $5 - local.get $3 + local.get $4 i32.load offset=4 i32.add i32.load8_u @@ -4584,7 +4555,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -4611,7 +4582,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4780,18 +4751,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/util/hash/hash16 (; 59 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 56 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4806,7 +4777,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 57 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -4849,7 +4820,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 61 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 58 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4862,7 +4833,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 59 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4993,7 +4964,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5087,7 +5058,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 61 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5110,7 +5081,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/array/Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5148,7 +5119,7 @@ local.get $2 i32.store16 ) - (func $~lib/array/Array#set:length (; 66 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 63 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -5160,74 +5131,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 67 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#rehash (; 68 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 64 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5358,7 +5262,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5491,7 +5395,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 70 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 66 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5554,7 +5458,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 71 ;) + (func $std/map/testNumeric (; 67 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -5772,8 +5676,63 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $5 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 @@ -5802,18 +5761,18 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if local.get $0 local.tee $5 - local.get $3 + local.get $4 i32.load offset=12 i32.ge_u if @@ -5824,7 +5783,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=4 local.get $5 i32.const 1 @@ -5867,7 +5826,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -5894,7 +5853,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -6071,18 +6030,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 72 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 68 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6093,7 +6052,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 73 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 69 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6224,7 +6183,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 74 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6316,7 +6275,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 75 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 71 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -6337,74 +6296,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 76 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 15 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#rehash (; 77 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 72 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6535,7 +6427,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6666,7 +6558,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 79 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 74 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -6727,7 +6619,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 80 ;) + (func $std/map/testNumeric (; 75 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -6931,8 +6823,63 @@ unreachable end local.get $1 - call $~lib/map/Map#keys + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 local.set $3 + i32.const 16 + i32.const 15 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $6 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $5 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $5 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $4 + local.get $0 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 @@ -6961,18 +6908,18 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if local.get $0 local.tee $5 - local.get $3 + local.get $4 i32.load offset=12 i32.ge_u if @@ -6983,7 +6930,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=4 local.get $5 i32.const 1 @@ -7026,7 +6973,7 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $3 local.get $7 i32.const 20 i32.sub @@ -7053,7 +7000,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7222,18 +7169,18 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#has (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 76 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7242,7 +7189,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 82 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 77 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7261,7 +7208,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#delete (; 83 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 78 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -7320,7 +7267,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 84 ;) + (func $std/map/testNumeric (; 79 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -7787,74 +7734,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 85 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 12 - i32.mul - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $std/map/testNumeric (; 86 ;) + (func $std/map/testNumeric (; 80 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8044,51 +7924,106 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $4 - local.get $1 - call $~lib/map/Map#values + i32.load offset=8 local.set $6 - i32.const 24 - i32.const 19 + local.get $1 + i32.load offset=16 + local.set $3 + i32.const 16 + i32.const 18 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 - i32.const 0 - i32.store - local.get $2 - i32.const 0 - i32.store offset=4 - local.get $2 - i32.const 0 - i32.store offset=8 - local.get $2 + local.get $3 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $5 i32.const 0 i32.store offset=12 - local.get $2 - i32.const 0 - i32.store offset=16 - local.get $2 - i32.const 0 - i32.store offset=20 - local.get $2 - call $~lib/map/Map#clear - call $~lib/map/Map#constructor - local.set $5 + local.get $5 + local.get $3 + i32.store offset=12 i32.const 0 local.set $0 - loop $for-loop|2 - local.get $0 + loop $for-loop|00 local.get $4 - i32.load offset=12 + local.get $3 i32.lt_s if - local.get $4 - local.get $0 - call $~lib/array/Array#__get - local.set $3 local.get $6 - local.get $0 + local.get $4 + i32.const 12 + i32.mul + i32.add + local.tee $7 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $2 + i32.const 1 + i32.add + local.set $0 + local.get $5 + local.get $2 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|00 + end + end + local.get $5 + local.get $0 + call $~lib/array/Array#set:length + local.get $1 + call $~lib/map/Map#values + local.set $6 + i32.const 24 + i32.const 19 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.tee $2 + i32.const 0 + i32.store + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.const 0 + i32.store offset=16 + local.get $2 + i32.const 0 + i32.store offset=20 + local.get $2 + call $~lib/map/Map#clear + call $~lib/map/Map#constructor + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|2 + local.get $0 + local.get $5 + i32.load offset=12 + i32.lt_s + if + local.get $5 + local.get $0 + call $~lib/array/Array#__get + local.set $3 + local.get $6 + local.get $0 call $~lib/array/Array#__get local.set $7 local.get $1 @@ -8122,7 +8057,7 @@ local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $4 local.get $7 i32.const 20 i32.sub @@ -8149,7 +8084,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -8310,18 +8245,18 @@ call $~lib/builtins/abort unreachable end - local.get $4 + 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 $5 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#clear (; 87 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 81 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8354,7 +8289,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/util/hash/hash64 (; 88 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 82 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -8420,7 +8355,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 89 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 83 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8461,7 +8396,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 90 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 84 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8470,7 +8405,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 91 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 85 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8601,7 +8536,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 92 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 86 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8691,7 +8626,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 93 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 87 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8710,7 +8645,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/array/Array#__set (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 88 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -8748,7 +8683,7 @@ local.get $2 i64.store ) - (func $~lib/array/Array#set:length (; 95 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#set:length (; 89 ;) (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 drop @@ -8760,74 +8695,7 @@ local.get $1 i32.store offset=12 ) - (func $~lib/map/Map#keys (; 96 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 21 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $~lib/map/Map#values (; 97 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#values (; 90 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8883,7 +8751,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#clear (; 98 ;) (param $0 i32) + (func $~lib/map/Map#clear (; 91 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8916,7 +8784,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 92 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -8937,7 +8805,7 @@ i32.add i64.load ) - (func $~lib/map/Map#rehash (; 100 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 93 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9068,7 +8936,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 101 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) + (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9194,7 +9062,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 102 ;) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 95 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -9254,7 +9122,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 103 ;) + (func $std/map/testNumeric (; 96 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9263,6 +9131,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 24 i32.const 20 call $~lib/rt/tlsf/__alloc @@ -9449,11 +9319,64 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $5 + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 + local.set $3 + i32.const 16 + i32.const 21 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + loop $for-loop|00 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $8 + local.get $5 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $6 + i32.const 1 + i32.add + local.set $2 + local.get $4 + local.get $6 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end + local.get $4 + local.get $2 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $5 i32.const 24 i32.const 22 call $~lib/rt/tlsf/__alloc @@ -9481,19 +9404,19 @@ call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $3 - local.get $5 + local.get $7 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $3 + local.get $4 + local.get $7 call $~lib/array/Array#__get local.set $0 + local.get $5 local.get $7 - local.get $3 call $~lib/array/Array#__get - local.set $4 + local.set $3 local.get $1 local.get $0 call $~lib/map/Map#has @@ -9507,7 +9430,7 @@ unreachable end local.get $1 - local.get $4 + local.get $3 i32.const 20 i32.sub i64.extend_i32_s @@ -9527,17 +9450,17 @@ call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $6 - local.get $4 + local.get $3 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $7 i32.const 1 i32.add - local.set $3 + local.set $7 br $for-loop|2 end end @@ -9716,9 +9639,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $5 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -9727,74 +9650,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#keys (; 104 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $2 - i32.const 16 - i32.const 24 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $2 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 - i32.const 0 - i32.store offset=12 - local.get $1 - local.get $2 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=12 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $0 - call $~lib/array/Array#set:length - local.get $1 - ) - (func $std/map/testNumeric (; 105 ;) + (func $std/map/testNumeric (; 97 ;) (local $0 i64) (local $1 i32) (local $2 i32) @@ -9803,6 +9659,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 i32) i32.const 24 i32.const 23 call $~lib/rt/tlsf/__alloc @@ -9989,11 +9847,64 @@ unreachable end local.get $1 - call $~lib/map/Map#keys - local.set $5 + i32.load offset=8 + local.set $8 + local.get $1 + i32.load offset=16 + local.set $3 + i32.const 16 + i32.const 24 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $3 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $4 + i32.const 0 + i32.store offset=12 + local.get $4 + local.get $3 + i32.store offset=12 + loop $for-loop|00 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $8 + local.get $5 + i32.const 4 + i32.shl + i32.add + local.tee $9 + i32.load offset=12 + i32.const 1 + i32.and + i32.eqz + if + local.get $2 + local.tee $6 + i32.const 1 + i32.add + local.set $2 + local.get $4 + local.get $6 + local.get $9 + i64.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end + local.get $4 + local.get $2 + call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $5 i32.const 24 i32.const 25 call $~lib/rt/tlsf/__alloc @@ -10021,19 +9932,19 @@ call $~lib/map/Map#constructor local.set $6 loop $for-loop|2 - local.get $3 - local.get $5 + local.get $7 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $3 + local.get $4 + local.get $7 call $~lib/array/Array#__get local.set $0 + local.get $5 local.get $7 - local.get $3 call $~lib/array/Array#__get - local.set $4 + local.set $3 local.get $1 local.get $0 call $~lib/map/Map#has @@ -10047,7 +9958,7 @@ unreachable end local.get $1 - local.get $4 + local.get $3 i32.const 20 i32.sub i64.extend_i32_s @@ -10067,17 +9978,17 @@ call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $6 - local.get $4 + local.get $3 i32.const 20 i32.sub - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $7 i32.const 1 i32.add - local.set $3 + local.set $7 br $for-loop|2 end end @@ -10256,9 +10167,9 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $5 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -10267,7 +10178,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 106 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 98 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -10308,7 +10219,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 107 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 99 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10318,7 +10229,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 108 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 100 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10450,7 +10361,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 109 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 101 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10541,7 +10452,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 110 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 102 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -10561,7 +10472,7 @@ local.get $0 i32.load offset=4 ) - (func $~lib/map/Map#keys (; 111 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10662,7 +10573,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 112 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 104 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10794,7 +10705,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 113 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) + (func $~lib/map/Map#set (; 105 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10885,7 +10796,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 114 ;) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 106 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -10946,7 +10857,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 115 ;) + (func $std/map/testNumeric (; 107 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -11435,7 +11346,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#find (; 116 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 108 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -11476,7 +11387,7 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 117 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 109 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11486,7 +11397,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 118 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 110 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11618,7 +11529,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 119 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#set (; 111 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11709,7 +11620,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#get (; 120 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 112 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -11729,7 +11640,7 @@ local.get $0 i32.load offset=8 ) - (func $~lib/map/Map#keys (; 121 ;) (param $0 i32) (result i32) + (func $~lib/map/Map#keys (; 113 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -11830,7 +11741,7 @@ call $~lib/array/Array#set:length local.get $1 ) - (func $~lib/map/Map#rehash (; 122 ;) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11962,7 +11873,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/map/Map#set (; 123 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) + (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12089,7 +12000,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/map/Map#delete (; 124 ;) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 116 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -12150,7 +12061,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/testNumeric (; 125 ;) + (func $std/map/testNumeric (; 117 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -12639,7 +12550,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 126 ;) + (func $~start (; 118 ;) call $std/map/testNumeric call $std/map/testNumeric call $std/map/testNumeric @@ -12651,7 +12562,7 @@ call $std/map/testNumeric call $std/map/testNumeric ) - (func $~lib/rt/pure/decrement (; 127 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 119 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -12746,7 +12657,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 128 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 120 ;) (param $0 i32) local.get $0 i32.const 556 i32.lt_u diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index eddb1da1cb..fe31cbbc0b 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1878,60 +1878,63 @@ local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.asinh (; 58 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i64) + (func $std/math/test_asinh (; 58 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i64) + (local $4 f64) local.get $0 + local.tee $4 i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 - local.set $1 - local.get $2 + local.set $0 + local.get $3 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $2 + local.tee $3 i64.const 1049 i64.ge_u - if (result f64) - local.get $1 + if + local.get $0 call $~lib/math/NativeMath.log f64.const 0.6931471805599453 f64.add + local.set $0 else - local.get $2 + local.get $3 i64.const 1024 i64.ge_u - if (result f64) + if f64.const 2 - local.get $1 + local.get $0 f64.mul f64.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f64.mul f64.const 1 f64.add f64.sqrt - local.get $1 + local.get $0 f64.add f64.div f64.add call $~lib/math/NativeMath.log + local.set $0 else - local.get $2 + local.get $3 i64.const 997 i64.ge_u - if (result f64) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f64.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.const 1 f64.add f64.sqrt @@ -1940,22 +1943,18 @@ f64.div f64.add call $~lib/math/NativeMath.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $4 f64.copysign - ) - (func $std/math/test_asinh (; 59 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.asinh local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $0 + local.get $4 call $~lib/bindings/Math/asinh local.get $1 local.get $2 @@ -1964,55 +1963,58 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asinh (; 60 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_asinhf (; 59 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 f32) local.get $0 + local.tee $4 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 f32.reinterpret_i32 - local.set $1 - local.get $2 + local.set $0 + local.get $3 i32.const 1166016512 i32.ge_u - if (result f32) - local.get $1 + if + local.get $0 call $~lib/math/NativeMathf.log f32.const 0.6931471824645996 f32.add + local.set $0 else - local.get $2 + local.get $3 i32.const 1073741824 i32.ge_u - if (result f32) + if f32.const 2 - local.get $1 + local.get $0 f32.mul f32.const 1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 f32.mul f32.const 1 f32.add f32.sqrt - local.get $1 + local.get $0 f32.add f32.div f32.add call $~lib/math/NativeMathf.log + local.set $0 else - local.get $2 + local.get $3 i32.const 964689920 i32.ge_u - if (result f32) - local.get $1 - local.get $1 - local.get $1 + if + local.get $0 + local.get $0 + local.get $0 f32.mul - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.const 1 f32.add f32.sqrt @@ -2021,22 +2023,18 @@ f32.div f32.add call $~lib/math/NativeMathf.log1p - else - local.get $1 + local.set $0 end end end local.get $0 + local.get $4 f32.copysign - ) - (func $std/math/test_asinhf (; 61 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.asinh local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan (; 62 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.atan (; 60 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -2259,7 +2257,7 @@ local.get $3 f64.copysign ) - (func $std/math/test_atan (; 63 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atan (; 61 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 @@ -2275,7 +2273,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan (; 64 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.atan (; 62 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -2471,14 +2469,14 @@ local.get $4 f32.copysign ) - (func $std/math/test_atanf (; 65 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_atanf (; 63 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.atan local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_atanh (; 66 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_atanh (; 64 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) (local $4 i64) (local $5 f64) @@ -2546,7 +2544,7 @@ i32.const 0 end ) - (func $std/math/test_atanhf (; 67 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_atanhf (; 65 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 f32) (local $4 i32) local.get $0 @@ -2599,7 +2597,7 @@ local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.atan2 (; 68 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.atan2 (; 66 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2807,7 +2805,7 @@ i32.and select ) - (func $std/math/test_atan2 (; 69 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_atan2 (; 67 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -2825,7 +2823,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.atan2 (; 68 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3018,7 +3016,7 @@ i32.and select ) - (func $std/math/test_atan2f (; 71 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_atan2f (; 69 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.atan2 @@ -3026,7 +3024,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMath.cbrt (; 72 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cbrt (; 70 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -3148,7 +3146,7 @@ f64.mul f64.add ) - (func $std/math/test_cbrt (; 73 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cbrt (; 71 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 @@ -3164,7 +3162,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cbrt (; 74 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cbrt (; 72 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 f64) (local $3 i32) @@ -3263,14 +3261,14 @@ f64.div f32.demote_f64 ) - (func $std/math/test_cbrtf (; 75 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_cbrtf (; 73 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.cbrt local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_ceil (; 76 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_ceil (; 74 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.ceil local.get $1 @@ -3286,14 +3284,14 @@ i32.const 0 end ) - (func $std/math/test_ceilf (; 77 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_ceilf (; 75 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.ceil local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/pio2_large_quot (; 78 ;) (param $0 i64) (result i32) + (func $~lib/math/pio2_large_quot (; 76 ;) (param $0 i64) (result i32) (local $1 i64) (local $2 i64) (local $3 i64) @@ -3579,7 +3577,7 @@ i64.sub i32.wrap_i64 ) - (func $~lib/math/NativeMath.cos (; 79 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.cos (; 77 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -3917,7 +3915,7 @@ end local.get $0 ) - (func $std/math/test_cos (; 80 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_cos (; 78 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.cos local.get $1 @@ -3933,7 +3931,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.cos (; 81 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.cos (; 79 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4202,14 +4200,14 @@ end local.get $0 ) - (func $std/math/test_cosf (; 82 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_cosf (; 80 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.cos local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.expm1 (; 83 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.expm1 (; 81 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -4480,7 +4478,7 @@ local.get $4 f64.mul ) - (func $~lib/math/NativeMath.exp (; 84 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp (; 82 ;) (param $0 f64) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) @@ -4632,73 +4630,71 @@ end local.get $0 ) - (func $~lib/math/NativeMath.cosh (; 85 ;) (param $0 f64) (result f64) - (local $1 i32) - (local $2 i64) - local.get $0 - i64.reinterpret_f64 - i64.const 9223372036854775807 - i64.and - local.tee $2 - f64.reinterpret_i64 - local.set $0 - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $1 - i32.const 1072049730 - i32.lt_u - if - local.get $1 - i32.const 1045430272 + (func $std/math/test_cosh (; 83 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) + block $__inlined_func$~lib/math/NativeMath.cosh (result f64) + local.get $0 + i64.reinterpret_f64 + i64.const 9223372036854775807 + i64.and + local.tee $5 + f64.reinterpret_i64 + local.set $3 + local.get $5 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $4 + i32.const 1072049730 i32.lt_u if f64.const 1 - return + local.get $4 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.cosh + drop + f64.const 1 + local.get $3 + call $~lib/math/NativeMath.expm1 + local.tee $3 + local.get $3 + f64.mul + f64.const 2 + f64.const 2 + local.get $3 + f64.mul + f64.add + f64.div + f64.add + br $__inlined_func$~lib/math/NativeMath.cosh end - f64.const 1 - local.get $0 - call $~lib/math/NativeMath.expm1 - local.tee $0 - local.get $0 - f64.mul - f64.const 2 - f64.const 2 - local.get $0 - f64.mul - f64.add - f64.div - f64.add - return - end - local.get $1 - i32.const 1082535490 - i32.lt_u - if - f64.const 0.5 - local.get $0 + local.get $4 + i32.const 1082535490 + i32.lt_u + if + f64.const 0.5 + local.get $3 + call $~lib/math/NativeMath.exp + local.tee $3 + f64.const 1 + local.get $3 + f64.div + f64.add + f64.mul + br $__inlined_func$~lib/math/NativeMath.cosh + end + local.get $3 + f64.const 1416.0996898839683 + f64.sub call $~lib/math/NativeMath.exp - local.tee $0 - f64.const 1 - local.get $0 - f64.div - f64.add + f64.const 2247116418577894884661631e283 + f64.mul + f64.const 2247116418577894884661631e283 f64.mul - return end - local.get $0 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - f64.const 2247116418577894884661631e283 - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $std/math/test_cosh (; 86 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.cosh local.get $1 local.get $2 call $std/math/check @@ -4712,7 +4708,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.expm1 (; 87 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.expm1 (; 84 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -4962,7 +4958,7 @@ local.get $4 f32.mul ) - (func $~lib/math/NativeMathf.exp (; 88 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp (; 85 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 f32) @@ -5096,7 +5092,7 @@ end local.get $0 ) - (func $std/math/test_coshf (; 89 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_coshf (; 86 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) (local $3 i32) block $__inlined_func$~lib/math/NativeMathf.cosh (result f32) local.get $0 @@ -5159,7 +5155,7 @@ local.get $2 call $std/math/check ) - (func $std/math/test_exp (; 90 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp (; 87 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 @@ -5175,14 +5171,14 @@ i32.const 0 end ) - (func $std/math/test_expf (; 91 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_expf (; 88 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_expm1 (; 92 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_expm1 (; 89 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 @@ -5198,14 +5194,14 @@ i32.const 0 end ) - (func $std/math/test_expm1f (; 93 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_expm1f (; 90 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.expm1 local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.exp2 (; 94 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.exp2 (; 91 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5411,7 +5407,7 @@ f64.add end ) - (func $std/math/test_exp2 (; 95 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_exp2 (; 92 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.exp2 local.get $1 @@ -5428,7 +5424,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.exp2 (; 96 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.exp2 (; 93 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i64) (local $3 i32) @@ -5523,14 +5519,14 @@ f32.demote_f64 end ) - (func $std/math/test_exp2f (; 97 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_exp2f (; 94 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.exp2 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_floor (; 98 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_floor (; 95 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.floor local.get $1 @@ -5546,14 +5542,14 @@ i32.const 0 end ) - (func $std/math/test_floorf (; 99 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_floorf (; 96 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.floor local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.hypot (; 100 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.hypot (; 97 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 i64) (local $4 i64) @@ -5722,7 +5718,7 @@ f64.sqrt f64.mul ) - (func $std/math/test_hypot (; 101 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_hypot (; 98 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot @@ -5730,7 +5726,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/NativeMathf.hypot (; 102 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.hypot (; 99 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f32) @@ -5835,7 +5831,7 @@ f32.sqrt f32.mul ) - (func $std/math/test_hypotf (; 103 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_hypotf (; 100 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.hypot @@ -5843,7 +5839,7 @@ local.get $3 call $std/math/check ) - (func $std/math/test_log (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log (; 101 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 @@ -5859,14 +5855,14 @@ i32.const 0 end ) - (func $std/math/test_logf (; 105 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_logf (; 102 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.log10 (; 106 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log10 (; 103 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6068,7 +6064,7 @@ local.get $1 f64.add ) - (func $std/math/test_log10 (; 107 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log10 (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 @@ -6084,7 +6080,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log10 (; 108 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log10 (; 105 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6242,14 +6238,14 @@ f32.mul f32.add ) - (func $std/math/test_log10f (; 109 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log10f (; 106 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log10 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_log1p (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log1p (; 107 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 @@ -6265,14 +6261,14 @@ i32.const 0 end ) - (func $std/math/test_log1pf (; 111 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log1pf (; 108 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log1p local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.log2 (; 112 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.log2 (; 109 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -6467,7 +6463,7 @@ local.get $1 f64.add ) - (func $std/math/test_log2 (; 113 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_log2 (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 @@ -6483,7 +6479,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.log2 (; 114 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.log2 (; 111 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) (local $3 f32) @@ -6633,14 +6629,14 @@ f32.convert_i32_s f32.add ) - (func $std/math/test_log2f (; 115 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_log2f (; 112 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.log2 local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_max (; 116 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_max (; 113 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.max @@ -6658,7 +6654,7 @@ i32.const 0 end ) - (func $std/math/test_maxf (; 117 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_maxf (; 114 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.max @@ -6666,7 +6662,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_min (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_min (; 115 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 f64.min @@ -6684,7 +6680,7 @@ i32.const 0 end ) - (func $std/math/test_minf (; 119 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_minf (; 116 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 f32.min @@ -6692,7 +6688,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.mod (; 120 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 117 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -6895,7 +6891,7 @@ local.get $0 f64.mul ) - (func $std/math/test_mod (; 121 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_mod (; 118 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -6913,7 +6909,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 122 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 119 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7105,7 +7101,7 @@ local.get $0 f32.mul ) - (func $std/math/test_modf (; 123 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_modf (; 120 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.mod @@ -7113,7 +7109,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.pow (; 124 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 121 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -8069,7 +8065,7 @@ f64.const 1e-300 f64.mul ) - (func $std/math/test_pow (; 125 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $std/math/test_pow (; 122 ;) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -8087,7 +8083,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.pow (; 126 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 123 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -8545,7 +8541,7 @@ end local.get $0 ) - (func $std/math/test_powf (; 127 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) + (func $std/math/test_powf (; 124 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.pow @@ -8553,7 +8549,7 @@ local.get $3 call $std/math/check ) - (func $~lib/math/murmurHash3 (; 128 ;) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 125 ;) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -8574,7 +8570,7 @@ i64.shr_u i64.xor ) - (func $~lib/math/splitMix32 (; 129 ;) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 126 ;) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -8606,7 +8602,7 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 130 ;) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 127 ;) (param $0 i64) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8650,7 +8646,7 @@ unreachable end ) - (func $std/math/test_round (; 131 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_round (; 128 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.const 0.5 f64.add @@ -8661,7 +8657,7 @@ f64.const 0 call $std/math/check ) - (func $std/math/test_roundf (; 132 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_roundf (; 129 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.const 0.5 f32.add @@ -8672,7 +8668,7 @@ f32.const 0 call $std/math/check ) - (func $std/math/test_sign (; 133 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_sign (; 130 ;) (param $0 f64) (param $1 f64) (result i32) f64.const 1 local.get $0 f64.copysign @@ -8695,7 +8691,7 @@ i32.const 0 end ) - (func $std/math/test_signf (; 134 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_signf (; 131 ;) (param $0 f32) (param $1 f32) (result i32) f32.const 1 local.get $0 f32.copysign @@ -8709,7 +8705,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.rem (; 135 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.rem (; 132 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) @@ -8958,7 +8954,7 @@ end local.get $0 ) - (func $std/math/test_rem (; 136 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_rem (; 133 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMath.rem @@ -8966,7 +8962,7 @@ f64.const 0 call $std/math/check ) - (func $~lib/math/NativeMathf.rem (; 137 ;) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.rem (; 134 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9207,7 +9203,7 @@ end local.get $0 ) - (func $std/math/test_remf (; 138 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_remf (; 135 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 local.get $1 call $~lib/math/NativeMathf.rem @@ -9215,7 +9211,7 @@ f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.sin (; 139 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sin (; 136 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -9535,7 +9531,7 @@ end local.get $0 ) - (func $std/math/test_sin (; 140 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sin (; 137 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sin local.get $1 @@ -9551,7 +9547,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sin (; 141 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sin (; 138 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -9821,14 +9817,14 @@ end local.get $0 ) - (func $std/math/test_sinf (; 142 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sinf (; 139 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.sin local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.sinh (; 143 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.sinh (; 140 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 f64) (local $3 i32) @@ -9905,7 +9901,7 @@ f64.mul f64.mul ) - (func $std/math/test_sinh (; 144 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sinh (; 141 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 @@ -9921,7 +9917,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (; 145 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.sinh (; 142 ;) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 f32) @@ -9993,14 +9989,14 @@ f32.mul f32.mul ) - (func $std/math/test_sinhf (; 146 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sinhf (; 143 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.sinh local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_sqrt (; 147 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_sqrt (; 144 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 f64.sqrt local.get $1 @@ -10016,14 +10012,14 @@ i32.const 0 end ) - (func $std/math/test_sqrtf (; 148 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_sqrtf (; 145 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 f32.sqrt local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/tan_kern (; 149 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) + (func $~lib/math/tan_kern (; 146 ;) (param $0 f64) (param $1 f64) (param $2 i32) (result f64) (local $3 f64) (local $4 f64) (local $5 f64) @@ -10205,7 +10201,7 @@ f64.mul f64.add ) - (func $~lib/math/NativeMath.tan (; 150 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tan (; 147 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10382,7 +10378,7 @@ i32.sub call $~lib/math/tan_kern ) - (func $std/math/test_tan (; 151 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tan (; 148 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tan local.get $1 @@ -10398,7 +10394,7 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tan (; 152 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.tan (; 149 ;) (param $0 f32) (result f32) (local $1 f64) (local $2 i32) (local $3 f64) @@ -10652,14 +10648,14 @@ local.get $1 f32.demote_f64 ) - (func $std/math/test_tanf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (func $std/math/test_tanf (; 150 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 call $~lib/math/NativeMathf.tan local.get $1 local.get $2 call $std/math/check ) - (func $~lib/math/NativeMath.tanh (; 154 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.tanh (; 151 ;) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) (local $3 i64) @@ -10738,7 +10734,7 @@ local.get $0 f64.copysign ) - (func $std/math/test_tanh (; 155 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (func $std/math/test_tanh (; 152 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 @@ -10754,34 +10750,34 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.tanh (; 156 ;) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (func $std/math/test_tanhf (; 153 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 f32) + (local $4 i32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 f32.reinterpret_i32 - local.set $1 - local.get $2 + local.set $3 + local.get $4 i32.const 1057791828 i32.gt_u - if - local.get $2 + if (result f32) + local.get $4 i32.const 1092616192 i32.gt_u if (result f32) f32.const 1 f32.const 0 - local.get $1 + local.get $3 f32.div f32.add else f32.const 1 f32.const 2 f32.const 2 - local.get $1 + local.get $3 f32.mul call $~lib/math/NativeMathf.expm1 f32.const 2 @@ -10789,53 +10785,47 @@ f32.div f32.sub end - local.set $1 else - local.get $2 + local.get $4 i32.const 1048757624 i32.gt_u - if + if (result f32) f32.const 2 - local.get $1 + local.get $3 f32.mul call $~lib/math/NativeMathf.expm1 - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f32.const 2 f32.add f32.div - local.set $1 else - local.get $2 + local.get $4 i32.const 8388608 i32.ge_u - if + if (result f32) f32.const -2 - local.get $1 + local.get $3 f32.mul call $~lib/math/NativeMathf.expm1 - local.tee $1 + local.tee $3 f32.neg - local.get $1 + local.get $3 f32.const 2 f32.add f32.div - local.set $1 + else + local.get $3 end end end - local.get $1 local.get $0 f32.copysign - ) - (func $std/math/test_tanhf (; 157 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.tanh local.get $1 local.get $2 call $std/math/check ) - (func $std/math/test_trunc (; 158 ;) (param $0 f64) (param $1 f64) (result i32) + (func $std/math/test_trunc (; 154 ;) (param $0 f64) (param $1 f64) (result i32) local.get $0 f64.trunc local.get $1 @@ -10851,14 +10841,14 @@ i32.const 0 end ) - (func $std/math/test_truncf (; 159 ;) (param $0 f32) (param $1 f32) (result i32) + (func $std/math/test_truncf (; 155 ;) (param $0 f32) (param $1 f32) (result i32) local.get $0 f32.trunc local.get $1 f32.const 0 call $std/math/check ) - (func $~lib/math/NativeMath.sincos (; 160 ;) (param $0 f64) + (func $~lib/math/NativeMath.sincos (; 156 ;) (param $0 f64) (local $1 f64) (local $2 f64) (local $3 f64) @@ -11253,7 +11243,7 @@ local.get $1 global.set $~lib/math/NativeMath.sincos_cos ) - (func $std/math/test_sincos (; 161 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) + (func $std/math/test_sincos (; 157 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) (local $5 f64) (local $6 f64) local.get $3 @@ -11279,7 +11269,7 @@ drop end ) - (func $~lib/math/dtoi32 (; 162 ;) (param $0 f64) (result i32) + (func $~lib/math/dtoi32 (; 158 ;) (param $0 f64) (result i32) local.get $0 f64.const 4294967296 local.get $0 @@ -11291,7 +11281,7 @@ i64.trunc_f64_s i32.wrap_i64 ) - (func $~lib/math/NativeMath.imul (; 163 ;) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.imul (; 159 ;) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) local.get $0 local.get $1 @@ -11312,7 +11302,7 @@ i32.mul f64.convert_i32_s ) - (func $~lib/math/NativeMath.clz32 (; 164 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.clz32 (; 160 ;) (param $0 f64) (result f64) local.get $0 local.get $0 f64.sub @@ -11327,7 +11317,7 @@ i32.clz f64.convert_i32_s ) - (func $~lib/math/ipow64 (; 165 ;) (param $0 i64) (param $1 i32) (result i64) + (func $~lib/math/ipow64 (; 161 ;) (param $0 i64) (param $1 i32) (result i64) (local $2 i64) i64.const 1 local.set $2 @@ -11358,7 +11348,7 @@ end local.get $2 ) - (func $~lib/math/ipow32f (; 166 ;) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/ipow32f (; 162 ;) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) local.get $1 @@ -11404,7 +11394,7 @@ end local.get $2 ) - (func $~lib/math/ipow64f (; 167 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/ipow64f (; 163 ;) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) local.get $1 @@ -11450,7 +11440,7 @@ end local.get $2 ) - (func $start:std/math (; 168 ;) + (func $start:std/math (; 164 ;) (local $0 f64) (local $1 f32) (local $2 i32) @@ -47231,7 +47221,7 @@ unreachable end ) - (func $~start (; 169 ;) + (func $~start (; 165 ;) call $start:std/math ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index ad93153023..e54a929ddb 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -7,7 +7,7 @@ (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/rt/stub/__alloc (; 0 ;) (result i32) + (func $std/new/AClass#constructor (; 0 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15,20 +15,20 @@ global.get $~lib/rt/stub/offset i32.const 16 i32.add - local.tee $2 + local.tee $1 i32.const 16 i32.add - local.tee $0 + local.tee $2 memory.size local.tee $3 i32.const 16 i32.shl - local.tee $1 + local.tee $0 i32.gt_u if local.get $3 + local.get $2 local.get $0 - local.get $1 i32.sub i32.const 65535 i32.add @@ -36,16 +36,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $0 local.get $3 - local.get $1 + local.get $0 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $0 memory.grow i32.const 0 i32.lt_s @@ -54,9 +54,9 @@ end end end - local.get $0 - global.set $~lib/rt/stub/offset local.get $2 + global.set $~lib/rt/stub/offset + local.get $1 i32.const 16 i32.sub local.tee $0 @@ -71,31 +71,29 @@ local.get $0 i32.const 8 i32.store offset=12 - local.get $2 - ) - (func $~start (; 1 ;) - (local $0 i32) - i32.const 16 - global.set $~lib/rt/stub/startOffset - i32.const 16 - global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc - local.tee $0 + local.get $1 i32.const 1 i32.store - local.get $0 + local.get $1 f32.const 2 f32.store offset=4 i32.const 0 - local.get $0 + local.get $1 i32.load i32.const 1 i32.add i32.store - local.get $0 + local.get $1 f32.const 3 f32.store offset=4 - local.get $0 + local.get $1 + ) + (func $~start (; 1 ;) + i32.const 16 + global.set $~lib/rt/stub/startOffset + i32.const 16 + global.set $~lib/rt/stub/offset + call $std/new/AClass#constructor global.set $std/new/aClass ) ) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 482bd722a0..9a87d394b1 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) (type $i32_=>_none (func (param i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) @@ -846,69 +846,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 12 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 12 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -984,9 +922,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1014,9 +953,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1066,7 +1061,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 14 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1074,7 +1069,7 @@ i32.const 16 i32.add ) - (func $~lib/rt/pure/__retain (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1125,7 +1120,7 @@ end local.get $0 ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -1336,7 +1331,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 18 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 17 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -1358,7 +1353,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 444 i32.gt_u @@ -1369,7 +1364,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/set/Set#clear (; 20 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 19 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1402,7 +1397,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 21 ;) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (result i32) (local $0 i32) i32.const 24 i32.const 3 @@ -1430,14 +1425,14 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash8 (; 22 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.const -2128831035 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -1480,7 +1475,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 24 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 23 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1493,7 +1488,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 24 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1620,7 +1615,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 26 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 25 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1707,7 +1702,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1775,7 +1770,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/memory/memory.copy (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1948,7 +1943,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 29 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 28 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1961,7 +1956,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2064,7 +2059,7 @@ end local.get $3 ) - (func $~lib/array/ensureSize (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureSize (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2167,7 +2162,7 @@ i32.store offset=8 end ) - (func $~lib/array/Array#__set (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -2203,71 +2198,7 @@ local.get $2 i32.store8 ) - (func $~lib/set/Set#values (; 33 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 4 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load8_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 32 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -2286,7 +2217,7 @@ i32.add i32.load8_s ) - (func $~lib/set/Set#delete (; 35 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 33 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2349,11 +2280,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 36 ;) + (func $std/set/testNumeric (; 34 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -2470,8 +2405,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 4 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load8_s + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -2668,7 +2655,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 37 ;) (result i32) + (func $~lib/set/Set#constructor (; 35 ;) (result i32) (local $0 i32) i32.const 24 i32.const 5 @@ -2696,7 +2683,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 38 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 36 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2707,7 +2694,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 39 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 37 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2834,7 +2821,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 40 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 38 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2919,91 +2906,27 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 41 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__get (; 39 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 6 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 0 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load8_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 42 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 352 - i32.const 416 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $1 - local.get $0 - i32.load offset=4 - i32.add - i32.load8_u - ) - (func $~lib/set/Set#delete (; 43 ;) (param $0 i32) (param $1 i32) - (local $2 i32) + i32.load offset=12 + i32.ge_u + if + i32.const 352 + i32.const 416 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + ) + (func $~lib/set/Set#delete (; 40 ;) (param $0 i32) (param $1 i32) + (local $2 i32) local.get $0 local.get $1 local.get $1 @@ -3063,11 +2986,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 44 ;) + (func $std/set/testNumeric (; 41 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -3180,8 +3107,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 6 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load8_u + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -3374,7 +3353,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 45 ;) (result i32) + (func $~lib/set/Set#constructor (; 42 ;) (result i32) (local $0 i32) i32.const 24 i32.const 7 @@ -3402,7 +3381,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash16 (; 46 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 43 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3417,7 +3396,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 44 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -3460,7 +3439,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 48 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 45 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -3473,7 +3452,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 49 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 46 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3600,7 +3579,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 50 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3687,7 +3666,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -3725,71 +3704,7 @@ local.get $2 i32.store16 ) - (func $~lib/set/Set#values (; 52 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 8 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load16_s - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 49 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3810,7 +3725,7 @@ i32.add i32.load16_s ) - (func $~lib/set/Set#delete (; 54 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 50 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -3873,11 +3788,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 55 ;) + (func $std/set/testNumeric (; 51 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -3994,8 +3913,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 8 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load16_s + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -4192,7 +4163,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 56 ;) (result i32) + (func $~lib/set/Set#constructor (; 52 ;) (result i32) (local $0 i32) i32.const 24 i32.const 9 @@ -4220,7 +4191,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#has (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 53 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -4231,7 +4202,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 54 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4358,7 +4329,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 55 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4443,92 +4414,28 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 60 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/array/Array#__get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load offset=8 - local.set $4 + i32.load offset=12 + i32.ge_u + if + i32.const 352 + i32.const 416 + i32.const 93 + i32.const 41 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 10 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 1 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load16_u - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 61 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 352 - i32.const 416 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + i32.load offset=4 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u ) - (func $~lib/set/Set#delete (; 62 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -4589,11 +4496,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 63 ;) + (func $std/set/testNumeric (; 58 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|1 @@ -4706,8 +4617,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 10 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load16_u + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -4900,7 +4863,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 64 ;) (result i32) + (func $~lib/set/Set#constructor (; 59 ;) (result i32) (local $0 i32) i32.const 24 i32.const 11 @@ -4928,7 +4891,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash32 (; 65 ;) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 60 ;) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -4959,7 +4922,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -5000,7 +4963,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 62 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -5009,7 +4972,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 68 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 63 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5136,7 +5099,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 69 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#add (; 64 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5219,7 +5182,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 local.get $0 @@ -5257,71 +5220,7 @@ local.get $2 i32.store ) - (func $~lib/set/Set#values (; 71 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 12 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 72 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 66 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5342,7 +5241,7 @@ i32.add i32.load ) - (func $~lib/set/Set#delete (; 73 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 67 ;) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -5401,11 +5300,15 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 74 ;) + (func $std/set/testNumeric (; 68 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -5514,8 +5417,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 12 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -5704,7 +5659,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 75 ;) (result i32) + (func $~lib/set/Set#constructor (; 69 ;) (result i32) (local $0 i32) i32.const 24 i32.const 13 @@ -5732,76 +5687,16 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 76 ;) (param $0 i32) (result i32) + (func $std/set/testNumeric (; 70 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 14 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 2 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.tee $5 - i32.load offset=4 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i32.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/set/testNumeric (; 77 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - call $~lib/set/Set#constructor + (local $7 i32) + call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 local.get $0 @@ -5909,8 +5804,60 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $6 + local.get $1 + i32.load offset=16 + local.set $4 + i32.const 16 + i32.const 14 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $4 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $4 + i32.store offset=12 + i32.const 0 + local.set $0 + loop $for-loop|00 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $6 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.tee $7 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $2 + local.get $3 + local.get $7 + i32.load + call $~lib/array/Array#__set + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|00 + end + end call $~lib/set/Set#constructor local.set $3 i32.const 0 @@ -6099,7 +6046,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#clear (; 78 ;) (param $0 i32) + (func $~lib/set/Set#clear (; 71 ;) (param $0 i32) (local $1 i32) i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6132,7 +6079,7 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 79 ;) (result i32) + (func $~lib/set/Set#constructor (; 72 ;) (result i32) (local $0 i32) i32.const 24 i32.const 15 @@ -6160,7 +6107,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/util/hash/hash64 (; 80 ;) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 73 ;) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -6226,7 +6173,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 81 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 74 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -6267,7 +6214,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 82 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 75 ;) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 @@ -6276,7 +6223,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 83 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 76 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6403,7 +6350,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 84 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#add (; 77 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6486,7 +6433,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/array/Array#__set (; 85 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) local.get $1 local.get $0 @@ -6524,71 +6471,7 @@ local.get $2 i64.store ) - (func $~lib/set/Set#values (; 86 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 16 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $~lib/array/Array#__get (; 87 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=12 @@ -6609,7 +6492,7 @@ i32.add i64.load ) - (func $~lib/set/Set#delete (; 88 ;) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 80 ;) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 @@ -6669,12 +6552,17 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 89 ;) + (func $std/set/testNumeric (; 81 ;) (local $0 i64) (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) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -6783,19 +6671,69 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $7 + local.get $1 + i32.load offset=16 + local.set $5 + i32.const 16 + i32.const 16 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $5 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $5 + i32.store offset=12 + loop $for-loop|00 + local.get $6 + local.get $5 + i32.lt_s + if + local.get $7 + local.get $6 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.tee $9 + i32.const 1 + i32.add + local.set $3 + local.get $2 + local.get $9 + local.get $8 + i64.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|00 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $4 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6807,20 +6745,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $4 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -6966,12 +6904,12 @@ end local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 90 ;) (result i32) + (func $~lib/set/Set#constructor (; 82 ;) (result i32) (local $0 i32) i32.const 24 i32.const 17 @@ -6999,76 +6937,17 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#values (; 91 ;) (param $0 i32) (result i32) + (func $std/set/testNumeric (; 83 ;) + (local $0 i64) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $0 - i32.load offset=16 - local.set $1 - i32.const 16 - i32.const 18 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.get $1 - i32.const 3 - call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 - i32.const 0 - i32.store offset=12 - local.get $2 - local.get $1 - i32.store offset=12 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $3 - local.get $1 - i32.lt_s - if - local.get $4 - local.get $3 - i32.const 4 - i32.shl - i32.add - local.tee $5 - i32.load offset=8 - i32.const 1 - i32.and - i32.eqz - if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 - local.get $2 - local.get $6 - local.get $5 - i64.load - call $~lib/array/Array#__set - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - ) - (func $std/set/testNumeric (; 92 ;) - (local $0 i64) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) call $~lib/set/Set#constructor local.set $1 loop $for-loop|0 @@ -7177,19 +7056,69 @@ unreachable end local.get $1 - call $~lib/set/Set#values - local.set $2 + i32.load offset=8 + local.set $7 + local.get $1 + i32.load offset=16 + local.set $5 + i32.const 16 + i32.const 18 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.get $5 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $2 + i32.const 0 + i32.store offset=12 + local.get $2 + local.get $5 + i32.store offset=12 + loop $for-loop|00 + local.get $6 + local.get $5 + i32.lt_s + if + local.get $7 + local.get $6 + i32.const 4 + i32.shl + i32.add + local.tee $8 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $3 + local.tee $9 + i32.const 1 + i32.add + local.set $3 + local.get $2 + local.get $9 + local.get $8 + i64.load + call $~lib/array/Array#__set + end + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|00 + end + end call $~lib/set/Set#constructor - local.set $4 + local.set $3 loop $for-loop|2 - local.get $3 + local.get $4 local.get $2 i32.load offset=12 i32.lt_s if local.get $1 local.get $2 - local.get $3 + local.get $4 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7201,20 +7130,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $2 local.get $3 + local.get $2 + local.get $4 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|2 end end - local.get $4 + local.get $3 i32.load offset=20 local.get $1 i32.load offset=20 @@ -7360,12 +7289,12 @@ end local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 93 ;) (result i32) + (func $~lib/set/Set#constructor (; 84 ;) (result i32) (local $0 i32) i32.const 24 i32.const 19 @@ -7393,7 +7322,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 94 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 85 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -7434,7 +7363,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 95 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 86 ;) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 @@ -7444,7 +7373,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 96 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 87 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7572,7 +7501,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 97 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#add (; 88 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7656,7 +7585,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 98 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 89 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7754,7 +7683,7 @@ end local.get $1 ) - (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=12 @@ -7775,7 +7704,7 @@ i32.add f32.load ) - (func $~lib/set/Set#delete (; 100 ;) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 91 ;) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 @@ -7836,7 +7765,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 101 ;) + (func $std/set/testNumeric (; 92 ;) (local $0 f32) (local $1 i32) (local $2 i32) @@ -8138,7 +8067,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#constructor (; 102 ;) (result i32) + (func $~lib/set/Set#constructor (; 93 ;) (result i32) (local $0 i32) i32.const 24 i32.const 21 @@ -8166,7 +8095,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 103 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 94 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $2 @@ -8207,7 +8136,7 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 104 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 95 ;) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 @@ -8217,7 +8146,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 105 ;) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 96 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8345,7 +8274,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/set/Set#add (; 106 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#add (; 97 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8429,7 +8358,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/set/Set#values (; 107 ;) (param $0 i32) (result i32) + (func $~lib/set/Set#values (; 98 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8527,7 +8456,7 @@ end local.get $1 ) - (func $~lib/array/Array#__get (; 108 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=12 @@ -8548,7 +8477,7 @@ i32.add f64.load ) - (func $~lib/set/Set#delete (; 109 ;) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 100 ;) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 @@ -8609,7 +8538,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/testNumeric (; 110 ;) + (func $std/set/testNumeric (; 101 ;) (local $0 f64) (local $1 i32) (local $2 i32) @@ -8911,7 +8840,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~start (; 111 ;) + (func $~start (; 102 ;) call $std/set/testNumeric call $std/set/testNumeric call $std/set/testNumeric @@ -8923,7 +8852,7 @@ call $std/set/testNumeric call $std/set/testNumeric ) - (func $~lib/rt/pure/decrement (; 112 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 103 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -9018,7 +8947,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 113 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 104 ;) (param $0 i32) local.get $0 i32.const 444 i32.lt_u diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 9bdbc8ac0f..6c41943137 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -858,69 +858,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -996,9 +934,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1046,9 +985,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1098,7 +1093,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1106,7 +1101,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1279,7 +1274,7 @@ end end ) - (func $~lib/rt/__allocBuffer (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/__allocBuffer (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 call $~lib/rt/tlsf/__alloc @@ -1293,7 +1288,7 @@ end local.get $1 ) - (func $~lib/rt/pure/__retain (; 19 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1344,14 +1339,14 @@ end local.get $0 ) - (func $std/staticarray/test (; 20 ;) (result i32) + (func $std/staticarray/test (; 19 ;) (result i32) i32.const 12 i32.const 3 i32.const 288 call $~lib/rt/__allocBuffer call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 21 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 20 ;) (param $0 i32) local.get $0 i32.const 464 i32.gt_u @@ -1362,7 +1357,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:std/staticarray (; 22 ;) + (func $start:std/staticarray (; 21 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1571,7 +1566,7 @@ i32.const 0 global.set $std/staticarray/arr4 ) - (func $~start (; 23 ;) + (func $~start (; 22 ;) global.get $~started if return @@ -1581,7 +1576,7 @@ end call $start:std/staticarray ) - (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1707,7 +1702,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 25 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 24 ;) (param $0 i32) local.get $0 i32.const 464 i32.lt_u diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 5233c42f4b..0fb3ba230c 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1161,69 +1161,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 17 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1299,9 +1237,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1329,9 +1268,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1381,7 +1376,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 20 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 19 ;) (param $0 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 i32.const 1 @@ -1389,7 +1384,7 @@ i32.const 16 i32.add ) - (func $~lib/util/casemap/casemap (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/casemap/casemap (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1540,7 +1535,7 @@ i32.and i32.add ) - (func $~lib/memory/memory.copy (; 22 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1713,7 +1708,7 @@ end end ) - (func $~lib/rt/tlsf/freeBlock (; 23 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 22 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -1726,7 +1721,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1829,7 +1824,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 24 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) call $~lib/rt/tlsf/maybeInitialize @@ -1877,7 +1872,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#toUpperCase (; 26 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toUpperCase (; 25 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2184,7 +2179,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 27 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 26 ;) (param $0 i32) local.get $0 i32.const 17376 i32.gt_u @@ -2195,7 +2190,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/string/compareImpl (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2271,7 +2266,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 29 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 28 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -2305,7 +2300,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/string/stagedBinaryLookup (; 30 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/stagedBinaryLookup (; 29 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 local.get $1 @@ -2330,7 +2325,7 @@ i32.const 1 i32.and ) - (func $~lib/string/String#toLowerCase (; 31 ;) (param $0 i32) (result i32) + (func $~lib/string/String#toLowerCase (; 30 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2811,7 +2806,7 @@ call $~lib/rt/tlsf/__realloc call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCodePoint (; 32 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 31 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2861,7 +2856,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#codePointAt (; 33 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#codePointAt (; 32 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -2920,7 +2915,7 @@ i32.const -56613888 i32.add ) - (func $start:std/string-casemapping (; 34 ;) + (func $start:std/string-casemapping (; 33 ;) (local $0 i32) (local $1 i64) (local $2 i64) @@ -4553,7 +4548,7 @@ local.get $94 call $~lib/rt/pure/__release ) - (func $~start (; 35 ;) + (func $~start (; 34 ;) global.get $~started if return @@ -4563,7 +4558,7 @@ end call $start:std/string-casemapping ) - (func $~lib/rt/pure/decrement (; 36 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 35 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 3e687e0e0e..c37c4310b2 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -2,8 +2,8 @@ (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (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 $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))) @@ -902,69 +902,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 14 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1040,9 +978,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1070,9 +1009,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1122,7 +1117,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1130,7 +1125,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.copy (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1303,7 +1298,7 @@ end end ) - (func $~lib/string/String.UTF16.encode (; 19 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.encode (; 18 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1320,7 +1315,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF16Encode (; 20 ;) + (func $std/string-encoding/testUTF16Encode (; 19 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -1483,7 +1478,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF16.decodeUnsafe (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF16.decodeUnsafe (; 20 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const -2 @@ -1498,7 +1493,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF16.decode (; 22 ;) (param $0 i32) (result i32) + (func $~lib/string/String.UTF16.decode (; 21 ;) (param $0 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -1506,7 +1501,7 @@ i32.load offset=12 call $~lib/string/String.UTF16.decodeUnsafe ) - (func $~lib/string/String#get:length (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 22 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1514,7 +1509,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 23 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1590,7 +1585,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 25 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 24 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1624,7 +1619,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $std/string-encoding/testUTF16DecodeUnsafe (; 26 ;) + (func $std/string-encoding/testUTF16DecodeUnsafe (; 25 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1769,7 +1764,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/string/String.UTF8.byteLength (; 27 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.byteLength (; 26 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1860,7 +1855,7 @@ end local.get $2 ) - (func $~lib/string/String.UTF8.encode (; 28 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.encode (; 27 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2070,7 +2065,7 @@ local.get $4 call $~lib/rt/pure/__retain ) - (func $std/string-encoding/testUTF8Encode (; 29 ;) + (func $std/string-encoding/testUTF8Encode (; 28 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2214,7 +2209,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8EncodeNullTerminated (; 30 ;) + (func $std/string-encoding/testUTF8EncodeNullTerminated (; 29 ;) (local $0 i32) (local $1 i32) i32.const 32 @@ -2368,7 +2363,7 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/rt/tlsf/freeBlock (; 31 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 30 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2381,7 +2376,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2484,7 +2479,7 @@ end local.get $3 ) - (func $~lib/string/String.UTF8.decodeUnsafe (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String.UTF8.decodeUnsafe (; 32 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2717,7 +2712,7 @@ i32.add call $~lib/rt/pure/__retain ) - (func $~lib/string/String.UTF8.decode (; 34 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.UTF8.decode (; 33 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $0 i32.const 16 @@ -2726,7 +2721,7 @@ local.get $1 call $~lib/string/String.UTF8.decodeUnsafe ) - (func $std/string-encoding/testUTF8DecodeNullTerminated (; 35 ;) + (func $std/string-encoding/testUTF8DecodeNullTerminated (; 34 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2840,7 +2835,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testUTF8DecodeUnsafe (; 36 ;) + (func $std/string-encoding/testUTF8DecodeUnsafe (; 35 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3037,7 +3032,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/string-encoding/testLarge (; 37 ;) (param $0 i32) + (func $std/string-encoding/testLarge (; 36 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3085,7 +3080,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $start:std/string-encoding (; 38 ;) + (func $start:std/string-encoding (; 37 ;) (local $0 i32) (local $1 i32) i32.const 28 @@ -3179,10 +3174,10 @@ i32.const 13696 call $std/string-encoding/testLarge ) - (func $~start (; 39 ;) + (func $~start (; 38 ;) call $start:std/string-encoding ) - (func $~lib/rt/pure/decrement (; 40 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 39 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 0ac4bd4ecf..980766612c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1386,69 +1386,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 18 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 18 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1524,9 +1462,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1554,9 +1493,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl local.get $4 - call $~lib/rt/tlsf/growMemory + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add + local.get $4 + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1606,7 +1601,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 20 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1614,7 +1609,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String.fromCharCode (; 22 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromCharCode (; 21 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 2 @@ -1637,7 +1632,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String.fromCharCode|trampoline (; 23 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCharCode|trampoline (; 22 ;) (param $0 i32) (result i32) (local $1 i32) block $1of1 block $0of1 @@ -1656,11 +1651,11 @@ local.get $1 call $~lib/string/String.fromCharCode ) - (func $~setArgumentsLength (; 24 ;) (param $0 i32) + (func $~setArgumentsLength (; 23 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/string/String.fromCodePoint (; 25 ;) (param $0 i32) (result i32) + (func $~lib/string/String.fromCodePoint (; 24 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1711,7 +1706,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#indexOf (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#indexOf (; 25 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1771,7 +1766,7 @@ end i32.const -1 ) - (func $~lib/memory/memory.copy (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 26 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1944,7 +1939,7 @@ end end ) - (func $~lib/memory/memory.repeat (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.repeat (; 27 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) local.get $2 local.get $3 @@ -1969,7 +1964,7 @@ end end ) - (func $~lib/string/String#padStart (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padStart (; 28 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2050,7 +2045,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#padEnd (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#padEnd (; 29 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2132,7 +2127,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#lastIndexOf (; 31 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#lastIndexOf (; 30 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -2192,7 +2187,7 @@ end i32.const -1 ) - (func $~lib/string/String#localeCompare (; 32 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#localeCompare (; 31 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -2230,7 +2225,7 @@ local.get $2 call $~lib/util/string/compareImpl ) - (func $~lib/util/string/isSpace (; 33 ;) (param $0 i32) (result i32) + (func $~lib/util/string/isSpace (; 32 ;) (param $0 i32) (result i32) local.get $0 i32.const 5760 i32.lt_u @@ -2294,7 +2289,7 @@ end i32.const 0 ) - (func $~lib/string/String#trimStart (; 34 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimStart (; 33 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2352,7 +2347,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trimEnd (; 35 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trimEnd (; 34 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -2406,7 +2401,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#trim (; 36 ;) (param $0 i32) (result i32) + (func $~lib/string/String#trim (; 35 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2493,7 +2488,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/strtol (; 37 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtol (; 36 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) @@ -2710,7 +2705,7 @@ local.get $5 f64.mul ) - (func $~lib/util/string/strtol (; 38 ;) (result i32) + (func $~lib/util/string/strtol (; 37 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -2928,7 +2923,7 @@ local.get $5 i32.mul ) - (func $~lib/util/string/strtol (; 39 ;) (result i64) + (func $~lib/util/string/strtol (; 38 ;) (result i64) (local $0 i32) (local $1 i32) (local $2 i32) @@ -3148,7 +3143,7 @@ local.get $5 i64.mul ) - (func $~lib/math/ipow32 (; 40 ;) (param $0 i32) (result i32) + (func $~lib/math/ipow32 (; 39 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 5 @@ -3182,7 +3177,7 @@ end local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 41 ;) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 40 ;) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -3259,7 +3254,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/util/string/strtod (; 42 ;) (param $0 i32) (result f64) + (func $~lib/util/string/strtod (; 41 ;) (param $0 i32) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) @@ -4007,15 +4002,22 @@ end f64.const nan:0x8000000000000 ) - (func $~lib/string/String.__concat (; 43 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 42 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + local.get $0 + i32.const 640 + local.get $0 + select + local.set $2 local.get $1 call $~lib/rt/pure/__retain local.tee $1 i32.eqz if + i32.const 640 + local.set $0 local.get $1 i32.const 640 i32.ne @@ -4027,15 +4029,11 @@ local.set $1 end block $__inlined_func$~lib/string/String#concat - local.get $0 - i32.const 640 - local.get $0 - select - local.tee $3 + local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl - local.tee $2 + local.tee $3 local.get $1 call $~lib/string/String#get:length i32.const 1 @@ -4045,10 +4043,10 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 272 local.set $0 + local.get $1 + call $~lib/rt/pure/__release br $__inlined_func$~lib/string/String#concat end local.get $0 @@ -4056,11 +4054,11 @@ call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain local.tee $0 - local.get $3 local.get $2 + local.get $3 call $~lib/memory/memory.copy local.get $0 - local.get $2 + local.get $3 i32.add local.get $1 local.get $4 @@ -4070,7 +4068,7 @@ end local.get $0 ) - (func $~lib/string/String.__gt (; 44 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4117,7 +4115,7 @@ i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 45 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 44 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4164,7 +4162,7 @@ i32.const 0 i32.lt_s ) - (func $~lib/string/String#repeat (; 46 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 45 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 1 @@ -4223,7 +4221,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#replace (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replace (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4320,7 +4318,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/rt/tlsf/checkUsedBlock (; 48 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 47 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -4362,7 +4360,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 49 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 48 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -4375,7 +4373,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/rt/tlsf/reallocateBlock (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/reallocateBlock (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4478,7 +4476,7 @@ end local.get $3 ) - (func $~lib/rt/tlsf/__realloc (; 51 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__realloc (; 50 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 call $~lib/rt/tlsf/checkUsedBlock @@ -4487,7 +4485,7 @@ i32.const 16 i32.add ) - (func $~lib/string/String#replaceAll (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#replaceAll (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4780,7 +4778,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#slice (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 52 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 call $~lib/string/String#get:length @@ -4854,7 +4852,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substr (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substr (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.const 0 @@ -4911,7 +4909,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#substring (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -4990,7 +4988,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/rt/__allocArray (; 56 ;) (param $0 i32) (result i32) + (func $~lib/rt/__allocArray (; 55 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5018,7 +5016,7 @@ i32.store offset=12 local.get $1 ) - (func $~lib/memory/memory.fill (; 57 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 56 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -5229,7 +5227,7 @@ end end ) - (func $~lib/array/Array<~lib/string/String>#push (; 58 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 57 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5305,7 +5303,7 @@ local.get $3 i32.store offset=12 ) - (func $~lib/string/String#split (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 58 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5517,7 +5515,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain ) - (func $~lib/array/Array<~lib/string/String>#__get (; 60 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 59 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -5552,7 +5550,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 61 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 60 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -5600,7 +5598,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -5624,7 +5622,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 63 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 62 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5666,7 +5664,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/utoa32 (; 64 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 63 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -5689,7 +5687,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64 (; 65 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 64 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -5742,7 +5740,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 66 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 65 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) loop $do-continue|0 local.get $1 @@ -5769,7 +5767,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/utoa64 (; 67 ;) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 66 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5812,7 +5810,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa64 (; 68 ;) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 67 ;) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5876,7 +5874,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/genDigits (; 69 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 68 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6266,7 +6264,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -6511,7 +6509,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 71 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 70 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) @@ -6820,7 +6818,7 @@ local.get $10 i32.add ) - (func $~lib/util/number/dtoa (; 72 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 71 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -6875,7 +6873,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $start:std/string (; 73 ;) + (func $start:std/string (; 72 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14441,11 +14439,11 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/string/getString (; 74 ;) (result i32) + (func $std/string/getString (; 73 ;) (result i32) global.get $std/string/str call $~lib/rt/pure/__retain ) - (func $~start (; 75 ;) + (func $~start (; 74 ;) global.get $~started if return @@ -14455,7 +14453,7 @@ end call $start:std/string ) - (func $~lib/rt/pure/decrement (; 76 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 75 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -14575,7 +14573,7 @@ i32.store offset=4 end ) - (func $~lib/rt/pure/__visit (; 77 ;) (param $0 i32) + (func $~lib/rt/pure/__visit (; 76 ;) (param $0 i32) local.get $0 i32.const 17000 i32.lt_u diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index 2c3f342815..f8a2b9d94a 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -14,7 +14,14 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $start:std/trace (; 1 ;) + (func $~start (; 1 ;) + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end i32.const 32 i32.const 0 f64.const 0 @@ -80,14 +87,4 @@ f64.const 5.5 call $~lib/builtins/trace ) - (func $~start (; 2 ;) - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:std/trace - ) ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index ab31da3a0b..387b26df63 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,11 +1,11 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (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_=>_none (func (param i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) @@ -1012,69 +1012,7 @@ end end ) - (func $~lib/rt/tlsf/growMemory (; 13 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - memory.size - local.tee $2 - i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.sub - i32.ne - i32.shl - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $1 - local.get $1 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $2 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - local.get $0 - local.get $2 - i32.const 16 - i32.shl - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - ) - (func $~lib/rt/tlsf/prepareBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 13 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1150,9 +1088,10 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) + (local $5 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -1180,9 +1119,65 @@ local.tee $3 i32.eqz if + memory.size + local.tee $3 + i32.const 16 local.get $0 + i32.load offset=1568 + local.get $3 + i32.const 16 + i32.shl + i32.const 16 + i32.sub + i32.ne + i32.shl + local.get $4 + i32.const 1 + i32.const 27 + local.get $4 + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.sub + i32.add local.get $4 - call $~lib/rt/tlsf/growMemory + local.get $4 + i32.const 536870904 + i32.lt_u + select + i32.add + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $5 + local.get $3 + local.get $5 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $5 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $3 + i32.const 16 + i32.shl + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory local.get $0 local.get $4 call $~lib/rt/tlsf/searchBlock @@ -1232,7 +1227,7 @@ call $~lib/rt/rtrace/onalloc local.get $3 ) - (func $~lib/rt/tlsf/__alloc (; 16 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 15 ;) (param $0 i32) (param $1 i32) (result i32) call $~lib/rt/tlsf/maybeInitialize local.get $0 local.get $1 @@ -1240,7 +1235,7 @@ i32.const 16 i32.add ) - (func $~lib/memory/memory.fill (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) block $~lib/util/memory/memset|inlined.0 @@ -1465,7 +1460,7 @@ end end ) - (func $~lib/rt/pure/__retain (; 18 ;) (param $0 i32) (result i32) + (func $~lib/rt/pure/__retain (; 17 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -1516,7 +1511,7 @@ end local.get $0 ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 18 ;) (param $0 i32) local.get $0 i32.const 7388 i32.gt_u @@ -1527,7 +1522,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -1596,7 +1591,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 21 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 20 ;) (param $0 i32) (result i32) i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1605,14 +1600,14 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 22 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 21 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load i32.sub ) - (func $~lib/typedarray/Uint8Array#constructor (; 23 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 22 ;) (param $0 i32) (result i32) i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc @@ -1621,7 +1616,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 24 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 23 ;) (param $0 i32) (result i32) i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc @@ -1630,7 +1625,7 @@ i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 25 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 24 ;) (param $0 i32) (result i32) i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -1639,7 +1634,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint16Array#constructor (; 26 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#constructor (; 25 ;) (param $0 i32) (result i32) i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc @@ -1648,7 +1643,7 @@ i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 27 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 26 ;) (param $0 i32) (result i32) i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc @@ -1657,7 +1652,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint32Array#constructor (; 28 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 27 ;) (param $0 i32) (result i32) i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc @@ -1666,7 +1661,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 29 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 28 ;) (param $0 i32) (result i32) i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -1675,7 +1670,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 29 ;) (param $0 i32) (result i32) i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc @@ -1684,7 +1679,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float32Array#constructor (; 31 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#constructor (; 30 ;) (param $0 i32) (result i32) i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -1693,7 +1688,7 @@ i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Float64Array#constructor (; 32 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 31 ;) (param $0 i32) (result i32) i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -1702,7 +1697,7 @@ i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 33 ;) (param $0 i32) + (func $std/typedarray/testInstantiate (; 32 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2165,7 +2160,7 @@ local.get $11 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#__set (; 34 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 33 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2189,7 +2184,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int32Array#__get (; 35 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 34 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2212,7 +2207,7 @@ i32.add i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 36 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 35 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2296,7 +2291,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#__set (; 37 ;) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2320,7 +2315,7 @@ local.get $2 f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 37 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -2404,11 +2399,11 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~setArgumentsLength (; 39 ;) (param $0 i32) + (func $~setArgumentsLength (; 38 ;) (param $0 i32) local.get $0 global.set $~argumentsLength ) - (func $~lib/util/sort/insertionSort (; 40 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/insertionSort (; 39 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2486,7 +2481,7 @@ end end ) - (func $~lib/rt/tlsf/checkUsedBlock (; 41 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/checkUsedBlock (; 40 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 16 @@ -2528,7 +2523,7 @@ end local.get $1 ) - (func $~lib/rt/tlsf/freeBlock (; 42 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/freeBlock (; 41 ;) (param $0 i32) (param $1 i32) local.get $1 local.get $1 i32.load @@ -2541,7 +2536,7 @@ local.get $1 call $~lib/rt/rtrace/onfree ) - (func $~lib/util/sort/weakHeapSort (; 43 ;) (param $0 i32) (param $1 i32) + (func $~lib/util/sort/weakHeapSort (; 42 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 f64) @@ -2800,7 +2795,7 @@ local.get $4 f64.store ) - (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 44 ;) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 43 ;) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -2829,7 +2824,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#__get (; 45 ;) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 44 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -2852,7 +2847,7 @@ i32.add f64.load ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 46 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2884,7 +2879,7 @@ i32.and i32.store8 ) - (func $~lib/typedarray/Uint8ClampedArray#__get (; 47 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 46 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -2903,7 +2898,7 @@ i32.add i32.load8_u ) - (func $~lib/typedarray/Int8Array#__set (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int8Array#__set (; 47 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2923,7 +2918,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Int8Array#fill (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int8Array#fill (; 48 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -2992,7 +2987,7 @@ end local.get $5 ) - (func $~lib/memory/memory.copy (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 49 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -3165,7 +3160,7 @@ end end ) - (func $~lib/rt/__allocArray (; 51 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/rt/__allocArray (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3203,7 +3198,7 @@ i32.store offset=12 local.get $2 ) - (func $~lib/typedarray/Int8Array#__get (; 52 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 51 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -3222,14 +3217,14 @@ i32.add i32.load8_s ) - (func $~lib/array/Array#__unchecked_get (; 53 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 52 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 54 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 53 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3284,7 +3279,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#subarray (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 54 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3362,7 +3357,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int32Array#fill (; 56 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3443,7 +3438,7 @@ end local.get $4 ) - (func $~lib/array/Array#__unchecked_get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 @@ -3452,7 +3447,7 @@ i32.add i32.load ) - (func $~lib/array/Array#__get (; 58 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 57 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=12 @@ -3469,7 +3464,7 @@ local.get $1 call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 59 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 58 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $1 @@ -3513,7 +3508,7 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#slice (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#slice (; 59 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -3592,7 +3587,7 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/typedarray/Int32Array#copyWithin (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#copyWithin (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3700,12 +3695,12 @@ call $~lib/memory/memory.copy local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 61 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#__set (; 63 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 62 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3725,7 +3720,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 64 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 63 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3762,7 +3757,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 64 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3786,7 +3781,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Uint16Array#__set (; 66 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint16Array#__set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3810,7 +3805,7 @@ local.get $2 i32.store16 ) - (func $~lib/typedarray/Int32Array#reduce (; 67 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 66 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3851,7 +3846,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint32Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint32Array#__set (; 67 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -3875,7 +3870,7 @@ local.get $2 i32.store ) - (func $~lib/typedarray/Int64Array#__set (; 69 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 68 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3899,12 +3894,12 @@ local.get $2 i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 70 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 69 ;) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 71 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 70 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -3945,7 +3940,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint64Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Uint64Array#__set (; 71 ;) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -3969,7 +3964,7 @@ local.get $2 i64.store ) - (func $~lib/typedarray/Float32Array#__set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 72 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -3993,17 +3988,17 @@ local.get $2 f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 74 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 73 ;) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 75 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 74 ;) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 76 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 75 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4041,7 +4036,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int32Array#reduceRight (; 77 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 76 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4083,7 +4078,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#reduceRight (; 78 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 77 ;) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) @@ -4125,382 +4120,306 @@ end local.get $3 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 79 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 78 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 80 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 + (func $~lib/typedarray/Uint8Array#__get (; 79 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.set $5 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $4 - i32.add - local.get $2 - local.get $5 - i32.add - i32.load8_s - local.tee $6 - local.get $6 - i32.mul - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $4 - call $~lib/rt/pure/__retain - i32.store local.get $0 - local.get $4 - i32.store offset=4 - local.get $0 - local.get $3 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne + i32.load offset=8 + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 365 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 152 + i32.const 44 call $~lib/builtins/abort unreachable end + local.get $1 + local.get $0 + i32.load offset=4 + i32.add + i32.load8_u + ) + (func $~lib/typedarray/Int16Array#__get (; 80 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 366 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 408 + i32.const 63 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/typedarray/Uint16Array#__get (; 81 ;) (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 0 - i32.const 304 - i32.const 367 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 536 + i32.const 63 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u ) - (func $~lib/typedarray/Uint8Array#__get (; 81 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#__get (; 82 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u i32.ge_u if i32.const 368 i32.const 432 - i32.const 152 - i32.const 44 + i32.const 792 + i32.const 63 call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl i32.add - i32.load8_u + i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 82 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - local.get $1 - i32.load offset=8 - local.set $3 - local.get $1 - i32.load offset=4 - local.set $5 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $4 - i32.add - local.get $2 - local.get $5 - i32.add - i32.load8_u - local.tee $6 - local.get $6 - i32.mul - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $4 - call $~lib/rt/pure/__retain - i32.store + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 83 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 - local.get $4 - i32.store offset=4 local.get $0 - local.get $3 - i32.store offset=8 + i64.mul + ) + (func $~lib/typedarray/Int64Array#__get (; 84 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $1 local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 1 - i32.ne + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 365 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 920 + i32.const 63 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/typedarray/Uint64Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 366 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1048 + i32.const 63 call $~lib/builtins/abort unreachable end local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 86 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + local.get $0 + local.get $0 + f32.mul + ) + (func $~lib/typedarray/Float32Array#__get (; 87 ;) (param $0 i32) (param $1 i32) (result f32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne + i32.shr_u + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 367 - i32.const 2 + i32.const 368 + i32.const 432 + i32.const 1176 + i32.const 63 call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 88 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 - call $~lib/rt/pure/__release + local.get $0 + f64.mul ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 83 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 89 ;) (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/reallocateBlock (; 90 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 $2 + call $~lib/rt/tlsf/prepareSize + local.tee $3 local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + i32.load + local.tee $5 + i32.const -4 + i32.and + i32.le_u + if + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + local.get $2 + i32.store offset=12 + local.get $1 + return + end local.get $1 - i32.load offset=8 - local.set $3 + i32.const 16 + i32.add local.get $1 - i32.load offset=4 - local.set $5 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $3 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $4 - loop $for-loop|0 - local.get $2 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $6 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $5 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $4 + i32.const -4 + i32.and + i32.add + local.tee $4 local.get $3 - i32.lt_s + i32.ge_u if - i32.const 3 - global.set $~argumentsLength - local.get $2 + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $1 local.get $4 - i32.add - local.get $2 local.get $5 - i32.add - i32.load8_u - local.tee $6 - local.get $6 - i32.mul - i32.store8 + i32.const 3 + i32.and + i32.or + i32.store + local.get $1 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $4 - call $~lib/rt/pure/__retain - i32.store + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return + end + end local.get $0 - local.get $4 + local.get $2 + local.get $1 + i32.load offset=8 + call $~lib/rt/tlsf/allocateBlock + local.tee $3 + local.get $1 + i32.load offset=4 i32.store offset=4 - local.get $0 local.get $3 - i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 365 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne + i32.const 16 + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + i32.const 7388 + i32.ge_u if - i32.const 0 - i32.const 304 - i32.const 366 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $3 + call $~lib/rt/rtrace/onrealloc + local.get $0 + local.get $1 + call $~lib/rt/tlsf/freeBlock end + local.get $3 + ) + (func $~lib/rt/tlsf/__realloc (; 91 ;) (param $0 i32) (param $1 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 367 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/rt/tlsf/checkUsedBlock local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add ) - (func $~lib/typedarray/Int16Array#map (; 84 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 92 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4508,146 +4427,154 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=8 i32.const 1 - i32.shr_u - local.set $4 + i32.const 2 + call $~lib/typedarray/Int8Array#__set local.get $0 - i32.load offset=4 + 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 5 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $0 + local.set $1 + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=8 local.set $5 i32.const 12 - i32.const 6 + i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $4 - i32.const 1 - i32.shl - local.tee $6 + local.set $2 + local.get $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $6 + local.get $1 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if + local.get $3 + local.get $8 + i32.add + i32.load8_s + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 1 - i32.shl - local.tee $7 - i32.add - i32.load16_s - local.tee $3 + local.get $7 local.get $3 - i32.mul - local.set $3 local.get $1 - local.get $7 - i32.add + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $6 + i32.add + local.get $7 + i32.store8 + end local.get $3 - i32.store16 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + local.get $2 + local.get $6 local.get $0 - local.get $1 + call $~lib/rt/tlsf/__realloc + local.tee $4 call $~lib/rt/pure/__retain i32.store + local.get $2 local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 i32.store offset=8 - local.get $0 + local.get $2 + local.get $4 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Int16Array#__get (; 85 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 + local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 408 - i32.const 63 + i32.const 0 + i32.const 304 + i32.const 391 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 86 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - 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 + call $~lib/typedarray/Int8Array#__get i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#map - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 + call $~lib/typedarray/Int8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable @@ -4657,7 +4584,15 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#map (; 87 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 255 + i32.and + i32.const 2 + i32.gt_u + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 94 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4665,146 +4600,154 @@ (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 - i32.load offset=8 + (local $8 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + i32.const 0 i32.const 1 - i32.shr_u - local.set $4 + call $~lib/typedarray/Uint8Array#__set local.get $0 - i32.load offset=4 + 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 5 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + local.set $1 + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=8 local.set $5 i32.const 12 - i32.const 7 + i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $4 - i32.const 1 - i32.shl - local.tee $6 + local.set $2 + local.get $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $6 + local.get $1 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if + local.get $3 + local.get $8 + i32.add + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 1 - i32.shl - local.tee $7 - i32.add - i32.load16_u - local.tee $3 + local.get $7 local.get $3 - i32.mul - local.set $3 local.get $1 - local.get $7 - i32.add + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $6 + i32.add + local.get $7 + i32.store8 + end local.get $3 - i32.store16 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + local.get $2 + local.get $6 local.get $0 - local.get $1 + call $~lib/rt/tlsf/__realloc + local.tee $4 call $~lib/rt/pure/__retain i32.store + local.get $2 local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 i32.store offset=8 - local.get $0 + local.get $2 + local.get $4 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint16Array#__get (; 88 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $1 + local.tee $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 - i32.const 1 - i32.shr_u - i32.ge_u + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 536 - i32.const 63 + i32.const 0 + i32.const 304 + i32.const 391 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 89 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - 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 + call $~lib/typedarray/Uint8Array#__get i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#map - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable @@ -4814,7 +4757,8 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#map (; 90 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 95 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4822,123 +4766,154 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=8 + i32.const 1 i32.const 2 - i32.shr_u - local.set $4 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=4 + 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 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + local.set $1 + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=8 local.set $5 i32.const 12 - i32.const 8 + i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $0 - local.get $4 - i32.const 2 - i32.shl - local.tee $6 + local.set $2 + local.get $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $6 + local.get $1 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if + local.get $3 + local.get $8 + i32.add + i32.load8_u + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 2 - i32.shl - local.tee $7 - i32.add - i32.load - local.tee $3 + local.get $7 local.get $3 - i32.mul - local.set $3 local.get $1 - local.get $7 - i32.add + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + if + local.get $0 + local.tee $4 + i32.const 1 + i32.add + local.set $0 + local.get $4 + local.get $6 + i32.add + local.get $7 + i32.store8 + end local.get $3 - i32.store - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end + local.get $2 + local.get $6 local.get $0 - local.get $1 + call $~lib/rt/tlsf/__realloc + local.tee $4 call $~lib/rt/pure/__retain i32.store + local.get $2 local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 i32.store offset=8 - local.get $0 + local.get $2 + local.get $4 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 91 ;) - (local $0 i32) - (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 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 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 2 + i32.load offset=8 i32.const 3 - call $~lib/typedarray/Int32Array#__set + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 391 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/typedarray/Int32Array#map - local.tee $0 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable @@ -4948,7 +4923,16 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#map (; 92 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 96 ;) (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/Int16Array#filter (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4956,48 +4940,57 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 i32.const 12 - i32.const 9 + i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 local.get $4 - i32.const 2 + i32.const 1 i32.shl - local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 local.get $2 local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $5 + local.get $7 local.get $2 - i32.const 2 + i32.const 1 i32.shl - local.tee $7 - i32.add - i32.load - local.tee $3 - local.get $3 - i32.mul - local.set $3 - local.get $1 - local.get $7 i32.add - local.get $3 - i32.store + i32.load16_s + local.set $6 + i32.const 3 + global.set $~argumentsLength + local.get $6 + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + if + local.get $3 + local.tee $8 + i32.const 1 + i32.add + local.set $3 + local.get $5 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $6 + i32.store16 + end local.get $2 i32.const 1 i32.add @@ -5005,434 +4998,499 @@ br $for-loop|0 end end - local.get $0 local.get $1 + local.get $5 + local.get $3 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $3 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=4 local.get $0 - local.get $6 i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint32Array#__get (; 93 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 792 - i32.const 63 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + local.get $3 + i32.store offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 94 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 98 ;) (local $0 i32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + i32.const 6 + call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint32Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Uint32Array#map - local.tee $0 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $0 + call $~lib/typedarray/Int16Array#filter + local.tee $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 i32.const 1 + i32.shr_u + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 391 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 392 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 1 - call $~lib/typedarray/Uint32Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 + call $~lib/typedarray/Int16Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 95 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - local.get $0 - i64.mul + i32.const 65535 + i32.and + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Int64Array#map (; 96 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 i32.const 12 - i32.const 10 + i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 local.get $4 - i32.const 3 + i32.const 1 i32.shl - local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 local.get $2 local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - i64.load - local.tee $3 - local.get $3 - i64.mul - local.set $3 - local.get $1 local.get $7 - i32.add - local.get $3 - i64.store local.get $2 i32.const 1 + i32.shl i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - local.get $1 - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $6 - i32.store offset=8 - local.get $0 + i32.load16_u + local.set $6 + i32.const 3 + global.set $~argumentsLength + local.get $6 + local.get $2 + local.get $0 + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + if + local.get $3 + local.tee $8 + i32.const 1 + i32.add + local.set $3 + local.get $5 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $6 + i32.store16 + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $1 + local.get $5 + local.get $3 + i32.const 1 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $3 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Int64Array#__get (; 97 ;) (param $0 i32) (param $1 i32) (result i64) + i32.store local.get $1 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 920 - i32.const 63 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + i32.store offset=8 local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load + local.get $3 + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 98 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 101 ;) (local $0 i32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 + i32.const 6 + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + i32.const 1 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set + i32.const 3 + call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Int64Array#map - local.tee $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + call $~lib/typedarray/Uint16Array#filter + local.tee $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 391 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne + call $~lib/typedarray/Uint16Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $0 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release + i32.const 2 + i32.gt_s ) - (func $~lib/typedarray/Uint64Array#map (; 99 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 i32.const 12 - i32.const 11 + i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 local.get $4 - i32.const 3 + i32.const 2 i32.shl - local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $5 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - i64.load - local.tee $3 - local.get $3 - i64.mul - local.set $3 - local.get $1 local.get $7 + local.get $3 + i32.const 2 + i32.shl i32.add + i32.load + local.set $6 + i32.const 3 + global.set $~argumentsLength + local.get $6 + i32.const 2 + i32.gt_s + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + end local.get $3 - i64.store - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $0 local.get $1 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=4 local.get $0 - local.get $6 i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint64Array#__get (; 100 ;) (param $0 i32) (param $1 i32) (result i64) local.get $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.ge_u - if - i32.const 368 - i32.const 432 - i32.const 1048 - i32.const 63 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + local.get $2 + i32.store offset=4 local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 101 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 104 ;) (local $0 i32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 + i32.const 6 + call $~lib/typedarray/Int32Array#constructor 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 + call $~lib/typedarray/Int32Array#__set local.get $0 + i32.const 1 i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Uint64Array#map - local.tee $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 5 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $0 + call $~lib/typedarray/Int32Array#filter + local.tee $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + 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 304 + i32.const 391 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne + call $~lib/typedarray/Int32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 102 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - local.get $0 - f32.mul + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Float32Array#map (; 103 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -5442,511 +5500,469 @@ i32.const 2 i32.shr_u local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 12 i32.const 12 + i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 local.get $4 i32.const 2 i32.shl - local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $5 - local.get $2 + local.get $7 + local.get $3 i32.const 2 i32.shl - local.tee $7 - i32.add - f32.load - local.tee $3 - local.get $3 - f32.mul - local.set $3 - local.get $1 - local.get $7 i32.add + i32.load + local.set $6 + i32.const 3 + global.set $~argumentsLength + local.get $6 + i32.const 2 + i32.gt_u + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + end local.get $3 - f32.store - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $0 local.get $1 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=4 local.get $0 - local.get $6 i32.store offset=8 - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Float32Array#__get (; 104 ;) (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 368 - i32.const 432 - i32.const 1176 - i32.const 63 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + local.get $2 + i32.store offset=4 local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load + call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 105 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 107 ;) (local $0 i32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 + i32.const 6 + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set + i32.const 1 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set + i32.const 2 + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set + i32.const 3 + call $~lib/typedarray/Uint32Array#__set local.get $0 - call $~lib/typedarray/Float32Array#map - local.tee $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + call $~lib/typedarray/Uint32Array#filter + local.tee $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + 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 304 + i32.const 391 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne + call $~lib/typedarray/Uint32Array#__get + i32.const 5 + i32.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 106 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 108 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.mul - ) - (func $~lib/typedarray/Float64Array#map (; 107 ;) (param $0 i32) (result i32) + i64.const 2 + i64.gt_s + ) + (func $~lib/typedarray/Int64Array#filter (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) (local $7 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 i32.const 12 - i32.const 13 + i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 local.get $4 i32.const 3 i32.shl - local.tee $6 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $1 + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $5 - local.get $2 + local.get $7 + local.get $3 i32.const 3 i32.shl - local.tee $7 - i32.add - f64.load - local.tee $3 - local.get $3 - f64.mul - local.set $3 - local.get $1 - local.get $7 i32.add + i64.load + local.set $6 + i32.const 3 + global.set $~argumentsLength + local.get $6 + i64.const 2 + i64.gt_s + if + local.get $2 + local.tee $0 + i32.const 1 + i32.add + local.set $2 + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $6 + i64.store + end local.get $3 - f64.store - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $0 local.get $1 + local.get $5 + local.get $2 + i32.const 3 + i32.shl + local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=4 local.get $0 - local.get $6 i32.store offset=8 - local.get $0 + local.get $1 + local.get $2 + i32.store offset=4 + local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 108 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 110 ;) (local $0 i32) (local $1 i32) - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 + i32.const 6 + call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $0 - call $~lib/typedarray/Float64Array#map - local.tee $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 5 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $0 + call $~lib/typedarray/Int64Array#filter + local.tee $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 390 + i32.const 2 + 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 304 + i32.const 391 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 304 - i32.const 365 + i32.const 392 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 304 - i32.const 366 + i32.const 393 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 304 - i32.const 367 + i32.const 394 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 - 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/Int8Array,i8>~anonymous|0 (; 109 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 111 ;) (param $0 i64) (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 + i64.const 2 + i64.gt_u ) - (func $~lib/rt/tlsf/reallocateBlock (; 110 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 112 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - local.get $2 - call $~lib/rt/tlsf/prepareSize - local.tee $3 - local.get $1 - i32.load - local.tee $5 - i32.const -4 - i32.and - i32.le_u - if - local.get $0 - local.get $1 + (local $6 i64) + (local $7 i32) + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.set $1 + local.get $4 + i32.const 3 + i32.shl + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $5 + local.get $0 + i32.load offset=4 + local.set $7 + loop $for-loop|0 local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - local.get $2 - i32.store offset=12 - local.get $1 - return - end - local.get $1 - i32.const 16 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $6 - i32.load - local.tee $4 - i32.const 1 - i32.and - if - local.get $5 - i32.const -4 - i32.and - i32.const 16 - i32.add local.get $4 - i32.const -4 - i32.and - i32.add - local.tee $4 - local.get $3 - i32.ge_u + i32.lt_s if - local.get $0 - local.get $6 - call $~lib/rt/tlsf/removeBlock - local.get $1 - local.get $4 - local.get $5 - i32.const 3 - i32.and - i32.or - i32.store - local.get $1 - local.get $2 - i32.store offset=12 - local.get $0 - local.get $1 + local.get $7 local.get $3 - call $~lib/rt/tlsf/prepareBlock - local.get $1 - return - end - end - local.get $0 - local.get $2 - local.get $1 - i32.load offset=8 - call $~lib/rt/tlsf/allocateBlock - local.tee $3 - local.get $1 - i32.load offset=4 - i32.store offset=4 - local.get $3 - i32.const 16 - i32.add - local.get $1 - i32.const 16 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $1 - i32.const 7388 - i32.ge_u - if - local.get $1 - local.get $3 - call $~lib/rt/rtrace/onrealloc - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $3 - ) - (func $~lib/rt/tlsf/__realloc (; 111 ;) (param $0 i32) (param $1 i32) (result i32) - call $~lib/rt/tlsf/maybeInitialize - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $1 - call $~lib/rt/tlsf/reallocateBlock - i32.const 16 - i32.add - ) - (func $~lib/typedarray/Int8Array#filter (; 112 ;) (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 - i32.load offset=8 - local.set $4 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $7 + i32.const 3 + i32.shl i32.add - i32.load8_s + i64.load local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 + i64.const 2 + i64.gt_u if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 + i32.const 3 + i32.shl i32.add local.get $6 - i32.store8 + i64.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 local.get $5 - local.get $3 - call $~lib/rt/tlsf/__realloc + local.get $2 + i32.const 3 + i32.shl local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $3 + local.get $0 i32.store offset=8 local.get $1 - local.get $0 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 113 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 113 ;) (local $0 i32) (local $1 i32) i32.const 6 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set + i64.const 4 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set + i64.const 5 + call $~lib/typedarray/Uint64Array#__set local.get $0 - call $~lib/typedarray/Int8Array#filter + call $~lib/typedarray/Uint64Array#filter local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -5960,6 +5976,8 @@ local.get $1 i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 3 i32.ne if i32.const 0 @@ -5971,9 +5989,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 304 @@ -5984,9 +6002,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 304 @@ -5997,9 +6015,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 304 @@ -6013,30 +6031,31 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 114 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 114 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.gt_u + f32.const 2 + f32.gt ) - (func $~lib/typedarray/Uint8Array#filter (; 115 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f32) (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $4 i32.const 12 - i32.const 4 + i32.const 12 call $~lib/rt/tlsf/__alloc local.set $1 local.get $4 + i32.const 2 + i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc local.set $5 @@ -6044,83 +6063,89 @@ i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $7 + local.get $3 + i32.const 2 + i32.shl i32.add - i32.load8_u + f32.load local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + f32.const 2 + f32.gt if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 + i32.const 2 + i32.shl i32.add local.get $6 - i32.store8 + f32.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 local.get $5 - local.get $3 - call $~lib/rt/tlsf/__realloc + local.get $2 + i32.const 2 + i32.shl local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $3 + local.get $0 i32.store offset=8 local.get $1 - local.get $0 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 116 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 116 ;) (local $0 i32) (local $1 i32) i32.const 6 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set + f32.const 3 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set + f32.const 4 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set + f32.const 5 + call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Uint8Array#filter + call $~lib/typedarray/Float32Array#filter local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -6133,6 +6158,8 @@ end local.get $1 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -6145,9 +6172,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne if i32.const 0 i32.const 304 @@ -6158,9 +6185,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne if i32.const 0 i32.const 304 @@ -6171,9 +6198,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 304 @@ -6187,107 +6214,121 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 117 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 117 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f64.const 2 + f64.gt + ) + (func $~lib/typedarray/Float64Array#filter (; 118 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 i32) local.get $0 i32.load offset=8 + i32.const 3 + i32.shr_u local.set $4 i32.const 12 - i32.const 5 + i32.const 13 call $~lib/rt/tlsf/__alloc local.set $1 local.get $4 - i32.const 0 + i32.const 3 + i32.shl + i32.const 0 call $~lib/rt/tlsf/__alloc local.set $5 local.get $0 i32.load offset=4 local.set $7 loop $for-loop|0 - local.get $2 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $7 + local.get $3 + i32.const 3 + i32.shl i32.add - i32.load8_u + f64.load local.set $6 i32.const 3 global.set $~argumentsLength local.get $6 - local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 + f64.const 2 + f64.gt if - local.get $3 - local.tee $8 + local.get $2 + local.tee $0 i32.const 1 i32.add - local.set $3 + local.set $2 local.get $5 - local.get $8 + local.get $0 + i32.const 3 + i32.shl i32.add local.get $6 - i32.store8 + f64.store end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end local.get $1 local.get $5 - local.get $3 - call $~lib/rt/tlsf/__realloc + local.get $2 + i32.const 3 + i32.shl local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $2 call $~lib/rt/pure/__retain i32.store local.get $1 - local.get $3 + local.get $0 i32.store offset=8 local.get $1 - local.get $0 + local.get $2 i32.store offset=4 local.get $1 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 118 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 119 ;) (local $0 i32) (local $1 i32) i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + f64.const 3 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + f64.const 4 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set + f64.const 5 + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Uint8ClampedArray#filter + call $~lib/typedarray/Float64Array#filter local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if @@ -6301,6 +6342,8 @@ local.get $1 i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 3 i32.ne if i32.const 0 @@ -6312,9 +6355,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne if i32.const 0 i32.const 304 @@ -6325,9 +6368,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne if i32.const 0 i32.const 304 @@ -6338,9 +6381,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 304 @@ -6354,1497 +6397,894 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 119 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 120 ;) (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 255 + i32.and i32.const 2 - i32.gt_s + i32.eq ) - (func $~lib/typedarray/Int16Array#filter (; 120 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#some (; 121 ;) (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 $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 1 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $4 + i32.lt_s if - local.get $3 - local.tee $8 + i32.const 3 + global.set $~argumentsLength i32.const 1 + local.get $2 + local.get $3 i32.add - local.set $3 - local.get $5 - local.get $8 + i32.load8_s + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + drop + local.get $2 i32.const 1 - i32.shl i32.add - local.get $6 - i32.store16 + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 0 end - local.get $1 - local.get $5 - local.get $3 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $3 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 121 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set + i32.const 255 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint8Array#some (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $2 + local.get $3 + i32.add + i32.load8_u + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 0 + end + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 + i32.const 65535 + i32.and 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 5 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 391 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 392 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne - if + i32.eq + ) + (func $~lib/typedarray/Int16Array#some (; 125 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and - i32.const 2 - i32.gt_u + i32.eqz ) - (func $~lib/typedarray/Uint16Array#filter (; 123 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint16Array#some (; 127 ;) (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 $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 1 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 local.get $2 - local.get $0 - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength + i32.const 1 local.get $3 - local.tee $8 + local.get $2 i32.const 1 + i32.shl i32.add - local.set $3 - local.get $5 - local.get $8 + i32.load16_u + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + drop + local.get $2 i32.const 1 - i32.shl i32.add - local.get $6 - i32.store16 + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + i32.const 0 end - local.get $1 - local.get $5 - local.get $3 - i32.const 1 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $3 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $3 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 124 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint16Array#constructor - 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 + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) 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 5 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 + i32.eq + ) + (func $~lib/typedarray/Int32Array#some (; 129 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 391 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 392 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne - if + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable end + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + i32.eqz ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.gt_s + i64.const 2 + i64.eq ) - (func $~lib/typedarray/Int32Array#filter (; 126 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int64Array#some (; 132 ;) (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.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 2 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - i32.const 2 - i32.gt_s + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + drop local.get $2 - local.tee $0 i32.const 1 i32.add local.set $2 - local.get $5 - local.get $0 + br $for-loop|0 + end + end + i32.const 0 + end + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 133 ;) (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 (; 134 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 2 + f32.eq + ) + (func $~lib/typedarray/Float32Array#some (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $3 + local.get $2 i32.const 2 i32.shl i32.add - local.get $6 - i32.store + f32.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end + i32.const 0 end - local.get $1 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 127 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int32Array#constructor - 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 + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 136 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) 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 5 - i32.const 5 - call $~lib/typedarray/Int32Array#__set + f32.const 0 + f32.eq + ) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/typedarray/Int32Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 392 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne - if + f64.const 2 + f64.eq + ) + (func $~lib/typedarray/Float64Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 1 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 139 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.gt_u + f64.const 0 + f64.eq ) - (func $~lib/typedarray/Uint32Array#filter (; 129 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#findIndex (; 140 ;) (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.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 2 - i32.shr_u local.set $4 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 2 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - i32.const 2 - i32.gt_u + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength local.get $2 - local.tee $0 - i32.const 1 + local.get $3 i32.add - local.set $2 - local.get $5 + i32.load8_s + local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 i32.add - local.get $6 - i32.store + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end + i32.const -1 + local.set $2 end - local.get $1 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 130 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint32Array#constructor - 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 + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 3 + i32.const 255 + i32.and i32.const 4 - call $~lib/typedarray/Uint32Array#__set + i32.eq + ) + (func $~lib/typedarray/Uint8Array#findIndex (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set + i32.load offset=4 + local.set $3 local.get $0 - call $~lib/typedarray/Uint32Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 392 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $3 + i32.add + i32.load8_u + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 end - local.get $1 + local.get $2 + ) + (func $~lib/typedarray/Int16Array#findIndex (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + local.get $2 ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.gt_s + i32.const 65535 + i32.and + i32.const 4 + i32.eq ) - (func $~lib/typedarray/Int64Array#filter (; 132 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 1 i32.shr_u local.set $4 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - i64.const 2 - i64.gt_s + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 - local.tee $0 i32.const 1 + i32.shl i32.add - local.set $2 - local.get $5 + i32.load16_u + local.get $2 local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int32Array#findIndex (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + i32.const 2 i32.shl i32.add - local.get $6 - i64.store + i32.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end + i32.const -1 + local.set $2 end - local.get $1 - local.get $5 local.get $2 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain + i32.const 4 + i32.eq ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 133 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + (func $~lib/typedarray/Int64Array#findIndex (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + i32.load offset=4 + local.set $3 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 5 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $0 - call $~lib/typedarray/Int64Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 392 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get + local.get $2 + ) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 149 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 i64.const 4 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 + i64.eq + ) + (func $~lib/typedarray/Float32Array#findIndex (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.shr_u + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f32_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const -1 + local.set $2 end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release + local.get $2 ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 134 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 151 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.gt_u + f32.const 4 + f32.eq ) - (func $~lib/typedarray/Uint64Array#filter (; 135 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Float64Array#findIndex (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u local.set $4 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - i64.const 2 - i64.gt_u + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 i32.const 3 i32.shl i32.add - local.get $6 - i64.store + f64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $f64_i32_i32_=>_i32) + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end + i32.const -1 + local.set $2 end - local.get $1 - local.get $5 - local.get $2 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 136 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 153 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set + f64.const 4 + f64.eq + ) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 154 ;) (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 - 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 - local.get $0 - call $~lib/typedarray/Uint64Array#filter - local.tee $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - 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 304 - i32.const 392 - i32.const 2 - 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 304 - i32.const 393 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.rem_s + i32.eqz + ) + (func $~lib/typedarray/Int8Array#every (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + i32.const 0 + local.get $2 + local.get $3 + i32.add + i32.load8_s + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1 end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 137 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 2 - f32.gt + i32.const 1 + i32.and + i32.eqz ) - (func $~lib/typedarray/Float32Array#filter (; 138 ;) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Uint8Array#every (; 157 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 f32) - (local $7 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 2 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - f32.const 2 - f32.gt + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s if + i32.const 3 + global.set $~argumentsLength + i32.const 0 local.get $2 - local.tee $0 - i32.const 1 + local.get $3 i32.add - local.set $2 - local.get $5 + i32.load8_u + local.get $2 local.get $0 - i32.const 2 - i32.shl + local.get $1 + call_indirect (type $i32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 + drop + local.get $2 + i32.const 1 i32.add - local.get $6 - f32.store + local.set $2 + br $for-loop|0 end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 end + i32.const 1 end - local.get $1 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 139 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Float32Array#constructor - 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 + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 158 ;) (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 - 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 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - 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 304 - i32.const 392 - i32.const 2 - 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 304 - i32.const 393 - i32.const 2 - 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 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - 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 (; 140 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f64.const 2 - f64.gt - ) - (func $~lib/typedarray/Float64Array#filter (; 141 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 - loop $for-loop|0 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $7 - local.get $3 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - i32.const 3 - global.set $~argumentsLength - local.get $6 - f64.const 2 - f64.gt - if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $1 - local.get $5 - local.get $2 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/tlsf/__realloc - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $0 - i32.store offset=8 - local.get $1 - local.get $2 - i32.store offset=4 - local.get $1 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 142 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - 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 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 390 - i32.const 2 - 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 304 - i32.const 391 - i32.const 2 - 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 304 - i32.const 392 - i32.const 2 - 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 304 - i32.const 393 - i32.const 2 - 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 304 - i32.const 394 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - 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 (; 143 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.const 2 - i32.eq + i32.rem_s + i32.eqz ) - (func $~lib/typedarray/Int8Array#some (; 144 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -7853,16 +7293,19 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 - local.get $2 + i32.const 0 local.get $3 - i32.add - i32.load8_s local.get $2 - local.get $0 - local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $2 + local.get $0 + local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 drop local.get $2 i32.const 1 @@ -7871,25 +7314,21 @@ br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - i32.eqz - ) - (func $~lib/typedarray/Uint8Array#some (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 160 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $4 loop $for-loop|0 local.get $2 @@ -7898,16 +7337,19 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 - local.get $2 + i32.const 0 local.get $3 + local.get $2 + i32.const 1 + i32.shl i32.add - i32.load8_u + i32.load16_u local.get $2 local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 drop local.get $2 i32.const 1 @@ -7916,27 +7358,26 @@ br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 161 ;) (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.rem_s + i32.eqz ) - (func $~lib/typedarray/Int16Array#some (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $4 loop $for-loop|0 @@ -7946,18 +7387,19 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 + i32.const 0 local.get $3 local.get $2 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 drop local.get $2 i32.const 1 @@ -7966,26 +7408,26 @@ br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 149 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 163 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.eqz + i64.const 2 + i64.rem_s + i64.eqz ) - (func $~lib/typedarray/Uint16Array#some (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 164 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $4 loop $for-loop|0 @@ -7995,18 +7437,19 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 + i32.const 0 local.get $3 local.get $2 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_u + i64.load local.get $2 local.get $0 local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + call_indirect (type $i64_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 drop local.get $2 i32.const 1 @@ -8015,77 +7458,179 @@ br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 165 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.eq + i64.const 2 + i64.rem_u + i64.eqz ) - (func $~lib/typedarray/Int32Array#some (; 152 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/math/NativeMathf.mod (; 166 ;) (param $0 f32) (result f32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + i32.const 1 + i32.const 0 + local.get $0 + i32.reinterpret_f32 + local.tee $1 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $2 + i32.const 255 + i32.eq + select + if local.get $0 - i32.load offset=4 - local.set $3 + f32.const 2 + f32.mul + local.tee $0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 + f32.div + return + end + local.get $1 + i32.const -2147483648 + i32.and + local.set $4 + block $folding-inner0 + local.get $1 + i32.const 1 + i32.shl + local.tee $3 + i32.const -2147483648 + i32.le_u + if + local.get $3 + i32.const -2147483648 + i32.eq + br_if $folding-inner0 + local.get $0 + return + end + local.get $2 + if (result i32) + local.get $1 + i32.const 8388607 + i32.and + i32.const 8388608 + i32.or + else + local.get $1 + i32.const 1 local.get $2 - local.get $4 - i32.lt_s + local.get $1 + i32.const 9 + i32.shl + i32.clz + i32.sub + local.tee $2 + i32.sub + i32.shl + end + local.set $1 + loop $while-continue|0 + local.get $2 + i32.const 128 + i32.gt_s if - i32.const 3 - global.set $~argumentsLength + local.get $1 + i32.const 8388608 + i32.ge_u + if + local.get $1 + i32.const 8388608 + i32.eq + br_if $folding-inner0 + local.get $1 + i32.const 8388608 + i32.sub + local.set $1 + end + local.get $1 i32.const 1 - local.get $3 - local.get $2 - i32.const 2 i32.shl - i32.add - i32.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - drop + local.set $1 local.get $2 i32.const 1 - i32.add + i32.sub local.set $2 - br $for-loop|0 + br $while-continue|0 end end + local.get $1 + i32.const 8388608 + i32.ge_u + if + local.get $1 + i32.const 8388608 + i32.eq + br_if $folding-inner0 + local.get $1 + i32.const 8388608 + i32.sub + local.set $1 + end + local.get $1 + local.get $1 + i32.const 8 + i32.shl + i32.clz + local.tee $3 + i32.shl + local.set $1 + local.get $2 + local.get $3 + i32.sub + local.tee $2 i32.const 0 + i32.gt_s + if (result i32) + local.get $1 + i32.const 8388608 + i32.sub + local.get $2 + i32.const 23 + i32.shl + i32.or + else + local.get $1 + i32.const 1 + local.get $2 + i32.sub + i32.shr_u + end + local.get $4 + i32.or + f32.reinterpret_i32 + return end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + f32.const 0 local.get $0 - i32.eqz + f32.mul ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 154 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 167 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.eq + call $~lib/math/NativeMathf.mod + f32.const 0 + f32.eq ) - (func $~lib/typedarray/Int64Array#some (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $4 loop $for-loop|0 @@ -8095,96 +7640,195 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 + i32.const 0 local.get $3 local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load + f32.load local.get $2 local.get $0 local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - drop - local.get $2 + call_indirect (type $f32_i32_i32_=>_i32) + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 i32.const 1 i32.add local.set $2 br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 156 ;) (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 (; 157 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/math/NativeMath.mod (; 169 ;) (param $0 f64) (result f64) + (local $1 i64) + (local $2 i64) + (local $3 i64) + (local $4 i64) + i32.const 1 + i32.const 0 local.get $0 - f32.const 2 - f32.eq - ) - (func $~lib/typedarray/Float32Array#some (; 158 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i64.reinterpret_f64 + local.tee $1 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $2 + i64.const 2047 + i64.eq + select + if local.get $0 - i32.load offset=4 - local.set $3 + f64.const 2 + f64.mul + local.tee $0 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 + f64.div + return + end + local.get $1 + i64.const 63 + i64.shr_u + local.set $4 + block $folding-inner0 + local.get $1 + i64.const 1 + i64.shl + local.tee $3 + i64.const -9223372036854775808 + i64.le_u + if + local.get $3 + i64.const -9223372036854775808 + i64.eq + br_if $folding-inner0 + local.get $0 + return + end + local.get $2 + i64.eqz + if (result i64) + local.get $1 + i64.const 0 local.get $2 - local.get $4 - i32.lt_s + local.get $1 + i64.const 12 + i64.shl + i64.clz + i64.sub + local.tee $2 + i64.sub + i64.const 1 + i64.add + i64.shl + else + local.get $1 + i64.const 4503599627370495 + i64.and + i64.const 4503599627370496 + i64.or + end + local.set $1 + loop $while-continue|0 + local.get $2 + i64.const 1024 + i64.gt_s if - i32.const 3 - global.set $~argumentsLength - i32.const 1 - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $2 - local.get $0 local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - drop + i64.const 4503599627370496 + i64.ge_u + if + local.get $1 + i64.const 4503599627370496 + i64.eq + br_if $folding-inner0 + local.get $1 + i64.const 4503599627370496 + i64.sub + local.set $1 + end + local.get $1 + i64.const 1 + i64.shl + local.set $1 local.get $2 - i32.const 1 - i32.add + i64.const 1 + i64.sub local.set $2 - br $for-loop|0 + br $while-continue|0 end end - i32.const 0 + local.get $1 + i64.const 4503599627370496 + i64.ge_u + if + local.get $1 + i64.const 4503599627370496 + i64.eq + br_if $folding-inner0 + local.get $1 + i64.const 4503599627370496 + i64.sub + local.set $1 + end + local.get $1 + local.get $1 + i64.const 11 + i64.shl + i64.clz + local.tee $3 + i64.shl + local.set $1 + local.get $2 + local.get $3 + i64.sub + local.tee $2 + i64.const 0 + i64.gt_s + if (result i64) + local.get $1 + i64.const 4503599627370496 + i64.sub + local.get $2 + i64.const 52 + i64.shl + i64.or + else + local.get $1 + i64.const 0 + local.get $2 + i64.sub + i64.const 1 + i64.add + i64.shr_u + end + local.get $4 + i64.const 63 + i64.shl + i64.or + f64.reinterpret_i64 + return end - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 159 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + f64.const 0 local.get $0 - f32.const 0 - f32.eq + f64.mul ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 160 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 170 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f64.const 2 + call $~lib/math/NativeMath.mod + f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 161 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 i32.load offset=4 local.set $3 @@ -8200,7 +7844,7 @@ if i32.const 3 global.set $~argumentsLength - i32.const 1 + i32.const 0 local.get $3 local.get $2 i32.const 3 @@ -8211,7 +7855,8 @@ local.get $0 local.get $1 call_indirect (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + i32.eqz + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 drop local.get $2 i32.const 1 @@ -8220,15 +7865,55 @@ br $for-loop|0 end end - i32.const 0 + i32.const 1 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 162 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - f64.const 0 - f64.eq + i32.const 255 + i32.and + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#findIndex (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#forEach (; 173 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8238,82 +7923,116 @@ local.get $0 i32.load offset=8 local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $3 - i32.add - i32.load8_s - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $3 + i32.add + i32.load8_u + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 - i32.const 255 + i32.const 65535 i32.and - i32.const 4 - i32.eq + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#findIndex (; 165 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get local.get $0 - i32.load offset=8 - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $3 - i32.add - i32.load8_u - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const -1 - local.set $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable end + global.get $std/typedarray/forEachSelf local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#findIndex (; 166 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#forEach (; 176 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8322,48 +8041,77 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i32_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 167 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 177 ;) (param $0 i64) (param $1 i32) (param $2 i32) + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + i64.extend_i32_s local.get $0 - i32.const 65535 - i32.and - i32.const 4 - i32.eq + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#findIndex (; 168 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#forEach (; 178 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8372,1298 +8120,1353 @@ local.set $3 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $3 local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 + call_indirect (type $i64_i32_i32_=>_none) + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 ) - (func $~lib/typedarray/Int32Array#findIndex (; 169 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 179 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const -1 - local.set $2 + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable end + global.get $std/typedarray/forEachSelf local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 170 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 180 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 - i32.const 4 - i32.eq + i32.const 1696 + local.get $1 + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 0 + i32.const 304 + i32.const 490 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + local.get $1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 491 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachSelf + local.get $2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 492 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#findIndex (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 181 ;) (param $0 i32) (result 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.tee $3 i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - loop $for-loop|0 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.tee $2 + i32.load8_s + local.set $5 local.get $2 + local.get $1 local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.add + local.tee $2 + i32.load8_s + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|0 end - i32.const -1 - local.set $2 end - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 172 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 4 - i64.eq + local.get $3 ) - (func $~lib/typedarray/Float32Array#findIndex (; 173 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 182 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - loop $for-loop|0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $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.add + local.set $0 + br $for-loop|0 end - i32.const -1 - local.set $2 end local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 174 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 4 - f32.eq - ) - (func $~lib/typedarray/Float64Array#findIndex (; 175 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - loop $for-loop|0 + call $~lib/typedarray/Int8Array#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 $4 - i32.lt_s + local.get $0 + call $~lib/typedarray/Int8Array#__get + i32.const 1792 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.ne if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 end - i32.const -1 - local.set $2 end - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 176 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int8Array#subarray + local.tee $1 + call $~lib/typedarray/Int8Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 529 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - f64.const 4 - f64.eq - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 7 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 530 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 2 - i32.rem_s - i32.eqz - ) - (func $~lib/typedarray/Int8Array#every (; 178 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $2 - local.get $3 - i32.add - i32.load8_s - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 531 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 179 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 1 - i32.and - i32.eqz + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 532 + i32.const 2 + 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 + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#every (; 180 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 183 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|0 local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 + local.get $1 + i32.lt_u + if + local.get $0 local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $2 - local.get $3 - i32.add - i32.load8_u - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + i32.add + local.tee $2 + i32.load8_u + local.set $5 + local.get $2 + local.get $1 + local.get $4 + i32.add + local.tee $2 + i32.load8_u + i32.store8 + local.get $2 + local.get $5 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|0 end - i32.const 1 end + local.get $3 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 181 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 184 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 2 - i32.rem_s - i32.eqz + i32.load offset=8 + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + end + local.set $1 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int16Array#every (; 182 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 185 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 + local.get $1 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - i32.const 1 end - ) - (func $~lib/typedarray/Uint16Array#every (; 183 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 + local.get $2 + call $~lib/typedarray/Uint8Array#reverse + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 + local.get $1 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s + local.get $0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1792 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne if - i32.const 3 - global.set $~argumentsLength i32.const 0 - local.get $3 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + i32.const 304 + i32.const 524 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 end - i32.const 1 end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 184 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 2 - i32.rem_s - i32.eqz - ) - (func $~lib/typedarray/Int32Array#every (; 185 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 + local.get $3 + i32.const 8 + call $~lib/typedarray/Uint8Array#subarray + local.tee $1 + call $~lib/typedarray/Uint8Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 529 i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 + call $~lib/builtins/abort + unreachable end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 186 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.rem_s - i64.eqz + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 7 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 530 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 531 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 532 + i32.const 2 + 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 + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#every (; 187 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $i64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 + i32.const 4 + local.get $0 + i32.load offset=8 + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 188 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.set $1 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - i64.const 2 - i64.rem_u - i64.eqz + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/math/NativeMathf.mod (; 189 ;) (param $0 f32) (result f32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 1 - i32.const 0 - local.get $0 - i32.reinterpret_f32 + (local $5 i32) + i32.const 1804 + i32.load local.tee $1 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.tee $2 - i32.const 255 - i32.eq - select - if - local.get $0 - f32.const 2 - f32.mul - local.tee $0 - local.get $0 - f32.div - return - end + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $4 + local.set $2 local.get $1 - i32.const -2147483648 - i32.and - local.set $4 - block $folding-inner0 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 + local.get $0 local.get $1 - i32.const 1 - i32.shl - local.tee $3 - i32.const -2147483648 - i32.le_u + i32.lt_s if - local.get $3 - i32.const -2147483648 - i32.eq - br_if $folding-inner0 + local.get $2 local.get $0 - return - end - local.get $2 - if (result i32) - local.get $1 - i32.const 8388607 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 i32.and - i32.const 8388608 - i32.or - else - local.get $1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Uint8Array#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/Uint8ClampedArray#__get + i32.const 1792 local.get $1 - i32.const 9 - i32.shl - i32.clz + i32.const 1 i32.sub - local.tee $2 + local.get $0 i32.sub - i32.shl - end - local.set $1 - loop $while-continue|0 - local.get $2 - i32.const 128 - i32.gt_s + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne if - local.get $1 - i32.const 8388608 - i32.ge_u - if - local.get $1 - i32.const 8388608 - i32.eq - br_if $folding-inner0 - local.get $1 - i32.const 8388608 - i32.sub - local.set $1 - end - local.get $1 - i32.const 1 - i32.shl - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + 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/Uint8ClampedArray#subarray + local.tee $1 + call $~lib/typedarray/Uint8Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 529 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 7 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 530 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 6 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 531 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 532 + i32.const 2 + 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 + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#reverse (; 188 ;) (param $0 i32) (result 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.tee $3 + i32.load offset=4 + local.set $4 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|0 + local.get $0 local.get $1 - i32.const 8388608 - i32.ge_u + i32.lt_u if - local.get $1 - i32.const 8388608 - i32.eq - br_if $folding-inner0 - local.get $1 - i32.const 8388608 - i32.sub - local.set $1 - end - local.get $1 - local.get $1 - i32.const 8 - i32.shl - i32.clz - local.tee $3 - i32.shl - local.set $1 - local.get $2 - local.get $3 - i32.sub - local.tee $2 - i32.const 0 - i32.gt_s - if (result i32) - local.get $1 - i32.const 8388608 - i32.sub - local.get $2 - i32.const 23 + local.get $4 + local.get $0 + i32.const 1 i32.shl - i32.or - else + i32.add + local.tee $2 + i32.load16_s + local.set $5 + local.get $2 + local.get $4 local.get $1 i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_s + i32.store16 local.get $2 + local.get $5 + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 i32.sub - i32.shr_u + local.set $1 + br $for-loop|0 end - local.get $4 - i32.or - f32.reinterpret_i32 - return end - f32.const 0 - local.get $0 - f32.mul - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 190 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - call $~lib/math/NativeMathf.mod - f32.const 0 - f32.eq + local.get $3 ) - (func $~lib/typedarray/Float32Array#every (; 191 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f32_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - i32.const 1 - end - ) - (func $~lib/math/NativeMath.mod (; 192 ;) (param $0 f64) (result f64) - (local $1 i64) - (local $2 i64) - (local $3 i64) - (local $4 i64) - i32.const 1 - i32.const 0 + i32.const 4 local.get $0 - i64.reinterpret_f64 - local.tee $1 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and + i32.load offset=8 + i32.const 1 + i32.shr_u local.tee $2 - i64.const 2047 - i64.eq + i32.const 4 + local.get $2 + i32.lt_s select - if - local.get $0 - f64.const 2 - f64.mul - local.tee $0 - local.get $0 - f64.div - return - end + local.set $3 local.get $1 - i64.const 63 - i64.shr_u - local.set $4 - block $folding-inner0 + i32.const 0 + i32.lt_s + if (result i32) local.get $1 - i64.const 1 - i64.shl - local.tee $3 - i64.const -9223372036854775808 - i64.le_u - if - local.get $3 - i64.const -9223372036854775808 - i64.eq - br_if $folding-inner0 - local.get $0 - return - end local.get $2 - i64.eqz - if (result i64) - local.get $1 - i64.const 0 - local.get $2 - local.get $1 - i64.const 12 - i64.shl - i64.clz - i64.sub - local.tee $2 - i64.sub - i64.const 1 - i64.add - i64.shl - else - local.get $1 - i64.const 4503599627370495 - i64.and - i64.const 4503599627370496 - i64.or - end - local.set $1 - loop $while-continue|0 - local.get $2 - i64.const 1024 - i64.gt_s - if - local.get $1 - i64.const 4503599627370496 - i64.ge_u - if - local.get $1 - i64.const 4503599627370496 - i64.eq - br_if $folding-inner0 - local.get $1 - i64.const 4503599627370496 - i64.sub - local.set $1 - end - local.get $1 - i64.const 1 - i64.shl - local.set $1 - local.get $2 - i64.const 1 - i64.sub - local.set $2 - br $while-continue|0 - end - end + i32.add + local.tee $1 + i32.const 0 local.get $1 - i64.const 4503599627370496 - i64.ge_u - if - local.get $1 - i64.const 4503599627370496 - i64.eq - br_if $folding-inner0 - local.get $1 - i64.const 4503599627370496 - i64.sub - local.set $1 - end + i32.const 0 + i32.gt_s + select + else local.get $1 + local.get $2 local.get $1 - i64.const 11 - i64.shl - i64.clz - local.tee $3 - i64.shl - local.set $1 local.get $2 - local.get $3 - i64.sub - local.tee $2 - i64.const 0 - i64.gt_s - if (result i64) - local.get $1 - i64.const 4503599627370496 - i64.sub - local.get $2 - i64.const 52 - i64.shl - i64.or - else - local.get $1 - i64.const 0 - local.get $2 - i64.sub - i64.const 1 - i64.add - i64.shr_u - end - local.get $4 - i64.const 63 - i64.shl - i64.or - f64.reinterpret_i64 - return + i32.lt_s + select end - f64.const 0 + local.set $1 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f64.mul - ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 193 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $0 - call $~lib/math/NativeMath.mod - f64.const 0 - f64.eq + i32.load offset=4 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 1 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Float64Array#every (; 194 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 190 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Int16Array#constructor + local.tee $5 + local.set $3 + loop $for-loop|0 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 + local.get $1 + i32.lt_s + if local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - i32.const 0 - local.get $3 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $2 - local.get $0 - local.get $1 - call_indirect (type $f64_i32_i32_=>_i32) - i32.eqz - br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $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.add + local.set $0 + br $for-loop|0 end - i32.const 1 - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 195 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 255 - i32.and - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 490 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - local.get $1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 491 - i32.const 4 - call $~lib/builtins/abort - unreachable end - global.get $std/typedarray/forEachSelf local.get $2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 492 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $~lib/typedarray/Uint8Array#forEach (; 196 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 + call $~lib/typedarray/Int16Array#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 - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $3 - i32.add - i32.load8_u local.get $2 local.get $0 + call $~lib/typedarray/Int16Array#__get + i32.const 1792 local.get $1 - call_indirect (type $i32_i32_i32_=>_none) - local.get $2 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $0 + br $for-loop|1 end end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 197 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 65535 - i32.and - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and + local.get $3 + i32.const 8 + call $~lib/typedarray/Int16Array#subarray + local.tee $1 + call $~lib/typedarray/Int16Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 8 i32.ne if i32.const 0 i32.const 304 - i32.const 490 - i32.const 4 + i32.const 529 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 304 - i32.const 491 - i32.const 4 + i32.const 530 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 492 - i32.const 4 + i32.const 531 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 198 ;) (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get local.get $0 + i32.const 3 + call $~lib/typedarray/Int16Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 490 - i32.const 4 + i32.const 532 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 491 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 492 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#forEach (; 199 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#reverse (; 191 ;) (param $0 i32) (result 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.tee $3 i32.load offset=4 - local.set $3 - local.get $0 + local.set $4 + i32.const 0 + local.set $0 + local.get $3 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u - local.set $4 + i32.const 1 + i32.sub + local.set $1 loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s + local.get $0 + local.get $1 + i32.lt_u if - i32.const 3 - global.set $~argumentsLength - local.get $3 - local.get $2 - i32.const 2 + local.get $4 + local.get $0 + i32.const 1 i32.shl i32.add - i32.load + local.tee $2 + i32.load16_u + local.set $5 local.get $2 - local.get $0 + local.get $4 local.get $1 - call_indirect (type $i32_i32_i32_=>_none) + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_u + i32.store16 local.get $2 + local.get $5 + i32.store16 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 br $for-loop|0 end end + local.get $3 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 200 ;) (param $0 i64) (param $1 i32) (param $2 i32) - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - i64.extend_i32_s + (func $~lib/typedarray/Uint16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 local.get $0 - i64.ne - if - i32.const 0 - i32.const 304 - i32.const 490 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.set $3 local.get $1 - i32.ne - if + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $2 + i32.add + local.tee $1 i32.const 0 - i32.const 304 - i32.const 491 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 - i32.ne - if + local.get $1 i32.const 0 - i32.const 304 - i32.const 492 - i32.const 4 - call $~lib/builtins/abort - unreachable + i32.gt_s + select + else + local.get $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select end - global.get $std/typedarray/forEachCallCount + local.set $1 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $0 + i32.load offset=4 + local.get $3 i32.const 1 + i32.shl i32.add - global.set $std/typedarray/forEachCallCount + i32.store offset=4 + local.get $2 + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.gt_s + select + local.get $3 + i32.sub + i32.const 1 + i32.shl + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Int64Array#forEach (; 201 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 193 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=4 + (local $5 i32) + i32.const 1804 + i32.load + local.tee $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $4 + local.set $2 + local.get $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $5 local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $0 + local.get $1 i32.lt_s if - i32.const 3 - global.set $~argumentsLength - local.get $3 local.get $2 - i32.const 3 - i32.shl + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $3 + local.get $0 + i32.const 1792 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 i32.add - i64.load + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Uint16Array#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/Uint16Array#__get + i32.const 1792 local.get $1 - call_indirect (type $i64_i32_i32_=>_none) - local.get $2 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 65535 + i32.and + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 524 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 1 i32.add - local.set $2 - br $for-loop|0 + local.set $0 + br $for-loop|1 end end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 202 ;) (param $0 f32) (param $1 i32) (param $2 i32) - local.get $0 - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne + local.get $3 + i32.const 8 + call $~lib/typedarray/Uint16Array#subarray + local.tee $1 + call $~lib/typedarray/Uint16Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 8 + i32.ne if i32.const 0 i32.const 304 - i32.const 490 - i32.const 4 + i32.const 529 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 7 i32.ne if i32.const 0 i32.const 304 - i32.const 491 - i32.const 4 + i32.const 530 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 6 i32.ne if i32.const 0 i32.const 304 - i32.const 492 - i32.const 4 + i32.const 531 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 203 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 - i32.const 1696 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 490 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - local.get $1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 491 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - global.get $std/typedarray/forEachSelf - local.get $2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__get + i32.const 5 i32.ne if i32.const 0 i32.const 304 - i32.const 492 - i32.const 4 + i32.const 532 + i32.const 2 call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#reverse (; 204 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 194 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9678,6 +9481,8 @@ local.set $0 local.get $3 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 1 i32.sub local.set $1 @@ -9686,22 +9491,26 @@ local.get $1 i32.lt_u if - local.get $0 local.get $4 + local.get $0 + i32.const 2 + i32.shl i32.add local.tee $2 - i32.load8_s + i32.load local.set $5 local.get $2 - local.get $1 local.get $4 + local.get $1 + i32.const 2 + i32.shl i32.add local.tee $2 - i32.load8_s - i32.store8 + i32.load + i32.store local.get $2 local.get $5 - i32.store8 + i32.store local.get $0 i32.const 1 i32.add @@ -9715,7 +9524,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 205 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 195 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9725,11 +9534,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -9742,21 +9551,13 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -9765,7 +9566,7 @@ end end local.get $2 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Int32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -9776,7 +9577,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -9784,10 +9585,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.ne if i32.const 0 @@ -9807,12 +9604,12 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $1 - call $~lib/typedarray/Int8Array#reverse + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne if @@ -9825,7 +9622,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne if @@ -9838,7 +9635,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne if @@ -9851,7 +9648,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if @@ -9871,64 +9668,14 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 206 ;) (param $0 i32) (result 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.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $0 - local.get $4 - i32.add - local.tee $2 - i32.load8_u - local.set $5 - local.get $2 - local.get $1 - local.get $4 - i32.add - local.tee $2 - i32.load8_u - i32.store8 - local.get $2 - local.get $5 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Uint8Array#subarray (; 207 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 196 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -9958,7 +9705,7 @@ end local.set $1 i32.const 12 - i32.const 4 + i32.const 9 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -9966,9 +9713,11 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $3 local.get $0 i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl i32.add i32.store offset=4 local.get $2 @@ -9980,11 +9729,13 @@ select local.get $3 i32.sub + i32.const 2 + i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 208 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 197 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9994,11 +9745,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10011,17 +9762,13 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.add @@ -10030,7 +9777,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10041,7 +9788,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -10049,8 +9796,6 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and i32.ne if i32.const 0 @@ -10069,12 +9814,12 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Uint32Array#subarray local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne if @@ -10087,7 +9832,7 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne if @@ -10100,7 +9845,7 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne if @@ -10113,7 +9858,7 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if @@ -10133,12 +9878,72 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 209 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 198 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i64) + local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=4 + local.set $4 + i32.const 0 + local.set $0 + local.get $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i64.load + local.set $5 + local.get $2 + local.get $4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.tee $2 + i64.load + i64.store + local.get $2 + local.get $5 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|0 + end + end + local.get $3 + ) + (func $~lib/typedarray/Int64Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 + i32.const 3 + i32.shr_u local.tee $2 i32.const 4 local.get $2 @@ -10168,7 +9973,7 @@ end local.set $1 i32.const 12 - i32.const 5 + i32.const 10 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -10176,9 +9981,11 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $3 local.get $0 i32.load offset=4 + local.get $3 + i32.const 3 + i32.shl i32.add i32.store offset=4 local.get $2 @@ -10190,11 +9997,13 @@ select local.get $3 i32.sub + i32.const 3 + i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 210 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 200 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10204,11 +10013,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10221,17 +10030,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i32.add @@ -10240,7 +10047,7 @@ end end local.get $2 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10251,7 +10058,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -10259,9 +10066,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 255 - i32.and - i32.ne + i64.extend_i32_s + i64.ne if i32.const 0 i32.const 304 @@ -10279,14 +10085,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Int64Array#subarray local.tee $1 - call $~lib/typedarray/Uint8Array#reverse + call $~lib/typedarray/Int64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 304 @@ -10297,9 +10103,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 304 @@ -10310,9 +10116,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 304 @@ -10323,9 +10129,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 304 @@ -10343,71 +10149,13 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 211 ;) (param $0 i32) (result 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.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_s - i32.store16 - local.get $2 - local.get $5 - i32.store16 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end - end - local.get $3 - ) - (func $~lib/typedarray/Int16Array#subarray (; 212 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 201 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.tee $2 i32.const 4 @@ -10438,7 +10186,7 @@ end local.set $1 i32.const 12 - i32.const 6 + i32.const 11 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -10449,7 +10197,7 @@ local.get $0 i32.load offset=4 local.get $3 - i32.const 1 + i32.const 3 i32.shl i32.add i32.store offset=4 @@ -10462,13 +10210,13 @@ select local.get $3 i32.sub - i32.const 1 + i32.const 3 i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 213 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 202 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10478,11 +10226,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10495,21 +10243,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i32.add @@ -10518,7 +10260,7 @@ end end local.get $2 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/Int64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10529,7 +10271,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -10537,11 +10279,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.ne + i64.extend_i32_s + i64.ne if i32.const 0 i32.const 304 @@ -10559,14 +10298,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Uint64Array#subarray local.tee $1 - call $~lib/typedarray/Int16Array#reverse + call $~lib/typedarray/Int64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 8 + i64.ne if i32.const 0 i32.const 304 @@ -10577,9 +10316,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 7 + i64.ne if i32.const 0 i32.const 304 @@ -10590,9 +10329,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 6 + i64.ne if i32.const 0 i32.const 304 @@ -10603,9 +10342,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 304 @@ -10623,12 +10362,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 214 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 203 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f32) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -10638,7 +10377,7 @@ local.set $0 local.get $3 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.const 1 i32.sub @@ -10650,24 +10389,24 @@ if local.get $4 local.get $0 - i32.const 1 + i32.const 2 i32.shl i32.add local.tee $2 - i32.load16_u + f32.load local.set $5 local.get $2 local.get $4 local.get $1 - i32.const 1 + i32.const 2 i32.shl i32.add local.tee $2 - i32.load16_u - i32.store16 + f32.load + f32.store local.get $2 local.get $5 - i32.store16 + f32.store local.get $0 i32.const 1 i32.add @@ -10681,13 +10420,13 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 215 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) i32.const 4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.tee $2 i32.const 4 @@ -10718,7 +10457,7 @@ end local.set $1 i32.const 12 - i32.const 7 + i32.const 12 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 @@ -10729,7 +10468,7 @@ local.get $0 i32.load offset=4 local.get $3 - i32.const 1 + i32.const 2 i32.shl i32.add i32.store offset=4 @@ -10742,13 +10481,13 @@ select local.get $3 i32.sub - i32.const 1 + i32.const 2 i32.shl i32.store offset=8 local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 216 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 205 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10758,11 +10497,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10775,17 +10514,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -10794,7 +10531,7 @@ end end local.get $2 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/Float32Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -10805,7 +10542,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Uint16Array#__get + call $~lib/typedarray/Float32Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -10813,9 +10550,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.const 65535 - i32.and - i32.ne + f32.convert_i32_s + f32.ne if i32.const 0 i32.const 304 @@ -10833,14 +10569,14 @@ end local.get $3 i32.const 8 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Float32Array#subarray local.tee $1 - call $~lib/typedarray/Uint16Array#reverse + call $~lib/typedarray/Float32Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 8 + f32.ne if i32.const 0 i32.const 304 @@ -10851,9 +10587,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 7 + f32.ne if i32.const 0 i32.const 304 @@ -10864,9 +10600,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 6 + f32.ne if i32.const 0 i32.const 304 @@ -10877,9 +10613,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 304 @@ -10897,12 +10633,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 217 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 206 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) local.get $0 call $~lib/rt/pure/__retain local.tee $3 @@ -10912,7 +10648,7 @@ local.set $0 local.get $3 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u i32.const 1 i32.sub @@ -10924,24 +10660,24 @@ if local.get $4 local.get $0 - i32.const 2 + i32.const 3 i32.shl i32.add local.tee $2 - i32.load + f64.load local.set $5 local.get $2 local.get $4 local.get $1 - i32.const 2 + i32.const 3 i32.shl i32.add local.tee $2 - i32.load - i32.store + f64.load + f64.store local.get $2 local.get $5 - i32.store + f64.store local.get $0 i32.const 1 i32.add @@ -10955,7 +10691,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 218 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 207 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10965,11 +10701,11 @@ i32.const 1804 i32.load local.tee $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $4 local.set $2 local.get $1 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $5 local.set $3 loop $for-loop|0 @@ -10982,13 +10718,15 @@ i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $3 local.get $0 i32.const 1792 local.get $0 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 i32.add @@ -10997,7 +10735,7 @@ end end local.get $2 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Float64Array#reverse call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -11008,7 +10746,7 @@ if local.get $2 local.get $0 - call $~lib/typedarray/Int32Array#__get + call $~lib/typedarray/Float64Array#__get i32.const 1792 local.get $1 i32.const 1 @@ -11016,7 +10754,8 @@ local.get $0 i32.sub call $~lib/array/Array#__get - i32.ne + f64.convert_i32_s + f64.ne if i32.const 0 i32.const 304 @@ -11035,14 +10774,14 @@ local.get $3 i32.const 4 i32.const 8 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Float64Array#subarray local.tee $1 - call $~lib/typedarray/Int32Array#reverse + call $~lib/typedarray/Float64Array#reverse local.tee $0 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 8 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 8 + f64.ne if i32.const 0 i32.const 304 @@ -11053,9 +10792,9 @@ end local.get $0 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 7 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.ne if i32.const 0 i32.const 304 @@ -11066,9 +10805,9 @@ end local.get $0 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 6 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.ne if i32.const 0 i32.const 304 @@ -11079,9 +10818,9 @@ end local.get $0 i32.const 3 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 304 @@ -11099,1317 +10838,984 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 219 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/typedarray/Int8Array#indexOf (; 208 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - i32.const 4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - i32.const 4 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $0 + i32.load offset=8 + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 209 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $0 + i32.load offset=8 + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + end local.get $2 + 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 + i32.const 1 + i32.sub local.get $2 - local.get $1 local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 i32.lt_s select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.const 255 + i32.and + i32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 end - local.set $1 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store local.get $2 + ) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 210 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + local.set $2 + end local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 2 - i32.shl - i32.store offset=8 local.get $2 - call $~lib/rt/pure/__retain + call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 220 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 211 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 + i32.const 1900 i32.load - local.tee $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $4 + local.tee $0 local.set $2 - local.get $1 - call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - local.set $3 + local.get $0 + call $~lib/typedarray/Int8Array#constructor + local.tee $3 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $2 i32.lt_s if - local.get $2 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $3 - local.get $0 - i32.const 1792 local.get $0 + local.get $1 + i32.const 1888 + local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $2 - call $~lib/typedarray/Int32Array#reverse - call $~lib/rt/pure/__release + local.get $0 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/Uint32Array#__get - i32.const 1792 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 8 - call $~lib/typedarray/Uint32Array#subarray - local.tee $1 - call $~lib/typedarray/Int32Array#reverse - local.tee $0 + local.get $0 + i32.const 11 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 8 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 558 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 7 + i32.const -1 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 559 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 6 + i32.const 3 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 560 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 + i32.const 2 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 561 i32.const 2 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 - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#reverse (; 221 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i64) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i64.load - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - i64.load - i64.store - local.get $2 - local.get $5 - i64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end + i32.const 3 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 562 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - ) - (func $~lib/typedarray/Int64Array#subarray (; 222 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 local.get $0 - i32.load offset=8 i32.const 3 - i32.shr_u - local.tee $2 i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select + i32.const 304 + i32.const 563 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.set $1 - i32.const 12 + local.get $0 + i32.const 1 i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $2 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 564 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 + i32.const 1 + i32.const -100 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 565 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 223 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 - i32.load - local.tee $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - 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 1792 - 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 1792 - 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 1792 - 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 304 - i32.const 524 - i32.const 4 - 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 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 - i32.const 529 + i32.const 567 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne + global.set $~argumentsLength + local.get $0 + i32.const 11 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 568 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne + i32.const -1 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 569 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 570 i32.const 2 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 local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#subarray (; 224 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + i32.const 3 i32.const 4 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 571 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=8 i32.const 3 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne + if i32.const 0 - local.get $1 + i32.const 304 + i32.const 572 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + i32.const 2 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select + i32.const 304 + i32.const 573 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.set $1 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 574 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 225 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 - i32.load - local.tee $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - 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 1792 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $3 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + i32.const 1 + i32.const -10 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 575 + i32.const 2 + call $~lib/builtins/abort + unreachable 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/Uint64Array#__get - i32.const 1792 - 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 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + local.get $0 + i32.const 1 + i32.const -11 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 576 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 8 - call $~lib/typedarray/Uint64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse + local.get $0 + i32.const 4 + i32.const 9 + call $~lib/typedarray/Int8Array#subarray local.tee $0 + i32.const 3 i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 8 - i64.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 580 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 581 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 5 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 7 - i64.ne + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 582 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 6 - i64.ne + i32.const 9 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 583 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 3 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne + i32.const 10 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 584 i32.const 2 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 + local.get $0 + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 585 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 1 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 586 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 2 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 587 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 226 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 212 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f32) + i32.const 1900 + i32.load + local.tee $0 + local.set $2 local.get $0 - call $~lib/rt/pure/__retain + call $~lib/typedarray/Uint8Array#constructor local.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 local.set $0 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 loop $for-loop|0 - local.get $0 local.get $1 - i32.lt_u + local.get $2 + i32.lt_s if - local.get $4 local.get $0 - i32.const 2 - i32.shl - i32.add - local.tee $2 - f32.load - local.set $5 - local.get $2 - local.get $4 local.get $1 - i32.const 2 - i32.shl - i32.add - local.tee $2 - f32.load - f32.store - local.get $2 - local.get $5 - f32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 + i32.const 1888 + local.get $1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $1 i32.const 1 - i32.sub + i32.add local.set $1 br $for-loop|0 end end - local.get $3 - ) - (func $~lib/typedarray/Float32Array#subarray (; 227 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $2 - i32.const 4 - local.get $2 - i32.lt_s - select - local.set $3 - local.get $1 i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.const 0 - local.get $1 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select + i32.const 304 + i32.const 557 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.set $1 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.gt_s - select - local.get $3 - i32.sub - i32.const 2 - i32.shl - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 228 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 - i32.load - local.tee $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - 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 1792 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $3 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/Float32Array#reverse - call $~lib/rt/pure/__release + i32.const 11 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/Float32Array#__get - i32.const 1792 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f32.convert_i32_s - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 558 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 8 - call $~lib/typedarray/Float32Array#subarray - local.tee $1 - call $~lib/typedarray/Float32Array#reverse - local.tee $0 + local.get $0 + i32.const -1 i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 8 - f32.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 559 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 7 - f32.ne + i32.const 3 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 560 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 + i32.const 3 i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 6 - f32.ne + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 561 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne + i32.const 3 + call $~lib/typedarray/Int8Array#indexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 562 i32.const 2 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 - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#reverse (; 229 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 f64) local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.set $4 - i32.const 0 - local.set $0 - local.get $3 - i32.load offset=8 i32.const 3 - i32.shr_u + i32.const 4 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 563 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 1 - i32.sub - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_u - if - local.get $4 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - local.set $5 - local.get $2 - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.tee $2 - f64.load - f64.store - local.get $2 - local.get $5 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|0 - end + i32.const 10 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 564 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 230 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 1804 - i32.load - local.tee $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $4 - local.set $2 - local.get $1 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - 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 1792 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $3 - local.get $0 - i32.const 1792 - local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + local.get $0 + i32.const 1 + i32.const -100 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 565 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $2 - call $~lib/typedarray/Float64Array#reverse - call $~lib/rt/pure/__release + i32.const 1 + global.set $~argumentsLength + local.get $0 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/Float64Array#__get - i32.const 1792 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - f64.convert_i32_s - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 524 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + if + i32.const 0 + i32.const 304 + i32.const 567 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Float64Array#subarray - local.tee $1 - call $~lib/typedarray/Float64Array#reverse - local.tee $0 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 8 - f64.ne + i32.const 1 + global.set $~argumentsLength + local.get $0 + i32.const 11 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne if i32.const 0 i32.const 304 - i32.const 529 + i32.const 568 i32.const 2 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $~argumentsLength local.get $0 + i32.const -1 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 569 + i32.const 2 + call $~lib/builtins/abort + unreachable + end i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.ne + global.set $~argumentsLength + local.get $0 + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 530 + i32.const 570 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.ne + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 531 + i32.const 571 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne + i32.const 3 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 3 + i32.ne if i32.const 0 i32.const 304 - i32.const 532 + i32.const 572 i32.const 2 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 local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#indexOf (; 231 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 + i32.const 3 + i32.const 2 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 + i32.const 304 + i32.const 573 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 232 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $0 - i32.load offset=8 - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 + local.get $0 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne + if i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.get $1 - i32.const 255 - i32.and - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 + i32.const 304 + i32.const 574 + i32.const 2 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 233 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - local.set $2 + local.get $0 + i32.const 1 + i32.const -10 + call $~lib/typedarray/Int8Array#lastIndexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 575 + i32.const 2 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $1 - local.get $2 + i32.const 1 + i32.const -11 call $~lib/typedarray/Int8Array#lastIndexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 576 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + call $~lib/typedarray/Uint8Array#subarray + local.tee $0 + i32.const 3 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 580 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + if + i32.const 0 + i32.const 304 + i32.const 581 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 582 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 583 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 10 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 584 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 11 + i32.const 0 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 585 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 1 + call $~lib/typedarray/Int8Array#indexOf + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 586 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 2 + call $~lib/typedarray/Int8Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 587 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 234 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 213 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12419,7 +11825,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12432,11 +11838,9 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 i32.const 1 i32.add @@ -12711,9 +12115,8 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Uint8ClampedArray#subarray local.tee $0 i32.const 3 i32.const 0 @@ -12829,9 +12232,159 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 235 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#indexOf (; 214 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + i32.const 65535 + i32.and + i32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 216 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Int16Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 217 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) i32.const 1900 @@ -12839,7 +12392,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -12852,9 +12405,11 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $1 i32.const 1 i32.add @@ -12865,7 +12420,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -12877,7 +12432,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -12891,7 +12446,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -12905,7 +12460,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -12919,7 +12474,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -12933,7 +12488,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -12947,7 +12502,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -12961,7 +12516,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -12975,7 +12530,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -12990,7 +12545,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -13003,7 +12558,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13018,7 +12573,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13033,7 +12588,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -13047,7 +12602,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13061,7 +12616,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13075,7 +12630,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13089,7 +12644,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13103,7 +12658,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13117,7 +12672,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13130,11 +12685,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Int16Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13148,7 +12703,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -13160,7 +12715,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13174,7 +12729,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13188,7 +12743,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13202,7 +12757,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13216,7 +12771,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13230,7 +12785,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13246,7 +12801,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 236 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 218 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13256,7 +12811,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -13269,9 +12824,9 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 255 + i32.const 65535 i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $1 i32.const 1 i32.add @@ -13282,7 +12837,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -13294,7 +12849,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13308,7 +12863,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13322,7 +12877,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13336,7 +12891,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13350,7 +12905,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 3 i32.ne if @@ -13364,7 +12919,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13378,7 +12933,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13392,7 +12947,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13407,7 +12962,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -13420,7 +12975,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13435,7 +12990,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -13450,7 +13005,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf|trampoline + call $~lib/typedarray/Int16Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -13464,7 +13019,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13478,7 +13033,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 3 i32.ne if @@ -13492,7 +13047,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13506,7 +13061,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13520,7 +13075,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const 1 i32.ne if @@ -13534,7 +13089,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int8Array#lastIndexOf + call $~lib/typedarray/Int16Array#lastIndexOf i32.const -1 i32.ne if @@ -13547,11 +13102,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Uint16Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13565,7 +13120,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf if i32.const 0 i32.const 304 @@ -13577,7 +13132,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13591,7 +13146,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13605,7 +13160,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13619,7 +13174,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13633,7 +13188,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const 1 i32.ne if @@ -13647,7 +13202,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int8Array#indexOf + call $~lib/typedarray/Int16Array#indexOf i32.const -1 i32.ne if @@ -13663,12 +13218,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 237 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 219 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.tee $3 if (result i32) @@ -13681,7 +13236,7 @@ if i32.const -1 local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end local.get $2 i32.const 0 @@ -13706,17 +13261,15 @@ local.get $3 i32.lt_s if + local.get $1 local.get $0 local.get $2 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and + i32.load i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $2 i32.const 1 i32.add @@ -13729,19 +13282,19 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 220 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.tee $3 i32.eqz if i32.const -1 local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 end local.get $2 local.get $3 @@ -13767,17 +13320,15 @@ i32.const 0 i32.ge_s if + local.get $1 local.get $0 local.get $2 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u - local.get $1 - i32.const 65535 - i32.and + i32.load i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $2 i32.const 1 i32.sub @@ -13790,7 +13341,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 239 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 221 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -13804,16 +13355,16 @@ end local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $2 end local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 240 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 222 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13823,7 +13374,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -13836,11 +13387,7 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Int32Array#__set local.get $1 i32.const 1 i32.add @@ -13851,7 +13398,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 304 @@ -13863,7 +13410,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -13877,7 +13424,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -13891,7 +13438,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -13905,7 +13452,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -13919,7 +13466,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -13933,7 +13480,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -13947,7 +13494,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -13961,7 +13508,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -13976,7 +13523,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -13989,7 +13536,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14004,7 +13551,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14019,7 +13566,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -14033,7 +13580,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14047,7 +13594,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14061,7 +13608,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14075,7 +13622,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14089,7 +13636,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14103,7 +13650,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14115,12 +13662,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Int32Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14134,7 +13682,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 304 @@ -14146,7 +13694,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14160,7 +13708,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14174,7 +13722,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14188,7 +13736,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14202,7 +13750,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14216,7 +13764,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14232,7 +13780,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 241 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 223 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14242,7 +13790,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -14255,9 +13803,7 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $1 i32.const 1 i32.add @@ -14268,7 +13814,7 @@ local.get $0 i32.const 0 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 304 @@ -14280,7 +13826,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14294,7 +13840,7 @@ local.get $0 i32.const -1 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14308,7 +13854,7 @@ local.get $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14322,7 +13868,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14336,7 +13882,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 3 i32.ne if @@ -14350,7 +13896,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14364,7 +13910,7 @@ local.get $0 i32.const 1 i32.const 10 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14378,7 +13924,7 @@ local.get $0 i32.const 1 i32.const -100 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14393,7 +13939,7 @@ global.set $~argumentsLength local.get $0 i32.const 0 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -14406,7 +13952,7 @@ global.set $~argumentsLength local.get $0 i32.const 11 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14421,7 +13967,7 @@ global.set $~argumentsLength local.get $0 i32.const -1 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14436,7 +13982,7 @@ global.set $~argumentsLength local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf|trampoline + call $~lib/typedarray/Int32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -14450,7 +13996,7 @@ local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14464,7 +14010,7 @@ local.get $0 i32.const 3 i32.const 3 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 3 i32.ne if @@ -14478,7 +14024,7 @@ local.get $0 i32.const 3 i32.const 2 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14492,7 +14038,7 @@ local.get $0 i32.const 1 i32.const 100 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14506,7 +14052,7 @@ local.get $0 i32.const 1 i32.const -10 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const 1 i32.ne if @@ -14520,7 +14066,7 @@ local.get $0 i32.const 1 i32.const -11 - call $~lib/typedarray/Int16Array#lastIndexOf + call $~lib/typedarray/Int32Array#lastIndexOf i32.const -1 i32.ne if @@ -14533,11 +14079,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Uint32Array#subarray local.tee $0 i32.const 3 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14551,7 +14097,7 @@ local.get $0 i32.const 4 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf if i32.const 0 i32.const 304 @@ -14563,7 +14109,7 @@ local.get $0 i32.const 5 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14577,7 +14123,7 @@ local.get $0 i32.const 9 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14591,7 +14137,7 @@ local.get $0 i32.const 10 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14605,7 +14151,7 @@ local.get $0 i32.const 11 i32.const 0 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14619,7 +14165,7 @@ local.get $0 i32.const 5 i32.const 1 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const 1 i32.ne if @@ -14633,7 +14179,7 @@ local.get $0 i32.const 5 i32.const 2 - call $~lib/typedarray/Int16Array#indexOf + call $~lib/typedarray/Int32Array#indexOf i32.const -1 i32.ne if @@ -14649,12 +14195,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 242 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 224 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.tee $3 if (result i32) @@ -14667,7 +14213,7 @@ if i32.const -1 local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end local.get $2 i32.const 0 @@ -14695,12 +14241,12 @@ local.get $1 local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load - i32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + i64.load + i64.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 i32.const 1 i32.add @@ -14713,19 +14259,19 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 243 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 225 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.tee $3 i32.eqz if i32.const -1 local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 end local.get $2 local.get $3 @@ -14754,12 +14300,12 @@ local.get $1 local.get $0 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load - i32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 + i64.load + i64.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $2 i32.const 1 i32.sub @@ -14772,7 +14318,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 244 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 226 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -14786,16 +14332,16 @@ end local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $2 end local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 245 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 227 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14805,7 +14351,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -14818,7 +14364,8 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set local.get $1 i32.const 1 i32.add @@ -14827,9 +14374,9 @@ end end local.get $0 + i64.const 0 i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 304 @@ -14839,9 +14386,9 @@ unreachable end local.get $0 - i32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -14853,9 +14400,9 @@ unreachable end local.get $0 - i32.const -1 + i64.const -1 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -14867,9 +14414,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -14881,9 +14428,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -14895,9 +14442,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -14909,9 +14456,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -14923,9 +14470,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -14937,9 +14484,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -14953,8 +14500,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -14966,8 +14513,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14981,8 +14528,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -14996,8 +14543,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -15009,9 +14556,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15023,9 +14570,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15037,9 +14584,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15051,9 +14598,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15065,9 +14612,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15079,9 +14626,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15093,13 +14640,12 @@ unreachable end local.get $0 - i32.const 4 i32.const 9 - call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Int64Array#subarray local.tee $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15111,9 +14657,9 @@ unreachable end local.get $0 - i32.const 4 + i64.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 304 @@ -15123,9 +14669,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15137,9 +14683,9 @@ unreachable end local.get $0 - i32.const 9 + i64.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15151,9 +14697,9 @@ unreachable end local.get $0 - i32.const 10 + i64.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15165,9 +14711,9 @@ unreachable end local.get $0 - i32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15179,9 +14725,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15193,9 +14739,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15211,7 +14757,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 246 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 228 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15221,7 +14767,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15234,7 +14780,8 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set local.get $1 i32.const 1 i32.add @@ -15243,9 +14790,9 @@ end end local.get $0 + i64.const 0 i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 304 @@ -15255,9 +14802,9 @@ unreachable end local.get $0 - i32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15269,9 +14816,9 @@ unreachable end local.get $0 - i32.const -1 + i64.const -1 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15283,9 +14830,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15297,9 +14844,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15311,9 +14858,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 3 i32.ne if @@ -15325,9 +14872,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15339,9 +14886,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 10 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15353,9 +14900,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -100 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15369,8 +14916,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 0 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 0 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -15382,8 +14929,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 11 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 11 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15397,8 +14944,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const -1 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const -1 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15412,8 +14959,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf|trampoline + i64.const 3 + call $~lib/typedarray/Int64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -15425,9 +14972,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 4 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15439,9 +14986,9 @@ unreachable end local.get $0 + i64.const 3 i32.const 3 - i32.const 3 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 3 i32.ne if @@ -15453,9 +15000,9 @@ unreachable end local.get $0 - i32.const 3 + i64.const 3 i32.const 2 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15467,9 +15014,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const 100 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15481,9 +15028,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -10 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const 1 i32.ne if @@ -15495,9 +15042,9 @@ unreachable end local.get $0 - i32.const 1 + i64.const 1 i32.const -11 - call $~lib/typedarray/Int32Array#lastIndexOf + call $~lib/typedarray/Int64Array#lastIndexOf i32.const -1 i32.ne if @@ -15510,11 +15057,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Uint32Array#subarray + call $~lib/typedarray/Uint64Array#subarray local.tee $0 - i32.const 3 + i64.const 3 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15526,9 +15073,9 @@ unreachable end local.get $0 - i32.const 4 + i64.const 4 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf if i32.const 0 i32.const 304 @@ -15538,9 +15085,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15552,9 +15099,9 @@ unreachable end local.get $0 - i32.const 9 + i64.const 9 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15566,9 +15113,9 @@ unreachable end local.get $0 - i32.const 10 + i64.const 10 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15580,9 +15127,9 @@ unreachable end local.get $0 - i32.const 11 + i64.const 11 i32.const 0 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15594,9 +15141,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 1 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const 1 i32.ne if @@ -15608,9 +15155,9 @@ unreachable end local.get $0 - i32.const 5 + i64.const 5 i32.const 2 - call $~lib/typedarray/Int32Array#indexOf + call $~lib/typedarray/Int64Array#indexOf i32.const -1 i32.ne if @@ -15626,12 +15173,12 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 247 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 229 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.tee $3 if (result i32) @@ -15644,7 +15191,7 @@ if i32.const -1 local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end local.get $2 i32.const 0 @@ -15669,15 +15216,15 @@ local.get $3 i32.lt_s if - local.get $1 local.get $0 local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load - i64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + f32.load + local.get $1 + f32.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 i32.const 1 i32.add @@ -15690,19 +15237,19 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 248 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 230 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.tee $3 i32.eqz if i32.const -1 local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 end local.get $2 local.get $3 @@ -15728,15 +15275,15 @@ i32.const 0 i32.ge_s if - local.get $1 local.get $0 local.get $2 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load - i64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 + f32.load + local.get $1 + f32.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $2 i32.const 1 i32.sub @@ -15749,7 +15296,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 249 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 231 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15763,16 +15310,16 @@ end local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u local.set $2 end local.get $0 local.get $1 local.get $2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 250 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 232 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15782,7 +15329,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -15795,8 +15342,8 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $1 i32.const 1 i32.add @@ -15805,9 +15352,9 @@ end end local.get $0 - i64.const 0 + f32.const 0 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf if i32.const 0 i32.const 304 @@ -15817,9 +15364,9 @@ unreachable end local.get $0 - i64.const 11 + f32.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15831,9 +15378,9 @@ unreachable end local.get $0 - i64.const -1 + f32.const -1 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15845,9 +15392,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15859,9 +15406,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15873,9 +15420,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 3 i32.ne if @@ -15887,9 +15434,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15901,9 +15448,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -15915,9 +15462,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -15931,8 +15478,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 0 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -15944,8 +15491,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 11 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15959,8 +15506,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const -1 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -15974,8 +15521,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f32.const 3 + call $~lib/typedarray/Float32Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -15987,9 +15534,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -16001,9 +15548,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 3 i32.ne if @@ -16015,9 +15562,9 @@ unreachable end local.get $0 - i64.const 3 + f32.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -16029,9 +15576,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -16043,9 +15590,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const 1 i32.ne if @@ -16057,9 +15604,9 @@ unreachable end local.get $0 - i64.const 1 + f32.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float32Array#lastIndexOf i32.const -1 i32.ne if @@ -16072,11 +15619,11 @@ end local.get $0 i32.const 9 - call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Float32Array#subarray local.tee $0 - i64.const 3 + f32.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16088,9 +15635,9 @@ unreachable end local.get $0 - i64.const 4 + f32.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf if i32.const 0 i32.const 304 @@ -16100,9 +15647,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -16114,9 +15661,9 @@ unreachable end local.get $0 - i64.const 9 + f32.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16128,9 +15675,9 @@ unreachable end local.get $0 - i64.const 10 + f32.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16142,9 +15689,9 @@ unreachable end local.get $0 - i64.const 11 + f32.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16156,9 +15703,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const 1 i32.ne if @@ -16170,9 +15717,9 @@ unreachable end local.get $0 - i64.const 5 + f32.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float32Array#indexOf i32.const -1 i32.ne if @@ -16188,7 +15735,153 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 251 ;) + (func $~lib/typedarray/Float64Array#indexOf (; 233 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + local.get $2 + local.get $3 + i32.ge_s + else + i32.const 1 + end + if + i32.const -1 + local.set $2 + br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $2 + i32.const 0 + i32.lt_s + if + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.set $2 + end + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + f64.eq + br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 234 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (local $3 i32) + block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + if + i32.const -1 + local.set $2 + br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $2 + local.get $3 + i32.add + local.get $3 + i32.const 1 + i32.sub + local.get $2 + local.get $2 + local.get $3 + i32.ge_s + select + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $2 + local.get $0 + i32.load offset=4 + local.set $0 + loop $while-continue|0 + local.get $2 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + f64.eq + br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.set $2 + br $while-continue|0 + end + end + i32.const -1 + local.set $2 + end + local.get $2 + ) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 235 ;) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $2 + end + local.get $0 + local.get $1 + local.get $2 + call $~lib/typedarray/Float64Array#lastIndexOf + ) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 236 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16198,7 +15891,7 @@ local.tee $0 local.set $2 local.get $0 - call $~lib/typedarray/Uint64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $3 local.set $0 loop $for-loop|0 @@ -16211,8 +15904,8 @@ i32.const 1888 local.get $1 call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $1 i32.const 1 i32.add @@ -16221,9 +15914,9 @@ end end local.get $0 - i64.const 0 + f64.const 0 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf if i32.const 0 i32.const 304 @@ -16233,9 +15926,9 @@ unreachable end local.get $0 - i64.const 11 + f64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16247,9 +15940,9 @@ unreachable end local.get $0 - i64.const -1 + f64.const -1 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16261,9 +15954,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -16275,9 +15968,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -16289,9 +15982,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 3 i32.ne if @@ -16303,9 +15996,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16317,9 +16010,9 @@ unreachable end local.get $0 - i64.const 1 + f64.const 1 i32.const 10 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16331,9 +16024,9 @@ unreachable end local.get $0 - i64.const 1 + f64.const 1 i32.const -100 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -16347,8 +16040,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 0 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f64.const 0 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline if i32.const 0 i32.const 304 @@ -16360,8 +16053,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 11 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f64.const 11 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -16375,8 +16068,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const -1 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f64.const -1 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const -1 i32.ne if @@ -16390,8 +16083,8 @@ i32.const 1 global.set $~argumentsLength local.get $0 - i64.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf|trampoline + f64.const 3 + call $~lib/typedarray/Float64Array#lastIndexOf|trampoline i32.const 3 i32.ne if @@ -16403,9 +16096,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 4 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 3 i32.ne if @@ -16417,9 +16110,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 3 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 3 i32.ne if @@ -16431,9 +16124,9 @@ unreachable end local.get $0 - i64.const 3 + f64.const 3 i32.const 2 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const -1 i32.ne if @@ -16445,9 +16138,9 @@ unreachable end local.get $0 - i64.const 1 + f64.const 1 i32.const 100 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 1 i32.ne if @@ -16459,9 +16152,9 @@ unreachable end local.get $0 - i64.const 1 + f64.const 1 i32.const -10 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const 1 i32.ne if @@ -16473,9 +16166,9 @@ unreachable end local.get $0 - i64.const 1 + f64.const 1 i32.const -11 - call $~lib/typedarray/Int64Array#lastIndexOf + call $~lib/typedarray/Float64Array#lastIndexOf i32.const -1 i32.ne if @@ -16487,12 +16180,13 @@ unreachable end local.get $0 + i32.const 4 i32.const 9 - call $~lib/typedarray/Uint64Array#subarray + call $~lib/typedarray/Float64Array#subarray local.tee $0 - i64.const 3 + f64.const 3 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16504,9 +16198,9 @@ unreachable end local.get $0 - i64.const 4 + f64.const 4 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf if i32.const 0 i32.const 304 @@ -16516,9 +16210,9 @@ unreachable end local.get $0 - i64.const 5 + f64.const 5 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -16530,9 +16224,9 @@ unreachable end local.get $0 - i64.const 9 + f64.const 9 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16544,9 +16238,9 @@ unreachable end local.get $0 - i64.const 10 + f64.const 10 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16558,9 +16252,9 @@ unreachable end local.get $0 - i64.const 11 + f64.const 11 i32.const 0 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16572,9 +16266,9 @@ unreachable end local.get $0 - i64.const 5 + f64.const 5 i32.const 1 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const 1 i32.ne if @@ -16586,9 +16280,9 @@ unreachable end local.get $0 - i64.const 5 + f64.const 5 i32.const 2 - call $~lib/typedarray/Int64Array#indexOf + call $~lib/typedarray/Float64Array#indexOf i32.const -1 i32.ne if @@ -16604,1185 +16298,1314 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 252 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 237 ;) (param $0 i32) (result i32) + i32.const 1 + i32.const 2 + local.get $0 + i32.const 10 + i32.lt_u + select + i32.const 3 + i32.const 4 + i32.const 5 + local.get $0 + i32.const 10000 + i32.lt_u + select + local.get $0 + i32.const 1000 + i32.lt_u + select + local.get $0 + i32.const 100 + i32.lt_u + select + i32.const 6 + i32.const 7 + local.get $0 + i32.const 1000000 + i32.lt_u + select + i32.const 8 + i32.const 9 + i32.const 10 + local.get $0 + i32.const 1000000000 + i32.lt_u + select + local.get $0 + i32.const 100000000 + i32.lt_u + select + local.get $0 + i32.const 10000000 + i32.lt_u + select + local.get $0 + i32.const 100000 + i32.lt_u + select + ) + (func $~lib/util/number/utoa_simple (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 + loop $do-continue|0 + local.get $1 + i32.const 10 + i32.div_u local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end local.get $2 + i32.const 1 + i32.sub + local.tee $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.const 10 + i32.rem_u + i32.const 48 + i32.add + i32.store16 + local.tee $1 + br_if $do-continue|0 + end + ) + (func $~lib/util/number/itoa32 (; 239 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.eqz + if + i32.const 1936 + return + end + local.get $0 + i32.const 0 + i32.lt_s + local.tee $1 + if i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end local.get $0 - i32.load offset=4 + i32.sub local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 + end + local.get $0 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $3 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + local.get $3 + call $~lib/util/number/utoa_simple + local.get $1 + if + local.get $2 + i32.const 45 + i32.store16 end local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/string/String#get:length (; 240 ;) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + i32.const 1 + i32.shr_u ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 253 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 255 + i32.and + i32.eqz + if local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - f32.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 + i32.const 48 + i32.store16 + i32.const 1 + return end local.get $2 - ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 254 ;) (param $0 i32) (param $1 f32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 0 + i32.lt_s + local.tee $1 + if + i32.const 0 + local.get $2 + i32.sub local.set $2 end + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $2 local.get $0 + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple local.get $1 + if + local.get $0 + i32.const 45 + i32.store16 + end local.get $2 - call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 255 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/string/String#substring (; 242 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 + (local $4 i32) + i32.const 0 local.get $0 - call $~lib/typedarray/Float32Array#constructor + call $~lib/string/String#get:length + local.tee $2 + i32.const 0 + local.get $2 + i32.lt_s + select local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - f32.const 0 + local.get $1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 11 + local.get $1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + i32.gt_s + select + local.tee $1 + local.get $2 + local.get $1 + local.get $2 + i32.lt_s + select + local.tee $1 + local.get $3 + local.get $1 + i32.gt_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 + select + i32.const 1 + i32.shl + local.tee $1 + i32.sub + local.tee $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - f32.const -1 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + local.get $4 + local.get $2 + i32.const 1 + i32.shl + i32.eq + local.get $1 + select if - i32.const 0 - i32.const 304 - i32.const 559 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + call $~lib/rt/pure/__retain + return end + local.get $3 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f32.const 3 + local.get $1 + i32.add + local.get $3 + call $~lib/memory/memory.copy + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/string/joinIntegerArray (; 243 ;) (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 1 + i32.sub + local.tee $3 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const 3 - i32.ne + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 560 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - f32.const 3 - i32.const 2 - call $~lib/typedarray/Float32Array#indexOf - i32.const 3 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 561 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load8_s + call $~lib/util/number/itoa32 + return + end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $5 + i32.add + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f32.const 3 - i32.const 3 - call $~lib/typedarray/Float32Array#indexOf - i32.const 3 - i32.ne + local.get $3 + i32.add + i32.load8_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 562 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Int8Array#join (; 244 ;) (param $0 i32) (result i32) local.get $0 - f32.const 3 + i32.load offset=4 + local.get $0 + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/string/compareImpl (; 245 ;) (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 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + i32.ge_u + select if - i32.const 0 - i32.const 304 - i32.const 563 - i32.const 2 - call $~lib/builtins/abort - unreachable + 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 - local.get $0 - f32.const 1 - i32.const 10 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 564 - i32.const 2 - call $~lib/builtins/abort - unreachable + 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 (; 246 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - f32.const 1 - i32.const -100 - call $~lib/typedarray/Float32Array#indexOf - i32.const 1 - i32.ne + local.get $1 + i32.eq if - i32.const 0 - i32.const 304 - i32.const 565 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1 + return end + local.get $1 + i32.eqz i32.const 1 - global.set $~argumentsLength local.get $0 - f32.const 0 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline + select if i32.const 0 - i32.const 304 - i32.const 567 - i32.const 2 - call $~lib/builtins/abort - unreachable + return end - i32.const 1 - global.set $~argumentsLength local.get $0 - f32.const 11 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline - i32.const -1 + call $~lib/string/String#get:length + local.tee $2 + local.get $1 + call $~lib/string/String#get:length i32.ne if i32.const 0 - i32.const 304 - i32.const 568 - i32.const 2 - call $~lib/builtins/abort - unreachable + return end - i32.const 1 - global.set $~argumentsLength local.get $0 - f32.const -1 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 569 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf|trampoline - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.get $1 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/util/number/utoa32 (; 247 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 - f32.const 3 - i32.const 4 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const 3 - i32.ne + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 571 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1936 + return end local.get $0 - f32.const 3 - i32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 572 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + call $~lib/util/number/decimalCount32 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $2 local.get $0 - f32.const 3 - i32.const 2 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 573 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + local.get $1 + call $~lib/util/number/utoa_simple + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/util/number/itoa_stream (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 1 - i32.const 100 - call $~lib/typedarray/Float32Array#lastIndexOf + local.get $1 i32.const 1 - i32.ne + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 255 + i32.and + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 574 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end + local.get $2 + i32.const 255 + i32.and + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $1 local.get $0 - f32.const 1 - i32.const -10 - call $~lib/typedarray/Float32Array#lastIndexOf + local.get $2 + local.get $1 + call $~lib/util/number/utoa_simple + local.get $1 + ) + (func $~lib/util/string/joinIntegerArray (; 249 ;) (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 1 - i32.ne + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 575 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - f32.const 1 - i32.const -11 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const -1 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 576 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load8_u + call $~lib/util/number/utoa32 + return end - local.get $0 - i32.const 9 - call $~lib/typedarray/Float32Array#subarray - local.tee $0 - f32.const 3 + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 10 + i32.add + i32.mul + i32.const 10 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 580 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $5 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f32.const 4 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf + local.get $3 + i32.add + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 581 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Uint8Array#join (; 250 ;) (param $0 i32) (result i32) local.get $0 - f32.const 5 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 582 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $0 - f32.const 9 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + i32.load offset=8 + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 65535 + i32.and + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 583 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end - local.get $0 - f32.const 10 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + i32.lt_s + local.tee $1 if i32.const 0 - i32.const 304 - i32.const 584 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.sub + local.set $2 end + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.tee $3 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $2 local.get $0 - f32.const 11 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple + local.get $1 if - i32.const 0 - i32.const 304 - i32.const 585 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 end - local.get $0 - f32.const 5 - i32.const 1 - call $~lib/typedarray/Float32Array#indexOf + local.get $2 + ) + (func $~lib/util/string/joinIntegerArray (; 252 ;) (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 1 - i32.ne + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 586 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - f32.const 5 - i32.const 2 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 587 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load16_s + call $~lib/util/number/itoa32 + return end local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#indexOf (; 256 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - i32.const 0 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 i32.lt_s if local.get $2 - local.get $3 + local.get $1 + local.get $0 + local.get $5 + i32.const 1 + i32.shl i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 if - local.get $0 local.get $2 - i32.const 3 + local.get $1 + i32.const 1 i32.shl i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 + i32.const 1968 + local.get $4 i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 i32.add - local.set $2 - br $while-continue|0 + local.set $1 end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 end - i32.const -1 - local.set $2 end + local.get $6 local.get $2 - ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 257 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $1 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_s + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s + if + local.get $2 local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end + call $~lib/string/String#substring local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 + call $~lib/rt/pure/__release + return end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 258 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end + (func $~lib/typedarray/Int16Array#join (; 253 ;) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/itoa_stream (; 254 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.const 65535 + i32.and + i32.eqz + if local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $2 + i32.const 48 + i32.store16 + i32.const 1 + return end + local.get $2 + i32.const 65535 + i32.and + local.tee $2 + call $~lib/util/number/decimalCount32 + local.set $1 local.get $0 - local.get $1 local.get $2 - call $~lib/typedarray/Float64Array#lastIndexOf + local.get $1 + call $~lib/util/number/utoa_simple + local.get $1 ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 259 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinIntegerArray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Float64Array#constructor + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 1 + i32.sub local.tee $3 - local.set $0 + i32.const 0 + i32.lt_s + if + i32.const 1920 + return + end + local.get $3 + i32.eqz + if + local.get $0 + i32.load16_u + call $~lib/util/number/utoa32 + return + end + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 10 + i32.add + i32.mul + i32.const 10 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 loop $for-loop|0 - local.get $1 - local.get $2 + local.get $5 + local.get $3 i32.lt_s if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + local.get $2 local.get $1 + local.get $0 + local.get $5 i32.const 1 + i32.shl + i32.add + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $1 i32.add local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 br $for-loop|0 end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f64.const 0 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf + local.get $3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Uint16Array#join (; 256 ;) (param $0 i32) (result i32) local.get $0 - f64.const 11 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/itoa_stream (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end local.get $0 - f64.const -1 + local.get $2 i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + i32.lt_s + local.tee $1 if i32.const 0 - i32.const 304 - i32.const 559 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + i32.sub + local.set $2 end - local.get $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $2 + call $~lib/util/number/utoa_simple + local.get $1 if - i32.const 0 - i32.const 304 - i32.const 560 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 45 + i32.store16 end - local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + local.get $2 + ) + (func $~lib/util/string/joinIntegerArray (; 258 ;) (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 1 + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 561 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 562 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load + call $~lib/util/number/itoa32 + return end - local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 563 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 11 + i32.add + i32.mul + i32.const 11 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f64.const 1 - i32.const 10 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 564 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Int32Array#join (; 259 ;) (param $0 i32) (result i32) local.get $0 - f64.const 1 - i32.const -100 - call $~lib/typedarray/Float64Array#indexOf + i32.load offset=4 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/itoa_stream (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 i32.const 1 - i32.ne + i32.shl + i32.add + local.set $0 + local.get $2 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 565 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end - i32.const 1 - global.set $~argumentsLength local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - if - i32.const 0 - i32.const 304 - i32.const 567 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount32 + local.tee $0 + call $~lib/util/number/utoa_simple local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 568 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + ) + (func $~lib/util/string/joinIntegerArray (; 261 ;) (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 1 - global.set $~argumentsLength - local.get $0 - f64.const -1 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne + i32.sub + local.tee $3 + i32.const 0 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 569 - i32.const 2 - call $~lib/builtins/abort - unreachable + i32.const 1920 + return end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne + local.get $3 + i32.eqz if - i32.const 0 - i32.const 304 - i32.const 571 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.load + call $~lib/util/number/utoa32 + return end - local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 572 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $3 + i32.const 1968 + call $~lib/string/String#get:length + local.tee $4 + i32.const 10 + i32.add + i32.mul + i32.const 10 + i32.add + local.tee $6 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + call $~lib/rt/pure/__retain + local.set $2 + i32.const 0 + local.set $1 + loop $for-loop|0 + local.get $5 + local.get $3 + i32.lt_s + if + local.get $2 + local.get $1 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.set $1 + local.get $4 + if + local.get $2 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.const 1968 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + local.set $1 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|0 + end end + local.get $6 + local.get $2 + local.get $1 local.get $0 - f64.const 3 + local.get $3 i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne + i32.shl + i32.add + i32.load + call $~lib/util/number/itoa_stream + local.get $1 + i32.add + local.tee $0 + i32.gt_s if - i32.const 0 - i32.const 304 - i32.const 573 - i32.const 2 - call $~lib/builtins/abort - unreachable + local.get $2 + local.get $0 + call $~lib/string/String#substring + local.get $2 + call $~lib/rt/pure/__release + return end + local.get $2 + ) + (func $~lib/typedarray/Uint32Array#join (; 262 ;) (param $0 i32) (result i32) local.get $0 - f64.const 1 - i32.const 100 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 574 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.load offset=4 local.get $0 - f64.const 1 - i32.const -10 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 575 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.load offset=8 + i32.const 2 + i32.shr_u + call $~lib/util/string/joinIntegerArray + ) + (func $~lib/util/number/decimalCount64 (; 263 ;) (param $0 i64) (result i32) + i32.const 10 + i32.const 11 + i32.const 12 local.get $0 - f64.const 1 - i32.const -11 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 576 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 100000000000 + i64.lt_u + select local.get $0 - i32.const 4 - i32.const 9 - call $~lib/typedarray/Float64Array#subarray - local.tee $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 580 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 10000000000 + i64.lt_u + select + i32.const 13 + i32.const 14 + i32.const 15 local.get $0 - f64.const 4 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 581 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 100000000000000 + i64.lt_u + select local.get $0 - f64.const 5 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 582 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 10000000000000 + i64.lt_u + select local.get $0 - f64.const 9 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 583 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i64.const 1000000000000 + i64.lt_u + select + i32.const 16 + i32.const 17 local.get $0 - f64.const 10 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 584 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 11 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 585 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 5 - i32.const 1 - call $~lib/typedarray/Float64Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 586 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 5 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 587 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/decimalCount32 (; 260 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u + i64.const 10000000000000000 + i64.lt_u select - i32.const 8 - i32.const 9 - i32.const 10 + i32.const 18 + i32.const 19 + i32.const 20 local.get $0 - i32.const 1000000000 - i32.lt_u + i64.const -8446744073709551616 + i64.lt_u select local.get $0 - i32.const 100000000 - i32.lt_u + i64.const 1000000000000000000 + i64.lt_u select local.get $0 - i32.const 10000000 - i32.lt_u + i64.const 100000000000000000 + i64.lt_u select local.get $0 - i32.const 100000 - i32.lt_u + i64.const 1000000000000000 + i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 261 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/util/number/utoa_simple (; 264 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (local $3 i64) loop $do-continue|0 local.get $1 - i32.const 10 - i32.div_u + i64.const 10 + i64.div_u local.get $0 local.get $2 i32.const 1 @@ -17792,67 +17615,21 @@ i32.shl i32.add local.get $1 - i32.const 10 - i32.rem_u + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.tee $1 + i64.const 0 + i64.ne br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 262 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 1936 - return - end - local.get $0 - i32.const 0 - i32.lt_s - 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 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#get:length (; 263 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/number/itoa_stream (; 264 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.const 1 @@ -17860,9 +17637,7 @@ i32.add local.set $0 local.get $2 - i32.const 255 - i32.and - i32.eqz + i64.eqz if local.get $0 i32.const 48 @@ -17871,149 +17646,140 @@ return end local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 0 - i32.lt_s + i64.const 0 + i64.lt_s local.tee $1 if - i32.const 0 + i64.const 0 local.get $2 - i32.sub + i64.sub local.set $2 end local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.tee $3 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $2 - local.get $0 - local.get $3 - local.get $2 - call $~lib/util/number/utoa_simple + i64.const 4294967295 + i64.le_u + if + local.get $2 + i32.wrap_i64 + local.tee $4 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.set $3 + local.get $0 + local.get $4 + local.get $3 + call $~lib/util/number/utoa_simple + else + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64 + local.get $1 + i32.add + local.tee $3 + call $~lib/util/number/utoa_simple + end local.get $1 if local.get $0 i32.const 45 i32.store16 end - local.get $2 + local.get $3 ) - (func $~lib/string/String#substring (; 265 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 266 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) + (local $3 i64) (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $1 + i32.const 1 + i32.sub + local.tee $4 i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 i32.lt_s - select - local.tee $1 - local.get $3 - local.get $1 - i32.gt_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 - select - i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz if i32.const 1920 return end - i32.const 0 local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $3 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/string/joinIntegerArray (; 266 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 i32.eqz if local.get $0 - i32.load8_s - call $~lib/util/number/itoa32 + i64.load + local.tee $3 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $3 + i64.const 0 + i64.lt_s + local.tee $0 + if + i64.const 0 + local.get $3 + i64.sub + local.set $3 + end + local.get $3 + i64.const 4294967295 + i64.le_u + if + local.get $3 + i32.wrap_i64 + local.tee $2 + call $~lib/util/number/decimalCount32 + local.get $0 + i32.add + local.tee $4 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $2 + local.get $4 + call $~lib/util/number/utoa_simple + else + local.get $3 + call $~lib/util/number/decimalCount64 + local.get $0 + i32.add + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $3 + local.get $2 + call $~lib/util/number/utoa_simple + end + local.get $0 + if + local.get $1 + i32.const 45 + i32.store16 + end + local.get $1 + call $~lib/rt/pure/__retain + end return end - local.get $3 + local.get $4 i32.const 1968 call $~lib/string/String#get:length - local.tee $4 - i32.const 11 + local.tee $5 + i32.const 21 i32.add i32.mul - i32.const 11 + i32.const 21 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -18023,21 +17789,23 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 - local.get $3 + local.get $6 + local.get $4 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 + i32.const 3 + i32.shl i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -18045,30 +17813,32 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 - local.get $3 + local.get $4 + i32.const 3 + i32.shl i32.add - i32.load8_s - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -18083,244 +17853,62 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#join (; 267 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 267 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - call $~lib/util/string/joinIntegerArray + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i64) (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 + i32.const 1 + i32.shl + i32.add + local.set $0 local.get $2 - i32.const 4 - i32.ge_u - select + i64.eqz 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 + local.get $0 + i32.const 48 + i32.store16 + i32.const 1 + return end - loop $while-continue|1 + local.get $2 + i64.const 4294967295 + i64.le_u + if local.get $2 + i32.wrap_i64 local.tee $3 - i32.const 1 - i32.sub - local.set $2 + call $~lib/util/number/decimalCount32 + local.set $1 + local.get $0 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 + local.get $1 + call $~lib/util/number/utoa_simple + else + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64 + local.tee $1 + call $~lib/util/number/utoa_simple end - i32.const 0 + local.get $1 ) - (func $~lib/string/String.__eq (; 269 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 270 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/utoa32 (; 271 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 1936 - return - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 255 - i32.and - i32.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 - i32.const 255 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 273 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -18335,20 +17923,57 @@ i32.eqz if local.get $0 - i32.load8_u - call $~lib/util/number/utoa32 + i64.load + local.tee $4 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64 + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $4 - i32.const 10 + local.tee $5 + i32.const 20 i32.add i32.mul - i32.const 10 + i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 @@ -18358,21 +17983,23 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $5 + local.get $6 + i32.const 3 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.set $1 - local.get $4 + local.get $5 if local.get $2 local.get $1 @@ -18380,30 +18007,32 @@ i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $4 + local.get $5 i32.add local.set $1 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 + local.get $7 local.get $2 local.get $1 local.get $0 local.get $3 + i32.const 3 + i32.shl i32.add - i32.load8_u - call $~lib/util/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $1 i32.add local.tee $0 @@ -18418,1233 +18047,1119 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#join (; 274 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 270 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - call $~lib/util/string/joinIntegerArray + i32.const 3 + i32.shr_u + call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 275 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 - local.get $0 + (func $~lib/util/number/genDigits (; 271 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i64) + local.get $3 + local.get $1 + i64.sub + local.set $9 + local.get $3 + i64.const 1 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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 276 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 277 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 65535 - i32.and - i32.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 0 - i32.lt_s - local.tee $1 - if - i32.const 0 - local.get $2 - i32.sub - local.set $2 - end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.tee $3 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $2 - local.get $0 - local.get $3 - local.get $2 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - local.get $2 - ) - (func $~lib/util/string/joinIntegerArray (; 278 ;) (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 1 + local.get $4 i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load16_s - call $~lib/util/number/itoa32 - return - end + local.tee $10 + i64.extend_i32_s + i64.shl + local.tee $11 + i64.const 1 + i64.sub + local.tee $13 + i64.and + local.set $12 local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s + local.get $10 + i64.extend_i32_s + i64.shr_u + i32.wrap_i64 + local.tee $7 + call $~lib/util/number/decimalCount32 + local.set $4 + loop $while-continue|0 + local.get $4 + i32.const 0 + i32.gt_s if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return + block $break|1 + block $case10|1 + block $case9|1 + block $case8|1 + block $case7|1 + block $case6|1 + block $case5|1 + block $case4|1 + block $case3|1 + block $case2|1 + block $case1|1 + local.get $4 + i32.const 10 + i32.ne + if + local.get $4 + i32.const 1 + i32.sub + br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 + end + local.get $7 + i32.const 1000000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 100000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 10000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 1000000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100000 + i32.div_u + local.set $8 + local.get $7 + i32.const 100000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10000 + i32.div_u + local.set $8 + local.get $7 + i32.const 10000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 1000 + i32.div_u + local.set $8 + local.get $7 + i32.const 1000 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 100 + i32.div_u + local.set $8 + local.get $7 + i32.const 100 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + i32.const 10 + i32.div_u + local.set $8 + local.get $7 + i32.const 10 + i32.rem_u + local.set $7 + br $break|1 + end + local.get $7 + local.set $8 + i32.const 0 + local.set $7 + br $break|1 + end + i32.const 0 + local.set $8 + end + local.get $6 + local.get $8 + i32.or + if + local.get $6 + local.tee $2 + i32.const 1 + i32.add + local.set $6 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $8 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $12 + local.get $7 + i64.extend_i32_u + local.get $10 + i64.extend_i32_s + i64.shl + i64.add + local.tee $1 + local.get $5 + i64.le_u + if + local.get $4 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $4 + i32.const 2 + i32.shl + i32.const 3104 + i32.add + i64.load32_u + local.get $10 + i64.extend_i32_s + i64.shl + local.set $3 + local.get $0 + local.get $6 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_u + local.set $4 + loop $while-continue|3 + i32.const 1 + local.get $9 + local.get $1 + i64.sub + local.get $1 + local.get $3 + i64.add + local.get $9 + i64.sub + i64.gt_u + local.get $1 + local.get $3 + i64.add + local.get $9 + i64.lt_u + select + i32.const 0 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 + local.get $1 + local.get $9 + i64.lt_u + select + select + if + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $1 + local.get $3 + i64.add + local.set $1 + br $while-continue|3 + end + end + local.get $2 + local.get $4 + i32.store16 + local.get $6 + return + end + br $while-continue|0 + end end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#join (; 279 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 280 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int16Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if + loop $while-continue|4 (result i32) + local.get $5 + i64.const 10 + i64.mul + local.set $5 + local.get $12 + i64.const 10 + i64.mul + local.tee $3 + local.get $10 + i64.extend_i32_s + i64.shr_u + local.tee $1 + local.get $6 + i64.extend_i32_s + i64.or + i64.const 0 + i64.ne + if + local.get $6 + local.tee $2 + i32.const 1 + i32.add + local.set $6 + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + local.get $1 + i32.wrap_i64 + i32.const 65535 + i32.and + i32.const 48 + i32.add + i32.store16 + end + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $3 + local.get $13 + i64.and + local.tee $12 + local.get $5 + i64.ge_u + br_if $while-continue|4 + local.get $4 + global.get $~lib/util/number/_K + i32.add + global.set $~lib/util/number/_K + local.get $12 + local.set $1 + local.get $9 i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $4 + i32.sub + i32.const 2 + i32.shl + i32.const 3104 + i32.add + i64.load32_u + i64.mul + local.set $3 + local.get $0 + local.get $6 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + local.tee $2 + i32.load16_u + local.set $4 + loop $while-continue|6 + i32.const 1 + local.get $3 + local.get $1 + i64.sub + local.get $1 + local.get $11 + i64.add + local.get $3 + i64.sub + i64.gt_u + local.get $1 + local.get $11 + i64.add + local.get $3 + i64.lt_u + select + i32.const 0 + local.get $5 + local.get $1 + i64.sub + local.get $11 + i64.ge_u + i32.const 0 + local.get $1 + local.get $3 + i64.lt_u + select + select + if + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $1 + local.get $11 + i64.add + local.set $1 + br $while-continue|6 + end + end + local.get $2 + local.get $4 + i32.store16 + local.get $6 end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release ) - (func $~lib/util/number/itoa_stream (; 281 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 + (func $~lib/util/number/prettify (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) local.get $2 - i32.const 65535 - i32.and i32.eqz if local.get $0 - i32.const 48 - i32.store16 + local.get $1 i32.const 1 + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $1 + i32.const 2 + i32.add return end - local.get $2 - i32.const 65535 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 282 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load16_u - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 + local.get $2 i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 + local.tee $3 + i32.le_s + if (result i32) local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream + i32.const 21 + i32.le_s + else + i32.const 0 + end + if (result i32) + loop $for-loop|0 local.get $1 - i32.add - local.set $1 - local.get $4 + local.get $3 + i32.lt_s if - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl i32.add - i32.const 1968 - local.get $4 + i32.const 48 + i32.store16 + local.get $1 i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 i32.add local.set $1 + br $for-loop|0 end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint16Array#join (; 283 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 284 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint16Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.eqz - if local.get $0 - i32.const 48 - i32.store16 + local.get $3 i32.const 1 - return - end - local.get $0 - local.get $2 - i32.const 0 - i32.lt_s - local.tee $1 - if + i32.shl + i32.add + i32.const 3145774 + i32.store + local.get $3 + i32.const 2 + i32.add + else + local.get $3 + i32.const 21 + i32.le_s i32.const 0 - local.get $2 - i32.sub - local.set $2 - end - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $2 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - local.get $2 - ) - (func $~lib/util/string/joinIntegerArray (; 286 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 + i32.const 0 + i32.gt_s + select + if (result i32) local.get $0 - local.get $5 - i32.const 2 + local.get $3 + i32.const 1 i32.shl i32.add - i32.load - call $~lib/util/number/itoa_stream + local.tee $0 + i32.const 2 + i32.add + local.get $0 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 local.get $1 + i32.const 1 i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 + else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 + i32.const -6 + local.get $3 + i32.lt_s + select + if (result i32) + local.get $0 + i32.const 2 + local.get $3 + i32.sub + local.tee $3 i32.const 1 i32.shl i32.add - i32.const 1968 - local.get $4 + local.get $0 + local.get $1 i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return + local.get $0 + i32.const 3014704 + i32.store + i32.const 2 + local.set $2 + loop $for-loop|1 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.const 48 + i32.store16 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + local.get $3 + i32.add + else + local.get $1 + i32.const 1 + i32.eq + if (result i32) + local.get $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $1 + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $2 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple + local.get $1 + i32.const 45 + i32.const 43 + local.get $2 + select + i32.store16 + local.get $0 + i32.const 2 + i32.add + else + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $1 + i32.const 1 + i32.shl + local.tee $2 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + local.get $2 + i32.add + local.tee $0 + i32.const 101 + i32.store16 offset=2 + local.get $0 + i32.const 4 + i32.add + local.tee $2 + local.get $3 + i32.const 1 + i32.sub + local.tee $0 + i32.const 0 + i32.lt_s + local.tee $3 + if + i32.const 0 + local.get $0 + i32.sub + local.set $0 + end + local.get $0 + local.get $0 + call $~lib/util/number/decimalCount32 + i32.const 1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple + local.get $2 + i32.const 45 + i32.const 43 + local.get $3 + select + i32.store16 + local.get $0 + local.get $1 + i32.add + i32.const 2 + i32.add + end + end + end end - local.get $2 - ) - (func $~lib/typedarray/Int32Array#join (; 287 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 288 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/number/dtoa_core (; 273 ;) (param $0 i32) (param $1 f64) (result i32) + (local $2 i64) (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int32Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 289 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 + (local $4 i64) + (local $5 i32) + (local $6 i32) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i64) + (local $12 i64) + (local $13 i64) + (local $14 i64) + (local $15 i64) + (local $16 i64) + (local $17 i64) + (local $18 i64) local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.eqz - if + f64.const 0 + f64.lt + local.tee $10 + if (result f64) local.get $0 - i32.const 48 + i32.const 45 i32.store16 - i32.const 1 - return + local.get $1 + f64.neg + else + local.get $1 end - local.get $0 - local.get $2 + i64.reinterpret_f64 + local.tee $2 + i64.const 9218868437227405312 + i64.and + i64.const 52 + i64.shr_u + i32.wrap_i64 + local.set $5 local.get $2 - call $~lib/util/number/decimalCount32 - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (; 290 ;) (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 1 - i32.sub - local.tee $3 + i64.const 4503599627370495 + i64.and + local.get $5 i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end + i32.ne + local.tee $6 + i64.extend_i32_u + i64.const 52 + i64.shl + i64.add + local.tee $2 + i64.const 1 + i64.shl + i64.const 1 + i64.add + local.tee $7 + i64.clz + i32.wrap_i64 + local.set $3 + local.get $7 local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/utoa32 - return - end + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_plus + local.get $5 + i32.const 1 + local.get $6 + select + i32.const 1075 + i32.sub + local.tee $5 + i32.const 1 + i32.sub local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 + i32.sub + local.set $3 + local.get $2 + local.get $2 + i64.const 4503599627370496 + i64.eq + i32.const 1 i32.add local.tee $6 + i64.extend_i32_s + i64.shl + i64.const 1 + i64.sub + local.get $5 + local.get $6 + i32.sub + local.get $3 + i32.sub + i64.extend_i32_s + i64.shl + global.set $~lib/util/number/_frc_minus + local.get $3 + global.set $~lib/util/number/_exp + i32.const 348 + i32.const -61 + global.get $~lib/util/number/_exp + i32.sub + f64.convert_i32_s + f64.const 0.30102999566398114 + f64.mul + f64.const 347 + f64.add + local.tee $1 + i32.trunc_f64_s + local.tee $3 + local.get $3 + f64.convert_i32_s + local.get $1 + f64.ne + i32.add + i32.const 3 + i32.shr_s i32.const 1 + i32.add + local.tee $3 + i32.const 3 i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end + local.tee $6 + i32.sub + global.set $~lib/util/number/_K local.get $6 - local.get $2 - local.get $1 - local.get $0 + i32.const 2192 + i32.add + i64.load + global.set $~lib/util/number/_frc_pow local.get $3 - i32.const 2 + i32.const 1 i32.shl + i32.const 2912 i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end + i32.load16_s + global.set $~lib/util/number/_exp_pow local.get $2 - ) - (func $~lib/typedarray/Uint32Array#join (; 291 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 292 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint32Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/decimalCount64 (; 293 ;) (param $0 i64) (result i32) - i32.const 10 - i32.const 11 - i32.const 12 - local.get $0 - i64.const 100000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 - local.get $0 - i64.const 100000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - i32.const 16 - i32.const 17 - local.get $0 - i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 - local.get $0 - i64.const -8446744073709551616 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000000 - i64.lt_u - select - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 294 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - loop $do-continue|0 - local.get $1 - i64.const 10 - i64.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - i32.const 48 - i32.add - i32.store16 - local.tee $1 - i64.const 0 - i64.ne - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa_stream (; 295 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - (local $4 i32) + i64.clz + i32.wrap_i64 + local.tee $3 + i64.extend_i32_s + i64.shl + local.tee $7 + i64.const 4294967295 + i64.and + local.tee $11 + global.get $~lib/util/number/_frc_pow + local.tee $2 + i64.const 4294967295 + i64.and + local.tee $13 + i64.mul + local.set $14 + global.get $~lib/util/number/_frc_plus + local.tee $8 + i64.const 4294967295 + i64.and + local.tee $4 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $9 + i64.mul + local.set $12 + global.get $~lib/util/number/_frc_minus + local.tee $15 + i64.const 4294967295 + i64.and + local.tee $16 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $17 + i64.mul + local.set $18 + local.get $4 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $4 + i64.mul + local.get $9 + local.get $8 + i64.const 32 + i64.shr_u + local.tee $8 + i64.mul + local.get $12 + i64.const 32 + i64.shr_u + i64.add + local.tee $9 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $4 + local.get $8 + i64.mul + local.get $9 + i64.const 32 + i64.shr_u + i64.add + i64.add + i64.const 1 + i64.sub + local.tee $8 + local.get $16 + local.get $2 + i64.const 32 + i64.shr_u + local.tee $4 + i64.mul + local.get $17 + local.get $15 + i64.const 32 + i64.shr_u + local.tee $9 + i64.mul + local.get $18 + i64.const 32 + i64.shr_u + i64.add + local.tee $12 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $4 + local.get $9 + i64.mul + local.get $12 + i64.const 32 + i64.shr_u + i64.add + i64.add + i64.const 1 + i64.add + i64.sub + local.set $4 local.get $0 - local.get $1 + local.get $10 i32.const 1 i32.shl i32.add - local.set $0 + local.get $0 + local.get $11 local.get $2 - i64.eqz + i64.const 32 + i64.shr_u + local.tee $2 + i64.mul + local.get $13 + local.get $7 + i64.const 32 + i64.shr_u + local.tee $7 + i64.mul + local.get $14 + i64.const 32 + i64.shr_u + i64.add + local.tee $11 + i64.const 4294967295 + i64.and + i64.add + i64.const 2147483647 + i64.add + i64.const 32 + i64.shr_u + local.get $2 + local.get $7 + i64.mul + local.get $11 + i64.const 32 + i64.shr_u + i64.add + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $0 + local.get $5 + local.get $3 + i32.sub + i32.add + i32.const -64 + i32.sub + local.get $8 + local.get $0 + global.get $~lib/util/number/_exp + i32.add + i32.const -64 + i32.sub + local.get $4 + local.get $10 + call $~lib/util/number/genDigits + local.get $10 + i32.sub + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.get $10 + i32.add + ) + (func $~lib/util/number/dtoa (; 274 ;) (param $0 f64) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + f64.const 0 + f64.eq if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 + i32.const 2048 return end - local.get $2 - i64.const 0 - i64.lt_s - local.tee $1 + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne if - i64.const 0 - local.get $2 - i64.sub - local.set $2 - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $4 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $3 local.get $0 - local.get $4 - local.get $3 - call $~lib/util/number/utoa_simple - else local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64 + f64.ne + if + i32.const 2080 + return + end + i32.const 2112 + i32.const 2160 + local.get $0 + f64.const 0 + f64.lt + select + call $~lib/rt/pure/__retain + return + end + i32.const 56 + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $1 + local.get $0 + call $~lib/util/number/dtoa_core + local.tee $2 + i32.const 28 + i32.eq + if local.get $1 - i32.add - local.tee $3 - call $~lib/util/number/utoa_simple + call $~lib/rt/pure/__retain + return end local.get $1 + local.get $2 + call $~lib/string/String#substring + call $~lib/rt/tlsf/maybeInitialize + local.get $1 + call $~lib/rt/tlsf/checkUsedBlock + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/util/number/dtoa_stream (; 275 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $0 + local.get $2 + f64.const 0 + f64.eq if local.get $0 - i32.const 45 + i32.const 48 i32.store16 + local.get $0 + i32.const 46 + i32.store16 offset=2 + local.get $0 + i32.const 48 + i32.store16 offset=4 + i32.const 3 + return end - local.get $3 + local.get $2 + local.get $2 + f64.sub + f64.const 0 + f64.ne + if + local.get $2 + local.get $2 + f64.ne + if + local.get $0 + i32.const 78 + i32.store16 + local.get $0 + i32.const 97 + i32.store16 offset=2 + local.get $0 + i32.const 78 + i32.store16 offset=4 + i32.const 3 + return + else + local.get $2 + f64.const 0 + f64.lt + local.tee $3 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 2112 + i32.const 2160 + local.get $3 + select + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $1 + return + end + unreachable + end + local.get $0 + local.get $2 + call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinIntegerArray (; 296 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 276 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $1 i32.const 1 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.lt_s if i32.const 1920 return end - local.get $4 + local.get $3 i32.eqz if local.get $0 - i64.load - local.tee $3 - i64.eqz - if (result i32) - i32.const 1936 - else - local.get $3 - i64.const 0 - i64.lt_s - local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 - i64.const 4294967295 - i64.le_u - if - local.get $3 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $0 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple - else - local.get $3 - call $~lib/util/number/decimalCount64 - local.get $0 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 - local.get $2 - call $~lib/util/number/utoa_simple - end - local.get $0 - if - local.get $1 - i32.const 45 - i32.store16 - end - local.get $1 - call $~lib/rt/pure/__retain - end + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa return end - local.get $4 + local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $5 - i32.const 21 + local.tee $4 + i32.const 28 i32.add i32.mul - i32.const 21 + i32.const 28 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -19654,23 +19169,24 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 - i32.const 3 + local.get $5 + i32.const 2 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -19678,32 +19194,33 @@ i32.shl i32.add i32.const 1968 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 - local.get $4 - i32.const 3 + local.get $3 + i32.const 2 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + f32.load + f64.promote_f32 + call $~lib/util/number/dtoa_stream local.get $1 i32.add local.tee $0 @@ -19718,125 +19235,22 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#join (; 297 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#join (; 277 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 298 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/util/string/joinFloatArray (; 278 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int64Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 299 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i64.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $3 - local.get $1 - call $~lib/util/number/utoa_simple - else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64 - local.tee $1 - call $~lib/util/number/utoa_simple - end - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 300 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 + (local $4 i32) + (local $5 i32) + (local $6 i32) + local.get $1 i32.const 1 i32.sub local.tee $3 @@ -19850,57 +19264,20 @@ i32.eqz if local.get $0 - i64.load - local.tee $4 - i64.eqz - if (result i32) - i32.const 1936 - else - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end + f64.load + call $~lib/util/number/dtoa return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $5 - i32.const 20 + local.tee $4 + i32.const 28 i32.add i32.mul - i32.const 20 + i32.const 28 i32.add - local.tee $7 + local.tee $6 i32.const 1 i32.shl i32.const 1 @@ -19910,23 +19287,23 @@ i32.const 0 local.set $1 loop $for-loop|0 - local.get $6 + local.get $5 local.get $3 i32.lt_s if local.get $2 local.get $1 local.get $0 - local.get $6 + local.get $5 i32.const 3 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + f64.load + call $~lib/util/number/dtoa_stream local.get $1 i32.add local.set $1 - local.get $5 + local.get $4 if local.get $2 local.get $1 @@ -19934,23 +19311,23 @@ i32.shl i32.add i32.const 1968 - local.get $5 + local.get $4 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $1 - local.get $5 + local.get $4 i32.add local.set $1 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|0 end end - local.get $7 + local.get $6 local.get $2 local.get $1 local.get $0 @@ -19958,8 +19335,8 @@ i32.const 3 i32.shl i32.add - i64.load - call $~lib/util/number/itoa_stream + f64.load + call $~lib/util/number/dtoa_stream local.get $1 i32.add local.tee $0 @@ -19974,1536 +19351,1178 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#join (; 301 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#join (; 279 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - call $~lib/util/string/joinIntegerArray + call $~lib/util/string/joinFloatArray ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 302 ;) - (local $0 i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 280 ;) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz + i32.const 1073741808 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 + i32.const 32 + i32.const 80 + i32.const 54 + i32.const 42 call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Uint64Array#join + local.get $0 + i32.const 0 + call $~lib/rt/tlsf/__alloc local.tee $1 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz + call $~lib/rt/pure/__retain + ) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 281 ;) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 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 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $2 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 630 + i32.const 368 + i32.const 432 + i32.const 1741 i32.const 4 call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/genDigits (; 303 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - local.get $3 - local.get $1 - i64.sub - local.set $9 local.get $3 - i64.const 1 i32.const 0 - local.get $4 - i32.sub - local.tee $10 - i64.extend_i32_s - i64.shl - local.tee $11 - i64.const 1 - i64.sub - local.tee $13 - i64.and - local.set $12 + i32.lt_s + if + local.get $3 + i32.const -1 + i32.eq + if (result i32) + local.get $2 + local.get $1 + i32.sub + else + i32.const 32 + i32.const 432 + i32.const 1750 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.set $3 + else + local.get $1 + local.get $3 + i32.add + local.get $2 + i32.gt_s + if + i32.const 32 + i32.const 432 + i32.const 1755 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + end + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 local.get $3 - local.get $10 - i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.tee $7 - call $~lib/util/number/decimalCount32 - local.set $4 - loop $while-continue|0 - local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + local.get $1 + i32.add + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + ) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 282 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + i32.const 16 + i32.sub + 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 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + local.get $1 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $3 + call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 283 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $5 + call $~lib/typedarray/Int8Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $5 + i32.lt_s if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $4 - i32.const 10 - i32.ne - if - local.get $4 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 - end - local.get $7 - i32.const 1000000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100 - i32.div_u - local.set $8 - local.get $7 - i32.const 100 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10 - i32.div_u - local.set $8 - local.get $7 - i32.const 10 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - local.set $8 - i32.const 0 - local.set $7 - br $break|1 - end - i32.const 0 - local.set $8 - end - local.get $6 - local.get $8 - i32.or - if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $4 + local.get $1 + local.get $0 + i32.const 3296 + local.get $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.sub - local.set $4 - local.get $12 - local.get $7 - i64.extend_i32_u - local.get $10 - i64.extend_i32_s - i64.shl - i64.add - local.tee $1 - local.get $5 - i64.le_u - if - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $4 - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - local.get $10 - i64.extend_i32_s - i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - return - end - br $while-continue|0 + i32.add + local.set $0 + br $for-loop|0 end end - loop $while-continue|4 (result i32) + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const -1 + local.set $2 + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $3 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.set $2 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $2 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $4 local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $12 - i64.const 10 - i64.mul - local.tee $3 - local.get $10 - i64.extend_i32_s - i64.shr_u - local.tee $1 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne + i32.lt_s if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 + local.get $1 + local.get $4 + call $~lib/typedarray/Int8Array#__get local.get $2 + local.get $4 + call $~lib/typedarray/Int8Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $4 i32.const 1 - i32.shl - i32.add - local.get $1 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 i32.add - i32.store16 + local.set $4 + br $for-loop|1 end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $3 - local.get $13 - i64.and - local.tee $12 - local.get $5 - i64.ge_u - br_if $while-continue|4 - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $12 - local.set $1 - local.get $9 - i32.const 0 - local.get $4 - i32.sub - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/util/number/prettify (; 304 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 284 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - local.get $2 - i32.eqz - if + (local $4 i32) + (local $5 i32) + i32.const 3308 + i32.load + local.tee $3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $5 + local.set $1 + loop $for-loop|0 local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end local.get $1 + i32.load local.get $1 - local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 i32.add - local.tee $3 - i32.le_s - if (result i32) + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $4 + loop $for-loop|1 + local.get $2 local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 + i32.lt_s + if local.get $1 - local.get $3 - i32.lt_s + local.get $2 + call $~lib/typedarray/Uint8Array#__get + local.get $4 + local.get $2 + call $~lib/typedarray/Uint8Array#__get + i32.ne if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 285 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) + local.get $5 + i32.lt_s + if + local.get $1 local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add + i32.const 3296 local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.const 46 - i32.store16 - local.get $1 i32.const 1 i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $2 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const -1 + local.set $2 + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $3 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.set $2 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $2 + i32.store offset=8 + local.get $3 + local.get $0 + i32.store offset=4 + local.get $3 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $4 + local.get $5 + i32.lt_s + if + local.get $1 + local.get $4 + call $~lib/typedarray/Uint8ClampedArray#__get + local.get $2 + local.get $4 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|1 end end + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/util/number/dtoa_core (; 305 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 286 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $10 - if (result f64) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $2 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 - i32.const 0 - i32.ne - local.tee $6 - i64.extend_i32_u - i64.const 52 - i64.shl - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $7 - i64.clz - i32.wrap_i64 - local.set $3 - local.get $7 - local.get $3 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $5 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $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.add + local.set $0 + br $for-loop|0 + end + end + local.get $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - local.get $6 - select - i32.const 1075 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 i32.sub + i32.load offset=12 local.tee $5 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 - local.get $2 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $6 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Int16Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Int16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end local.get $6 - i32.sub - local.get $3 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $3 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $3 - local.get $3 - f64.convert_i32_s + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 287 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Uint16Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end local.get $1 - f64.ne + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 i32.add - i32.const 3 - i32.shr_s + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.add - local.tee $3 - i32.const 3 - i32.shl - local.tee $6 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 i32.sub - global.set $~lib/util/number/_K - local.get $6 - i32.const 2192 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $3 + i32.load offset=12 + local.tee $5 + i32.gt_u + if + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 i32.const 1 - i32.shl - i32.const 2912 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $3 - i64.extend_i32_s - i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 - i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $9 - i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 + local.get $0 + call $~lib/rt/pure/__retain + i32.store local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $9 - local.get $8 - i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - local.tee $9 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $9 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 + local.get $5 + i32.store offset=8 local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $17 - local.get $15 - i64.const 32 - i64.shr_u - local.tee $9 - i64.mul - local.get $18 - i64.const 32 - i64.shr_u - i64.add - local.tee $12 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.add - i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl - i32.add local.get $0 - local.get $11 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - i64.mul - local.get $13 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $14 - i64.const 32 - i64.shr_u - i64.add - local.tee $11 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u + i32.store offset=4 local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub - local.get $8 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint16Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 + call $~lib/rt/pure/__release local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 - call $~lib/util/number/genDigits - local.get $10 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $10 - i32.add + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/util/number/dtoa (; 306 ;) (param $0 f64) (result i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 288 ;) + (local $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 2048 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Int32Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 local.get $0 - f64.ne + local.get $4 + i32.lt_s if - i32.const 2080 - return + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - i32.const 2112 - i32.const 2160 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return end local.get $1 - local.get $2 - call $~lib/string/String#substring - call $~lib/rt/tlsf/maybeInitialize + i32.load local.get $1 - call $~lib/rt/tlsf/checkUsedBlock - call $~lib/rt/tlsf/freeBlock - ) - (func $~lib/util/number/dtoa_stream (; 307 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 i32) - local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 - i32.const 1 - i32.shl + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + i32.load offset=8 i32.add + call $~lib/arraybuffer/ArrayBuffer#slice local.set $0 - local.get $2 - f64.const 0 - f64.eq + i32.const 1 + global.set $~argumentsLength + i32.const 0 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if - local.get $0 - i32.const 48 - i32.store16 - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - i32.const 48 - i32.store16 offset=4 - i32.const 3 - return + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $5 + i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable end + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store local.get $2 + local.get $5 + i32.store offset=8 local.get $2 - f64.sub - f64.const 0 - f64.ne - if - local.get $2 - local.get $2 - f64.ne + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 - i32.const 3 - return - else + local.get $1 + local.get $3 + call $~lib/typedarray/Int32Array#__get local.get $2 - f64.const 0 - f64.lt - local.tee $3 - i32.const 8 - i32.add - local.set $1 - local.get $0 - i32.const 2112 - i32.const 2160 local.get $3 - select - local.get $1 + call $~lib/typedarray/Int32Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - return + i32.add + local.set $3 + br $for-loop|1 end - unreachable end + local.get $6 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release local.get $2 - call $~lib/util/number/dtoa_core + call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinFloatArray (; 308 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 289 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 - i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length + i32.const 3308 + i32.load local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add + call $~lib/typedarray/Uint32Array#constructor local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 - local.get $3 + local.get $0 + local.get $4 i32.lt_s if - local.get $2 local.get $1 local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 1 i32.add - local.set $5 + local.set $0 br $for-loop|0 end end - local.get $6 - local.get $2 local.get $1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 + i32.load offset=8 i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Float32Array#join (; 309 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 310 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - local.get $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $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 + global.set $~argumentsLength + i32.const 0 local.get $0 - call $~lib/typedarray/Float32Array#join - local.tee $2 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if - i32.const 0 - i32.const 304 - i32.const 626 + i32.const 368 + i32.const 432 + i32.const 1741 i32.const 4 call $~lib/builtins/abort unreachable end - call $~lib/typedarray/Float32Array#join - local.tee $1 - local.get $1 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz + local.get $5 + i32.const 3 + i32.and if - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 call $~lib/builtins/abort unreachable end + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store local.get $2 - call $~lib/rt/pure/__release + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint32Array#__get + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/util/string/joinFloatArray (; 311 ;) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 290 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Int64Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + 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 $1 + i32.load + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 i32.const 1 - i32.sub - local.tee $3 + global.set $~argumentsLength i32.const 0 - i32.lt_s + local.get $0 + i32.const 16 + i32.sub + i32.load offset=12 + local.tee $5 + i32.gt_u if - i32.const 1920 - return + i32.const 368 + i32.const 432 + i32.const 1741 + i32.const 4 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.eqz + local.get $5 + i32.const 7 + i32.and if - local.get $0 - f64.load - call $~lib/util/number/dtoa - return + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 28 - i32.add - i32.mul - i32.const 28 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 + i32.const 12 + i32.const 10 call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $0 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $5 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 + loop $for-loop|1 local.get $3 + local.get $4 i32.lt_s if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_stream local.get $1 - i32.add - local.set $1 - local.get $4 + local.get $3 + call $~lib/typedarray/Int64Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Int64Array#__get + i64.ne if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort + unreachable end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 - br $for-loop|0 + local.set $3 + br $for-loop|1 end end local.get $6 - local.get $2 - local.get $1 + call $~lib/rt/pure/__release local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - f64.load - call $~lib/util/number/dtoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end + call $~lib/rt/pure/__release local.get $2 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#join (; 312 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> (; 313 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 291 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - local.get $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 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 626 - i32.const 4 - call $~lib/builtins/abort - unreachable + (local $4 i32) + (local $5 i32) + (local $6 i32) + i32.const 3308 + i32.load + local.tee $4 + call $~lib/typedarray/Uint64Array#constructor + local.tee $6 + local.set $1 + loop $for-loop|0 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 3296 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - call $~lib/typedarray/Float64Array#join - local.tee $1 local.get $1 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 314 ;) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - i32.const 32 - i32.const 80 - i32.const 54 - i32.const 42 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.tee $1 - i32.const 0 - local.get $0 - call $~lib/memory/memory.fill + i32.load local.get $1 - call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array.wrap (; 315 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset local.get $1 + i32.load offset=8 + i32.add + call $~lib/arraybuffer/ArrayBuffer#slice + local.set $0 + i32.const 1 + global.set $~argumentsLength + i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -21513,157 +20532,71 @@ call $~lib/builtins/abort unreachable end - local.get $2 - i32.const 0 - i32.lt_s + local.get $5 + i32.const 7 + i32.and if - local.get $2 - i32.const -1 - i32.eq - if (result i32) - local.get $3 - local.get $1 - i32.sub - else - i32.const 32 - i32.const 432 - i32.const 1750 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.set $2 - else - local.get $1 - local.get $2 - i32.add - local.get $3 - i32.gt_s - if - i32.const 32 - i32.const 432 - i32.const 1755 - i32.const 6 - call $~lib/builtins/abort - unreachable - end + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable end i32.const 12 - i32.const 4 + i32.const 11 call $~lib/rt/tlsf/__alloc - local.tee $3 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $3 local.get $2 + local.get $5 i32.store offset=8 - local.get $3 + local.get $2 local.get $0 - local.get $1 - i32.add i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 316 ;) (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 + local.set $2 + loop $for-loop|1 + local.get $3 + local.get $4 + i32.lt_s + if + local.get $1 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + local.get $2 + local.get $3 + call $~lib/typedarray/Uint64Array#__get + i64.ne + if + i32.const 0 + i32.const 304 + i32.const 684 + i32.const 4 + call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 end - i32.const -1 - local.set $2 end + local.get $6 + call $~lib/rt/pure/__release local.get $0 - local.get $1 + call $~lib/rt/pure/__release local.get $2 - call $~lib/typedarray/Uint8Array.wrap + call $~lib/rt/pure/__release ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 317 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.const 16 - i32.sub - 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 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $1 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 318 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 292 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -21671,8 +20604,8 @@ i32.const 3308 i32.load local.tee $4 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 + call $~lib/typedarray/Float32Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 local.get $0 @@ -21684,11 +20617,8 @@ i32.const 3296 local.get $0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -21714,7 +20644,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $5 i32.gt_u if i32.const 368 @@ -21724,15 +20654,26 @@ call $~lib/builtins/abort unreachable end - i32.const 12 + local.get $5 i32.const 3 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + i32.const 12 + i32.const 12 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $6 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -21747,11 +20688,11 @@ if local.get $1 local.get $3 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Float32Array#__get local.get $2 local.get $3 - call $~lib/typedarray/Int8Array#__get - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.ne if i32.const 0 i32.const 304 @@ -21767,98 +20708,14 @@ br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 319 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3308 - i32.load - local.tee $3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $5 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $4 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.get $4 - local.get $2 - call $~lib/typedarray/Uint8Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 320 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21869,8 +20726,8 @@ i32.const 3308 i32.load local.tee $4 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 + call $~lib/typedarray/Float64Array#constructor + local.tee $6 local.set $1 loop $for-loop|0 local.get $0 @@ -21882,9 +20739,8 @@ i32.const 3296 local.get $0 call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 i32.add @@ -21910,7 +20766,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $6 + local.tee $5 i32.gt_u if i32.const 368 @@ -21920,15 +20776,26 @@ call $~lib/builtins/abort unreachable end + local.get $5 + i32.const 7 + i32.and + if + i32.const 32 + i32.const 432 + i32.const 1746 + i32.const 8 + call $~lib/builtins/abort + unreachable + end i32.const 12 - i32.const 5 + i32.const 13 call $~lib/rt/tlsf/__alloc local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $6 + local.get $5 i32.store offset=8 local.get $2 local.get $0 @@ -21943,11 +20810,11 @@ if local.get $1 local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Float64Array#__get local.get $2 local.get $3 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.ne + call $~lib/typedarray/Float64Array#__get + f64.ne if i32.const 0 i32.const 304 @@ -21963,165 +20830,174 @@ br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 321 ;) - (local $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 294 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 + i32.const 3372 i32.load - local.tee $4 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 local.set $1 + i32.const 3364 + i32.load + local.set $2 + i32.const 3372 + i32.load + local.set $3 + i32.const 0 + local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $3 i32.lt_s if - local.get $1 local.get $0 - i32.const 3296 + local.get $1 + i32.add + local.get $2 local.get $0 - call $~lib/array/Array#__get - i32.const 16 + i32.const 2 i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 + i32.add + i32.load + i32.store8 + local.get $0 + i32.const 1 i32.add local.set $0 br $for-loop|0 end end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 295 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 16 - i32.sub + i32.load offset=8 + local.tee $3 + local.get $1 i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 1 - i32.and + i32.ne if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_s if + local.get $0 + local.get $2 + call $~lib/typedarray/Int8Array#__get + local.tee $4 local.get $1 - local.get $3 - call $~lib/typedarray/Int16Array#__get local.get $2 - local.get $3 - call $~lib/typedarray/Int16Array#__get + call $~lib/array/Array#__unchecked_get + local.tee $5 i32.ne if + i32.const 3632 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i32_s + local.get $5 + f64.convert_i32_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace i32.const 0 i32.const 304 - i32.const 684 - i32.const 4 + i32.const 718 + i32.const 6 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 322 ;) - (local $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 296 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 6 + i32.add + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 + i32.const 0 + local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if - local.get $1 local.get $0 - i32.const 3296 + local.get $2 + i32.add + local.get $3 local.get $0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set + i32.const 3 + i32.shl + i32.add + i64.load + i64.store8 local.get $0 i32.const 1 i32.add @@ -22129,120 +21005,79 @@ br $for-loop|0 end end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 297 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.load offset=8 + i32.gt_s if i32.const 368 i32.const 432 - i32.const 1741 - i32.const 4 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - local.get $5 + 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 + ) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 298 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 i32.const 1 - i32.and + i32.shr_u + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s if - i32.const 32 + i32.const 368 i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain + i32.load offset=4 + i32.const 4 + i32.add local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 i32.lt_s if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint16Array#__get + local.get $0 local.get $2 + i32.add local.get $3 - call $~lib/typedarray/Uint16Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.get $0 i32.const 1 + i32.shl i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 323 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Int32Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set + i32.load16_s + i32.store8 local.get $0 i32.const 1 i32.add @@ -22250,96 +21085,34 @@ br $for-loop|0 end end - local.get $1 + ) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 299 ;) (param $0 i32) + i32.const 3580 i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 + i32.const 7 i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.load offset=8 + i32.gt_s if i32.const 368 i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 3 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Int32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release + i32.load offset=4 + i32.const 7 + i32.add + i32.const 3572 + i32.load + i32.const 3576 + i32.load + call $~lib/memory/memory.copy ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 324 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22347,120 +21120,320 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 + (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) i32.const 3 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set local.get $2 - local.get $5 - i32.store offset=8 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set local.get $2 - local.get $0 - i32.store offset=4 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Uint32Array#__get - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3600 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $1 + local.get $5 + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + 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 $0 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3680 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3712 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 2 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $1 + local.get $7 + i32.add + local.get $11 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + 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|00 + end + end + local.get $0 + i32.const 10 + i32.const 0 + i32.const 14 + i32.const 3744 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 14 + i32.const 3776 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/array/Array#__unchecked_get (; 301 ;) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 302 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=8 + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint8Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i32.ne + if + i32.const 3840 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i32_u + local.get $5 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 325 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 303 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22468,390 +21441,390 @@ (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 + (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - 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 $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength + local.tee $3 i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 - call $~lib/builtins/abort - unreachable - end - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set local.get $2 - local.get $5 - i32.store offset=8 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set local.get $2 - local.get $0 - i32.store offset=4 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3808 + call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 3 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 local.get $1 - local.get $3 - call $~lib/typedarray/Int64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Int64Array#__get - i64.ne + local.get $7 + i32.lt_s if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable + local.get $1 + local.get $5 + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + 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 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 end - end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 326 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Uint64Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 local.get $0 - local.get $4 - i32.lt_s - if + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3888 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3920 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 2 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength - i32.const 0 + local.get $12 + i32.lt_s + if + local.get $1 + local.get $7 + i32.add + local.get $11 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + 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|00 + end + end + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 3952 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 21 + i32.const 3984 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 304 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 16 - i32.sub + i32.load offset=8 + local.tee $3 + local.get $1 i32.load offset=12 - local.tee $5 - i32.gt_u - if - i32.const 368 - i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and + i32.ne if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 + loop $for-loop|0 + local.get $2 local.get $3 - local.get $4 i32.lt_s if + local.get $0 + local.get $2 + call $~lib/typedarray/Uint8ClampedArray#__get + local.tee $4 local.get $1 - local.get $3 - call $~lib/typedarray/Uint64Array#__get local.get $2 - local.get $3 - call $~lib/typedarray/Uint64Array#__get - i64.ne + call $~lib/array/Array#__unchecked_get + local.tee $5 + i32.ne if + i32.const 4048 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i32_u + local.get $5 + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace i32.const 0 i32.const 304 - i32.const 684 - i32.const 4 + i32.const 718 + i32.const 6 call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 - br $for-loop|1 + local.set $2 + br $for-loop|0 end end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 327 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 305 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i64) (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Float32Array#constructor - local.tee $6 - local.set $1 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3296 - local.get $0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength + local.get $2 i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.lt_s if i32.const 368 i32.const 432 - i32.const 1741 - i32.const 4 + i32.const 1774 + i32.const 18 call $~lib/builtins/abort unreachable end - local.get $5 + local.get $2 + local.get $1 + i32.load offset=8 i32.const 3 - i32.and + i32.shr_u + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s if - i32.const 32 + i32.const 368 i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 local.get $2 local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain + i32.load offset=4 + i32.add local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Float32Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float32Array#__get - f32.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 328 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 3308 - i32.load - local.tee $4 - call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.get $1 + i32.load offset=4 + local.set $4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $1 + i32.const 0 + local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if - local.get $1 local.get $0 - i32.const 3296 + local.get $2 + i32.add + local.get $4 local.get $0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set + i32.const 3 + i32.shl + i32.add + i64.load + local.tee $3 + i32.wrap_i64 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + i64.extend_i32_s + local.get $3 + i32.const 255 + local.get $3 + i32.wrap_i64 + i32.sub + i32.const 31 + i32.shr_s + i64.extend_i32_s + i64.or + i64.and + i64.store8 local.get $0 i32.const 1 i32.add @@ -22859,101 +21832,27 @@ br $for-loop|0 end end - local.get $1 - i32.load - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 - i32.load offset=8 - i32.add - call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - i32.const 1 - global.set $~argumentsLength + ) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 306 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 i32.const 0 - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - local.tee $5 - i32.gt_u + i32.lt_s if i32.const 368 i32.const 432 - i32.const 1741 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $5 - i32.const 7 - i32.and - if - i32.const 32 - i32.const 432 - i32.const 1746 - i32.const 8 + i32.const 1774 + i32.const 18 call $~lib/builtins/abort unreachable end - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $5 - i32.store offset=8 - local.get $2 - local.get $0 - i32.store offset=4 - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - loop $for-loop|1 - local.get $3 - local.get $4 - i32.lt_s - if - local.get $1 - local.get $3 - call $~lib/typedarray/Float64Array#__get - local.get $2 - local.get $3 - call $~lib/typedarray/Float64Array#__get - f64.ne - if - i32.const 0 - i32.const 304 - i32.const 684 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|1 - end - end - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 329 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3372 - i32.load + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.add local.get $0 i32.load offset=8 i32.gt_s @@ -22965,31 +21864,48 @@ call $~lib/builtins/abort unreachable end + local.get $2 local.get $0 i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load + i32.add local.set $2 - i32.const 3372 - i32.load + local.get $1 + i32.load offset=4 local.set $3 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 - local.get $1 - i32.add local.get $2 + i32.add + local.get $3 local.get $0 - i32.const 2 + i32.const 1 i32.shl i32.add - i32.load + i32.load16_s + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $1 + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and i32.store8 local.get $0 i32.const 1 @@ -22999,202 +21915,387 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 330 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 307 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load offset=8 - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i32.ne - if - i32.const 3632 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 331 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 f32) + (local $13 f64) i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + call $~lib/typedarray/Int64Array#constructor + local.tee $7 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $7 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 i32.const 3 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $8 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $8 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 local.set $0 - loop $for-loop|0 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 + i32.load offset=4 + local.set $9 + i32.const 3364 + i32.load + local.set $3 + i32.const 3372 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - i32.trunc_f32_s - else - i32.const 0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $3 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $5 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $5 + i32.const 255 + local.get $5 + 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 - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 end - end - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 332 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4016 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 3436 + i32.load + 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 $3 + i32.const 3428 + i32.load + local.set $4 + i32.const 3436 + i32.load + local.set $6 + i32.const 0 + local.set $0 + loop $for-loop|00 local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store8 + local.get $6 + i32.lt_s + if + local.get $0 + local.get $3 + i32.add + local.get $4 + local.get $0 + 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 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4112 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $1 + local.get $7 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4144 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 3516 + i32.load + 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 $6 + i32.const 3508 + i32.load + local.set $10 + i32.const 3516 + i32.load + local.set $11 + i32.const 0 + local.set $0 + loop $for-loop|01 local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $11 + i32.lt_s + if + local.get $0 + local.get $6 + i32.add + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $13 + local.get $13 + f64.sub + f64.const 0 + f64.eq + if (result i32) + f64.const 0 + f64.const 255 + local.get $13 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4176 + call $~lib/rt/__allocArray + 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 $1 + local.get $2 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $8 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + i32.const 3580 + i32.load + 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 $6 + i32.const 3572 + i32.load + local.set $10 + i32.const 3580 + i32.load + local.set $11 + i32.const 0 + local.set $0 + loop $for-loop|02 + local.get $0 + local.get $11 + i32.lt_s + if + local.get $0 + local.get $6 + i32.add + local.get $0 + local.get $10 + i32.add + i32.load8_s + local.tee $5 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $5 + i32.const 255 + local.get $5 + 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 $1 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 4208 + call $~lib/rt/__allocArray + 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 $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 333 ;) (param $0 i32) - (local $1 f64) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 308 ;) (param $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 3516 + i32.const 3372 i32.load - i32.const 2 - i32.add local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -23206,43 +22307,32 @@ end local.get $0 i32.load offset=4 - i32.const 2 - i32.add + local.set $1 + i32.const 3364 + i32.load local.set $2 - i32.const 3508 + i32.const 3372 i32.load local.set $3 - i32.const 3516 - i32.load - local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $3 i32.lt_s if + local.get $1 local.get $0 - local.get $2 + i32.const 1 + i32.shl i32.add - local.get $3 + local.get $2 local.get $0 - i32.const 3 + i32.const 2 i32.shl i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store8 + i32.load + i32.store16 local.get $0 i32.const 1 i32.add @@ -23251,39 +22341,89 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 334 ;) (param $0 i32) (param $1 i32) - local.get $1 - i32.load offset=8 + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 309 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - i32.gt_s + i32.const 1 + i32.shr_u + local.tee $4 + local.get $1 + i32.load offset=12 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 712 + i32.const 2 call $~lib/builtins/abort unreachable end - 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 - ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 335 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - i32.const 1 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int16Array#__get + local.set $3 + local.get $1 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.tee $5 + local.set $6 + local.get $3 + local.get $5 + i32.ne + if + i32.const 4288 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $3 + f64.convert_i32_s + local.get $6 + f64.convert_i32_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 310 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + i32.const 3 i32.shr_u - i32.const 4 + i32.const 6 i32.add local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -23295,7 +22435,7 @@ end local.get $0 i32.load offset=4 - i32.const 4 + i32.const 12 i32.add local.set $2 local.get $1 @@ -23303,7 +22443,7 @@ local.set $3 local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $1 i32.const 0 @@ -23313,16 +22453,70 @@ local.get $1 i32.lt_s if - local.get $0 local.get $2 + local.get $0 + i32.const 1 + i32.shl i32.add local.get $3 local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + i64.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 311 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=4 + local.set $3 + local.get $1 + i32.load offset=8 + local.set $1 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 i32.const 1 i32.shl i32.add - i32.load16_s - i32.store8 + local.get $0 + local.get $3 + i32.add + i32.load8_u + i32.store16 local.get $0 i32.const 1 i32.add @@ -23331,13 +22525,48 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 336 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 312 ;) (param $0 i32) (param $1 i32) + local.get $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 368 + i32.const 432 + i32.const 1775 + i32.const 46 + 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 + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 313 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) i32.const 3580 i32.load i32.const 7 i32.add local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u i32.gt_s if i32.const 368 @@ -23349,15 +22578,41 @@ end local.get $0 i32.load offset=4 - i32.const 7 + i32.const 14 i32.add + local.set $1 i32.const 3572 i32.load - i32.const 3576 + local.set $2 + i32.const 3580 i32.load - call $~lib/memory/memory.copy + local.set $3 + i32.const 0 + local.set $0 + loop $for-loop|0 + local.get $0 + local.get $3 + i32.lt_s + if + local.get $1 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $2 + i32.add + i32.load8_s + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 337 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 314 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23366,150 +22621,270 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3600 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 14 - i32.const 3680 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 14 - i32.const 3712 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 0 - i32.const 14 - i32.const 3744 + i32.const 1 + i32.const 22 + i32.const 4240 call $~lib/rt/__allocArray 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 $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 14 - i32.const 3776 - call $~lib/rt/__allocArray - 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 $0 - 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 - ) - (func $~lib/array/Array#__unchecked_get (; 338 ;) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - i32.load8_u + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 6 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + i32.trunc_f32_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 $0 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 4336 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 4384 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $11 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + 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|00 + end + end + local.get $0 + i32.const 10 + i32.const 1 + i32.const 22 + i32.const 4432 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 22 + i32.const 4480 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 339 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 315 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $0 i32.load offset=8 - local.tee $3 + i32.const 1 + i32.shr_u + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -23523,26 +22898,33 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Uint8Array#__get - local.tee $4 + call $~lib/typedarray/Uint16Array#__get + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 1 + i32.shl + i32.add + i32.load16_u local.tee $5 + local.set $6 + local.get $3 + local.get $5 i32.ne if - i32.const 3840 + i32.const 4576 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 + local.get $3 f64.convert_i32_u - local.get $5 + local.get $6 f64.convert_i32_u f64.const 0 f64.const 0 @@ -23562,350 +22944,318 @@ end end ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 340 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 316 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) i32.const 3 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (; 341 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 342 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3808 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 21 - i32.const 3888 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 21 - i32.const 3920 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 21 - i32.const 3952 - call $~lib/rt/__allocArray - 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> + call $~lib/typedarray/Int16Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 0 - i32.const 21 - i32.const 3984 + i32.const 1 + i32.const 23 + i32.const 4528 call $~lib/rt/__allocArray 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 $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - 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 - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 343 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - i32.const 3364 - i32.load - local.set $3 - i32.const 3372 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 6 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 local.get $1 - 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 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $8 + 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 $0 + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4624 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4672 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $11 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $9 + 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|00 + end end + local.get $0 + i32.const 10 + i32.const 1 + i32.const 23 + i32.const 4720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 23 + i32.const 4768 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 317 ;) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 368 + i32.const 432 + i32.const 1774 + i32.const 18 + call $~lib/builtins/abort + unreachable end + local.get $2 + local.get $1 + i32.load offset=12 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 344 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 318 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.tee $3 local.get $1 i32.load offset=12 @@ -23925,22 +23275,22 @@ if local.get $0 local.get $2 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get local.tee $4 local.get $1 local.get $2 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.tee $5 i32.ne if - i32.const 4048 + i32.const 4880 i32.const 3 local.get $2 f64.convert_i32_s local.get $4 - f64.convert_i32_u + f64.convert_i32_s local.get $5 - f64.convert_i32_u + f64.convert_i32_s f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -23959,17 +23309,19 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 345 ;) (param $0 i32) - (local $1 f32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 319 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load + local.get $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 368 @@ -23981,47 +23333,36 @@ end local.get $0 i32.load offset=4 - i32.const 3 + i32.const 24 i32.add local.set $2 - i32.const 3428 - i32.load + local.get $1 + i32.load offset=4 local.set $3 - i32.const 3436 - i32.load - local.set $4 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $1 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if - local.get $0 local.get $2 + local.get $0 + i32.const 2 + i32.shl i32.add local.get $3 local.get $0 - i32.const 2 + i32.const 3 i32.shl i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $1 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 + i64.load + i64.store32 local.get $0 i32.const 1 i32.add @@ -24030,28 +23371,15 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 346 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 368 - i32.const 432 - i32.const 1774 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $2 + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 320 ;) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.add local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -24061,18 +23389,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 i32.load offset=4 - i32.add local.set $2 local.get $1 i32.load offset=4 - local.set $4 + local.set $3 local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -24081,104 +23405,16 @@ local.get $1 i32.lt_s if - local.get $0 local.get $2 - i32.add - local.get $4 local.get $0 - i32.const 3 + i32.const 2 i32.shl i32.add - i64.load - local.tee $3 - i32.wrap_i64 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - i64.extend_i32_s - local.get $3 - i32.const 255 - local.get $3 - i32.wrap_i64 - i32.sub - i32.const 31 - i32.shr_s - i64.extend_i32_s - i64.or - i64.and - i64.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 347 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if local.get $0 - local.get $2 - i32.add local.get $3 - local.get $0 - i32.const 3 - i32.shl i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $1 - f64.min - f64.max - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 + i32.load8_u + i32.store local.get $0 i32.const 1 i32.add @@ -24187,28 +23423,19 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 348 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 321 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 368 - i32.const 432 - i32.const 1774 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $2 local.get $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 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -24218,9 +23445,9 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $0 i32.load offset=4 + i32.const 16 i32.add local.set $2 local.get $1 @@ -24230,16 +23457,18 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $1 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if - local.get $0 local.get $2 + local.get $0 + i32.const 2 + i32.shl i32.add local.get $3 local.get $0 @@ -24247,20 +23476,7 @@ i32.shl i32.add i32.load16_s - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 + i32.store local.get $0 i32.const 1 i32.add @@ -24269,17 +23485,18 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (; 349 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 322 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 3580 i32.load i32.const 7 i32.add local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u i32.gt_s if i32.const 368 @@ -24291,43 +23508,32 @@ end local.get $0 i32.load offset=4 - i32.const 7 + i32.const 28 i32.add - local.set $2 + local.set $1 i32.const 3572 i32.load - local.set $3 + local.set $2 i32.const 3580 i32.load - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $3 i32.lt_s if + local.get $1 local.get $0 - local.get $2 + i32.const 2 + i32.shl i32.add local.get $0 - local.get $3 + local.get $2 i32.add i32.load8_s - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 + i32.store local.get $0 i32.const 1 i32.add @@ -24336,7 +23542,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 350 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 323 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24345,203 +23551,270 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4016 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 21 - i32.const 4112 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - local.get $2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4144 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 3360 i32.const 0 - i32.const 21 - i32.const 4176 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - 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 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> + call $~lib/typedarray/Int32Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 0 - i32.const 21 - i32.const 4208 + i32.const 2 + i32.const 15 + i32.const 4816 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - 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 $0 - 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 - ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 351 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 12 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + local.tee $8 + i32.add + local.get $6 + local.get $8 + i32.add + f32.load + local.tee $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + i32.trunc_f32_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 $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 4928 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> local.get $0 local.get $3 - i32.lt_s - if + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 4992 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $8 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 local.get $1 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - i32.store16 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $8 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + 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|00 + end end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 15 + i32.const 5056 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 15 + i32.const 5120 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + 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 $0 + 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 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 352 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 324 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -24555,34 +23828,27 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Int16Array#__get - local.set $3 + call $~lib/typedarray/Uint32Array#__get + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 i32.ne if - i32.const 4288 + i32.const 5248 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 - f64.convert_i32_s - local.get $6 - f64.convert_i32_s + local.get $4 + f64.convert_i32_u + local.get $5 + f64.convert_i32_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -24601,22 +23867,282 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 353 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 325 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3436 - i32.load + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 f32) + (local $10 f64) + (local $11 i32) + (local $12 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 368 + call $~lib/typedarray/Int64Array#constructor + local.tee $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 1 + i64.const 8 + call $~lib/typedarray/Int64Array#__set + local.get $3 + i32.const 2 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.const 0 + i32.const 100 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 2 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $2 + i32.const 3 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $4 + i32.const 0 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $4 + i32.const 2 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 + i32.const 3360 + i32.const 0 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 24 + i32.const 5184 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 12 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 2 + i32.shl + local.tee $8 + i32.add + local.get $6 + local.get $8 + i32.add + f32.load + local.tee $9 + local.get $9 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $9 + i32.trunc_f32_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 $0 + i32.const 10 + i32.const 2 + i32.const 24 + i32.const 5296 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 2 + i32.const 24 + i32.const 5360 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $8 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $8 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $10 + local.get $10 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $10 + 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|00 + end + end + local.get $0 + i32.const 10 + i32.const 2 + i32.const 24 + i32.const 5424 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 24 + i32.const 5488 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + 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 $0 + 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 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 326 ;) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 3372 + i32.load + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + if + i32.const 368 i32.const 432 i32.const 1775 i32.const 46 @@ -24625,45 +24151,32 @@ end local.get $0 i32.load offset=4 - i32.const 6 - i32.add + local.set $1 + i32.const 3364 + i32.load local.set $2 - i32.const 3428 + i32.const 3372 i32.load local.set $3 - i32.const 3436 - i32.load - local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $3 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add - local.get $3 + local.get $2 local.get $0 i32.const 2 i32.shl i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store16 + i64.load32_s + i64.store local.get $0 i32.const 1 i32.add @@ -24672,9 +24185,78 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 354 ;) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#__unchecked_get (; 327 ;) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 328 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + (local $4 i64) + (local $5 i64) + 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 304 + i32.const 712 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + loop $for-loop|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#__get + local.tee $4 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_get + local.tee $5 + i64.ne + if + i32.const 5648 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i64_s + local.get $5 + f64.convert_i64_s + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 304 + i32.const 718 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + ) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 329 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -24683,7 +24265,7 @@ i32.add local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.gt_s if @@ -24696,56 +24278,22 @@ end local.get $0 i32.load offset=4 - i32.const 12 + i32.const 48 i32.add - local.set $2 local.get $1 i32.load offset=4 - local.set $3 local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store16 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end + call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 355 ;) (param $0 i32) - (local $1 f64) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 330 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add + local.get $1 + i32.load offset=8 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.gt_s if @@ -24758,45 +24306,30 @@ end local.get $0 i32.load offset=4 - i32.const 4 - i32.add local.set $2 - i32.const 3508 - i32.load + local.get $1 + i32.load offset=4 local.set $3 - i32.const 3516 - i32.load - local.set $4 + local.get $1 + i32.load offset=8 + local.set $1 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if local.get $2 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add - local.get $3 local.get $0 - i32.const 3 - i32.shl + local.get $3 i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store16 + i64.load8_u + i64.store local.get $0 i32.const 1 i32.add @@ -24805,14 +24338,18 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 356 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 331 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $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.const 3 i32.shr_u i32.gt_s if @@ -24825,12 +24362,16 @@ end local.get $0 i32.load offset=4 + i32.const 32 + i32.add local.set $2 local.get $1 i32.load offset=4 local.set $3 local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $1 i32.const 0 local.set $0 @@ -24841,14 +24382,16 @@ if local.get $2 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add - local.get $0 local.get $3 + local.get $0 + i32.const 1 + i32.shl i32.add - i32.load8_u - i32.store16 + i64.load16_s + i64.store local.get $0 i32.const 1 i32.add @@ -24857,37 +24400,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 357 ;) (param $0 i32) (param $1 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - 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 - ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 358 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 332 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24897,7 +24410,7 @@ i32.add local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.gt_s if @@ -24910,7 +24423,7 @@ end local.get $0 i32.load offset=4 - i32.const 14 + i32.const 56 i32.add local.set $1 i32.const 3572 @@ -24928,14 +24441,14 @@ if local.get $1 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.add local.get $0 local.get $2 i32.add - i32.load8_s - i32.store16 + i64.load8_s + i64.store local.get $0 i32.const 1 i32.add @@ -24944,7 +24457,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 359 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 333 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24953,146 +24466,269 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 22 - i32.const 4240 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 1 - i32.const 22 - i32.const 4336 + i32.const 3 + i32.const 25 + i32.const 5552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - 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 22 - i32.const 4384 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 22 - i32.const 4432 - call $~lib/rt/__allocArray - 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 $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 22 - i32.const 4480 - call $~lib/rt/__allocArray - 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 $0 - 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.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $8 + 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 $0 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5696 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5792 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + local.tee $13 + i32.add + local.get $11 + local.get $13 + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $9 + i64.trunc_f64_s + else + i64.const 0 + end + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 + i32.const 3 + i32.const 25 + i32.const 5888 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 25 + i32.const 5984 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 360 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 334 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (local $4 i64) + (local $5 i64) local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.tee $4 + local.tee $3 local.get $1 i32.load offset=12 i32.ne @@ -25106,34 +24742,27 @@ end loop $for-loop|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Uint16Array#__get - local.set $3 + call $~lib/typedarray/Uint64Array#__get + local.tee $4 local.get $1 - i32.load offset=4 local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_u + call $~lib/array/Array#__unchecked_get local.tee $5 - local.set $6 - local.get $3 - local.get $5 - i32.ne + i64.ne if - i32.const 4576 + i32.const 6176 i32.const 3 local.get $2 f64.convert_i32_s - local.get $3 - f64.convert_i32_u - local.get $6 - f64.convert_i32_u + local.get $4 + f64.convert_i64_u + local.get $5 + f64.convert_i64_u f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -25152,337 +24781,279 @@ end end ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 361 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 335 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 3436 - i32.load + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 f32) + (local $9 f64) + (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (; 362 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 363 ;) - (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 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 $3 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $3 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $3 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $2 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $4 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $4 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 23 - i32.const 4528 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 23 - i32.const 4624 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 23 - i32.const 4672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 23 - i32.const 4720 - call $~lib/rt/__allocArray - 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 $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> + call $~lib/typedarray/Int64Array#set<~lib/array/Array> local.get $0 i32.const 10 - i32.const 1 - i32.const 23 - i32.const 4768 + i32.const 3 + i32.const 26 + i32.const 6080 call $~lib/rt/__allocArray 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 $0 - 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 - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 364 ;) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $2 - i32.const 0 - i32.lt_s - if - i32.const 368 - i32.const 432 - i32.const 1774 - i32.const 18 - call $~lib/builtins/abort - unreachable - end - local.get $2 - local.get $1 - i32.load offset=12 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + block $folding-inner0 + i32.const 3436 + i32.load + i32.const 3 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 24 + i32.add + local.set $5 + i32.const 3428 + i32.load + local.set $6 + i32.const 3436 + i32.load + local.set $7 + loop $for-loop|0 + local.get $1 + local.get $7 + i32.lt_s + if + local.get $5 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $6 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $8 + local.get $8 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $8 + i64.trunc_f32_u + 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 $0 + i32.const 10 + i32.const 3 + i32.const 26 + i32.const 6224 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + local.get $3 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $0 + i32.const 10 + i32.const 3 + i32.const 26 + i32.const 6320 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + i32.const 3516 + i32.load + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + i32.const 16 + i32.add + local.set $7 + i32.const 3508 + i32.load + local.set $11 + i32.const 3516 + i32.load + local.set $12 + i32.const 0 + local.set $1 + loop $for-loop|00 + local.get $1 + local.get $12 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + local.tee $13 + i32.add + local.get $11 + local.get $13 + i32.add + f64.load + local.tee $9 + local.get $9 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $9 + i64.trunc_f64_u + else + i64.const 0 + end + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 10 + i32.const 3 + i32.const 26 + i32.const 6416 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + local.get $2 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $0 + local.get $4 + 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 26 + i32.const 6512 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $1 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + 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 $0 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 365 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 336 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 i32) - (local $5 i32) + (local $5 f32) + (local $6 f32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -25496,27 +25067,34 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Int32Array#__get - local.tee $4 + call $~lib/typedarray/Float32Array#__get + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 2 + i32.shl + i32.add + f32.load local.tee $5 - i32.ne + local.set $6 + local.get $3 + local.get $5 + f32.ne if - i32.const 4880 + i32.const 6672 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.convert_i32_s - local.get $5 - f64.convert_i32_s + local.get $3 + f64.promote_f32 + local.get $6 + f64.promote_f32 f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -25535,531 +25113,380 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 366 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 337 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 3436 - i32.load + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) i32.const 3 - i32.add - local.get $0 - i32.load offset=8 + 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 $5 i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 + i64.const 9 + call $~lib/typedarray/Int64Array#__set + i32.const 4 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 367 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 100 + call $~lib/typedarray/Uint8Array#__set + local.get $3 + i32.const 1 + i32.const 101 + call $~lib/typedarray/Uint8Array#__set + local.get $3 i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 + i32.const 102 + call $~lib/typedarray/Uint8Array#__set + local.get $3 i32.const 3 - i32.shr_u - local.set $1 + i32.const 103 + call $~lib/typedarray/Uint8Array#__set + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $6 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - i64.load - i64.store32 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 368 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 + i32.const 1000 + call $~lib/typedarray/Int16Array#__set + local.get $6 + i32.const 1 + i32.const 1001 + call $~lib/typedarray/Int16Array#__set + local.get $6 i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 + i32.const 1002 + call $~lib/typedarray/Int16Array#__set + i32.const 10 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 local.set $0 - loop $for-loop|0 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 + i32.load offset=4 + local.set $9 + i32.const 3364 + i32.load + local.set $10 + i32.const 3372 + i32.load + local.set $7 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - i32.trunc_f64_s - else - i32.const 0 + local.get $7 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $2 + i32.add + local.get $2 + local.get $10 + i32.add + i32.load + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - i32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 end - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 369 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $3 - i32.add - i32.load8_u - i32.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 370 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6608 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.store + i32.const 3424 + i32.const 3 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6720 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $5 + 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 $7 + local.get $5 + i32.load offset=4 + local.set $2 + local.get $5 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|00 local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $4 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $2 + 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 - end - ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 371 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 28 - i32.add - local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6784 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $0 - local.get $2 - i32.add - i32.load8_s - i32.store + i32.load offset=8 + 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 + local.set $2 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load offset=8 + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|01 local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $4 + i32.add + i32.load8_u + f32.convert_i32_u + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 372 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - i32.const 3360 - i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 15 - i32.const 4816 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 15 - i32.const 4928 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 15 - i32.const 4992 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 15 - i32.const 5056 - call $~lib/rt/__allocArray - 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 $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 15 - i32.const 5120 - call $~lib/rt/__allocArray - 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 $0 - 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 + 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 $2 + local.get $6 + i32.load offset=4 + local.set $4 + local.get $6 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|02 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $4 + 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 + i32.const 3580 + i32.load + i32.const 7 + 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 28 + i32.add + local.set $2 + i32.const 3572 + i32.load + local.set $4 + i32.const 3580 + i32.load + local.set $8 + i32.const 0 + local.set $0 + loop $for-loop|03 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $4 + i32.add + i32.load8_s + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $1 + i32.const 10 + i32.const 2 + i32.const 19 + i32.const 6848 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + return + end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 373 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 338 ;) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 i32) - (local $5 i32) + (local $5 f64) + (local $6 f64) local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u - local.tee $3 + local.tee $4 local.get $1 i32.load offset=12 i32.ne @@ -26073,27 +25500,32 @@ end loop $for-loop|0 local.get $2 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $2 - call $~lib/typedarray/Uint32Array#__get - local.tee $4 + call $~lib/typedarray/Float64Array#__get + local.set $3 local.get $1 + i32.load offset=4 local.get $2 - call $~lib/array/Array#__unchecked_get + i32.const 3 + i32.shl + i32.add + f64.load local.tee $5 - i32.ne + local.set $6 + local.get $3 + local.get $5 + f64.ne if - i32.const 5248 + i32.const 7008 i32.const 3 local.get $2 f64.convert_i32_s - local.get $4 - f64.convert_i32_u - local.get $5 - f64.convert_i32_u + local.get $3 + local.get $6 f64.const 0 f64.const 0 call $~lib/builtins/trace @@ -26112,496 +25544,425 @@ end end ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 374 ;) (param $0 i32) - (local $1 f32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 339 ;) + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (; 375 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3516 - i32.load - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 376 ;) - (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 $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $7 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $7 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $7 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $8 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $8 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $8 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - i32.const 3360 - i32.const 0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 24 - i32.const 5184 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - 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 24 - i32.const 5296 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - 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 24 - i32.const 5360 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - 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 24 - i32.const 5424 - call $~lib/rt/__allocArray - 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 $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 24 - i32.const 5488 - call $~lib/rt/__allocArray - 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 $0 - 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 - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 377 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $1 - i32.const 3364 - i32.load - local.set $2 - i32.const 3372 - i32.load - local.set $3 - i32.const 0 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 local.set $0 - loop $for-loop|0 + block $folding-inner0 + i32.const 3372 + i32.load + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 local.get $0 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - i64.load32_s - i64.store + i32.load offset=4 + local.set $10 + i32.const 3364 + i32.load + local.set $9 + i32.const 3372 + i32.load + local.set $4 + i32.const 0 + local.set $0 + loop $for-loop|0 local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $4 + i32.lt_s + if + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end end - end - ) - (func $~lib/array/Array#__unchecked_get (; 378 ;) (param $0 i32) (param $1 i32) (result i64) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 379 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) - 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 + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 6912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 3436 + i32.load + i32.const 3 + 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 24 + i32.add + local.set $9 + i32.const 3428 + i32.load + local.set $4 + i32.const 3436 + i32.load + local.set $2 i32.const 0 - i32.const 304 - i32.const 712 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 - local.get $2 - local.get $3 - i32.lt_s - if + local.set $0 + loop $for-loop|00 local.get $0 local.get $2 - call $~lib/typedarray/Int64Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i64.ne + i32.lt_s if - i32.const 5648 + local.get $9 + local.get $0 i32.const 3 - local.get $2 - f64.convert_i32_s + i32.shl + i32.add local.get $4 - f64.convert_i64_s - local.get $5 - f64.convert_i64_s - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f64.promote_f32 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 380 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7056 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $9 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $7 + 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 $4 + local.get $7 + i32.load offset=4 + local.set $2 + local.get $7 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $5 + i32.const 0 + local.set $0 + loop $for-loop|01 local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $1 - i64.trunc_f32_s - else - i64.const 0 + local.get $5 + i32.lt_s + if + local.get $4 + local.get $0 + i32.const 3 + i32.shl + local.tee $6 + i32.add + local.get $2 + local.get $6 + 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 - i64.store + end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7152 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $3 + i32.load offset=8 + 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 + local.set $2 + local.get $3 + i32.load offset=4 + local.set $5 + local.get $3 + i32.load offset=8 + local.set $6 + i32.const 0 + local.set $0 + loop $for-loop|02 local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $5 + i32.add + i32.load8_u + f64.convert_i32_u + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $8 + 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 $2 + local.get $8 + i32.load offset=4 + local.set $5 + local.get $8 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + i32.const 0 + local.set $0 + loop $for-loop|03 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $5 + 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 + i32.const 3580 + i32.load + i32.const 7 + 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 56 + i32.add + local.set $2 + i32.const 3572 + i32.load + local.set $5 + i32.const 3580 + i32.load + local.set $6 + i32.const 0 + local.set $0 + loop $for-loop|04 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $0 + local.get $5 + i32.add + i32.load8_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|04 + end end + local.get $1 + i32.const 10 + i32.const 3 + i32.const 20 + i32.const 7248 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return end + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 381 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 340 ;) (param $0 i32) (param $1 i32) + (local $2 f32) + (local $3 i32) + (local $4 i32) local.get $1 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - i32.const 6 + i32.const 1 i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -26613,129 +25974,49 @@ end local.get $0 i32.load offset=4 - i32.const 48 + i32.const 1 i32.add + local.set $3 local.get $1 i32.load offset=4 + local.set $4 local.get $1 i32.load offset=8 - call $~lib/memory/memory.copy - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 382 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3516 - i32.load i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 + local.set $1 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $4 + local.get $1 i32.lt_s if - local.get $2 local.get $0 - i32.const 3 - i32.shl - local.tee $5 - i32.add local.get $3 - local.get $5 i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $1 - 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|0 - end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 383 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 + local.get $4 local.get $0 - i32.const 3 + i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.add - i64.load8_u - i64.store + f32.load + local.tee $2 + local.get $2 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $2 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 local.get $0 i32.const 1 i32.add @@ -26744,19 +26025,18 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 384 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 341 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - i32.const 4 + i32.const 8 i32.add local.get $0 i32.load offset=8 - i32.const 3 - i32.shr_u i32.gt_s if i32.const 368 @@ -26768,7 +26048,7 @@ end local.get $0 i32.load offset=4 - i32.const 32 + i32.const 8 i32.add local.set $2 local.get $1 @@ -26776,85 +26056,39 @@ local.set $3 local.get $1 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u - local.set $1 + local.set $4 i32.const 0 local.set $0 loop $for-loop|0 local.get $0 - local.get $1 + local.get $4 i32.lt_s if - local.get $2 local.get $0 - i32.const 3 - i32.shl + local.get $2 i32.add local.get $3 local.get $0 - i32.const 1 + i32.const 2 i32.shl i32.add - i64.load16_s - i64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 385 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 56 - i32.add - local.set $1 - i32.const 3572 - i32.load - local.set $2 - i32.const 3580 - i32.load - local.set $3 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $3 - i32.lt_s - if + i32.load + local.tee $1 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor local.get $1 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $2 - i32.add - i64.load8_s - i64.store + i32.const 255 + local.get $1 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 local.get $0 i32.const 1 i32.add @@ -26863,7 +26097,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 386 ;) + (func $start:std/typedarray (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -26872,1681 +26106,1094 @@ (local $5 i32) (local $6 i32) (local $7 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 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + (local $8 i32) + (local $9 f64) + (local $10 f32) + (local $11 i64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 f64) + (local $16 i32) + (local $17 i32) + (local $18 i32) + (local $19 i32) + (local $20 i32) + (local $21 i32) + (local $22 i32) + (local $23 i32) + (local $24 i32) + (local $25 i32) + (local $26 i32) + (local $27 i32) + (local $28 i32) + (local $29 i32) i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set + call $std/typedarray/testInstantiate + i32.const 5 + call $std/typedarray/testInstantiate i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 10 + i32.const 2 i32.const 3 - i32.const 25 - i32.const 5552 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 10 + i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 - i32.const 25 - i32.const 5696 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 95 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 96 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 10 - i32.const 3 - i32.const 25 - i32.const 5792 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.load offset=8 + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 97 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 98 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 10 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 99 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get i32.const 3 - i32.const 25 - i32.const 5888 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $4 - call $~lib/rt/pure/__release + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 100 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#subarray + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 103 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 104 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 105 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 106 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 8 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 - local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 2 + f64.const 7 + call $~lib/typedarray/Float64Array#__set local.get $0 - i32.const 10 i32.const 3 - i32.const 25 - i32.const 5984 - call $~lib/rt/__allocArray - 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 $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + f64.const 6 + call $~lib/typedarray/Float64Array#__set local.get $0 - 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 - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 387 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 7 + f64.const 8 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Float64Array#subarray + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 122 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $1 - i32.load offset=12 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 16 i32.ne if i32.const 0 i32.const 304 - i32.const 712 + i32.const 123 i32.const 2 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 + local.get $1 + i32.load offset=8 + i32.const 32 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 124 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + global.set $~argumentsLength + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $1 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + i32.const 1 + i32.le_s + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $3 - i32.lt_s + i32.load offset=4 + local.set $0 + local.get $2 + i32.const 2 + i32.eq if local.get $0 - local.get $2 - call $~lib/typedarray/Uint64Array#__get - local.tee $4 - local.get $1 - local.get $2 - call $~lib/array/Array#__unchecked_get - local.tee $5 - i64.ne + f64.load offset=8 + local.set $9 + local.get $0 + f64.load + local.set $15 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $15 + call $~lib/util/sort/COMPARATOR~anonymous|0 + i32.const 0 + i32.lt_s if - i32.const 6176 - 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 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable + local.get $0 + local.get $15 + f64.store offset=8 + local.get $0 + local.get $9 + f64.store end + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $2 + i32.const 256 + i32.lt_s + if + local.get $0 local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + call $~lib/util/sort/insertionSort + else + local.get $0 + local.get $2 + call $~lib/util/sort/weakHeapSort end end - ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 388 ;) (param $0 i32) - (local $1 f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 3436 - i32.load + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + local.get $1 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.const 3 + call $~lib/typedarray/Float64Array#__get + f64.const 7 + f64.eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 126 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release i32.const 3 - i32.add + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $0 + i32.const 0 + i32.const -32 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 256 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 135 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $2 - i32.const 3428 - i32.load - local.set $3 - i32.const 3436 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $1 - 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 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 136 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (; 389 ;) (param $0 i32) - (local $1 f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 3516 - i32.load + local.get $0 i32.const 2 - i32.add + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 255 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 137 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.load offset=8 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 - i32.shr_u - i32.gt_s + 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 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 496 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 149 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $2 - i32.const 3508 - i32.load - local.set $3 - i32.const 3516 - i32.load - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $5 - i32.add - local.get $3 - local.get $5 - i32.add - f64.load - local.tee $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $1 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 390 ;) - (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 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $2 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release local.get $0 - i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6080 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.tee $3 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 152 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release local.get $0 - i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6224 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.tee $4 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 155 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill + call $~lib/rt/pure/__release local.get $0 - i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6320 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> + local.tee $5 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 158 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 - i32.const 10 - i32.const 3 - i32.const 26 - i32.const 6416 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $4 + i32.const 0 + i32.const 1 + i32.const 0 + call $~lib/typedarray/Int8Array#fill 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 26 - i32.const 6512 + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 672 call $~lib/rt/__allocArray 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 $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + local.tee $6 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 161 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill 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 - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 391 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 f32) - (local $6 f32) - local.get $0 + local.get $1 i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 165 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $1 - i32.load offset=12 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 i32.ne if i32.const 0 i32.const 304 - i32.const 712 + i32.const 166 i32.const 2 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Float32Array#__get - local.set $3 - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $5 - local.set $6 - local.get $3 - local.get $5 - f32.ne - if - i32.const 6672 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $3 - f64.promote_f32 - local.get $6 - f64.promote_f32 - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (; 392 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) local.get $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 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 167 + i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 local.get $1 - i32.load offset=8 i32.const 3 - i32.shr_u - local.set $1 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - 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|0 - end + i32.const 14 + i32.const 704 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/isInt8ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 168 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (; 393 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $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 2 - i32.shr_u - i32.gt_s + i32.const 5 + i32.const 0 + i32.const 14 + i32.const 736 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/isInt8ArrayEqual + i32.eqz if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 169 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 + 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 + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - local.get $3 - 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|0 - end - end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 394 ;) - (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) - (local $9 i32) - (local $10 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $7 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $7 - i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set + call $~lib/rt/pure/__release local.get $7 - i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set - i32.const 4 - call $~lib/typedarray/Uint8Array#constructor - local.tee $3 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set - local.get $3 i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set - local.get $3 + 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 102 - call $~lib/typedarray/Uint8Array#__set - local.get $3 i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int32Array#__set + local.get $0 i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $8 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $8 - i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $8 + 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 + i32.const 1 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - local.set $2 - block $folding-inner0 - i32.const 3372 - i32.load - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $2 - i32.load offset=4 - local.set $9 - i32.const 3364 - i32.load - local.set $4 - i32.const 3372 - i32.load - local.set $5 - loop $for-loop|0 - local.get $6 - local.get $5 - i32.lt_s - if - local.get $9 - local.get $6 - i32.const 2 - i32.shl - local.tee $2 - i32.add - local.get $2 - local.get $4 - i32.add - i32.load - f32.convert_i32_s - f32.store - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - i32.const 3424 - i32.const 3 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6720 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $0 - local.get $7 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 19 - i32.const 6784 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $3 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $3 - i32.load offset=4 - local.set $5 - local.get $3 - i32.load offset=8 - local.set $2 - loop $for-loop|00 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_u - f32.convert_i32_u - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|00 - end - end - local.get $0 - local.get $8 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> - i32.const 3580 - i32.load - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - i32.const 28 - i32.add - local.set $4 - i32.const 3572 - i32.load - local.set $5 - i32.const 3580 - i32.load - local.set $2 + i32.const 15 + i32.const 768 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $2 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if i32.const 0 - local.set $1 - loop $for-loop|01 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_s - f32.convert_i32_s - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|01 - end - end - local.get $0 - i32.const 10 + i32.const 304 + i32.const 181 i32.const 2 - i32.const 19 - i32.const 6848 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $2 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - return + call $~lib/builtins/abort + unreachable end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 395 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 f64) - (local $6 f64) local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 816 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $3 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 712 + i32.const 184 i32.const 2 call $~lib/builtins/abort unreachable end - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/typedarray/Float64Array#__get - local.set $3 - local.get $1 - i32.load offset=4 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $5 - local.set $6 - local.get $3 - local.get $5 - f64.ne - if - i32.const 7008 - i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $3 - local.get $6 - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 304 - i32.const 718 - i32.const 6 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end + local.get $0 + i32.const 1 + i32.const 0 + i32.const -3 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 864 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 187 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (; 396 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $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 + i32.const 2 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 912 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 190 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $1 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $4 - i32.add - local.get $3 - local.get $4 - i32.add - i64.load - f64.convert_i64_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end + i32.const 1 + i32.const 0 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 960 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 193 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (; 397 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load offset=8 + local.get $0 i32.const 1 - i32.shr_u i32.const 4 - i32.add - local.get $0 + call $~lib/typedarray/Int32Array#subarray + local.tee $1 + i32.const 0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill + call $~lib/rt/pure/__release + local.get $1 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - i32.gt_s + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 197 + i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $2 local.get $1 - i32.load offset=4 - local.set $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 198 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $1 i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 - 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|0 - end + i32.const 12 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 199 + i32.const 2 + call $~lib/builtins/abort + unreachable end - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 398 ;) - (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) - (local $9 i32) - (local $10 i32) + local.get $1 i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $6 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set + i32.const 2 + i32.const 15 + i32.const 1008 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 200 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1040 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/isInt32ArrayEqual + i32.eqz + if + i32.const 0 + i32.const 304 + i32.const 201 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + 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 + local.get $5 + call $~lib/rt/pure/__release local.get $6 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 i32.const 1 - i64.const 8 - call $~lib/typedarray/Int64Array#__set - local.get $6 i32.const 2 - i64.const 9 - call $~lib/typedarray/Int64Array#__set + 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/Uint8Array#constructor + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 5 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 6 + call $~lib/typedarray/Int8Array#subarray + local.tee $1 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 222 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 223 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 224 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 225 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 1 + i32.const 5 + call $~lib/typedarray/Int8Array#subarray local.tee $2 i32.const 0 - i32.const 100 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 228 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.const 1 - i32.const 101 - call $~lib/typedarray/Uint8Array#__set + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 229 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 - i32.const 102 - call $~lib/typedarray/Uint8Array#__set + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 230 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 231 + i32.const 2 + call $~lib/builtins/abort + unreachable + end local.get $2 - i32.const 3 - i32.const 103 - call $~lib/typedarray/Uint8Array#__set - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $7 - i32.const 0 - i32.const 1000 - call $~lib/typedarray/Int16Array#__set - local.get $7 i32.const 1 - i32.const 1001 - call $~lib/typedarray/Int16Array#__set - local.get $7 - i32.const 2 - i32.const 1002 - call $~lib/typedarray/Int16Array#__set - i32.const 10 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - local.set $0 - block $folding-inner0 - i32.const 3372 - i32.load - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - br_if $folding-inner0 - local.get $0 - i32.load offset=4 - local.set $8 - i32.const 3364 - i32.load - local.set $3 - i32.const 3372 - i32.load - local.set $4 + i32.const 4 + call $~lib/typedarray/Int8Array#subarray + local.tee $3 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $8 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 6912 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - i32.const 3436 - i32.load - i32.const 3 - 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 24 - i32.add - local.set $3 - i32.const 3428 - i32.load - local.set $4 - i32.const 3436 - i32.load - local.set $5 - i32.const 0 - local.set $0 - loop $for-loop|00 - local.get $0 - local.get $5 - i32.lt_s - if - local.get $3 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f64.promote_f32 - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7056 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 - local.get $6 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7152 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $2 - i32.load offset=8 - 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 - local.set $5 - local.get $2 - i32.load offset=4 - local.set $9 - local.get $2 - i32.load offset=8 - local.set $10 - i32.const 0 - local.set $0 - loop $for-loop|01 - local.get $0 - local.get $10 - i32.lt_s - if - local.get $5 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $9 - i32.add - i32.load8_u - f64.convert_i32_u - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - local.get $7 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> - i32.const 3580 - i32.load - i32.const 7 - 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 56 - i32.add - local.set $5 - i32.const 3572 - i32.load - local.set $9 - i32.const 3580 - i32.load - local.set $10 - i32.const 0 - local.set $0 - loop $for-loop|02 - local.get $0 - local.get $10 - i32.lt_s - if - local.get $5 - local.get $0 - i32.const 3 - i32.shl - i32.add - local.get $0 - local.get $9 - i32.add - i32.load8_s - f64.convert_i32_s - f64.store - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $1 - i32.const 10 - i32.const 3 - i32.const 20 - i32.const 7248 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $0 - call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - return + i32.const 304 + i32.const 234 + i32.const 2 + call $~lib/builtins/abort + unreachable end - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 399 ;) (param $0 i32) (param $1 i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add - local.get $0 + local.get $3 i32.load offset=8 - i32.gt_s + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 235 + i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $3 - local.get $1 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $3 - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $2 - local.get $2 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $2 - 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|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 400 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $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 + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 236 + i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - 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 - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (; 401 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 + local.get $3 i32.load offset=8 - i32.gt_s + i32.const 3 + i32.ne if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 + i32.const 0 + i32.const 304 + i32.const 237 + i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 + call $~lib/rt/pure/__release local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - i32.const 255 - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $4 - i32.const 255 - local.get $4 - i32.lt_u - select - i32.store8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - ) - (func $start:std/typedarray (; 402 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f32) - (local $8 f64) - (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 f64) - (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) - (local $23 i32) - (local $24 i32) - (local $25 i32) - (local $26 i32) - (local $27 i32) - (local $28 i32) - (local $29 i32) - i32.const 0 - call $std/typedarray/testInstantiate + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release i32.const 5 - call $std/typedarray/testInstantiate - i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 @@ -28561,4475 +27208,5024 @@ i32.const 3 call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 95 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 4 + call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 96 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.load offset=8 - i32.const 12 - i32.ne + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $2 + local.get $0 + i32.const 0 + i32.const 3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $3 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1088 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 97 + i32.const 248 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 98 - i32.const 2 - call $~lib/builtins/abort - unreachable - end + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 99 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int32Array#__get i32.const 3 - i32.ne + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $5 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1136 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 100 + i32.const 250 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 1 i32.const 2 - call $~lib/typedarray/Int32Array#subarray - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $7 + i32.const 5 i32.const 2 - i32.shr_u - i32.const 1 - i32.ne + i32.const 15 + i32.const 1184 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 103 + i32.const 252 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne + call $~lib/rt/pure/__release + local.tee $1 + i32.const 2 + i32.const 2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $12 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1232 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $13 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 104 + i32.const 254 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 - i32.load offset=8 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const 3 i32.const 4 - i32.ne + call $~lib/typedarray/Int32Array#copyWithin + local.tee $14 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1280 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $16 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 105 + i32.const 256 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 - call $~lib/typedarray/Int32Array#__get + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.get $1 + call $~lib/rt/pure/__release + local.tee $1 + i32.const 1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $17 + i32.const 5 i32.const 2 - i32.ne + i32.const 15 + i32.const 1328 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $18 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 106 + i32.const 258 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 call $~lib/rt/pure/__release - i32.const 8 - call $~lib/typedarray/Float64Array#constructor - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 + local.tee $1 i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 i32.const 2 - f64.const 7 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 6 - 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/Int32Array#copyWithin + local.tee $19 i32.const 5 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 7 - f64.const 8 - call $~lib/typedarray/Float64Array#__set - local.get $0 i32.const 2 - i32.const 6 - call $~lib/typedarray/Float64Array#subarray - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 4 - i32.ne + i32.const 15 + i32.const 1376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $20 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 122 + i32.const 260 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 16 - i32.ne + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const -2 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $21 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1424 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $22 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 123 + i32.const 262 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 - i32.load offset=8 - i32.const 32 - i32.ne + call $~lib/rt/pure/__release + local.tee $1 + i32.const 0 + i32.const -2 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $23 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1472 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $24 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 124 + i32.const 264 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 i32.const 0 - global.set $~argumentsLength - block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $2 - i32.const 1 - i32.le_s - br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $3 - i32.load offset=4 - local.set $0 - local.get $2 - i32.const 2 - i32.eq - if - local.get $0 - f64.load offset=8 - local.set $11 - local.get $0 - f64.load - local.set $12 - i32.const 2 - global.set $~argumentsLength - local.get $11 - local.get $12 - call $~lib/util/sort/COMPARATOR~anonymous|0 - i32.const 0 - i32.lt_s - if - local.get $0 - local.get $12 - f64.store offset=8 - local.get $0 - local.get $11 - f64.store - end - br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - i32.const 256 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/util/sort/insertionSort - else - local.get $0 - local.get $2 - call $~lib/util/sort/weakHeapSort - end - end - local.get $3 - call $~lib/rt/pure/__release + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.eq - if (result i32) - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 6 - f64.eq - else - i32.const 0 - end - if (result i32) - local.get $1 - i32.const 3 - call $~lib/typedarray/Float64Array#__get - f64.const 7 - f64.eq - else - i32.const 0 - end + call $~lib/rt/pure/__release + local.tee $1 + i32.const -4 + i32.const -3 + i32.const -2 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $25 + i32.const 5 + i32.const 2 + i32.const 15 + i32.const 1520 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 i32.const 304 - i32.const 126 + i32.const 266 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $0 local.get $1 call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 - i32.const 0 - i32.const -32 - 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 256 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - if - i32.const 0 - i32.const 304 - i32.const 135 - i32.const 2 - call $~lib/builtins/abort - unreachable - end local.get $0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + i32.const -4 + i32.const -3 + i32.const -1 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $27 + i32.const 5 i32.const 2 - i32.ne + i32.const 15 + i32.const 1568 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $28 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 136 + i32.const 268 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 + i32.const -4 + i32.const -3 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#copyWithin + local.tee $0 + i32.const 5 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 255 - i32.ne + i32.const 15 + i32.const 1616 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $29 + call $std/typedarray/isInt32ArrayEqual + i32.eqz if i32.const 0 i32.const 304 - i32.const 137 + i32.const 270 i32.const 2 call $~lib/builtins/abort unreachable end + local.get $1 + 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 + 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 $8 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $14 + 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 + call $~lib/rt/pure/__release + local.get $22 + call $~lib/rt/pure/__release + local.get $23 + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release i32.const 5 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 4 i32.const 5 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 496 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain + i32.const 4 + call $~lib/typedarray/Int32Array#subarray local.tee $2 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 149 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 576 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 152 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 608 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 155 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 640 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 158 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 0 - i32.const 14 - i32.const 672 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 161 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray - local.tee $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int8Array#fill - call $~lib/rt/pure/__release - local.get $1 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if i32.const 0 i32.const 304 - i32.const 165 + i32.const 282 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 1 + i32.const 4 i32.ne if i32.const 0 i32.const 304 - i32.const 166 + i32.const 283 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.load offset=8 - i32.const 3 + i32.const 12 i32.ne if i32.const 0 i32.const 304 - i32.const 167 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 3 - i32.const 0 - i32.const 14 - i32.const 704 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/isInt8ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 168 + i32.const 284 i32.const 2 call $~lib/builtins/abort unreachable end local.get $0 - i32.const 5 + i32.const 1 + i32.const 3 + call $~lib/typedarray/Int32Array#slice + local.tee $1 i32.const 0 - i32.const 14 - i32.const 736 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt8ArrayEqual - i32.eqz + call $~lib/typedarray/Int32Array#__get + i32.const 2 + i32.ne if i32.const 0 i32.const 304 - i32.const 169 + i32.const 287 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - 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 - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $1 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - i32.const 1 i32.const 1 + call $~lib/typedarray/Int32Array#__get i32.const 3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 768 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $2 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.ne if i32.const 0 i32.const 304 - i32.const 181 + i32.const 288 i32.const 2 call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 + local.get $1 + i32.load offset=8 i32.const 2 - i32.const 15 - i32.const 816 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $3 - call $std/typedarray/isInt32ArrayEqual - i32.eqz + i32.shr_u + i32.const 2 + i32.ne if i32.const 0 i32.const 304 - i32.const 184 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 0 - i32.const -3 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 864 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 187 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 912 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $5 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 190 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 0 - i32.const 1 - i32.const 0 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 960 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 193 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $1 - i32.const 0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#fill - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 197 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 198 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 199 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 3 - i32.const 2 - i32.const 15 - i32.const 1008 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 200 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1040 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 201 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - 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 - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 5 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 6 - call $~lib/typedarray/Int8Array#subarray - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 222 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 223 + i32.const 289 i32.const 2 call $~lib/builtins/abort unreachable end local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 224 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 5 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 225 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.const 5 - call $~lib/typedarray/Int8Array#subarray - local.tee $2 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 228 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 229 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 230 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 231 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#subarray - local.tee $3 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 234 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 235 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 236 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=8 - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 237 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $2 - local.get $0 - i32.const 0 - i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $3 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1088 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 248 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const 1 - i32.const 3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $5 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1136 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 250 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 1 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $9 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1184 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 252 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 2 - i32.const 2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $13 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1232 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $14 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 254 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1280 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $16 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 256 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1328 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 258 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 1 - i32.const 2 - i32.const 4 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $20 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 260 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 0 - i32.const -2 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1424 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $22 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 262 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const 0 - i32.const -2 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1472 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 264 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.get $1 - call $~lib/rt/pure/__release - local.tee $1 - i32.const -4 - i32.const -3 - i32.const -2 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1520 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $26 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 266 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - i32.const -4 - i32.const -3 - i32.const -1 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $27 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1568 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $28 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 268 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - i32.const -4 - i32.const -3 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#copyWithin - local.tee $0 - i32.const 5 - i32.const 2 - i32.const 15 - i32.const 1616 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $29 - call $std/typedarray/isInt32ArrayEqual - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 270 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - 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 - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release - local.get $13 - call $~lib/rt/pure/__release - local.get $14 - call $~lib/rt/pure/__release - local.get $15 - 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 - call $~lib/rt/pure/__release - local.get $22 - call $~lib/rt/pure/__release - local.get $23 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#subarray - local.tee $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 282 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 283 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.load offset=8 - i32.const 12 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 284 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.const 3 - call $~lib/typedarray/Int32Array#slice - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 287 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 288 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 289 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 290 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 8 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 291 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#slice - local.tee $3 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 294 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 295 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - if - i32.const 0 - i32.const 304 - i32.const 296 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.load offset=8 - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 297 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - local.get $0 - i32.const 0 - i32.const 2147483647 - call $~lib/typedarray/Int32Array#slice - local.tee $4 - i32.eq - if - i32.const 0 - i32.const 304 - i32.const 300 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 301 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $0 - call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 302 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $4 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 303 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - 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 $4 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $3 - i32.add - i32.load8_s - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - 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 $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 4 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|00 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|00 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|01 - local.get $1 - local.get $4 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $3 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|01 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - loop $for-loop|02 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $7 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $7 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $7 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $3 - loop $for-loop|03 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $8 - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $8 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $8 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|04 - local.get $0 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $0 - local.get $3 - i32.add - i32.load8_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|04 - end - end - local.get $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 14 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 15 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 - 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 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|05 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $2 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $1 - local.get $2 - i32.load offset=4 - local.set $3 - 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 - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $3 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|06 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $2 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - f32.const 0 - local.set $7 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|07 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $7 - local.get $2 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $7 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|07 - end - end - local.get $7 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - f64.const 0 - local.set $8 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|08 - local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $8 - local.get $2 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $8 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|08 - end - end - local.get $8 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> - 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 $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 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner2 - local.get $0 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner3 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner4 - local.get $0 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner5 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner7 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner6 - local.get $0 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner7 - 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 $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - 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 $1 - i32.const 1 - i32.const 1696 - 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 $1 - i32.const 2 - i32.const 1696 - 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 $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - local.set $3 - loop $for-loop|09 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $0 - local.get $2 - i32.add - i32.load8_s - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|09 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 113 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 114 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - 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 $1 - i32.const 1 - i32.const 1696 - 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 $1 - i32.const 2 - i32.const 1696 - 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 $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $3 - loop $for-loop|010 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|010 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $3 - loop $for-loop|011 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|011 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 117 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 118 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 119 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 120 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - 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 $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $3 - loop $for-loop|012 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|012 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 - local.get $1 - i32.load offset=4 - local.set $2 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $3 - loop $for-loop|013 - local.get $0 - local.get $3 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $0 - local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|013 - end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner8 - local.get $1 - 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 $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 607 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - if (result i32) - i32.const 0 - local.get $3 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $5 - loop $while-continue|0 - local.get $1 - local.get $3 - i32.lt_s - if - i32.const 1 - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $8 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $8 - local.get $8 - f64.ne + if + i32.const 0 + i32.const 304 + i32.const 290 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 291 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#slice + local.tee $3 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 294 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 295 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + if + i32.const 0 + i32.const 304 + i32.const 296 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.load offset=8 + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 297 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $0 + i32.const 0 + i32.const 2147483647 + call $~lib/typedarray/Int32Array#slice + local.tee $4 + i32.eq + if + i32.const 0 + i32.const 304 + i32.const 300 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 301 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 302 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 303 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + 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 $4 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $1 + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + block $folding-inner15 + block $folding-inner14 + block $folding-inner13 + block $folding-inner12 + 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 $0 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 4 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|00 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|00 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|01 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $3 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|01 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|02 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $10 + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $10 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $10 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + f64.const 0 + local.set $9 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $for-loop|03 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $9 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $9 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $9 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|04 + local.get $0 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $0 + local.get $3 + i32.add + i32.load8_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|04 + end + end + local.get $1 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 14 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 15 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|05 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $2 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + local.get $2 + i32.load offset=4 + local.set $3 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $3 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|06 + end + end + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $2 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + f32.const 0 + local.set $10 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|07 + local.get $1 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $10 + local.get $2 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $10 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|07 + end + end + local.get $10 + f32.const 6 + f32.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + f64.const 0 + local.set $9 + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|08 + local.get $1 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $9 + local.get $2 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $9 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|08 + end + end + local.get $9 + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $4 + loop $for-loop|09 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $4 + i32.add + local.get $0 + local.get $5 + i32.add + i32.load8_s + local.tee $6 + local.get $6 + i32.mul + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|09 + 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 $3 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $4 + loop $for-loop|010 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $4 + i32.add + local.get $0 + local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 + i32.mul + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|010 + 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 $3 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + local.set $3 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $3 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $4 + loop $for-loop|011 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $4 + i32.add + local.get $0 + local.get $5 + i32.add + i32.load8_u + local.tee $6 + local.get $6 + i32.mul + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|011 + 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 $3 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 1 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|012 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 1 + i32.shl + local.tee $7 + i32.add + i32.load16_s + local.tee $8 + local.get $8 + i32.mul + local.set $8 + local.get $3 + local.get $7 + i32.add + local.get $8 + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 1 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|013 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 1 + i32.shl + local.tee $7 + i32.add + i32.load16_u + local.tee $8 + local.get $8 + i32.mul + local.set $8 + local.get $3 + local.get $7 + i32.add + local.get $8 + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|013 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 2 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|014 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 2 + i32.shl + local.tee $7 + i32.add + i32.load + local.tee $8 + local.get $8 + i32.mul + local.set $8 + local.get $3 + local.get $7 + i32.add + local.get $8 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|014 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 2 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|015 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 2 + i32.shl + local.tee $7 + i32.add + i32.load + local.tee $8 + local.get $8 + i32.mul + local.set $8 + local.get $3 + local.get $7 + i32.add + local.get $8 + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|015 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 3 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|016 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 3 + i32.shl + local.tee $7 + i32.add + i64.load + local.tee $11 + local.get $11 + i64.mul + local.set $11 + local.get $3 + local.get $7 + i32.add + local.get $11 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|016 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 3 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|017 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 3 + i32.shl + local.tee $7 + i32.add + i64.load + local.tee $11 + local.get $11 + i64.mul + local.set $11 + local.get $3 + local.get $7 + i32.add + local.get $11 + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|017 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 2 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|018 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 2 + i32.shl + local.tee $7 + i32.add + f32.load + local.tee $10 + local.get $10 + f32.mul + local.set $10 + local.get $3 + local.get $7 + i32.add + local.get $10 + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|018 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 + 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 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + local.get $1 + i32.load offset=4 + local.set $5 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.set $2 + local.get $4 + i32.const 3 + i32.shl + local.tee $6 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $3 + loop $for-loop|019 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $5 + local.get $0 + i32.const 3 + i32.shl + local.tee $7 + i32.add + f64.load + local.tee $9 + local.get $9 + f64.mul + local.set $9 + local.get $3 + local.get $7 + i32.add + local.get $9 + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|019 + end + end + local.get $2 + local.get $3 + call $~lib/rt/pure/__retain + i32.store + local.get $2 + local.get $3 + i32.store offset=4 + local.get $2 + local.get $6 + i32.store offset=8 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $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 $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 $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 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 52 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 54 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 56 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 58 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 60 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 62 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 64 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 66 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner6 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 74 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 76 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 78 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 80 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 82 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 84 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 86 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 88 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 96 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 98 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 100 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 102 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 104 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 106 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 108 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner10 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 110 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner10 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + 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 $1 + i32.const 1 + i32.const 1696 + 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 $1 + i32.const 2 + i32.const 1696 + 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 $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + local.set $3 + loop $for-loop|020 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $2 + i32.add + i32.load8_s + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|020 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 113 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 114 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + 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 $1 + i32.const 1 + i32.const 1696 + 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 $1 + i32.const 2 + i32.const 1696 + 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 $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + loop $for-loop|021 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|021 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $3 + loop $for-loop|022 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|022 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 117 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 118 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 119 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 120 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $3 + loop $for-loop|023 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|023 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + i32.load offset=4 + local.set $2 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $for-loop|024 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $0 + local.get $1 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|024 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + 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 $1 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $1 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i32.const 0 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + if (result i32) + i32.const 0 + local.get $3 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $1 + i32.load offset=4 + local.set $5 + loop $while-continue|0 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $9 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $9 + local.get $9 + f64.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + drop + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 608 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $0 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $2 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + if (result i32) + i32.const 0 + local.get $4 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $0 + i32.load offset=4 + local.set $6 + loop $while-continue|025 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $10 + local.get $10 + f32.ne + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + drop + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $while-continue|025 + end + end + i32.const 0 + end + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Int8Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Int16Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Uint16Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Int32Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Uint32Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Int64Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + 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 $1 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $0 + call $~lib/typedarray/Uint64Array#join + local.tee $2 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + 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 $1 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float32Array#join + local.tee $2 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + 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 $1 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float64Array#join + local.tee $2 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $1 + call $~lib/rt/pure/__release + local.get $2 + 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|trampoline + local.tee $2 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 691 + i32.const 2 + 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|trampoline + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 + if + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + 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 $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 $2 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $2 + i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $6 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $6 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + local.get $5 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> + local.get $0 + local.get $2 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + local.get $0 + local.get $6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 7344 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + 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 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $8 + local.get $1 + i32.load offset=4 + local.set $12 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $13 + i32.const 0 + local.set $4 + loop $for-loop|026 + local.get $4 + local.get $13 + i32.lt_s + if + local.get $4 + local.get $8 + i32.add + i32.const 255 + local.get $12 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $14 + i32.const 255 + local.get $14 + i32.lt_u + select + i32.store8 + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $for-loop|026 + end + end + 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 21 + i32.const 7376 + call $~lib/rt/__allocArray + 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 $2 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return + end + i32.const 0 + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 344 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + i32.const 304 + i32.const 365 + i32.const 2 + call $~lib/builtins/abort + unreachable end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 608 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 613 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $2 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $4 - if (result i32) - i32.const 0 - local.get $4 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 - i32.load offset=4 - local.set $6 - loop $while-continue|014 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 1 - local.get $6 - local.get $2 + i32.const 0 + i32.const 304 + i32.const 366 i32.const 2 - i32.shl - i32.add - f32.load - local.tee $7 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $7 - local.get $7 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|014 + call $~lib/builtins/abort + unreachable end + i32.const 0 + i32.const 304 + i32.const 367 + i32.const 2 + call $~lib/builtins/abort + unreachable end i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float64Array,f64> - 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|trampoline - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - 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|trampoline - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - if - i32.const 0 i32.const 304 - i32.const 695 + i32.const 415 i32.const 2 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 21 - i32.const 7344 - call $~lib/rt/__allocArray - 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 304 + i32.const 417 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 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 21 - i32.const 7376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $9 - 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 $9 - call $~lib/rt/pure/__release - return + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 304 - i32.const 323 + i32.const 438 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 344 + i32.const 440 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 415 + i32.const 461 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 417 + i32.const 463 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 438 + i32.const 495 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 440 - i32.const 2 + i32.const 629 + i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 461 - i32.const 2 + i32.const 630 + i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 463 - i32.const 2 + i32.const 626 + i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 627 + i32.const 4 call $~lib/builtins/abort unreachable ) - (func $~start (; 403 ;) + (func $~start (; 343 ;) global.get $~started if return @@ -33039,7 +32235,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 404 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 344 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index b4bc9fb7be..697ebf5ca5 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -1,7 +1,6 @@ (module (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 (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))) @@ -137,73 +136,9 @@ end i32.const 0 ) - (func $~lib/rt/stub/__alloc (; 4 ;) (result i32) + (func $start:typeof (; 4 ;) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - local.tee $0 - memory.size - local.tee $3 - i32.const 16 - i32.shl - local.tee $1 - i32.gt_u - if - local.get $3 - local.get $0 - local.get $1 - i32.sub - i32.const 65535 - i32.add - i32.const -65536 - i32.and - i32.const 16 - i32.shr_u - local.tee $1 - local.get $3 - local.get $1 - i32.gt_s - select - memory.grow - i32.const 0 - i32.lt_s - if - local.get $1 - memory.grow - i32.const 0 - i32.lt_s - if - unreachable - end - end - end - local.get $0 - global.set $~lib/rt/stub/offset - local.get $2 - i32.const 16 - i32.sub - local.tee $0 - i32.const 16 - i32.store - local.get $0 - i32.const 1 - i32.store offset=4 - local.get $0 - i32.const 3 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $2 - ) - (func $start:typeof (; 5 ;) i32.const 64 i32.const 64 call $~lib/string/String.__eq @@ -424,7 +359,55 @@ global.set $~lib/rt/stub/startOffset i32.const 304 global.set $~lib/rt/stub/offset - call $~lib/rt/stub/__alloc + i32.const 336 + memory.size + local.tee $1 + i32.const 16 + i32.shl + local.tee $0 + i32.gt_u + if + local.get $1 + i32.const 65871 + local.get $0 + i32.sub + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $0 + local.get $1 + local.get $0 + i32.gt_s + select + memory.grow + i32.const 0 + i32.lt_s + if + local.get $0 + memory.grow + i32.const 0 + i32.lt_s + if + unreachable + end + end + end + i32.const 336 + global.set $~lib/rt/stub/offset + i32.const 304 + i32.const 16 + i32.store + i32.const 308 + i32.const 1 + i32.store + i32.const 312 + i32.const 3 + i32.store + i32.const 316 + i32.const 0 + i32.store + i32.const 320 global.set $typeof/c i32.const 64 i32.const 64 @@ -487,7 +470,7 @@ unreachable end ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) global.get $~started if return diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 9b72fcf65f..03f18b25ae 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -817,70 +817,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 11 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 12 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 11 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -905,11 +845,11 @@ i32.eqz if memory.size - local.tee $1 + local.tee $2 i32.const 16 local.get $0 i32.load offset=1568 - local.get $1 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -922,16 +862,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $1 + local.tee $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -940,7 +880,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -987,14 +927,68 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $while/Ref#constructor (; 13 ;) (result i32) + (func $while/Ref#constructor (; 12 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1050,7 +1044,7 @@ end local.get $1 ) - (func $~lib/rt/pure/__release (; 14 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 13 ;) (param $0 i32) local.get $0 i32.const 208 i32.gt_u @@ -1061,7 +1055,7 @@ call $~lib/rt/pure/decrement end ) - (func $start:while (; 15 ;) + (func $start:while (; 14 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -1166,17 +1160,17 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $0 + local.set $1 loop $while-continue|01 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1204,18 +1198,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $0 + local.set $1 loop $while-continue|02 - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|02 end end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1343,23 +1337,25 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $1 + local.set $2 call $while/Ref#constructor local.set $0 loop $while-continue|05 block $while-break|0 call $while/Ref#constructor - local.tee $2 + local.tee $1 call $~lib/rt/pure/__release - local.get $2 + local.get $1 if - local.get $1 + local.get $2 i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 10 i32.eq if + i32.const 0 + local.set $1 local.get $0 if local.get $0 @@ -1373,7 +1369,7 @@ end end end - local.get $1 + local.get $2 i32.const 10 i32.ne if @@ -1408,7 +1404,7 @@ unreachable end ) - (func $~start (; 16 ;) + (func $~start (; 15 ;) global.get $~started if return @@ -1418,7 +1414,7 @@ end call $start:while ) - (func $~lib/rt/pure/decrement (; 17 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 16 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 From 5a37bc338074fe82064419b72db06f78dfd5c43d Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 06:06:05 +0200 Subject: [PATCH 16/51] finalize --- cli/asc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 970c8f387f..30da1453fe 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -647,11 +647,11 @@ exports.main = function main(argv, options, callback) { if (optimizeLevel >= 2 && shrinkLevel === 0) { module.setAlwaysInlineMaxSize(12); module.setFlexibleInlineMaxSize(70); - module.setOneCallerInlineMaxSize(120); + module.setOneCallerInlineMaxSize(200); } else { module.setAlwaysInlineMaxSize(4); // default: 2 module.setFlexibleInlineMaxSize(65); // default: 20 - module.setOneCallerInlineMaxSize(70); // default: 15 + module.setOneCallerInlineMaxSize(80); // default: 15 } // Optimize the module if requested From e94b69c25f53e7bdf01ed100934be4b7122bf2aa Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 11:45:26 +0200 Subject: [PATCH 17/51] pre-simplify for cse --- cli/asc.js | 1 + tests/compiler/do.optimized.wat | 19 +- .../extends-baseaggregate.optimized.wat | 29 +- tests/compiler/for.optimized.wat | 19 +- .../implicit-getter-setter.optimized.wat | 19 +- .../inlining-blocklocals.optimized.wat | 4 +- tests/compiler/issues/1095.optimized.wat | 19 +- tests/compiler/managed-cast.optimized.wat | 19 +- tests/compiler/mandelbrot.optimized.wat | 121 +- tests/compiler/memset.optimized.wat | 10 +- tests/compiler/number.optimized.wat | 135 +- tests/compiler/rc/local-init.optimized.wat | 19 +- .../rc/logical-and-mismatch.optimized.wat | 19 +- .../rc/logical-or-mismatch.optimized.wat | 19 +- tests/compiler/rc/optimize.optimized.wat | 19 +- tests/compiler/rc/rereturn.optimized.wat | 19 +- .../rc/ternary-mismatch.optimized.wat | 19 +- tests/compiler/resolve-access.optimized.wat | 32 +- tests/compiler/resolve-binary.optimized.wat | 135 +- .../resolve-elementaccess.optimized.wat | 276 ++-- .../resolve-function-expression.optimized.wat | 11 +- .../resolve-propertyaccess.optimized.wat | 11 +- tests/compiler/resolve-ternary.optimized.wat | 154 +- tests/compiler/resolve-unary.optimized.wat | 11 +- .../retain-release-sanity.optimized.wat | 143 +- tests/compiler/retain-return.optimized.wat | 19 +- tests/compiler/runtime-full.optimized.wat | 19 +- .../compiler/std/array-literal.optimized.wat | 19 +- tests/compiler/std/array.optimized.wat | 388 +++-- tests/compiler/std/arraybuffer.optimized.wat | 29 +- tests/compiler/std/dataview.optimized.wat | 19 +- tests/compiler/std/libm.optimized.wat | 1007 +++++++------ tests/compiler/std/map.optimized.wat | 29 +- tests/compiler/std/math.optimized.wat | 1294 ++++++++--------- .../std/operator-overloading.optimized.wat | 302 ++-- tests/compiler/std/set.optimized.wat | 29 +- tests/compiler/std/static-array.optimized.wat | 10 +- tests/compiler/std/staticarray.optimized.wat | 19 +- .../std/string-casemapping.optimized.wat | 33 +- .../std/string-encoding.optimized.wat | 47 +- tests/compiler/std/string.optimized.wat | 493 +++---- tests/compiler/std/symbol.optimized.wat | 10 +- tests/compiler/std/typedarray.optimized.wat | 880 ++++++----- tests/compiler/while.optimized.wat | 19 +- 44 files changed, 2878 insertions(+), 3069 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 30da1453fe..1e5cd50e01 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -667,6 +667,7 @@ exports.main = function main(argv, options, callback) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { + add("simplify-locals-nostructure"); add("flatten"); add("local-cse"); } diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 95e8066adc..d4d5124038 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -240,11 +240,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -252,7 +248,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -542,12 +540,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 7cfea5a2bc..6763c20cb3 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -165,11 +165,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -177,7 +173,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -467,12 +465,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1495,23 +1492,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 180de5abe5..6c523bc98e 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -237,11 +237,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -249,7 +245,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -539,12 +537,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 112190e49e..ae323547d7 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -172,11 +172,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -184,7 +180,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -474,12 +472,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/inlining-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat index 49b142ecbf..dd518ac9e1 100644 --- a/tests/compiler/inlining-blocklocals.optimized.wat +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -12,13 +12,13 @@ (start $~start) (func $~start (; 1 ;) (local $0 i32) + i32.const 1 + global.set $inlining-blocklocals/theCall_a global.get $inlining-blocklocals/b local.tee $0 i32.const 1 i32.add global.set $inlining-blocklocals/b - i32.const 1 - global.set $inlining-blocklocals/theCall_a local.get $0 global.set $inlining-blocklocals/theCall_b i32.const 3 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 9bb6db40b1..23e0132da5 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -156,11 +156,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -168,7 +164,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -458,12 +456,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 20eba61b7c..f6ca382524 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -158,11 +158,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -170,7 +166,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -460,12 +458,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index bf5a69b441..39a8179beb 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -9,8 +9,7 @@ (local $2 i64) (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) + (local $5 i32) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -52,7 +51,7 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul @@ -111,9 +110,6 @@ local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul local.set $0 local.get $4 f64.const 0.5 @@ -122,9 +118,12 @@ local.get $3 f64.mul local.tee $4 - local.get $5 + local.get $0 f64.const 0.6666666666666735 local.get $0 + local.get $0 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -151,7 +150,7 @@ f64.add f64.add f64.mul - local.get $6 + local.get $5 local.get $1 i32.const 20 i32.shr_s @@ -173,31 +172,34 @@ f64.add ) (func $~lib/math/NativeMath.log2 (; 1 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 i32) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.const 31 i32.shr_u end if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.eqz @@ -209,7 +211,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -221,30 +223,30 @@ return end i32.const -54 - local.set $7 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return else - local.get $3 + local.get $2 i64.const 32 i64.shl i64.eqz i32.const 0 - local.get $2 + local.get $1 i32.const 1072693248 i32.eq select @@ -254,13 +256,13 @@ end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add - local.tee $2 + local.tee $1 i32.const 1048575 i32.and i32.const 1072079006 @@ -272,40 +274,55 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $1 + local.tee $0 f64.const 2 - local.get $1 + local.get $0 f64.add f64.div local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul - local.set $0 - local.get $1 + local.set $3 + local.get $8 local.get $1 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + i32.add + f64.convert_i32_s + local.tee $9 + local.get $0 f64.const 0.5 - local.get $1 + local.get $0 f64.mul - local.get $1 + local.get $0 f64.mul - local.tee $1 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $6 + f64.const 1.4426950407214463 + f64.mul + local.tee $10 + f64.add + local.set $7 + local.get $0 + local.get $6 f64.sub - local.get $1 + local.get $5 f64.sub local.get $4 - local.get $1 local.get $5 + local.get $3 f64.const 0.6666666666666735 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -333,23 +350,7 @@ f64.add f64.mul f64.add - local.set $0 - local.get $7 - local.get $2 - i32.const 20 - i32.shr_u - i32.const 1023 - i32.sub - i32.add - f64.convert_i32_s - local.tee $4 - local.get $6 - f64.const 1.4426950407214463 - f64.mul - local.tee $5 - f64.add - local.set $1 - local.get $0 + local.tee $0 local.get $6 f64.add f64.const 1.6751713164886512e-10 @@ -358,13 +359,13 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $4 - local.get $1 + local.get $9 + local.get $7 f64.sub - local.get $5 + local.get $10 f64.add f64.add - local.get $1 + local.get $7 f64.add ) (func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) diff --git a/tests/compiler/memset.optimized.wat b/tests/compiler/memset.optimized.wat index 67fd3a804c..8a016af619 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -72,17 +72,13 @@ i32.const 8 i32.le_u br_if $folding-inner0 - local.get $2 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $2 - i32.sub - local.set $3 - local.get $0 - local.get $2 + local.tee $3 i32.add local.tee $0 local.get $1 @@ -93,7 +89,9 @@ local.tee $1 i32.store local.get $0 + local.get $2 local.get $3 + i32.sub i32.const -4 i32.and local.tee $2 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index b6b9c702c0..47022b1a79 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -176,9 +176,14 @@ (func $~lib/util/number/utoa_simple (; 3 ;) (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 @@ -187,13 +192,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -1166,7 +1169,6 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -1181,68 +1183,66 @@ i32.const 1096 i32.load16_s global.set $~lib/util/number/_exp_pow + local.get $0 + local.get $0 global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.set $1 - i64.const -9223372036854774784 - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $2 i64.const 32 i64.shr_u - local.tee $2 - i64.mul - local.get $1 + local.tee $3 i64.const 2147483648 - local.tee $4 i64.mul - local.get $1 - i64.const 1024 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + i64.const 2147483648 i64.mul + i64.const 0 + i64.add + local.tee $1 i64.const 32 i64.shr_u i64.add - local.tee $3 + local.get $1 i64.const 4294967295 i64.and + i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $0 + i32.const 2 + i32.add local.get $3 + i64.const -9223372036854774784 + local.tee $1 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub local.tee $4 - i64.const 9223372036854775296 - local.tee $3 - i64.const 4294967295 - i64.and - local.tee $5 - local.get $2 i64.mul - local.get $1 - i64.const 2147483647 - local.tee $3 + local.get $2 + i64.const 2147483648 i64.mul - local.get $1 - i64.const 4294966784 + local.get $2 + i64.const 1024 + local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $4 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 1024 + i64.mul + local.get $4 i64.const 4294967295 i64.and i64.add @@ -1250,51 +1250,50 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483647 - i64.mul - local.get $5 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $3 - local.get $0 + local.tee $1 local.get $0 + i32.const 2 + i32.add local.get $1 - i64.const 2147483648 + local.get $3 + i64.const 9223372036854775296 + local.tee $1 + i64.const 32 + i64.shr_u + local.tee $4 i64.mul - i64.const 0 + local.get $2 + i64.const 2147483647 + i64.mul + local.get $2 + i64.const 4294966784 + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u i64.add local.tee $1 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 4294966784 + i64.mul + local.get $1 i64.const 4294967295 i64.and - i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul - local.get $1 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 2 - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.add - local.get $3 + i64.sub call $~lib/util/number/genDigits global.get $~lib/util/number/_K call $~lib/util/number/prettify diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 2f611c71ce..3e0533db66 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -155,11 +155,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +163,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -457,12 +455,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 08c13c1897..f07384336e 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -155,11 +155,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +163,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -457,12 +455,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index d425f1eb8e..6ccc127e1a 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -155,11 +155,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +163,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -457,12 +455,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 31953b8931..97149897e3 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -246,11 +246,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -258,7 +254,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -548,12 +546,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index c5017d8041..230b388667 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -158,11 +158,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -170,7 +166,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -460,12 +458,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 15def55ded..83a507b9f7 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -157,11 +157,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -169,7 +165,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -459,12 +457,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 8e9993e7ed..06a1408e43 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -326,9 +326,14 @@ (func $~lib/util/number/utoa_simple (; 4 ;) (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 @@ -337,13 +342,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -351,7 +354,7 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) local.get $0 i64.eqz if @@ -364,16 +367,16 @@ if local.get $0 i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 i32.const 1 i32.shl i32.const 1 call $~lib/rt/stub/__alloc local.tee $3 - local.get $2 local.get $1 + local.get $2 call $~lib/util/number/utoa_simple else i32.const 10 @@ -435,9 +438,15 @@ 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 @@ -446,14 +455,11 @@ i32.const 1 i32.shl i32.add - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 + local.get $4 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 i64.const 0 i64.ne br_if $do-continue|0 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 0fd974f393..6d3d7678b7 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -307,9 +307,14 @@ (func $~lib/util/number/utoa_simple (; 6 ;) (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 @@ -318,13 +323,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -1182,7 +1185,6 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -1204,68 +1206,66 @@ i32.const 1240 i32.load16_s global.set $~lib/util/number/_exp_pow + local.get $0 + local.get $0 global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.set $1 - i64.const -9223372036854774784 - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $2 i64.const 32 i64.shr_u - local.tee $2 - i64.mul - local.get $1 + local.tee $3 i64.const 2147483648 - local.tee $4 i64.mul - local.get $1 - i64.const 1024 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + i64.const 2147483648 i64.mul + i64.const 0 + i64.add + local.tee $1 i64.const 32 i64.shr_u i64.add - local.tee $3 + local.get $1 i64.const 4294967295 i64.and + i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $0 + i32.const 3 + i32.add local.get $3 + i64.const -9223372036854774784 + local.tee $1 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub local.tee $4 - i64.const 9223372036854775296 - local.tee $3 - i64.const 4294967295 - i64.and - local.tee $5 - local.get $2 i64.mul - local.get $1 - i64.const 2147483647 - local.tee $3 + local.get $2 + i64.const 2147483648 i64.mul - local.get $1 - i64.const 4294966784 + local.get $2 + i64.const 1024 + local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $4 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 1024 + i64.mul + local.get $4 i64.const 4294967295 i64.and i64.add @@ -1273,51 +1273,50 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483647 - i64.mul - local.get $5 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $3 - local.get $0 + local.tee $1 local.get $0 + i32.const 3 + i32.add local.get $1 - i64.const 2147483648 + local.get $3 + i64.const 9223372036854775296 + local.tee $1 + i64.const 32 + i64.shr_u + local.tee $4 i64.mul - i64.const 0 + local.get $2 + i64.const 2147483647 + i64.mul + local.get $2 + i64.const 4294966784 + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u i64.add local.tee $1 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 4294966784 + i64.mul + local.get $1 i64.const 4294967295 i64.and - i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul - local.get $1 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 3 - i32.add - local.get $4 - local.get $0 - i32.const 3 - i32.add - local.get $3 + i64.sub call $~lib/util/number/genDigits global.get $~lib/util/number/_K call $~lib/util/number/prettify diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 1072c4a370..05a645b69f 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -863,9 +863,14 @@ (func $~lib/util/number/utoa_simple (; 8 ;) (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 @@ -874,13 +879,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -1131,26 +1134,19 @@ ) (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) local.get $1 f64.const 0 f64.lt - local.tee $10 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -1161,70 +1157,69 @@ local.get $1 end i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 + local.tee $9 i32.const 0 i32.ne - local.tee $6 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $7 + local.set $4 local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $5 + local.get $9 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $9 i32.const 1 i32.sub - local.get $3 + local.get $4 i32.sub - local.set $3 + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $9 + local.get $7 i32.sub - local.get $3 + local.get $4 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $3 + local.get $4 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -1237,8 +1232,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.convert_i32_s local.get $1 f64.ne @@ -1247,81 +1242,74 @@ i32.shr_s i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 3 i32.shl - local.tee $6 + local.tee $7 i32.sub global.set $~lib/util/number/_K - local.get $6 + local.get $7 i32.const 416 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $3 + local.get $4 i32.const 1 i32.shl i32.const 1136 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $3 + i64.const 4294967295 + i64.and + local.set $6 + local.get $0 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $0 local.get $2 local.get $2 i64.clz i32.wrap_i64 - local.tee $3 + local.tee $0 i64.extend_i32_s i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 + i64.const 32 + i64.shr_u + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $3 i64.const 4294967295 i64.and - local.tee $9 + local.tee $11 + local.get $5 i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 local.get $2 i64.const 4294967295 i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 + local.tee $2 + local.get $11 i64.mul - local.get $9 - local.get $8 i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1329,34 +1317,45 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $9 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + i64.mul + local.get $5 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $6 i64.mul - local.get $17 - local.get $15 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.get $2 + local.get $10 + i64.mul + local.get $6 i64.const 4294967295 i64.and i64.add @@ -1364,41 +1363,49 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add - local.get $0 - local.get $11 + i32.const -64 + i32.sub local.get $2 + global.get $~lib/util/number/_frc_minus + local.tee $2 i64.const 32 i64.shr_u + local.tee $6 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and local.tee $2 + local.get $3 i64.mul - local.get $13 - local.get $7 i64.const 32 i64.shr_u - local.tee $7 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.get $2 + local.get $5 + i64.mul + local.get $3 i64.const 4294967295 i64.and i64.add @@ -1406,36 +1413,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $8 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 call $~lib/util/number/genDigits - local.get $10 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $10 + local.get $8 i32.add ) (func $~lib/string/String#get:length (; 11 ;) (param $0 i32) (result i32) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 49ee60b1ff..49c5177f38 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -180,9 +180,14 @@ 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 i32.const 1 @@ -191,13 +196,11 @@ i32.const 1 i32.shl i32.add - local.get $0 - i32.const 10 - i32.rem_u + local.get $5 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 br_if $do-continue|0 end local.get $1 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index c783b68c93..705b3ee376 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -184,9 +184,14 @@ 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 i32.const 1 @@ -195,13 +200,11 @@ i32.const 1 i32.shl i32.add - local.get $0 - i32.const 10 - i32.rem_u + local.get $5 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 br_if $do-continue|0 end local.get $1 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 0a31841912..9ac855beef 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -180,11 +180,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -192,7 +188,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -482,12 +480,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1178,9 +1175,14 @@ (func $~lib/util/number/utoa_simple (; 12 ;) (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 @@ -1189,13 +1191,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -2131,7 +2131,6 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -2146,68 +2145,66 @@ i32.const 1272 i32.load16_s global.set $~lib/util/number/_exp_pow + local.get $0 + local.get $0 global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.set $1 - i64.const -9223372036854774784 - local.tee $4 - i64.const 4294967295 - i64.and - local.tee $3 - local.get $2 i64.const 32 i64.shr_u - local.tee $2 - i64.mul - local.get $1 + local.tee $3 i64.const 2147483648 - local.tee $4 i64.mul - local.get $1 - i64.const 1024 + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + i64.const 2147483648 i64.mul + i64.const 0 + i64.add + local.tee $1 i64.const 32 i64.shr_u i64.add - local.tee $3 + local.get $1 i64.const 4294967295 i64.and + i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $0 + i32.const 1 + i32.add local.get $3 + i64.const -9223372036854774784 + local.tee $1 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub local.tee $4 - i64.const 9223372036854775296 - local.tee $3 - i64.const 4294967295 - i64.and - local.tee $5 - local.get $2 i64.mul - local.get $1 - i64.const 2147483647 - local.tee $3 + local.get $2 + i64.const 2147483648 i64.mul - local.get $1 - i64.const 4294966784 + local.get $2 + i64.const 1024 + local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $4 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 1024 + i64.mul + local.get $4 i64.const 4294967295 i64.and i64.add @@ -2215,51 +2212,50 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483647 - i64.mul - local.get $5 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $3 - local.get $0 + local.tee $1 local.get $0 + i32.const 1 + i32.add local.get $1 - i64.const 2147483648 + local.get $3 + i64.const 9223372036854775296 + local.tee $1 + i64.const 32 + i64.shr_u + local.tee $4 i64.mul - i64.const 0 + local.get $2 + i64.const 2147483647 + i64.mul + local.get $2 + i64.const 4294966784 + local.tee $2 + i64.mul + i64.const 32 + i64.shr_u i64.add local.tee $1 + i64.const 32 + i64.shr_u + i64.add + local.get $3 + i64.const 4294966784 + i64.mul + local.get $1 i64.const 4294967295 i64.and - i64.const 0 i64.add i64.const 2147483647 i64.add i64.const 32 i64.shr_u - local.get $2 - i64.const 2147483648 - i64.mul - local.get $1 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - i32.const 1 - i32.add - local.get $4 - local.get $0 - i32.const 1 - i32.add - local.get $3 + i64.sub call $~lib/util/number/genDigits global.get $~lib/util/number/_K call $~lib/util/number/prettify diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index df997ada08..033cf99ad1 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -192,9 +192,14 @@ 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 i32.const 1 @@ -203,13 +208,11 @@ i32.const 1 i32.shl i32.add - local.get $0 - i32.const 10 - i32.rem_u + local.get $5 i32.const 48 i32.add i32.store16 - local.tee $0 + local.get $0 br_if $do-continue|0 end local.get $1 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index f6984adf75..22db3c8758 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -172,11 +172,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -184,7 +180,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -474,12 +472,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1129,23 +1126,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 @@ -1916,7 +1911,7 @@ local.get $0 call $~lib/array/Array#push local.get $0 - local.tee $2 + local.tee $4 i32.load offset=12 local.tee $1 i32.const 1 @@ -1929,7 +1924,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 i32.load offset=4 local.get $1 i32.const 1 @@ -1940,7 +1935,7 @@ i32.add i32.load drop - local.get $2 + local.get $4 local.get $1 i32.store offset=12 local.get $0 @@ -1951,14 +1946,14 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $2 + local.get $4 i32.const 0 i32.store offset=12 loop $for-loop|0 - local.get $3 + local.get $2 i32.const 10 i32.lt_s if @@ -1975,23 +1970,23 @@ i32.const 0 i32.store offset=12 i32.const 0 - local.set $1 + local.set $3 loop $for-loop|1 - local.get $1 + local.get $3 i32.const 10 i32.lt_s if local.get $0 local.get $0 i32.load offset=12 - local.tee $4 + local.tee $1 i32.const 1 i32.add local.tee $5 call $~lib/array/ensureSize local.get $0 i32.load offset=4 - local.get $4 + local.get $1 i32.const 2 i32.shl i32.add @@ -2000,31 +1995,31 @@ local.get $0 local.get $5 i32.store offset=12 - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $4 call $~lib/rt/pure/__release i32.const 416 i32.const 448 call $~lib/string/String.__concat - local.tee $2 + local.tee $4 i32.const 512 call $~lib/string/String.__concat - local.get $2 + local.get $4 call $~lib/rt/pure/__release call $~lib/rt/pure/__release i32.const 4 @@ -2039,115 +2034,115 @@ i32.const 7 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $4 i32.const 0 i32.store - local.get $2 - local.set $1 - local.get $2 + local.get $4 + local.tee $3 local.get $0 i32.load - local.tee $3 + local.tee $1 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 + local.get $3 i32.store + local.get $4 + local.set $2 local.get $0 local.set $1 - local.get $2 - local.set $3 - local.get $2 + local.get $4 local.get $0 i32.load - local.tee $4 + local.tee $3 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - local.get $4 + local.set $2 + local.get $3 call $~lib/rt/pure/__release end local.get $1 - local.get $3 - i32.store local.get $2 - local.set $3 + i32.store + local.get $4 + local.set $2 local.get $0 - local.get $2 + local.get $4 i32.load - local.tee $4 + local.tee $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end - local.get $3 + local.get $2 local.get $1 i32.store local.get $0 local.set $1 local.get $0 - local.get $3 + local.get $2 i32.load - local.tee $4 + local.tee $3 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end - local.get $3 + local.get $2 local.get $1 i32.store - local.get $3 - local.set $1 local.get $0 - local.set $3 + local.set $1 local.get $2 + local.tee $3 local.get $0 i32.load - local.tee $4 + local.tee $2 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 - local.get $4 + local.set $3 + local.get $2 call $~lib/rt/pure/__release end - local.get $3 local.get $1 + local.get $3 i32.store + local.get $1 + local.set $2 local.get $0 - local.get $2 + local.get $4 i32.load local.tee $1 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $1 call $~lib/rt/pure/__release end + local.get $4 local.get $2 - local.get $3 i32.store local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $4 call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 5ec23bbfd8..16b3f021a5 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -154,11 +154,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -166,7 +162,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -456,12 +454,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 07837e56f8..a6f3cba94c 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -158,11 +158,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -170,7 +166,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -460,12 +458,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 3fb3bb3088..017d0ca459 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -210,11 +210,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -222,7 +218,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -512,12 +510,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index ec464424cc..a346ac4b1c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -370,11 +370,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -382,7 +378,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -672,12 +670,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1266,6 +1263,7 @@ (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) + (local $5 i32) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -1327,19 +1325,15 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $2 - i32.sub - local.set $3 - local.get $0 - local.get $2 + local.tee $5 i32.add - local.tee $2 + local.tee $3 local.get $1 i32.const 255 i32.and @@ -1347,26 +1341,28 @@ i32.mul local.tee $0 i32.store - local.get $2 local.get $3 + local.get $2 + local.get $5 + i32.sub i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.add i32.const 4 i32.sub local.get $0 i32.store - local.get $3 + local.get $2 i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $3 i32.const 4 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 8 i32.add local.get $0 @@ -1384,26 +1380,26 @@ i32.sub local.get $0 i32.store - local.get $3 + local.get $2 i32.const 24 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $3 i32.const 12 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 16 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 20 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 24 i32.add local.get $0 @@ -1431,17 +1427,17 @@ i32.sub local.get $0 i32.store - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.const 4 i32.and i32.const 24 i32.add - local.tee $2 + local.tee $3 i32.add local.set $1 - local.get $3 local.get $2 + local.get $3 i32.sub local.set $2 local.get $0 @@ -2469,6 +2465,7 @@ (func $~lib/array/Array#copyWithin (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $3 local.get $0 i32.load offset=12 @@ -2477,10 +2474,10 @@ local.get $4 i32.lt_s select - local.set $3 + local.set $5 local.get $0 i32.load offset=4 - local.tee $5 + local.tee $3 local.get $1 i32.const 0 i32.lt_s @@ -2502,11 +2499,11 @@ i32.lt_s select end - local.tee $1 + local.tee $6 i32.const 2 i32.shl i32.add - local.get $5 + local.get $3 local.get $2 i32.const 0 i32.lt_s @@ -2514,9 +2511,9 @@ local.get $2 local.get $4 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select @@ -2528,40 +2525,40 @@ i32.lt_s select end - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $3 local.get $4 + local.get $5 i32.add - local.tee $3 + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.const 0 i32.gt_s select else - local.get $3 + local.get $5 local.get $4 - local.get $3 + local.get $5 local.get $4 i32.lt_s select end - local.get $2 - i32.sub - local.tee $2 - local.get $4 local.get $1 i32.sub local.tee $1 - local.get $2 + local.get $4 + local.get $6 + i32.sub + local.tee $2 local.get $1 + local.get $2 i32.lt_s select i32.const 2 @@ -6170,9 +6167,14 @@ (func $~lib/util/number/utoa_simple (; 127 ;) (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 @@ -6181,13 +6183,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -7189,26 +7189,19 @@ ) (func $~lib/util/number/dtoa_core (; 138 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) local.get $1 f64.const 0 f64.lt - local.tee $10 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -7219,70 +7212,69 @@ local.get $1 end i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 + local.tee $9 i32.const 0 i32.ne - local.tee $6 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $7 + local.set $4 local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $5 + local.get $9 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $9 i32.const 1 i32.sub - local.get $3 + local.get $4 i32.sub - local.set $3 + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $9 + local.get $7 i32.sub - local.get $3 + local.get $4 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $3 + local.get $4 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -7295,8 +7287,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.convert_i32_s local.get $1 f64.ne @@ -7305,81 +7297,74 @@ i32.shr_s i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 3 i32.shl - local.tee $6 + local.tee $7 i32.sub global.set $~lib/util/number/_K - local.get $6 + local.get $7 i32.const 5968 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $3 + local.get $4 i32.const 1 i32.shl i32.const 6688 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $3 + i64.const 4294967295 + i64.and + local.set $6 + local.get $0 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $0 local.get $2 local.get $2 i64.clz i32.wrap_i64 - local.tee $3 + local.tee $0 i64.extend_i32_s i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 + i64.const 32 + i64.shr_u + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $3 i64.const 4294967295 i64.and - local.tee $9 + local.tee $11 + local.get $5 i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 local.get $2 i64.const 4294967295 i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 + local.tee $2 + local.get $11 i64.mul - local.get $9 - local.get $8 i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -7387,34 +7372,45 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $9 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + i64.mul + local.get $5 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $6 i64.mul - local.get $17 - local.get $15 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.get $2 + local.get $10 + i64.mul + local.get $6 i64.const 4294967295 i64.and i64.add @@ -7422,41 +7418,49 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add - local.get $0 - local.get $11 + i32.const -64 + i32.sub local.get $2 + global.get $~lib/util/number/_frc_minus + local.tee $2 i64.const 32 i64.shr_u + local.tee $6 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and local.tee $2 + local.get $3 i64.mul - local.get $13 - local.get $7 i64.const 32 i64.shr_u - local.tee $7 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.get $2 + local.get $5 + i64.mul + local.get $3 i64.const 4294967295 i64.and i64.add @@ -7464,36 +7468,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $8 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 call $~lib/util/number/genDigits - local.get $10 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $10 + local.get $8 i32.add ) (func $~lib/util/number/dtoa_stream (; 139 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) @@ -8416,11 +8401,17 @@ select ) (func $~lib/util/number/utoa_simple (; 150 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) + (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 @@ -8429,14 +8420,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 i64.const 0 i64.ne br_if $do-continue|0 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 0d6dcfffcf..f4f1c71442 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -163,11 +163,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -175,7 +171,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -465,12 +463,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1115,23 +1112,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 30ec2116a7..48a4f542a8 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -171,11 +171,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -183,7 +179,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -473,12 +471,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index fdcac55bfb..5f2397f815 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -496,8 +496,7 @@ (local $2 i64) (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) + (local $5 i32) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -539,7 +538,7 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul @@ -598,9 +597,6 @@ local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul local.set $0 local.get $4 f64.const 0.5 @@ -609,9 +605,12 @@ local.get $3 f64.mul local.tee $4 - local.get $5 + local.get $0 f64.const 0.6666666666666735 local.get $0 + local.get $0 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -638,7 +637,7 @@ f64.add f64.add f64.mul - local.get $6 + local.get $5 local.get $1 i32.const 20 i32.shr_s @@ -1532,7 +1531,10 @@ local.get $0 f64.mul f64.div - local.tee $1 + local.set $1 + local.get $0 + local.get $0 + local.get $1 local.get $0 f64.sub f64.const 2 @@ -1541,10 +1543,6 @@ local.get $1 f64.add f64.div - local.set $1 - local.get $0 - local.get $0 - local.get $1 f64.mul f64.add ) @@ -1590,8 +1588,8 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i64) @@ -1611,15 +1609,15 @@ i32.shl i32.const 32 i32.add - local.tee $8 + local.tee $7 i64.load - local.set $6 - local.get $8 + local.set $5 + local.get $7 i64.load offset=8 - local.set $2 - local.get $8 + local.set $3 + local.get $7 i64.load offset=16 - local.set $5 + local.set $4 local.get $1 i64.const 63 i64.and @@ -1627,39 +1625,35 @@ i64.const 0 i64.ne if - local.get $6 + local.get $5 local.get $1 i64.shl - local.get $2 + local.get $3 i64.const 64 local.get $1 i64.sub - local.tee $3 + local.tee $2 i64.shr_u i64.or - local.set $6 - local.get $2 + local.set $5 + local.get $3 local.get $1 i64.shl - local.get $5 - local.get $3 + local.get $4 + local.get $2 i64.shr_u i64.or - local.set $2 - local.get $5 + local.set $3 + local.get $4 local.get $1 i64.shl - local.get $8 + local.get $7 i64.load offset=24 - local.get $3 + local.get $2 i64.shr_u i64.or - local.set $5 + local.set $4 end - local.get $2 - i64.const 4294967295 - i64.and - local.tee $4 local.get $0 i64.const 4503599627370495 i64.and @@ -1668,36 +1662,40 @@ local.tee $1 i64.const 4294967295 i64.and - local.tee $7 - i64.mul - local.set $3 - local.get $7 - local.get $2 + local.tee $2 + local.get $3 i64.const 32 i64.shr_u - local.tee $7 + local.tee $8 i64.mul local.get $3 + i64.const 4294967295 + i64.and + local.tee $6 + local.get $2 + i64.mul + local.tee $9 i64.const 32 i64.shr_u i64.add - local.tee $2 - i64.const 32 - i64.shr_u - local.get $4 + local.set $3 local.get $1 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + local.get $6 i64.mul - local.get $2 + local.get $3 i64.const 4294967295 i64.and i64.add local.set $2 - local.get $4 - local.get $7 + local.get $8 + local.get $10 i64.mul + local.get $3 + i64.const 32 + i64.shr_u i64.add local.get $2 i64.const 32 @@ -1706,18 +1704,18 @@ global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi local.get $1 - local.get $6 + local.get $5 i64.mul i64.add - local.get $5 + local.get $4 i64.const 32 i64.shr_u local.get $1 i64.const 32 i64.shr_s i64.mul - local.tee $5 - local.get $3 + local.tee $3 + local.get $9 i64.const 4294967295 i64.and local.get $2 @@ -1726,94 +1724,94 @@ i64.add i64.add local.tee $1 - local.get $5 + local.get $3 i64.lt_u i64.extend_i32_u i64.add - local.tee $7 + local.tee $8 i64.const 2 i64.shl local.get $1 i64.const 62 i64.shr_u i64.or - local.tee $6 + local.tee $5 i64.const 63 i64.shr_s - local.tee $5 + local.tee $4 i64.const 1 i64.shr_s - local.get $6 + local.get $5 i64.xor - local.tee $3 + local.tee $2 i64.clz - local.set $2 - local.get $3 + local.set $3 local.get $2 + local.get $3 i64.shl - local.get $5 + local.get $4 local.get $1 i64.const 2 i64.shl i64.xor - local.tee $9 + local.tee $6 i64.const 64 - local.get $2 + local.get $3 i64.sub i64.shr_u i64.or local.tee $1 i64.const 4294967295 i64.and - local.tee $4 + local.set $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $9 i64.const 560513588 i64.mul - local.set $3 - local.get $4 + local.get $2 i64.const 3373259426 i64.mul - local.get $3 + local.get $2 + i64.const 560513588 + i64.mul + local.tee $10 i64.const 32 i64.shr_u i64.add - local.tee $4 - i64.const 32 - i64.shr_u - local.get $1 - i64.const 32 - i64.shr_u local.tee $11 - i64.const 560513588 - i64.mul - local.get $4 i64.const 4294967295 i64.and i64.add - local.set $4 - local.get $11 + local.set $2 + local.get $9 i64.const 3373259426 i64.mul + local.get $11 + i64.const 32 + i64.shr_u i64.add - local.get $4 + local.get $2 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - local.get $3 + local.get $10 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $3 + local.tee $2 f64.const 3.753184150245214e-04 local.get $1 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $9 - local.get $2 + local.get $6 + local.get $3 i64.shl f64.convert_i64_u f64.mul @@ -1823,7 +1821,7 @@ i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi - local.tee $4 + local.tee $6 i64.const 11 i64.shr_u i64.add @@ -1831,10 +1829,10 @@ global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 local.get $1 - local.get $4 + local.get $6 i64.const 53 i64.shl - local.get $3 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -1844,12 +1842,12 @@ global.set $~lib/math/rempio2_y1 global.get $~lib/math/rempio2_y0 i64.const 4372995238176751616 - local.get $2 + local.get $3 i64.const 52 i64.shl i64.sub local.get $0 - local.get $6 + local.get $5 i64.xor i64.const -9223372036854775808 i64.and @@ -1862,10 +1860,10 @@ local.get $12 f64.mul global.set $~lib/math/rempio2_y1 - local.get $7 + local.get $8 i64.const 62 i64.shr_s - local.get $5 + local.get $4 i64.sub i32.wrap_i64 ) @@ -1877,7 +1875,6 @@ (local $5 i32) (local $6 f64) (local $7 i64) - (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $7 @@ -1902,25 +1899,21 @@ f64.const 1 return end + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - f64.const 0.5 - local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.sub - local.tee $6 + local.tee $3 f64.const 1 - local.get $6 - f64.sub local.get $3 f64.sub + local.get $1 + f64.sub local.get $2 local.get $2 f64.const 0.0416666666666666 @@ -1933,7 +1926,10 @@ f64.mul f64.add f64.mul - local.get $1 + local.get $2 + local.get $2 + f64.mul + local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 @@ -2093,15 +2089,11 @@ i32.const 1 i32.and if (result f64) + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 0.00833333333332249 - local.get $1 f64.const -1.984126982985795e-04 local.get $1 f64.const 2.7557313707070068e-06 @@ -2110,7 +2102,9 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $1 + local.get $1 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $1 @@ -2141,25 +2135,21 @@ f64.sub f64.sub else + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 1 - f64.const 0.5 - local.get $1 f64.mul - local.tee $6 + local.tee $3 f64.sub - local.tee $8 + local.tee $6 f64.const 1 - local.get $8 - f64.sub local.get $6 f64.sub + local.get $3 + f64.sub local.get $1 local.get $1 f64.const 0.0416666666666666 @@ -2172,7 +2162,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $3 local.get $3 f64.mul f64.const -2.7557314351390663e-07 @@ -2897,9 +2890,10 @@ local.get $0 end end - local.tee $0 - local.get $0 - local.get $0 + local.set $0 + local.get $1 + local.get $1 + local.get $1 f64.const 134217729 f64.mul local.tee $2 @@ -2909,9 +2903,9 @@ local.tee $6 f64.sub local.set $10 - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.const 134217729 f64.mul local.tee $2 @@ -2922,8 +2916,8 @@ f64.sub local.set $2 local.get $5 - local.get $7 - local.get $7 + local.get $6 + local.get $6 f64.mul local.get $1 local.get $1 @@ -2931,15 +2925,15 @@ local.tee $1 f64.sub f64.const 2 - local.get $7 + local.get $6 f64.mul - local.get $2 + local.get $10 f64.add - local.get $2 + local.get $10 f64.mul f64.add - local.get $6 - local.get $6 + local.get $7 + local.get $7 f64.mul local.get $0 local.get $0 @@ -2947,11 +2941,11 @@ local.tee $0 f64.sub f64.const 2 - local.get $6 + local.get $7 f64.mul - local.get $10 + local.get $2 f64.add - local.get $10 + local.get $2 f64.mul f64.add f64.add @@ -2994,32 +2988,35 @@ call $~lib/math/NativeMath.log ) (func $~lib/math/NativeMath.log10 (; 35 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.const 31 i32.shr_u end if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.eqz @@ -3031,7 +3028,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -3048,25 +3045,25 @@ f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return else - local.get $3 + local.get $2 i64.const 32 i64.shl i64.eqz i32.const 0 - local.get $2 + local.get $1 i32.const 1072693248 i32.eq select @@ -3076,13 +3073,13 @@ end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add - local.tee $2 + local.tee $1 i32.const 1048575 i32.and i32.const 1072079006 @@ -3094,55 +3091,61 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $1 + local.tee $0 f64.const 2 - local.get $1 + local.get $0 f64.add f64.div - local.tee $5 - local.get $5 - f64.mul - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 f64.mul - local.set $0 + local.set $3 local.get $8 - local.get $2 + local.get $1 i32.const 20 i32.shr_u i32.const 1023 i32.sub i32.add f64.convert_i32_s - local.tee $4 + local.tee $9 f64.const 0.30102999566361177 f64.mul - local.set $7 - local.get $4 - f64.const 3.694239077158931e-13 - f64.mul - local.get $1 - local.get $1 + local.tee $10 + local.get $0 f64.const 0.5 - local.get $1 + local.get $0 f64.mul - local.get $1 + local.get $0 f64.mul - local.tee $1 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $4 + local.tee $6 + f64.const 0.4342944818781689 + f64.mul + local.tee $11 + f64.add + local.set $7 + local.get $9 + f64.const 3.694239077158931e-13 + f64.mul + local.get $0 + local.get $6 f64.sub - local.get $1 + local.get $5 f64.sub + local.get $4 local.get $5 - local.get $1 - local.get $6 + local.get $3 f64.const 0.6666666666666735 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -3171,7 +3174,7 @@ f64.mul f64.add local.tee $0 - local.get $4 + local.get $6 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -3180,19 +3183,13 @@ f64.const 0.4342944818781689 f64.mul f64.add + local.get $10 local.get $7 - local.get $7 - local.get $4 - f64.const 0.4342944818781689 - f64.mul - local.tee $0 - f64.add - local.tee $1 f64.sub - local.get $0 + local.get $11 f64.add f64.add - local.get $1 + local.get $7 f64.add ) (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) @@ -3204,31 +3201,34 @@ call $~lib/math/NativeMath.log1p ) (func $~lib/math/NativeMath.log2 (; 38 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 i32) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.const 31 i32.shr_u end if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.eqz @@ -3240,7 +3240,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -3252,30 +3252,30 @@ return end i32.const -54 - local.set $7 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return else - local.get $3 + local.get $2 i64.const 32 i64.shl i64.eqz i32.const 0 - local.get $2 + local.get $1 i32.const 1072693248 i32.eq select @@ -3285,13 +3285,13 @@ end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add - local.tee $2 + local.tee $1 i32.const 1048575 i32.and i32.const 1072079006 @@ -3303,40 +3303,55 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $1 + local.tee $0 f64.const 2 - local.get $1 + local.get $0 f64.add f64.div local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul - local.set $0 - local.get $1 + local.set $3 + local.get $8 local.get $1 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + i32.add + f64.convert_i32_s + local.tee $9 + local.get $0 f64.const 0.5 - local.get $1 + local.get $0 f64.mul - local.get $1 + local.get $0 f64.mul - local.tee $1 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $6 + f64.const 1.4426950407214463 + f64.mul + local.tee $10 + f64.add + local.set $7 + local.get $0 + local.get $6 f64.sub - local.get $1 + local.get $5 f64.sub local.get $4 - local.get $1 local.get $5 + local.get $3 f64.const 0.6666666666666735 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -3364,23 +3379,7 @@ f64.add f64.mul f64.add - local.set $0 - local.get $7 - local.get $2 - i32.const 20 - i32.shr_u - i32.const 1023 - i32.sub - i32.add - f64.convert_i32_s - local.tee $4 - local.get $6 - f64.const 1.4426950407214463 - f64.mul - local.tee $5 - f64.add - local.set $1 - local.get $0 + local.tee $0 local.get $6 f64.add f64.const 1.6751713164886512e-10 @@ -3389,13 +3388,13 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $4 - local.get $1 + local.get $9 + local.get $7 f64.sub - local.get $5 + local.get $10 f64.add f64.add - local.get $1 + local.get $7 f64.add ) (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) @@ -3420,18 +3419,18 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) + (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) (local $15 i64) - (local $16 i32) + (local $16 f64) (local $17 i32) - (local $18 f64) - (local $19 i32) - (local $20 f64) + (local $18 i32) + (local $19 f64) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -3488,12 +3487,12 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $19 + local.set $20 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 @@ -3528,7 +3527,7 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $20 i32.const 0 local.get $4 i32.const 2146435072 @@ -3546,7 +3545,7 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -3567,30 +3566,30 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $10 + local.set $9 i32.const 2 local.get $6 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $9 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $11 local.get $10 + local.get $9 i32.shl i32.eq select @@ -3598,7 +3597,7 @@ i32.const 0 end end - local.set $17 + local.set $18 end local.get $6 i32.eqz @@ -3607,7 +3606,7 @@ i32.const 2146435072 i32.eq if - local.get $19 + local.get $20 local.get $4 i32.const 1072693248 i32.sub @@ -3672,7 +3671,7 @@ i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -3684,8 +3683,8 @@ end local.get $0 f64.abs - local.set $3 - local.get $19 + local.set $2 + local.get $20 i32.eqz if i32.const 1 @@ -3701,52 +3700,52 @@ select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 + local.get $2 local.get $7 i32.const 0 i32.lt_s select - local.set $3 - local.get $16 + local.set $2 + local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $17 + local.get $18 local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 - local.get $17 + local.get $2 + local.get $18 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $12 - local.get $16 + local.set $11 + local.get $17 i32.const 0 i32.lt_s if - local.get $17 + local.get $18 i32.eqz if local.get $0 @@ -3759,11 +3758,11 @@ end f64.const -1 f64.const 1 - local.get $17 + local.get $18 i32.const 1 i32.eq select - local.set $12 + local.set $11 end local.get $8 i32.const 1105199104 @@ -3802,12 +3801,12 @@ i32.const 1072693247 i32.lt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -3822,12 +3821,12 @@ i32.const 1072693248 i32.gt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -3838,31 +3837,29 @@ select return end - local.get $3 + f64.const 1.4426950216293335 + local.get $2 f64.const 1 f64.sub + local.tee $0 + f64.mul local.tee $2 - local.get $2 + local.get $0 + f64.const 1.9259629911266175e-08 + f64.mul + local.get $0 + local.get $0 f64.mul f64.const 0.5 - local.get $2 + local.get $0 f64.const 0.3333333333333333 - local.get $2 + local.get $0 f64.const 0.25 f64.mul f64.sub f64.mul f64.sub f64.mul - local.set $0 - f64.const 1.4426950216293335 - local.get $2 - f64.mul - local.tee $3 - local.get $2 - f64.const 1.9259629911266175e-08 - f64.mul - local.get $0 f64.const 1.4426950408889634 f64.mul f64.sub @@ -3872,10 +3869,10 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 + local.set $12 local.get $0 - local.get $9 - local.get $3 + local.get $12 + local.get $2 f64.sub f64.sub else @@ -3885,10 +3882,10 @@ i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3936,7 +3933,7 @@ end end local.set $5 - local.get $3 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and @@ -3946,58 +3943,37 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $3 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 select - local.tee $0 + local.tee $3 f64.sub - local.tee $9 + local.tee $2 f64.const 1 + local.get $13 local.get $3 - local.get $0 f64.add f64.div - local.tee $2 + local.tee $0 f64.mul - local.tee $18 + local.tee $19 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $13 - local.get $3 - local.get $4 - i32.const 1 - i32.shr_s - i32.const 536870912 - i32.or - i32.const 524288 - i32.add - local.get $5 - i32.const 18 - i32.shl - i32.add - i64.extend_i32_s - i64.const 32 - i64.shl - f64.reinterpret_i64 - local.tee $3 - local.get $0 - f64.sub - f64.sub - local.set $0 + local.tee $16 + local.get $16 + f64.mul + local.set $12 f64.const 0.9617967009544373 - local.get $13 + local.get $16 f64.const 3 - local.get $13 - local.get $13 - f64.mul - local.tee $20 + local.get $12 f64.add - local.get $18 - local.get $18 + local.get $19 + local.get $19 f64.mul local.tee $14 local.get $14 @@ -4024,20 +4000,39 @@ f64.mul f64.add f64.mul + local.get $0 local.get $2 - local.get $9 - local.get $13 - local.get $3 + local.get $16 + local.get $4 + i32.const 1 + i32.shr_s + i32.const 536870912 + i32.or + i32.const 524288 + i32.add + local.get $5 + i32.const 18 + i32.shl + i32.add + i64.extend_i32_s + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.tee $0 f64.mul f64.sub + local.get $16 local.get $13 local.get $0 + local.get $3 + f64.sub + f64.sub f64.mul f64.sub f64.mul - local.tee $2 - local.get $13 - local.get $18 + local.tee $3 + local.get $16 + local.get $19 f64.add f64.mul f64.add @@ -4047,20 +4042,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $9 + local.tee $13 f64.mul - local.tee $3 - local.get $2 - local.get $9 + local.tee $2 + local.get $3 + local.get $13 f64.mul local.get $0 - local.get $9 + local.get $13 f64.const 3 f64.sub - local.get $20 + local.get $12 f64.sub f64.sub - local.get $18 + local.get $19 f64.mul f64.add local.tee $0 @@ -4069,15 +4064,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $2 + local.tee $3 f64.mul - local.tee $20 + local.tee $13 f64.const -7.028461650952758e-09 - local.get $2 + local.get $3 f64.mul local.get $0 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -4088,13 +4083,13 @@ local.get $5 select f64.add - local.tee $2 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -4104,18 +4099,18 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 - local.get $2 - local.get $9 + local.set $12 + local.get $3 + local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub - local.get $20 + local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -4124,17 +4119,17 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $9 + local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 - local.get $9 + local.get $12 f64.mul - local.tee $2 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 @@ -4147,12 +4142,12 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $9 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $9 i32.const 1083179008 i32.sub i32.or @@ -4160,36 +4155,36 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $2 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $10 + local.get $9 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $10 + local.get $9 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -4197,19 +4192,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $9 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -4220,7 +4215,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -4228,7 +4223,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -4240,18 +4235,18 @@ local.tee $6 i32.sub local.get $6 - local.get $10 + local.get $9 i32.const 0 i32.lt_s select local.set $6 - local.get $2 + local.get $3 local.get $0 f64.sub - local.set $2 + local.set $3 end local.get $1 - local.get $2 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -4260,10 +4255,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -4274,14 +4269,14 @@ f64.add local.tee $1 f64.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $12 + local.get $11 f64.const 1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -4309,17 +4304,17 @@ f64.sub f64.div local.get $1 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $2 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $2 + local.get $3 f64.sub f64.sub local.tee $0 @@ -4355,14 +4350,14 @@ f64.mul return end - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -4402,7 +4397,6 @@ (local $5 i32) (local $6 f64) (local $7 i64) - (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $7 @@ -4427,21 +4421,11 @@ local.get $0 return end + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $2 - local.get $2 - f64.mul - local.set $1 - local.get $0 - local.get $2 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $2 - f64.const 0.00833333333332249 - local.get $2 f64.const -1.984126982985795e-04 local.get $2 f64.const 2.7557313707070068e-06 @@ -4450,7 +4434,9 @@ f64.mul f64.add local.get $2 - local.get $1 + local.get $2 + local.get $2 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $2 @@ -4459,6 +4445,14 @@ f64.add f64.mul f64.add + local.set $1 + local.get $0 + local.get $2 + local.get $0 + f64.mul + f64.const -0.16666666666666632 + local.get $2 + local.get $1 f64.mul f64.add f64.mul @@ -4602,25 +4596,21 @@ i32.const 1 i32.and if (result f64) + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 1 - f64.const 0.5 - local.get $1 f64.mul - local.tee $6 + local.tee $3 f64.sub - local.tee $8 + local.tee $6 f64.const 1 - local.get $8 - f64.sub local.get $6 f64.sub + local.get $3 + f64.sub local.get $1 local.get $1 f64.const 0.0416666666666666 @@ -4633,7 +4623,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $3 local.get $3 f64.mul f64.const -2.7557314351390663e-07 @@ -4655,15 +4648,11 @@ f64.add f64.add else + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 0.00833333333332249 - local.get $1 f64.const -1.984126982985795e-04 local.get $1 f64.const 2.7557313707070068e-06 @@ -4672,7 +4661,9 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $1 + local.get $1 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $1 @@ -4809,7 +4800,6 @@ (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -4848,18 +4838,18 @@ local.get $0 f64.mul local.tee $4 - local.get $4 + local.get $0 f64.mul - local.set $3 + local.set $5 local.get $0 local.get $1 local.get $4 + local.get $5 + f64.const 0.13333333333320124 + local.get $4 local.get $4 - local.get $0 f64.mul - local.tee $5 - f64.const 0.13333333333320124 - local.get $3 + local.tee $3 f64.const 0.021869488294859542 local.get $3 f64.const 3.5920791075913124e-03 @@ -4952,7 +4942,6 @@ local.get $1 return end - f64.const 1 f64.const -1 local.get $1 f64.div @@ -4962,6 +4951,9 @@ i64.and f64.reinterpret_i64 local.tee $4 + local.get $5 + f64.const 1 + local.get $4 local.get $1 i64.reinterpret_f64 i64.const -4294967296 @@ -4970,10 +4962,6 @@ local.tee $1 f64.mul f64.add - local.set $8 - local.get $4 - local.get $5 - local.get $8 local.get $4 local.get $3 local.get $1 @@ -5570,8 +5558,7 @@ (local $1 i32) (local $2 f32) (local $3 f32) - (local $4 f32) - (local $5 i32) + (local $4 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -5609,7 +5596,7 @@ return end i32.const -25 - local.set $5 + local.set $4 local.get $0 f32.const 33554432 f32.mul @@ -5651,9 +5638,6 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 local.get $3 f32.const 0.5 @@ -5662,9 +5646,12 @@ local.get $0 f32.mul local.tee $3 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $2 f32.const 0.2849878668785095 f32.mul f32.add @@ -5679,7 +5666,7 @@ f32.add f32.add f32.mul - local.get $5 + local.get $4 local.get $1 i32.const 23 i32.shr_s @@ -7426,9 +7413,8 @@ (local $2 f32) (local $3 f32) (local $4 f32) - (local $5 f32) - (local $6 i32) - (local $7 f32) + (local $5 i32) + (local $6 f32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -7466,7 +7452,7 @@ return end i32.const -25 - local.set $6 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -7508,11 +7494,8 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 - local.get $6 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7520,7 +7503,7 @@ i32.sub i32.add f32.convert_i32_s - local.tee $7 + local.tee $6 f32.const 7.903415166765626e-07 f32.mul local.get $0 @@ -7536,22 +7519,25 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub local.get $3 local.get $0 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $0 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $2 + local.get $0 f32.const 0.40000972151756287 - local.get $2 + local.get $0 f32.const 0.24279078841209412 f32.mul f32.add @@ -7561,7 +7547,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -7570,11 +7556,11 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $5 + local.get $4 f32.const 0.434326171875 f32.mul f32.add - local.get $7 + local.get $6 f32.const 0.3010292053222656 f32.mul f32.add @@ -7592,8 +7578,7 @@ (local $2 f32) (local $3 f32) (local $4 f32) - (local $5 f32) - (local $6 i32) + (local $5 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -7631,7 +7616,7 @@ return end i32.const -25 - local.set $6 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -7673,9 +7658,6 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 local.get $0 local.get $0 @@ -7690,22 +7672,25 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub local.get $3 local.get $0 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $0 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $2 + local.get $0 f32.const 0.40000972151756287 - local.get $2 + local.get $0 f32.const 0.24279078841209412 f32.mul f32.add @@ -7715,7 +7700,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -7723,11 +7708,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $4 f32.const 1.44287109375 f32.mul f32.add - local.get $6 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7759,7 +7744,6 @@ (local $6 f64) (local $7 i32) (local $8 i64) - (local $9 f64) local.get $1 f32.abs f32.const 2 @@ -8061,7 +8045,6 @@ local.set $2 end end - f64.const 1.4426950408774342 local.get $2 local.get $2 i32.const 1060306944 @@ -8088,6 +8071,22 @@ f64.const 1 f64.sub local.tee $4 + local.get $4 + f64.mul + local.set $6 + local.get $1 + f64.promote_f32 + f64.const 0.288457581109214 + local.get $4 + f64.mul + f64.const -0.36092606229713164 + f64.add + local.get $6 + local.get $6 + f64.mul + f64.mul + f64.const 1.4426950408774342 + local.get $4 f64.mul local.get $3 f64.load offset=8 @@ -8102,25 +8101,9 @@ f64.mul f64.const -0.7213474675006291 f64.add - local.get $4 - local.get $4 - f64.mul - local.tee $6 - f64.mul - f64.add - local.set $9 - local.get $1 - f64.promote_f32 - f64.const 0.288457581109214 - local.get $4 - f64.mul - f64.const -0.36092606229713164 - f64.add local.get $6 - local.get $6 - f64.mul f64.mul - local.get $9 + f64.add f64.add f64.mul local.tee $4 @@ -8159,31 +8142,12 @@ br $~lib/util/math/powf_lut|inlined.0 end end + f64.const 0.6931471806916203 + local.get $4 local.get $4 f64.const 211106232532992 f64.add local.tee $6 - i64.reinterpret_f64 - local.tee $8 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.const 560 - i32.add - i64.load - local.get $8 - local.get $7 - i64.extend_i32_u - i64.add - i64.const 47 - i64.shl - i64.add - local.set $8 - f64.const 0.6931471806916203 - local.get $4 - local.get $6 f64.const 211106232532992 f64.sub f64.sub @@ -8201,7 +8165,24 @@ f64.mul f64.mul f64.add + local.get $6 + i64.reinterpret_f64 + local.tee $8 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.const 560 + i32.add + i64.load local.get $8 + local.get $7 + i64.extend_i32_u + i64.add + i64.const 47 + i64.shl + i64.add f64.reinterpret_i64 f64.mul f32.demote_f64 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ec32c47d57..1138be7cbc 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -179,11 +179,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -191,7 +187,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -481,12 +479,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1186,23 +1183,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index fe31cbbc0b..1ae7646516 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1046,8 +1046,7 @@ (local $2 i64) (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) + (local $5 i32) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -1089,7 +1088,7 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul @@ -1148,9 +1147,6 @@ local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul local.set $0 local.get $4 f64.const 0.5 @@ -1159,9 +1155,12 @@ local.get $3 f64.mul local.tee $4 - local.get $5 + local.get $0 f64.const 0.6666666666666735 local.get $0 + local.get $0 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -1188,7 +1187,7 @@ f64.add f64.add f64.mul - local.get $6 + local.get $5 local.get $1 i32.const 20 i32.shr_s @@ -1452,8 +1451,7 @@ (local $1 i32) (local $2 f32) (local $3 f32) - (local $4 f32) - (local $5 i32) + (local $4 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -1491,7 +1489,7 @@ return end i32.const -25 - local.set $5 + local.set $4 local.get $0 f32.const 33554432 f32.mul @@ -1533,9 +1531,6 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 local.get $3 f32.const 0.5 @@ -1544,9 +1539,12 @@ local.get $0 f32.mul local.tee $3 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $2 f32.const 0.2849878668785095 f32.mul f32.add @@ -1561,7 +1559,7 @@ f32.add f32.add f32.mul - local.get $5 + local.get $4 local.get $1 i32.const 23 i32.shr_s @@ -3130,7 +3128,10 @@ local.get $0 f64.mul f64.div - local.tee $1 + local.set $1 + local.get $0 + local.get $0 + local.get $1 local.get $0 f64.sub f64.const 2 @@ -3139,10 +3140,6 @@ local.get $1 f64.add f64.div - local.set $1 - local.get $0 - local.get $0 - local.get $1 f64.mul f64.add ) @@ -3298,8 +3295,8 @@ (local $4 i64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i32) + (local $7 i32) + (local $8 i64) (local $9 i64) (local $10 i64) (local $11 i64) @@ -3319,15 +3316,15 @@ i32.shl i32.const 80 i32.add - local.tee $8 + local.tee $7 i64.load - local.set $6 - local.get $8 + local.set $5 + local.get $7 i64.load offset=8 - local.set $2 - local.get $8 + local.set $3 + local.get $7 i64.load offset=16 - local.set $5 + local.set $4 local.get $1 i64.const 63 i64.and @@ -3335,39 +3332,35 @@ i64.const 0 i64.ne if - local.get $6 + local.get $5 local.get $1 i64.shl - local.get $2 + local.get $3 i64.const 64 local.get $1 i64.sub - local.tee $3 + local.tee $2 i64.shr_u i64.or - local.set $6 - local.get $2 + local.set $5 + local.get $3 local.get $1 i64.shl - local.get $5 - local.get $3 + local.get $4 + local.get $2 i64.shr_u i64.or - local.set $2 - local.get $5 + local.set $3 + local.get $4 local.get $1 i64.shl - local.get $8 + local.get $7 i64.load offset=24 - local.get $3 + local.get $2 i64.shr_u i64.or - local.set $5 + local.set $4 end - local.get $2 - i64.const 4294967295 - i64.and - local.tee $4 local.get $0 i64.const 4503599627370495 i64.and @@ -3376,36 +3369,40 @@ local.tee $1 i64.const 4294967295 i64.and - local.tee $7 - i64.mul - local.set $3 - local.get $7 - local.get $2 + local.tee $2 + local.get $3 i64.const 32 i64.shr_u - local.tee $7 + local.tee $8 i64.mul local.get $3 + i64.const 4294967295 + i64.and + local.tee $6 + local.get $2 + i64.mul + local.tee $9 i64.const 32 i64.shr_u i64.add - local.tee $2 - i64.const 32 - i64.shr_u - local.get $4 + local.set $3 local.get $1 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + local.get $6 i64.mul - local.get $2 + local.get $3 i64.const 4294967295 i64.and i64.add local.set $2 - local.get $4 - local.get $7 + local.get $8 + local.get $10 i64.mul + local.get $3 + i64.const 32 + i64.shr_u i64.add local.get $2 i64.const 32 @@ -3414,18 +3411,18 @@ global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi local.get $1 - local.get $6 + local.get $5 i64.mul i64.add - local.get $5 + local.get $4 i64.const 32 i64.shr_u local.get $1 i64.const 32 i64.shr_s i64.mul - local.tee $5 - local.get $3 + local.tee $3 + local.get $9 i64.const 4294967295 i64.and local.get $2 @@ -3434,94 +3431,94 @@ i64.add i64.add local.tee $1 - local.get $5 + local.get $3 i64.lt_u i64.extend_i32_u i64.add - local.tee $7 + local.tee $8 i64.const 2 i64.shl local.get $1 i64.const 62 i64.shr_u i64.or - local.tee $6 + local.tee $5 i64.const 63 i64.shr_s - local.tee $5 + local.tee $4 i64.const 1 i64.shr_s - local.get $6 + local.get $5 i64.xor - local.tee $3 + local.tee $2 i64.clz - local.set $2 - local.get $3 + local.set $3 local.get $2 + local.get $3 i64.shl - local.get $5 + local.get $4 local.get $1 i64.const 2 i64.shl i64.xor - local.tee $9 + local.tee $6 i64.const 64 - local.get $2 + local.get $3 i64.sub i64.shr_u i64.or local.tee $1 i64.const 4294967295 i64.and - local.tee $4 + local.set $2 + local.get $1 + i64.const 32 + i64.shr_u + local.tee $9 i64.const 560513588 i64.mul - local.set $3 - local.get $4 + local.get $2 i64.const 3373259426 i64.mul - local.get $3 + local.get $2 + i64.const 560513588 + i64.mul + local.tee $10 i64.const 32 i64.shr_u i64.add - local.tee $4 - i64.const 32 - i64.shr_u - local.get $1 - i64.const 32 - i64.shr_u local.tee $11 - i64.const 560513588 - i64.mul - local.get $4 i64.const 4294967295 i64.and i64.add - local.set $4 - local.get $11 + local.set $2 + local.get $9 i64.const 3373259426 i64.mul + local.get $11 + i64.const 32 + i64.shr_u i64.add - local.get $4 + local.get $2 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - local.get $3 + local.get $10 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $3 + local.tee $2 f64.const 3.753184150245214e-04 local.get $1 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $9 - local.get $2 + local.get $6 + local.get $3 i64.shl f64.convert_i64_u f64.mul @@ -3531,7 +3528,7 @@ i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi - local.tee $4 + local.tee $6 i64.const 11 i64.shr_u i64.add @@ -3539,10 +3536,10 @@ global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 local.get $1 - local.get $4 + local.get $6 i64.const 53 i64.shl - local.get $3 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -3552,12 +3549,12 @@ global.set $~lib/math/rempio2_y1 global.get $~lib/math/rempio2_y0 i64.const 4372995238176751616 - local.get $2 + local.get $3 i64.const 52 i64.shl i64.sub local.get $0 - local.get $6 + local.get $5 i64.xor i64.const -9223372036854775808 i64.and @@ -3570,10 +3567,10 @@ local.get $12 f64.mul global.set $~lib/math/rempio2_y1 - local.get $7 + local.get $8 i64.const 62 i64.shr_s - local.get $5 + local.get $4 i64.sub i32.wrap_i64 ) @@ -3585,7 +3582,6 @@ (local $5 i32) (local $6 f64) (local $7 i64) - (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $7 @@ -3610,25 +3606,21 @@ f64.const 1 return end + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $2 - local.get $2 - f64.mul - local.set $1 - f64.const 1 - f64.const 0.5 - local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.sub - local.tee $6 + local.tee $3 f64.const 1 - local.get $6 - f64.sub local.get $3 f64.sub + local.get $1 + f64.sub local.get $2 local.get $2 f64.const 0.0416666666666666 @@ -3641,7 +3633,10 @@ f64.mul f64.add f64.mul - local.get $1 + local.get $2 + local.get $2 + f64.mul + local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 @@ -3801,15 +3796,11 @@ i32.const 1 i32.and if (result f64) + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 0.00833333333332249 - local.get $1 f64.const -1.984126982985795e-04 local.get $1 f64.const 2.7557313707070068e-06 @@ -3818,7 +3809,9 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $1 + local.get $1 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $1 @@ -3849,25 +3842,21 @@ f64.sub f64.sub else + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 1 - f64.const 0.5 - local.get $1 f64.mul - local.tee $6 + local.tee $3 f64.sub - local.tee $8 + local.tee $6 f64.const 1 - local.get $8 - f64.sub local.get $6 f64.sub + local.get $3 + f64.sub local.get $1 local.get $1 f64.const 0.0416666666666666 @@ -3880,7 +3869,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $3 local.get $3 f64.mul f64.const -2.7557314351390663e-07 @@ -5206,9 +5198,9 @@ (local $2 i64) (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 i64) - (local $7 i32) + (local $5 i64) + (local $6 i32) + (local $7 f64) block $~lib/util/math/exp2_lut|inlined.0 (result f64) local.get $0 i64.reinterpret_f64 @@ -5278,12 +5270,8 @@ f64.const 52776558133248 f64.add local.tee $1 - f64.const 52776558133248 - f64.sub - local.set $4 - local.get $1 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 127 i64.and i64.const 1 @@ -5293,23 +5281,25 @@ i32.shl i32.const 336 i32.add - local.tee $7 - i64.load - f64.reinterpret_i64 - local.get $7 + local.tee $6 i64.load offset=8 - local.get $6 + local.get $5 i64.const 45 i64.shl i64.add local.set $2 local.get $0 - local.get $4 + local.get $1 + f64.const 52776558133248 + f64.sub f64.sub local.tee $0 local.get $0 f64.mul local.set $1 + local.get $6 + i64.load + f64.reinterpret_i64 local.get $0 f64.const 0.6931471805599453 f64.mul @@ -5337,7 +5327,7 @@ i32.eqz if block $~lib/util/math/specialcase2|inlined.0 (result f64) - local.get $6 + local.get $5 i64.const 2147483648 i64.and i64.eqz @@ -5368,11 +5358,12 @@ f64.const 1 f64.lt if (result f64) - f64.const 1 f64.const 1 local.get $1 f64.add - local.tee $5 + local.tee $7 + f64.const 1 + local.get $7 f64.sub local.get $1 f64.add @@ -5384,9 +5375,6 @@ f64.mul f64.add f64.add - local.set $0 - local.get $5 - local.get $0 f64.add f64.const 1 f64.sub @@ -5426,27 +5414,27 @@ ) (func $~lib/math/NativeMathf.exp2 (; 93 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i64) + (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f64) + (local $4 f64) + (local $5 i64) block $~lib/util/math/exp2f_lut|inlined.0 (result f32) local.get $0 f64.promote_f32 local.set $1 local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 20 i32.shr_u i32.const 2047 i32.and - local.tee $4 + local.tee $3 i32.const 1072 i32.ge_u if f32.const 0 - local.get $3 + local.get $2 i32.const -8388608 i32.eq br_if $~lib/util/math/exp2f_lut|inlined.0 @@ -5454,7 +5442,7 @@ local.get $0 local.get $0 f32.add - local.get $4 + local.get $3 i32.const 2040 i32.ge_u br_if $~lib/util/math/exp2f_lut|inlined.0 @@ -5474,28 +5462,12 @@ br_if $~lib/util/math/exp2f_lut|inlined.0 drop end + f64.const 0.6931471806916203 + local.get $1 local.get $1 f64.const 211106232532992 f64.add - local.tee $5 - i64.reinterpret_f64 - local.tee $2 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.const 2400 - i32.add - i64.load - local.get $2 - i64.const 47 - i64.shl - i64.add - local.set $2 - f64.const 0.6931471806916203 - local.get $1 - local.get $5 + local.tee $4 f64.const 211106232532992 f64.sub f64.sub @@ -5513,7 +5485,21 @@ f64.mul f64.mul f64.add - local.get $2 + local.get $4 + i64.reinterpret_f64 + local.tee $5 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.const 2400 + i32.add + i64.load + local.get $5 + i64.const 47 + i64.shl + i64.add f64.reinterpret_i64 f64.mul f32.demote_f64 @@ -5653,9 +5639,10 @@ local.get $0 end end - local.tee $0 - local.get $0 - local.get $0 + local.set $0 + local.get $1 + local.get $1 + local.get $1 f64.const 134217729 f64.mul local.tee $2 @@ -5665,9 +5652,9 @@ local.tee $6 f64.sub local.set $10 - local.get $1 - local.get $1 - local.get $1 + local.get $0 + local.get $0 + local.get $0 f64.const 134217729 f64.mul local.tee $2 @@ -5678,8 +5665,8 @@ f64.sub local.set $2 local.get $5 - local.get $7 - local.get $7 + local.get $6 + local.get $6 f64.mul local.get $1 local.get $1 @@ -5687,15 +5674,15 @@ local.tee $1 f64.sub f64.const 2 - local.get $7 + local.get $6 f64.mul - local.get $2 + local.get $10 f64.add - local.get $2 + local.get $10 f64.mul f64.add - local.get $6 - local.get $6 + local.get $7 + local.get $7 f64.mul local.get $0 local.get $0 @@ -5703,11 +5690,11 @@ local.tee $0 f64.sub f64.const 2 - local.get $6 + local.get $7 f64.mul - local.get $10 + local.get $2 f64.add - local.get $10 + local.get $2 f64.mul f64.add f64.add @@ -5863,32 +5850,35 @@ call $std/math/check ) (func $~lib/math/NativeMath.log10 (; 103 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.const 31 i32.shr_u end if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.eqz @@ -5900,7 +5890,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -5917,25 +5907,25 @@ f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return else - local.get $3 + local.get $2 i64.const 32 i64.shl i64.eqz i32.const 0 - local.get $2 + local.get $1 i32.const 1072693248 i32.eq select @@ -5945,13 +5935,13 @@ end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add - local.tee $2 + local.tee $1 i32.const 1048575 i32.and i32.const 1072079006 @@ -5963,55 +5953,61 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $1 + local.tee $0 f64.const 2 - local.get $1 + local.get $0 f64.add f64.div - local.tee $5 - local.get $5 - f64.mul - local.tee $6 - local.get $6 + local.tee $4 + local.get $4 f64.mul - local.set $0 + local.set $3 local.get $8 - local.get $2 + local.get $1 i32.const 20 i32.shr_u i32.const 1023 i32.sub i32.add f64.convert_i32_s - local.tee $4 + local.tee $9 f64.const 0.30102999566361177 f64.mul - local.set $7 - local.get $4 - f64.const 3.694239077158931e-13 - f64.mul - local.get $1 - local.get $1 + local.tee $10 + local.get $0 f64.const 0.5 - local.get $1 + local.get $0 f64.mul - local.get $1 + local.get $0 f64.mul - local.tee $1 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $4 + local.tee $6 + f64.const 0.4342944818781689 + f64.mul + local.tee $11 + f64.add + local.set $7 + local.get $9 + f64.const 3.694239077158931e-13 + f64.mul + local.get $0 + local.get $6 f64.sub - local.get $1 + local.get $5 f64.sub + local.get $4 local.get $5 - local.get $1 - local.get $6 + local.get $3 f64.const 0.6666666666666735 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -6040,7 +6036,7 @@ f64.mul f64.add local.tee $0 - local.get $4 + local.get $6 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -6049,19 +6045,13 @@ f64.const 0.4342944818781689 f64.mul f64.add + local.get $10 local.get $7 - local.get $7 - local.get $4 - f64.const 0.4342944818781689 - f64.mul - local.tee $0 - f64.add - local.tee $1 f64.sub - local.get $0 + local.get $11 f64.add f64.add - local.get $1 + local.get $7 f64.add ) (func $std/math/test_log10 (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6085,9 +6075,8 @@ (local $2 f32) (local $3 f32) (local $4 f32) - (local $5 f32) - (local $6 i32) - (local $7 f32) + (local $5 i32) + (local $6 f32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -6125,7 +6114,7 @@ return end i32.const -25 - local.set $6 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -6167,11 +6156,8 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 - local.get $6 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -6179,7 +6165,7 @@ i32.sub i32.add f32.convert_i32_s - local.tee $7 + local.tee $6 f32.const 7.903415166765626e-07 f32.mul local.get $0 @@ -6195,22 +6181,25 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub local.get $3 local.get $0 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $0 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $2 + local.get $0 f32.const 0.40000972151756287 - local.get $2 + local.get $0 f32.const 0.24279078841209412 f32.mul f32.add @@ -6220,7 +6209,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -6229,11 +6218,11 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $5 + local.get $4 f32.const 0.434326171875 f32.mul f32.add - local.get $7 + local.get $6 f32.const 0.3010292053222656 f32.mul f32.add @@ -6269,31 +6258,34 @@ call $std/math/check ) (func $~lib/math/NativeMath.log2 (; 109 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (local $1 i32) + (local $2 i64) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 i32) + (local $7 f64) + (local $8 i32) + (local $9 f64) + (local $10 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u if (result i32) i32.const 1 else - local.get $2 + local.get $1 i32.const 31 i32.shr_u end if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.eqz @@ -6305,7 +6297,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -6317,30 +6309,30 @@ return end i32.const -54 - local.set $7 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if local.get $0 return else - local.get $3 + local.get $2 i64.const 32 i64.shl i64.eqz i32.const 0 - local.get $2 + local.get $1 i32.const 1072693248 i32.eq select @@ -6350,13 +6342,13 @@ end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add - local.tee $2 + local.tee $1 i32.const 1048575 i32.and i32.const 1072079006 @@ -6368,40 +6360,55 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $1 + local.tee $0 f64.const 2 - local.get $1 + local.get $0 f64.add f64.div local.tee $4 local.get $4 f64.mul - local.tee $5 - local.get $5 - f64.mul - local.set $0 - local.get $1 + local.set $3 + local.get $8 local.get $1 + i32.const 20 + i32.shr_u + i32.const 1023 + i32.sub + i32.add + f64.convert_i32_s + local.tee $9 + local.get $0 f64.const 0.5 - local.get $1 + local.get $0 f64.mul - local.get $1 + local.get $0 f64.mul - local.tee $1 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 local.tee $6 + f64.const 1.4426950407214463 + f64.mul + local.tee $10 + f64.add + local.set $7 + local.get $0 + local.get $6 f64.sub - local.get $1 + local.get $5 f64.sub local.get $4 - local.get $1 local.get $5 + local.get $3 f64.const 0.6666666666666735 - local.get $0 + local.get $3 + local.get $3 + f64.mul + local.tee $0 f64.const 0.2857142874366239 local.get $0 f64.const 0.1818357216161805 @@ -6429,23 +6436,7 @@ f64.add f64.mul f64.add - local.set $0 - local.get $7 - local.get $2 - i32.const 20 - i32.shr_u - i32.const 1023 - i32.sub - i32.add - f64.convert_i32_s - local.tee $4 - local.get $6 - f64.const 1.4426950407214463 - f64.mul - local.tee $5 - f64.add - local.set $1 - local.get $0 + local.tee $0 local.get $6 f64.add f64.const 1.6751713164886512e-10 @@ -6454,13 +6445,13 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $4 - local.get $1 + local.get $9 + local.get $7 f64.sub - local.get $5 + local.get $10 f64.add f64.add - local.get $1 + local.get $7 f64.add ) (func $std/math/test_log2 (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6484,8 +6475,7 @@ (local $2 f32) (local $3 f32) (local $4 f32) - (local $5 f32) - (local $6 i32) + (local $5 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -6523,7 +6513,7 @@ return end i32.const -25 - local.set $6 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -6565,9 +6555,6 @@ local.tee $3 local.get $3 f32.mul - local.tee $4 - local.get $4 - f32.mul local.set $2 local.get $0 local.get $0 @@ -6582,22 +6569,25 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub local.get $3 local.get $0 - local.get $4 + local.get $2 f32.const 0.6666666269302368 local.get $2 + local.get $2 + f32.mul + local.tee $0 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $2 + local.get $0 f32.const 0.40000972151756287 - local.get $2 + local.get $0 f32.const 0.24279078841209412 f32.mul f32.add @@ -6607,7 +6597,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -6615,11 +6605,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $4 f32.const 1.44287109375 f32.mul f32.add - local.get $6 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7117,18 +7107,18 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) + (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) (local $15 i64) - (local $16 i32) + (local $16 f64) (local $17 i32) - (local $18 f64) - (local $19 i32) - (local $20 f64) + (local $18 i32) + (local $19 f64) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -7185,12 +7175,12 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $19 + local.set $20 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 @@ -7225,7 +7215,7 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $20 i32.const 0 local.get $4 i32.const 2146435072 @@ -7243,7 +7233,7 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -7264,30 +7254,30 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $10 + local.set $9 i32.const 2 local.get $6 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $9 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $11 local.get $10 + local.get $9 i32.shl i32.eq select @@ -7295,7 +7285,7 @@ i32.const 0 end end - local.set $17 + local.set $18 end local.get $6 i32.eqz @@ -7304,7 +7294,7 @@ i32.const 2146435072 i32.eq if - local.get $19 + local.get $20 local.get $4 i32.const 1072693248 i32.sub @@ -7369,7 +7359,7 @@ i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -7381,8 +7371,8 @@ end local.get $0 f64.abs - local.set $3 - local.get $19 + local.set $2 + local.get $20 i32.eqz if i32.const 1 @@ -7398,52 +7388,52 @@ select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 + local.get $2 local.get $7 i32.const 0 i32.lt_s select - local.set $3 - local.get $16 + local.set $2 + local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $17 + local.get $18 local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 - local.get $17 + local.get $2 + local.get $18 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $12 - local.get $16 + local.set $11 + local.get $17 i32.const 0 i32.lt_s if - local.get $17 + local.get $18 i32.eqz if local.get $0 @@ -7456,11 +7446,11 @@ end f64.const -1 f64.const 1 - local.get $17 + local.get $18 i32.const 1 i32.eq select - local.set $12 + local.set $11 end local.get $8 i32.const 1105199104 @@ -7499,12 +7489,12 @@ i32.const 1072693247 i32.lt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -7519,12 +7509,12 @@ i32.const 1072693248 i32.gt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -7535,31 +7525,29 @@ select return end - local.get $3 + f64.const 1.4426950216293335 + local.get $2 f64.const 1 f64.sub + local.tee $0 + f64.mul local.tee $2 - local.get $2 + local.get $0 + f64.const 1.9259629911266175e-08 + f64.mul + local.get $0 + local.get $0 f64.mul f64.const 0.5 - local.get $2 + local.get $0 f64.const 0.3333333333333333 - local.get $2 - f64.const 0.25 - f64.mul - f64.sub - f64.mul - f64.sub - f64.mul - local.set $0 - f64.const 1.4426950216293335 - local.get $2 + local.get $0 + f64.const 0.25 f64.mul - local.tee $3 - local.get $2 - f64.const 1.9259629911266175e-08 + f64.sub + f64.mul + f64.sub f64.mul - local.get $0 f64.const 1.4426950408889634 f64.mul f64.sub @@ -7569,10 +7557,10 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 + local.set $12 local.get $0 - local.get $9 - local.get $3 + local.get $12 + local.get $2 f64.sub f64.sub else @@ -7582,10 +7570,10 @@ i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -7633,7 +7621,7 @@ end end local.set $5 - local.get $3 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and @@ -7643,58 +7631,37 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $3 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 select - local.tee $0 + local.tee $3 f64.sub - local.tee $9 + local.tee $2 f64.const 1 + local.get $13 local.get $3 - local.get $0 f64.add f64.div - local.tee $2 + local.tee $0 f64.mul - local.tee $18 + local.tee $19 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $13 - local.get $3 - local.get $4 - i32.const 1 - i32.shr_s - i32.const 536870912 - i32.or - i32.const 524288 - i32.add - local.get $5 - i32.const 18 - i32.shl - i32.add - i64.extend_i32_s - i64.const 32 - i64.shl - f64.reinterpret_i64 - local.tee $3 - local.get $0 - f64.sub - f64.sub - local.set $0 + local.tee $16 + local.get $16 + f64.mul + local.set $12 f64.const 0.9617967009544373 - local.get $13 + local.get $16 f64.const 3 - local.get $13 - local.get $13 - f64.mul - local.tee $20 + local.get $12 f64.add - local.get $18 - local.get $18 + local.get $19 + local.get $19 f64.mul local.tee $14 local.get $14 @@ -7721,20 +7688,39 @@ f64.mul f64.add f64.mul + local.get $0 local.get $2 - local.get $9 - local.get $13 - local.get $3 + local.get $16 + local.get $4 + i32.const 1 + i32.shr_s + i32.const 536870912 + i32.or + i32.const 524288 + i32.add + local.get $5 + i32.const 18 + i32.shl + i32.add + i64.extend_i32_s + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.tee $0 f64.mul f64.sub + local.get $16 local.get $13 local.get $0 + local.get $3 + f64.sub + f64.sub f64.mul f64.sub f64.mul - local.tee $2 - local.get $13 - local.get $18 + local.tee $3 + local.get $16 + local.get $19 f64.add f64.mul f64.add @@ -7744,20 +7730,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $9 + local.tee $13 f64.mul - local.tee $3 - local.get $2 - local.get $9 + local.tee $2 + local.get $3 + local.get $13 f64.mul local.get $0 - local.get $9 + local.get $13 f64.const 3 f64.sub - local.get $20 + local.get $12 f64.sub f64.sub - local.get $18 + local.get $19 f64.mul f64.add local.tee $0 @@ -7766,15 +7752,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $2 + local.tee $3 f64.mul - local.tee $20 + local.tee $13 f64.const -7.028461650952758e-09 - local.get $2 + local.get $3 f64.mul local.get $0 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -7785,13 +7771,13 @@ local.get $5 select f64.add - local.tee $2 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -7801,18 +7787,18 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 - local.get $2 - local.get $9 + local.set $12 + local.get $3 + local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub - local.get $20 + local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -7821,17 +7807,17 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $9 + local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 - local.get $9 + local.get $12 f64.mul - local.tee $2 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 @@ -7844,12 +7830,12 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $9 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $9 i32.const 1083179008 i32.sub i32.or @@ -7857,36 +7843,36 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $2 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $10 + local.get $9 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $10 + local.get $9 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -7894,19 +7880,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $9 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -7917,7 +7903,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -7925,7 +7911,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -7937,18 +7923,18 @@ local.tee $6 i32.sub local.get $6 - local.get $10 + local.get $9 i32.const 0 i32.lt_s select local.set $6 - local.get $2 + local.get $3 local.get $0 f64.sub - local.set $2 + local.set $3 end local.get $1 - local.get $2 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -7957,10 +7943,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -7971,14 +7957,14 @@ f64.add local.tee $1 f64.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $12 + local.get $11 f64.const 1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -8006,17 +7992,17 @@ f64.sub f64.div local.get $1 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $2 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $2 + local.get $3 f64.sub f64.sub local.tee $0 @@ -8052,14 +8038,14 @@ f64.mul return end - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -8091,7 +8077,6 @@ (local $6 f64) (local $7 i32) (local $8 i64) - (local $9 f64) local.get $1 f32.abs f32.const 2 @@ -8393,7 +8378,6 @@ local.set $2 end end - f64.const 1.4426950408774342 local.get $2 local.get $2 i32.const 1060306944 @@ -8420,6 +8404,22 @@ f64.const 1 f64.sub local.tee $4 + local.get $4 + f64.mul + local.set $6 + local.get $1 + f64.promote_f32 + f64.const 0.288457581109214 + local.get $4 + f64.mul + f64.const -0.36092606229713164 + f64.add + local.get $6 + local.get $6 + f64.mul + f64.mul + f64.const 1.4426950408774342 + local.get $4 f64.mul local.get $3 f64.load offset=8 @@ -8434,25 +8434,9 @@ f64.mul f64.const -0.7213474675006291 f64.add - local.get $4 - local.get $4 - f64.mul - local.tee $6 - f64.mul - f64.add - local.set $9 - local.get $1 - f64.promote_f32 - f64.const 0.288457581109214 - local.get $4 - f64.mul - f64.const -0.36092606229713164 - f64.add - local.get $6 local.get $6 f64.mul - f64.mul - local.get $9 + f64.add f64.add f64.mul local.tee $4 @@ -8491,31 +8475,12 @@ br $~lib/util/math/powf_lut|inlined.0 end end + f64.const 0.6931471806916203 + local.get $4 local.get $4 f64.const 211106232532992 f64.add local.tee $6 - i64.reinterpret_f64 - local.tee $8 - i32.wrap_i64 - i32.const 31 - i32.and - i32.const 3 - i32.shl - i32.const 2400 - i32.add - i64.load - local.get $8 - local.get $7 - i64.extend_i32_u - i64.add - i64.const 47 - i64.shl - i64.add - local.set $8 - f64.const 0.6931471806916203 - local.get $4 - local.get $6 f64.const 211106232532992 f64.sub f64.sub @@ -8533,7 +8498,24 @@ f64.mul f64.mul f64.add + local.get $6 + i64.reinterpret_f64 + local.tee $8 + i32.wrap_i64 + i32.const 31 + i32.and + i32.const 3 + i32.shl + i32.const 2400 + i32.add + i64.load local.get $8 + local.get $7 + i64.extend_i32_u + i64.add + i64.const 47 + i64.shl + i64.add f64.reinterpret_i64 f64.mul f32.demote_f64 @@ -9219,7 +9201,6 @@ (local $5 i32) (local $6 f64) (local $7 i64) - (local $8 f64) local.get $0 i64.reinterpret_f64 local.tee $7 @@ -9244,21 +9225,11 @@ local.get $0 return end + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul - local.tee $2 - local.get $2 - f64.mul - local.set $1 - local.get $0 - local.get $2 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $2 - f64.const 0.00833333333332249 - local.get $2 + local.tee $2 f64.const -1.984126982985795e-04 local.get $2 f64.const 2.7557313707070068e-06 @@ -9267,7 +9238,9 @@ f64.mul f64.add local.get $2 - local.get $1 + local.get $2 + local.get $2 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $2 @@ -9276,6 +9249,14 @@ f64.add f64.mul f64.add + local.set $1 + local.get $0 + local.get $2 + local.get $0 + f64.mul + f64.const -0.16666666666666632 + local.get $2 + local.get $1 f64.mul f64.add f64.mul @@ -9419,25 +9400,21 @@ i32.const 1 i32.and if (result f64) + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 1 - f64.const 0.5 - local.get $1 f64.mul - local.tee $6 + local.tee $3 f64.sub - local.tee $8 + local.tee $6 f64.const 1 - local.get $8 - f64.sub local.get $6 f64.sub + local.get $3 + f64.sub local.get $1 local.get $1 f64.const 0.0416666666666666 @@ -9450,7 +9427,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $1 + local.get $1 + f64.mul + local.tee $3 local.get $3 f64.mul f64.const -2.7557314351390663e-07 @@ -9472,15 +9452,11 @@ f64.add f64.add else + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - f64.const 0.00833333333332249 - local.get $1 f64.const -1.984126982985795e-04 local.get $1 f64.const 2.7557313707070068e-06 @@ -9489,7 +9465,9 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $1 + local.get $1 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $1 @@ -10025,7 +10003,6 @@ (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -10064,18 +10041,18 @@ local.get $0 f64.mul local.tee $4 - local.get $4 + local.get $0 f64.mul - local.set $3 + local.set $5 local.get $0 local.get $1 local.get $4 + local.get $5 + f64.const 0.13333333333320124 + local.get $4 local.get $4 - local.get $0 f64.mul - local.tee $5 - f64.const 0.13333333333320124 - local.get $3 + local.tee $3 f64.const 0.021869488294859542 local.get $3 f64.const 3.5920791075913124e-03 @@ -10168,7 +10145,6 @@ local.get $1 return end - f64.const 1 f64.const -1 local.get $1 f64.div @@ -10178,6 +10154,9 @@ i64.and f64.reinterpret_i64 local.tee $4 + local.get $5 + f64.const 1 + local.get $4 local.get $1 i64.reinterpret_f64 i64.const -4294967296 @@ -10186,10 +10165,6 @@ local.tee $1 f64.mul f64.add - local.set $8 - local.get $4 - local.get $5 - local.get $8 local.get $4 local.get $3 local.get $1 @@ -10853,30 +10828,29 @@ (local $2 f64) (local $3 f64) (local $4 f64) - (local $5 f64) + (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 i32) + (local $8 i64) (local $9 f64) - (local $10 i64) local.get $0 i64.reinterpret_f64 - local.tee $10 + local.tee $8 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 31 i32.shr_u - local.set $8 - local.get $6 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $6 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $6 + local.get $5 i32.const 1044816030 i32.lt_u if @@ -10886,21 +10860,11 @@ global.set $~lib/math/NativeMath.sincos_cos return end + f64.const 0.00833333333332249 local.get $0 local.get $0 f64.mul local.tee $1 - local.get $1 - f64.mul - local.set $3 - local.get $0 - local.get $1 - local.get $0 - f64.mul - f64.const -0.16666666666666632 - local.get $1 - f64.const 0.00833333333332249 - local.get $1 f64.const -1.984126982985795e-04 local.get $1 f64.const 2.7557313707070068e-06 @@ -10909,7 +10873,9 @@ f64.mul f64.add local.get $1 - local.get $3 + local.get $1 + local.get $1 + f64.mul f64.mul f64.const -2.5050760253406863e-08 local.get $1 @@ -10918,37 +10884,40 @@ f64.add f64.mul f64.add - local.tee $2 + local.set $2 + local.get $0 + local.get $1 + local.get $0 + f64.mul + f64.const -0.16666666666666632 + local.get $1 + local.get $2 f64.mul f64.add f64.mul f64.add global.set $~lib/math/NativeMath.sincos_sin + f64.const 1 + f64.const 0.5 local.get $0 local.get $0 f64.mul - local.tee $4 - local.get $4 - f64.mul - local.set $1 - f64.const 1 - f64.const 0.5 - local.get $4 + local.tee $1 f64.mul local.tee $2 f64.sub - local.tee $3 + local.tee $4 f64.const 1 - local.get $3 + local.get $4 f64.sub local.get $2 f64.sub - local.get $4 - local.get $4 + local.get $1 + local.get $1 f64.const 0.0416666666666666 - local.get $4 + local.get $1 f64.const -0.001388888888887411 - local.get $4 + local.get $1 f64.const 2.480158728947673e-05 f64.mul f64.add @@ -10958,10 +10927,13 @@ local.get $1 local.get $1 f64.mul - f64.const -2.7557314351390663e-07 + local.tee $4 local.get $4 + f64.mul + f64.const -2.7557314351390663e-07 + local.get $1 f64.const 2.087572321298175e-09 - local.get $4 + local.get $1 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -10979,7 +10951,7 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $6 + local.get $5 i32.const 2139095040 i32.ge_u if @@ -10993,20 +10965,20 @@ return end block $~lib/math/rempio2|inlined.3 (result i32) - local.get $10 + local.get $8 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $6 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $6 + local.get $5 i32.const 20 i32.shr_u - local.tee $8 + local.tee $6 local.get $0 local.get $0 f64.const 0.6366197723675814 @@ -11020,7 +10992,7 @@ local.get $2 f64.const 6.077100506506192e-11 f64.mul - local.tee $3 + local.tee $4 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11050,10 +11022,10 @@ local.get $0 f64.sub f64.sub - local.set $3 - local.get $8 + local.set $4 + local.get $6 local.get $1 - local.get $3 + local.get $4 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11083,9 +11055,9 @@ local.get $0 f64.sub f64.sub - local.set $3 + local.set $4 local.get $1 - local.get $3 + local.get $4 f64.sub local.set $0 end @@ -11095,7 +11067,7 @@ local.get $1 local.get $0 f64.sub - local.get $3 + local.get $4 f64.sub global.set $~lib/math/rempio2_y1 local.get $2 @@ -11103,53 +11075,53 @@ br $~lib/math/rempio2|inlined.3 end i32.const 0 - local.get $10 + local.get $8 call $~lib/math/pio2_large_quot - local.tee $6 + local.tee $5 i32.sub + local.get $5 local.get $6 - local.get $8 select end - local.set $8 + local.set $6 global.get $~lib/math/rempio2_y0 - local.tee $9 - local.get $9 - local.get $9 - f64.mul - local.tee $5 - local.get $5 - f64.mul - local.set $0 - local.get $5 - f64.const 0.5 - global.get $~lib/math/rempio2_y1 - local.tee $4 - local.tee $1 - f64.mul - local.get $5 - local.get $9 - f64.mul - local.tee $2 + local.tee $7 f64.const 0.00833333333332249 - local.get $5 + local.get $7 + local.get $7 + f64.mul + local.tee $3 f64.const -1.984126982985795e-04 - local.get $5 + local.get $3 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $0 + local.get $3 + local.get $3 + local.get $3 + f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $5 + local.get $3 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add + local.set $0 + local.get $3 + f64.const 0.5 + global.get $~lib/math/rempio2_y1 + local.tee $9 + local.tee $1 + f64.mul + local.get $3 + local.get $7 + f64.mul + local.tee $2 + local.get $0 f64.mul f64.sub f64.mul @@ -11160,19 +11132,14 @@ f64.mul f64.sub f64.sub - local.set $3 - local.get $9 - local.get $9 - f64.mul - local.tee $7 - local.get $7 - f64.mul - local.set $5 - local.get $3 + local.tee $4 local.set $2 f64.const 1 f64.const 0.5 local.get $7 + local.get $7 + f64.mul + local.tee $3 f64.mul local.tee $1 f64.sub @@ -11182,25 +11149,28 @@ f64.sub local.get $1 f64.sub - local.get $7 - local.get $7 + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $7 + local.get $3 f64.const -0.001388888888887411 - local.get $7 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $5 - local.get $5 + local.get $3 + local.get $3 + f64.mul + local.tee $0 + local.get $0 f64.mul f64.const -2.7557314351390663e-07 - local.get $7 + local.get $3 f64.const 2.087572321298175e-09 - local.get $7 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -11209,25 +11179,25 @@ f64.mul f64.add f64.mul + local.get $7 local.get $9 - local.get $4 f64.mul f64.sub f64.add f64.add local.tee $0 local.set $1 - local.get $8 + local.get $6 i32.const 1 i32.and if - local.get $3 + local.get $4 f64.neg local.set $1 local.get $0 local.set $2 end - local.get $8 + local.get $6 i32.const 2 i32.and if (result f64) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 2e4ed6d68e..486cbdcdfe 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -241,18 +241,18 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) + (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) (local $15 i64) - (local $16 i32) + (local $16 f64) (local $17 i32) - (local $18 f64) - (local $19 i32) - (local $20 f64) + (local $18 i32) + (local $19 f64) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -309,12 +309,12 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $19 + local.set $20 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 @@ -349,7 +349,7 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $20 i32.const 0 local.get $4 i32.const 2146435072 @@ -367,7 +367,7 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -388,30 +388,30 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $10 + local.set $9 i32.const 2 local.get $6 local.get $8 local.get $5 select local.tee $5 - local.get $10 + local.get $9 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $11 local.get $10 + local.get $9 i32.shl i32.eq select @@ -419,7 +419,7 @@ i32.const 0 end end - local.set $17 + local.set $18 end local.get $6 i32.eqz @@ -428,7 +428,7 @@ i32.const 2146435072 i32.eq if - local.get $19 + local.get $20 local.get $4 i32.const 1072693248 i32.sub @@ -493,7 +493,7 @@ i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -505,8 +505,8 @@ end local.get $0 f64.abs - local.set $3 - local.get $19 + local.set $2 + local.get $20 i32.eqz if i32.const 1 @@ -522,52 +522,52 @@ select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 + local.get $2 local.get $7 i32.const 0 i32.lt_s select - local.set $3 - local.get $16 + local.set $2 + local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $17 + local.get $18 local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 - local.get $17 + local.get $2 + local.get $18 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $12 - local.get $16 + local.set $11 + local.get $17 i32.const 0 i32.lt_s if - local.get $17 + local.get $18 i32.eqz if local.get $0 @@ -580,11 +580,11 @@ end f64.const -1 f64.const 1 - local.get $17 + local.get $18 i32.const 1 i32.eq select - local.set $12 + local.set $11 end local.get $8 i32.const 1105199104 @@ -623,12 +623,12 @@ i32.const 1072693247 i32.lt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -643,12 +643,12 @@ i32.const 1072693248 i32.gt_s if - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -659,31 +659,29 @@ select return end - local.get $3 + f64.const 1.4426950216293335 + local.get $2 f64.const 1 f64.sub + local.tee $0 + f64.mul local.tee $2 - local.get $2 + local.get $0 + f64.const 1.9259629911266175e-08 + f64.mul + local.get $0 + local.get $0 f64.mul f64.const 0.5 - local.get $2 + local.get $0 f64.const 0.3333333333333333 - local.get $2 + local.get $0 f64.const 0.25 f64.mul f64.sub f64.mul f64.sub f64.mul - local.set $0 - f64.const 1.4426950216293335 - local.get $2 - f64.mul - local.tee $3 - local.get $2 - f64.const 1.9259629911266175e-08 - f64.mul - local.get $0 f64.const 1.4426950408889634 f64.mul f64.sub @@ -693,10 +691,10 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 + local.set $12 local.get $0 - local.get $9 - local.get $3 + local.get $12 + local.get $2 f64.sub f64.sub else @@ -706,10 +704,10 @@ i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -757,7 +755,7 @@ end end local.set $5 - local.get $3 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and @@ -767,58 +765,37 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $3 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 select - local.tee $0 + local.tee $3 f64.sub - local.tee $9 + local.tee $2 f64.const 1 + local.get $13 local.get $3 - local.get $0 f64.add f64.div - local.tee $2 + local.tee $0 f64.mul - local.tee $18 + local.tee $19 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $13 - local.get $3 - local.get $4 - i32.const 1 - i32.shr_s - i32.const 536870912 - i32.or - i32.const 524288 - i32.add - local.get $5 - i32.const 18 - i32.shl - i32.add - i64.extend_i32_s - i64.const 32 - i64.shl - f64.reinterpret_i64 - local.tee $3 - local.get $0 - f64.sub - f64.sub - local.set $0 + local.tee $16 + local.get $16 + f64.mul + local.set $12 f64.const 0.9617967009544373 - local.get $13 + local.get $16 f64.const 3 - local.get $13 - local.get $13 - f64.mul - local.tee $20 + local.get $12 f64.add - local.get $18 - local.get $18 + local.get $19 + local.get $19 f64.mul local.tee $14 local.get $14 @@ -845,20 +822,39 @@ f64.mul f64.add f64.mul + local.get $0 local.get $2 - local.get $9 - local.get $13 - local.get $3 + local.get $16 + local.get $4 + i32.const 1 + i32.shr_s + i32.const 536870912 + i32.or + i32.const 524288 + i32.add + local.get $5 + i32.const 18 + i32.shl + i32.add + i64.extend_i32_s + i64.const 32 + i64.shl + f64.reinterpret_i64 + local.tee $0 f64.mul f64.sub + local.get $16 local.get $13 local.get $0 + local.get $3 + f64.sub + f64.sub f64.mul f64.sub f64.mul - local.tee $2 - local.get $13 - local.get $18 + local.tee $3 + local.get $16 + local.get $19 f64.add f64.mul f64.add @@ -868,20 +864,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $9 + local.tee $13 f64.mul - local.tee $3 - local.get $2 - local.get $9 + local.tee $2 + local.get $3 + local.get $13 f64.mul local.get $0 - local.get $9 + local.get $13 f64.const 3 f64.sub - local.get $20 + local.get $12 f64.sub f64.sub - local.get $18 + local.get $19 f64.mul f64.add local.tee $0 @@ -890,15 +886,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $2 + local.tee $3 f64.mul - local.tee $20 + local.tee $13 f64.const -7.028461650952758e-09 - local.get $2 + local.get $3 f64.mul local.get $0 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -909,13 +905,13 @@ local.get $5 select f64.add - local.tee $2 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -925,18 +921,18 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $9 - local.get $2 - local.get $9 + local.set $12 + local.get $3 + local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub - local.get $20 + local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -945,17 +941,17 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $9 + local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 - local.get $9 + local.get $12 f64.mul - local.tee $2 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 @@ -968,12 +964,12 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $10 + local.tee $9 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $10 + local.get $9 i32.const 1083179008 i32.sub i32.or @@ -981,36 +977,36 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $2 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $10 + local.get $9 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $10 + local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $10 + local.get $9 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -1018,19 +1014,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $10 + local.get $9 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -1041,7 +1037,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -1049,7 +1045,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -1061,18 +1057,18 @@ local.tee $6 i32.sub local.get $6 - local.get $10 + local.get $9 i32.const 0 i32.lt_s select local.set $6 - local.get $2 + local.get $3 local.get $0 f64.sub - local.set $2 + local.set $3 end local.get $1 - local.get $2 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -1081,10 +1077,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $2 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -1095,14 +1091,14 @@ f64.add local.tee $1 f64.add - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $12 + local.get $11 f64.const 1 - local.get $2 - local.get $2 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -1130,17 +1126,17 @@ f64.sub f64.div local.get $1 - local.get $2 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $2 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $2 + local.get $3 f64.sub f64.sub local.tee $0 @@ -1176,14 +1172,14 @@ f64.mul return end - local.get $12 + local.get $11 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $12 + local.get $11 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 9a87d394b1..14e32b281a 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -176,11 +176,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -188,7 +184,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -478,12 +476,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1183,23 +1180,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index b16f11b7f6..43c9724224 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -480,23 +480,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 6c41943137..c7bae0ce02 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -212,11 +212,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -224,7 +220,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -514,12 +512,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 0fb3ba230c..5a7955fc06 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -491,11 +491,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -503,7 +499,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -793,12 +791,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1394,6 +1391,10 @@ i32.const 8 i32.shr_u local.tee $2 + i32.const 4736 + i32.add + i32.load8_u + local.get $2 i32.const 1040 i32.add i32.load8_u @@ -1422,10 +1423,6 @@ i32.shr_u i32.const 6 i32.rem_u - local.get $2 - i32.const 4736 - i32.add - i32.load8_u i32.add i32.const 2 i32.shl @@ -2067,10 +2064,7 @@ i32.shl i32.const 208 i32.add - local.tee $1 - i32.load offset=2 - local.set $3 - local.get $1 + local.tee $3 i32.load16_u offset=6 local.set $1 local.get $5 @@ -2080,6 +2074,7 @@ i32.add local.tee $4 local.get $3 + i32.load offset=2 i32.store local.get $4 local.get $1 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index c37c4310b2..496288292a 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -232,11 +232,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -244,7 +240,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -534,12 +532,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1869,7 +1866,7 @@ i32.sub i32.load offset=12 i32.add - local.set $6 + local.set $5 local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength @@ -1884,12 +1881,12 @@ i32.const 0 i32.ne i32.sub - local.set $7 + local.set $6 local.get $4 local.set $0 loop $while-continue|0 local.get $0 - local.get $7 + local.get $6 i32.lt_u if local.get $3 @@ -1931,7 +1928,7 @@ local.get $3 i32.const 2 i32.add - local.get $6 + local.get $5 i32.lt_u i32.const 0 local.get $2 @@ -1943,12 +1940,13 @@ if local.get $3 i32.load16_u offset=2 - local.tee $5 + local.tee $7 i32.const 64512 i32.and i32.const 56320 i32.eq if + local.get $0 local.get $2 i32.const 1023 i32.and @@ -1956,7 +1954,7 @@ i32.shl i32.const 65536 i32.add - local.get $5 + local.get $7 i32.const 1023 i32.and i32.or @@ -1965,14 +1963,6 @@ i32.and i32.const 128 i32.or - local.set $5 - local.get $0 - local.get $2 - i32.const 18 - i32.shr_u - i32.const 240 - i32.or - local.get $5 i32.const 24 i32.shl local.get $2 @@ -1995,6 +1985,11 @@ i32.const 8 i32.shl i32.or + local.get $2 + i32.const 18 + i32.shr_u + i32.const 240 + i32.or i32.or i32.store local.get $0 @@ -2046,7 +2041,7 @@ end end local.get $3 - local.get $6 + local.get $5 i32.gt_u if i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 980766612c..6179af48c7 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -716,11 +716,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -728,7 +724,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -1018,12 +1016,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1969,7 +1966,6 @@ (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) local.get $0 call $~lib/string/String#get:length i32.const 1 @@ -1979,17 +1975,17 @@ call $~lib/string/String#get:length i32.const 1 i32.shl - local.set $4 + local.set $3 local.get $1 i32.const 1 i32.shl - local.tee $3 + local.tee $4 local.get $5 i32.lt_u if (result i32) i32.const 1 else - local.get $4 + local.get $3 i32.eqz end if @@ -1997,47 +1993,46 @@ call $~lib/rt/pure/__retain return end - local.get $3 + local.get $4 i32.const 1 call $~lib/rt/tlsf/__alloc local.set $1 - local.get $3 + local.get $4 local.get $5 i32.sub - local.tee $3 - local.get $4 + local.tee $4 + local.get $3 i32.gt_u if - local.get $4 + local.get $1 + local.get $2 local.get $3 + local.get $4 i32.const 2 i32.sub - local.get $4 + local.get $3 i32.div_u - local.tee $7 - i32.mul - local.set $6 - local.get $1 - local.get $2 - local.get $4 - local.get $7 + local.tee $6 call $~lib/memory/memory.repeat local.get $1 + local.get $3 local.get $6 + i32.mul + local.tee $3 i32.add local.get $2 + local.get $4 local.get $3 - local.get $6 i32.sub call $~lib/memory/memory.copy else local.get $1 local.get $2 - local.get $3 + local.get $4 call $~lib/memory/memory.copy end local.get $1 - local.get $3 + local.get $4 i32.add local.get $0 local.get $5 @@ -2049,7 +2044,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 call $~lib/string/String#get:length i32.const 1 @@ -2091,29 +2085,28 @@ local.get $4 i32.gt_u if - local.get $4 - local.get $0 - i32.const 2 - i32.sub - local.get $4 - i32.div_u - local.tee $6 - i32.mul - local.set $5 local.get $1 local.get $3 i32.add local.tee $3 local.get $2 local.get $4 - local.get $6 + local.get $0 + i32.const 2 + i32.sub + local.get $4 + i32.div_u + local.tee $5 call $~lib/memory/memory.repeat - local.get $3 + local.get $4 local.get $5 + i32.mul + local.tee $4 + local.get $3 i32.add local.get $2 local.get $0 - local.get $5 + local.get $4 i32.sub call $~lib/memory/memory.copy else @@ -3276,13 +3269,13 @@ br_if $folding-inner0 local.get $0 i32.load16_u - local.set $6 + local.set $5 f64.const 1 local.set $11 loop $while-continue|0 local.get $1 if (result i32) - local.get $6 + local.get $5 call $~lib/util/string/isSpace else i32.const 0 @@ -3293,7 +3286,7 @@ i32.add local.tee $0 i32.load16_u - local.set $6 + local.set $5 local.get $1 i32.const 1 i32.sub @@ -3304,7 +3297,7 @@ local.get $1 i32.eqz br_if $folding-inner0 - local.get $6 + local.get $5 i32.const 45 i32.eq if (result i32) @@ -3322,7 +3315,7 @@ local.tee $0 i32.load16_u else - local.get $6 + local.get $5 i32.const 43 i32.eq if (result i32) @@ -3338,10 +3331,10 @@ local.tee $0 i32.load16_u else - local.get $6 + local.get $5 end end - local.tee $6 + local.tee $5 i32.const 73 i32.eq i32.const 0 @@ -3370,13 +3363,13 @@ end br $folding-inner0 end - local.get $6 + local.get $5 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $6 + local.get $5 i32.const 46 i32.ne select @@ -3384,7 +3377,7 @@ local.get $0 local.set $3 loop $while-continue|1 - local.get $6 + local.get $5 i32.const 48 i32.eq if @@ -3393,7 +3386,7 @@ i32.add local.tee $0 i32.load16_u - local.set $6 + local.set $5 local.get $1 i32.const 1 i32.sub @@ -3408,7 +3401,7 @@ f64.const 0 return end - local.get $6 + local.get $5 i32.const 46 i32.eq if @@ -3436,7 +3429,7 @@ loop $for-loop|2 local.get $0 i32.load16_u - local.tee $6 + local.tee $5 i32.const 48 i32.eq if @@ -3444,10 +3437,10 @@ i32.const 1 i32.sub local.set $1 - local.get $5 + local.get $6 i32.const 1 i32.sub - local.set $5 + local.set $6 local.get $0 i32.const 2 i32.add @@ -3462,12 +3455,12 @@ f64.const 0 return end - local.get $5 + local.get $6 if i32.const 0 local.set $3 end - local.get $6 + local.get $5 i32.const 48 i32.sub i32.const 10 @@ -3477,7 +3470,7 @@ select br_if $folding-inner0 end - local.get $6 + local.get $5 i32.const 48 i32.sub local.set $3 @@ -3486,7 +3479,7 @@ local.get $12 i32.eqz i32.const 0 - local.get $6 + local.get $5 i32.const 46 i32.eq select @@ -3523,7 +3516,7 @@ local.set $4 else local.get $4 - local.set $5 + local.set $6 i32.const 1 local.set $12 end @@ -3538,7 +3531,7 @@ i32.add local.tee $0 i32.load16_u - local.tee $6 + local.tee $5 i32.const 48 i32.sub local.set $3 @@ -3548,7 +3541,7 @@ end block $~lib/util/string/scientific|inlined.0 i32.const 1 - local.get $5 + local.get $6 local.get $4 local.get $12 select @@ -3560,14 +3553,12 @@ select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) - local.get $0 - local.set $5 i32.const 1 - local.set $4 + local.set $6 i32.const 0 - local.set $0 + local.set $4 i32.const 0 - local.get $5 + local.get $0 i32.load16_u i32.const 32 i32.or @@ -3575,12 +3566,12 @@ i32.ne br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $5 + local.get $0 i32.const 2 i32.add local.tee $3 i32.load16_u - local.tee $5 + local.tee $0 i32.const 45 i32.eq if (result i32) @@ -3593,14 +3584,14 @@ br_if $~lib/util/string/parseExp|inlined.0 drop i32.const -1 - local.set $4 + local.set $6 local.get $3 i32.const 2 i32.add local.tee $3 i32.load16_u else - local.get $5 + local.get $0 i32.const 43 i32.eq if (result i32) @@ -3618,12 +3609,12 @@ local.tee $3 i32.load16_u else - local.get $5 + local.get $0 end end - local.set $5 + local.set $0 loop $while-continue|4 - local.get $5 + local.get $0 i32.const 48 i32.eq if @@ -3640,36 +3631,36 @@ i32.add local.tee $3 i32.load16_u - local.set $5 + local.set $0 br $while-continue|4 end end - local.get $5 + local.get $0 i32.const 48 i32.sub - local.set $5 + local.set $0 loop $for-loop|5 - local.get $5 + local.get $0 i32.const 10 i32.lt_u i32.const 0 local.get $1 select if - local.get $4 + local.get $6 i32.const 3200 i32.mul - local.get $0 + local.get $4 i32.const 3200 i32.ge_s br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $5 local.get $0 + local.get $4 i32.const 10 i32.mul i32.add - local.set $0 + local.set $4 local.get $1 i32.const 1 i32.sub @@ -3681,12 +3672,12 @@ i32.load16_u i32.const 48 i32.sub - local.set $5 + local.set $0 br $for-loop|5 end end - local.get $0 local.get $4 + local.get $6 i32.mul end i32.add @@ -3787,13 +3778,13 @@ i64.shl local.set $2 local.get $0 - local.tee $4 + local.tee $6 i64.extend_i32_s local.get $7 i64.sub local.set $7 loop $for-loop|6 - local.get $4 + local.get $6 i32.const -14 i32.le_s if @@ -3823,16 +3814,16 @@ local.get $8 i64.sub local.set $7 - local.get $4 + local.get $6 i32.const 14 i32.add - local.set $4 + local.set $6 br $for-loop|6 end end local.get $2 i32.const 0 - local.get $4 + local.get $6 i32.sub call $~lib/math/ipow32 i64.extend_i32_s @@ -3874,11 +3865,12 @@ local.set $2 local.get $7 local.get $0 + local.tee $4 i64.extend_i32_s i64.add global.set $~lib/util/string/__fixmulShift loop $for-loop|7 - local.get $0 + local.get $4 i32.const 13 i32.ge_s if @@ -3902,7 +3894,7 @@ i64.shr_u i32.wrap_i64 i32.clz - local.tee $4 + local.tee $0 i64.extend_i32_u i64.sub local.tee $8 @@ -3910,7 +3902,7 @@ i64.add global.set $~lib/util/string/__fixmulShift local.get $2 - local.get $4 + local.get $0 i64.extend_i32_u i64.shl i64.const 31 @@ -3918,7 +3910,7 @@ i64.const 1 i64.and local.get $7 - local.get $4 + local.get $0 i64.extend_i32_u i64.shl local.get $2 @@ -3929,14 +3921,14 @@ i64.or i64.add local.set $2 - local.get $0 + local.get $4 i32.const 13 i32.sub - local.set $0 + local.set $4 br $for-loop|7 end end - local.get $0 + local.get $4 call $~lib/math/ipow32 local.tee $0 i64.extend_i32_u @@ -5079,23 +5071,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 @@ -5601,9 +5591,14 @@ (func $~lib/util/number/utoa_simple (; 61 ;) (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 @@ -5612,13 +5607,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -5741,11 +5734,17 @@ select ) (func $~lib/util/number/utoa_simple (; 65 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) + (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 @@ -5754,14 +5753,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -6511,26 +6507,19 @@ ) (func $~lib/util/number/dtoa_core (; 70 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) local.get $1 f64.const 0 f64.lt - local.tee $10 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -6541,70 +6530,69 @@ local.get $1 end i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 + local.tee $9 i32.const 0 i32.ne - local.tee $6 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $7 + local.set $4 local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $5 + local.get $9 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $9 i32.const 1 i32.sub - local.get $3 + local.get $4 i32.sub - local.set $3 + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $9 + local.get $7 i32.sub - local.get $3 + local.get $4 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $3 + local.get $4 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -6617,8 +6605,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.convert_i32_s local.get $1 f64.ne @@ -6627,81 +6615,74 @@ i32.shr_s i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 3 i32.shl - local.tee $6 + local.tee $7 i32.sub global.set $~lib/util/number/_K - local.get $6 + local.get $7 i32.const 14368 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $3 + local.get $4 i32.const 1 i32.shl i32.const 15088 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $3 + i64.const 4294967295 + i64.and + local.set $6 + local.get $0 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $0 local.get $2 local.get $2 i64.clz i32.wrap_i64 - local.tee $3 + local.tee $0 i64.extend_i32_s i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 + i64.const 32 + i64.shr_u + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $3 i64.const 4294967295 i64.and - local.tee $9 + local.tee $11 + local.get $5 i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 local.get $2 i64.const 4294967295 i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 + local.tee $2 + local.get $11 i64.mul - local.get $9 - local.get $8 i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -6709,34 +6690,45 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $9 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + i64.mul + local.get $5 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $6 i64.mul - local.get $17 - local.get $15 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.get $2 + local.get $10 + i64.mul + local.get $6 i64.const 4294967295 i64.and i64.add @@ -6744,41 +6736,49 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add - local.get $0 - local.get $11 + i32.const -64 + i32.sub local.get $2 + global.get $~lib/util/number/_frc_minus + local.tee $2 + i64.const 32 + i64.shr_u + local.tee $6 + local.get $3 i64.const 32 i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and local.tee $2 + local.get $3 i64.mul - local.get $13 - local.get $7 i64.const 32 i64.shr_u - local.tee $7 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.get $2 + local.get $5 + i64.mul + local.get $3 i64.const 4294967295 i64.and i64.add @@ -6786,36 +6786,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $8 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 call $~lib/util/number/genDigits - local.get $10 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $10 + local.get $8 i32.add ) (func $~lib/util/number/dtoa (; 71 ;) (param $0 f64) (result i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 0a25108c6a..c5dfee9779 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -213,23 +213,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 387b26df63..dc545b089a 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -342,11 +342,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -354,7 +350,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -644,12 +642,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl @@ -1238,6 +1235,7 @@ (func $~lib/memory/memory.fill (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) + (local $5 i32) block $~lib/util/memory/memset|inlined.0 local.get $2 i32.eqz @@ -1299,19 +1297,15 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $2 - i32.sub - local.set $3 - local.get $0 - local.get $2 + local.tee $5 i32.add - local.tee $2 + local.tee $3 local.get $1 i32.const 255 i32.and @@ -1319,26 +1313,28 @@ i32.mul local.tee $0 i32.store - local.get $2 local.get $3 + local.get $2 + local.get $5 + i32.sub i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.add i32.const 4 i32.sub local.get $0 i32.store - local.get $3 + local.get $2 i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $3 i32.const 4 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 8 i32.add local.get $0 @@ -1356,26 +1352,26 @@ i32.sub local.get $0 i32.store - local.get $3 + local.get $2 i32.const 24 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $2 + local.get $3 i32.const 12 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 16 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 20 i32.add local.get $0 i32.store - local.get $2 + local.get $3 i32.const 24 i32.add local.get $0 @@ -1403,17 +1399,17 @@ i32.sub local.get $0 i32.store - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.const 4 i32.and i32.const 24 i32.add - local.tee $2 + local.tee $3 i32.add local.set $1 - local.get $3 local.get $2 + local.get $3 i32.sub local.set $2 local.get $0 @@ -2211,11 +2207,21 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $4 i32.load offset=8 i32.const 2 i32.shr_u local.set $3 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 local.get $1 i32.const 0 i32.lt_s @@ -2237,7 +2243,12 @@ i32.lt_s select end - local.set $0 + local.tee $0 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $4 local.get $2 i32.const 0 i32.lt_s @@ -2259,25 +2270,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $4 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.load offset=4 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $0 local.get $1 local.get $0 @@ -2288,7 +2281,7 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $2 + local.get $4 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Float64Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 f64) @@ -2319,11 +2312,21 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $4 i32.load offset=8 i32.const 3 i32.shr_u local.set $3 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 local.get $1 i32.const 0 i32.lt_s @@ -2345,7 +2348,12 @@ i32.lt_s select end - local.set $0 + local.tee $0 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $4 local.get $2 i32.const 0 i32.lt_s @@ -2367,25 +2375,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $4 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.load offset=4 - local.get $0 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $0 local.get $1 local.get $0 @@ -2396,7 +2386,7 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $2 + local.get $4 call $~lib/rt/pure/__retain ) (func $~setArgumentsLength (; 38 ;) (param $0 i32) @@ -2951,7 +2941,7 @@ i32.lt_s select end - local.tee $2 + local.tee $0 local.get $3 i32.const 0 i32.lt_s @@ -2959,9 +2949,9 @@ local.get $3 local.get $4 i32.add - local.tee $0 + local.tee $2 i32.const 0 - local.get $0 + local.get $2 i32.const 0 i32.gt_s select @@ -2973,15 +2963,15 @@ i32.lt_s select end - local.tee $0 + local.tee $2 i32.lt_s if - local.get $2 + local.get $0 local.get $6 i32.add local.get $1 - local.get $0 local.get $2 + local.get $0 i32.sub call $~lib/memory/memory.fill end @@ -3283,9 +3273,19 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $4 i32.load offset=8 local.set $3 + local.get $0 + local.set $4 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $0 local.get $1 i32.const 0 i32.lt_s @@ -3293,9 +3293,9 @@ local.get $1 local.get $3 i32.add - local.tee $0 + local.tee $1 i32.const 0 - local.get $0 + local.get $1 i32.const 0 i32.gt_s select @@ -3307,7 +3307,12 @@ i32.lt_s select end - local.set $0 + local.tee $1 + local.get $4 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $0 local.get $2 i32.const 0 i32.lt_s @@ -3315,9 +3320,9 @@ local.get $2 local.get $3 i32.add - local.tee $1 + local.tee $2 i32.const 0 - local.get $1 + local.get $2 i32.const 0 i32.gt_s select @@ -3329,32 +3334,16 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc local.tee $2 - local.get $4 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - local.get $4 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 local.get $1 - local.get $0 + local.get $2 local.get $1 - local.get $0 i32.gt_s select - local.get $0 + local.get $1 i32.sub i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Int32Array#fill (; 55 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -8495,15 +8484,31 @@ (func $~lib/typedarray/Uint8Array#subarray (; 184 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 - local.tee $2 + local.set $2 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $3 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $3 local.get $1 i32.const 0 i32.lt_s @@ -8511,9 +8516,9 @@ local.get $1 local.get $2 i32.add - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select @@ -8525,32 +8530,16 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 + local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.store offset=8 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 185 ;) @@ -8705,15 +8694,31 @@ (func $~lib/typedarray/Uint8ClampedArray#subarray (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 - local.tee $2 + local.set $2 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.tee $3 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $3 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $4 + local.get $0 + i32.load offset=4 + i32.add + i32.store offset=4 + local.get $3 local.get $1 i32.const 0 i32.lt_s @@ -8721,9 +8726,9 @@ local.get $1 local.get $2 i32.add - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select @@ -8735,32 +8740,16 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $3 + local.tee $0 + local.get $4 local.get $0 - i32.load offset=4 - i32.add - i32.store offset=4 - local.get $2 - local.get $1 - local.get $3 - local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.store offset=8 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) @@ -8973,17 +8962,36 @@ (func $~lib/typedarray/Int16Array#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -9005,25 +9013,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -9034,7 +9024,7 @@ i32.const 1 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 190 ;) @@ -9253,17 +9243,36 @@ (func $~lib/typedarray/Uint16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 1 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -9285,25 +9294,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -9314,7 +9305,7 @@ i32.const 1 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 193 ;) @@ -9671,17 +9662,36 @@ (func $~lib/typedarray/Uint32Array#subarray (; 196 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -9703,25 +9713,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -9732,7 +9724,7 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 197 ;) @@ -9939,17 +9931,36 @@ (func $~lib/typedarray/Int64Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -9971,25 +9982,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -10000,7 +9993,7 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 200 ;) @@ -10152,17 +10145,36 @@ (func $~lib/typedarray/Uint64Array#subarray (; 201 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -10184,25 +10196,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -10213,7 +10207,7 @@ i32.const 3 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 202 ;) @@ -10423,17 +10417,36 @@ (func $~lib/typedarray/Float32Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $2 + local.set $2 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 + i32.const 4 + local.get $2 i32.const 4 local.get $2 i32.lt_s select - local.set $3 + local.tee $3 + i32.const 2 + i32.shl + i32.add + i32.store offset=4 + local.get $4 + local.tee $0 local.get $1 i32.const 0 i32.lt_s @@ -10455,25 +10468,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $0 - i32.load offset=4 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.store offset=4 - local.get $2 - local.get $1 + local.tee $1 local.get $3 local.get $1 local.get $3 @@ -10484,7 +10479,7 @@ i32.const 2 i32.shl i32.store offset=8 - local.get $2 + local.get $0 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 205 ;) @@ -16349,9 +16344,14 @@ (func $~lib/util/number/utoa_simple (; 238 ;) (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 @@ -16360,13 +16360,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i32.const 10 - i32.rem_u + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 br_if $do-continue|0 end ) @@ -17601,11 +17599,17 @@ select ) (func $~lib/util/number/utoa_simple (; 264 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) + (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 @@ -17614,14 +17618,11 @@ i32.const 1 i32.shl i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 + local.get $3 i32.const 48 i32.add i32.store16 - local.tee $1 + local.get $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -18693,26 +18694,19 @@ ) (func $~lib/util/number/dtoa_core (; 273 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) local.get $1 f64.const 0 f64.lt - local.tee $10 + local.tee $8 if (result f64) local.get $0 i32.const 45 @@ -18723,70 +18717,69 @@ local.get $1 end i64.reinterpret_f64 - local.tee $2 + local.tee $3 i64.const 9218868437227405312 i64.and i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 + local.tee $9 i32.const 0 i32.ne - local.tee $6 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl + local.get $3 + i64.const 4503599627370495 + i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $7 + local.set $4 local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $5 + local.get $9 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $9 i32.const 1 i32.sub - local.get $3 + local.get $4 i32.sub - local.set $3 + local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $7 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $9 + local.get $7 i32.sub - local.get $3 + local.get $4 i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus - local.get $3 + local.get $4 global.set $~lib/util/number/_exp i32.const 348 i32.const -61 @@ -18799,8 +18792,8 @@ f64.add local.tee $1 i32.trunc_f64_s - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.convert_i32_s local.get $1 f64.ne @@ -18809,81 +18802,74 @@ i32.shr_s i32.const 1 i32.add - local.tee $3 + local.tee $4 i32.const 3 i32.shl - local.tee $6 + local.tee $7 i32.sub global.set $~lib/util/number/_K - local.get $6 + local.get $7 i32.const 2192 i32.add i64.load global.set $~lib/util/number/_frc_pow - local.get $3 + local.get $4 i32.const 1 i32.shl i32.const 2912 i32.add i32.load16_s global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $3 + i64.const 4294967295 + i64.and + local.set $6 + local.get $0 + local.get $8 + i32.const 1 + i32.shl + i32.add + local.get $0 local.get $2 local.get $2 i64.clz i32.wrap_i64 - local.tee $3 + local.tee $0 i64.extend_i32_s i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 + i64.const 32 + i64.shr_u + local.tee $5 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $8 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $3 i64.const 4294967295 i64.and - local.tee $9 + local.tee $11 + local.get $5 i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 local.get $2 i64.const 4294967295 i64.and - local.tee $17 + local.tee $2 + local.get $11 i64.mul - local.set $18 - local.get $4 - local.get $2 i64.const 32 i64.shr_u - local.tee $4 - i64.mul - local.get $9 - local.get $8 - i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -18891,34 +18877,45 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $9 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $8 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u - local.tee $4 + local.tee $10 + i64.mul + local.get $5 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and + local.tee $2 + local.get $6 i64.mul - local.get $17 - local.get $15 i64.const 32 i64.shr_u - local.tee $9 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.get $2 + local.get $10 + i64.mul + local.get $6 i64.const 4294967295 i64.and i64.add @@ -18926,41 +18923,49 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $9 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add i64.add i64.const 1 - i64.add i64.sub - local.set $4 - local.get $0 - local.get $10 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add - local.get $0 - local.get $11 + i32.const -64 + i32.sub local.get $2 + global.get $~lib/util/number/_frc_minus + local.tee $2 i64.const 32 i64.shr_u + local.tee $6 + local.get $3 + i64.const 32 + i64.shr_u + local.tee $5 + i64.mul + local.get $3 + i64.const 4294967295 + i64.and + local.tee $3 + local.get $6 + i64.mul + local.get $2 + i64.const 4294967295 + i64.and local.tee $2 + local.get $3 i64.mul - local.get $13 - local.get $7 i64.const 32 i64.shr_u - local.tee $7 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.get $2 + local.get $5 + i64.mul + local.get $3 i64.const 4294967295 i64.and i64.add @@ -18968,36 +18973,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add + i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $8 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $10 call $~lib/util/number/genDigits - local.get $10 + local.get $8 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $10 + local.get $8 i32.add ) (func $~lib/util/number/dtoa (; 274 ;) (param $0 f64) (result i32) diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 03f18b25ae..d3f248a248 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -245,11 +245,7 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $4 i32.load offset=4 i32.const 1 local.get $2 @@ -257,7 +253,9 @@ i32.const -1 i32.xor i32.and - local.tee $1 + local.set $1 + local.get $4 + local.get $1 i32.store offset=4 local.get $1 i32.eqz @@ -547,12 +545,11 @@ i32.const 2 i32.shl i32.add - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add + local.tee $0 i32.load offset=4 + local.set $1 + local.get $0 + local.get $1 i32.const 1 local.get $4 i32.shl From 0ac67d244b53e6b3d257ce50d5304c5ec8bb333b Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 11:56:27 +0200 Subject: [PATCH 18/51] add comment --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 1e5cd50e01..a0883ec7c9 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -667,7 +667,7 @@ exports.main = function main(argv, options, callback) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { - add("simplify-locals-nostructure"); + add("simplify-locals-nostructure"); // differs add("flatten"); add("local-cse"); } From 2d8fb422a09c1900560f52325e1309be6a32cc9e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 11:59:38 +0200 Subject: [PATCH 19/51] remould g-o-l --- examples/game-of-life/build/optimized.wasm | Bin 901 -> 903 bytes examples/game-of-life/build/optimized.wat | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 7702c9c6f6395e2dfdac3318b68ab237230695c7..0e3135c28075a31f93b72463fe88ae4d14153efb 100644 GIT binary patch delta 41 xcmZo=Z)cydo^jp84dsl7Cu=Zz2(c(L=O{5LFgP-1E3hjtNGmaKZeV0(0s#Nl3FH6( delta 39 vcmZo?Z)Kmbo^j2@4dsjnCu=Zz2rxJ@W-G8OFi0ygE3hat=WK3bWMu*X>`@84 diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index 9474a6ca67..2c1b8fc7fc 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -127,6 +127,10 @@ local.get $9 i32.lt_s if + local.get $4 + global.get $assembly/index/width + i32.mul + local.tee $2 local.get $0 i32.const 1 i32.sub @@ -134,9 +138,6 @@ local.get $0 select local.tee $3 - local.get $4 - global.get $assembly/index/width - i32.mul i32.add i32.const 2 i32.shl From 49a561d12300e4fec23e443ae32d7259f2afa768 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 12:40:34 +0200 Subject: [PATCH 20/51] better --- cli/asc.js | 2 + tests/compiler/do.optimized.wat | 39 +++--- .../extends-baseaggregate.optimized.wat | 44 ++++--- tests/compiler/for.optimized.wat | 39 +++--- .../implicit-getter-setter.optimized.wat | 44 ++++--- tests/compiler/issues/1095.optimized.wat | 39 +++--- tests/compiler/logical.optimized.wat | 5 +- tests/compiler/loop-flow.optimized.wat | 18 ++- tests/compiler/managed-cast.optimized.wat | 39 +++--- tests/compiler/number.optimized.wat | 14 ++- tests/compiler/possibly-null.optimized.wat | 8 +- tests/compiler/rc/local-init.optimized.wat | 39 +++--- .../rc/logical-and-mismatch.optimized.wat | 39 +++--- .../rc/logical-or-mismatch.optimized.wat | 39 +++--- tests/compiler/rc/optimize.optimized.wat | 44 ++++--- tests/compiler/rc/rereturn.optimized.wat | 44 ++++--- .../rc/ternary-mismatch.optimized.wat | 39 +++--- tests/compiler/resolve-binary.optimized.wat | 14 ++- .../resolve-elementaccess.optimized.wat | 16 +-- tests/compiler/resolve-ternary.optimized.wat | 58 ++++----- .../retain-release-sanity.optimized.wat | 65 +++++----- tests/compiler/retain-return.optimized.wat | 39 +++--- tests/compiler/runtime-full.optimized.wat | 44 ++++--- .../compiler/std/array-literal.optimized.wat | 44 ++++--- tests/compiler/std/array.optimized.wat | 75 ++++++------ tests/compiler/std/arraybuffer.optimized.wat | 65 +++++----- tests/compiler/std/dataview.optimized.wat | 44 ++++--- tests/compiler/std/libm.optimized.wat | 88 +++++++------- tests/compiler/std/map.optimized.wat | 63 +++++----- tests/compiler/std/math.optimized.wat | 115 +++++++++--------- tests/compiler/std/set.optimized.wat | 63 +++++----- tests/compiler/std/staticarray.optimized.wat | 44 ++++--- .../std/string-casemapping.optimized.wat | 46 ++++--- .../std/string-encoding.optimized.wat | 57 ++++----- tests/compiler/std/string.optimized.wat | 60 ++++----- tests/compiler/std/typedarray.optimized.wat | 75 ++++++------ tests/compiler/while.optimized.wat | 39 +++--- 37 files changed, 812 insertions(+), 837 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index a0883ec7c9..0ba7d3472c 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -668,6 +668,8 @@ exports.main = function main(argv, options, callback) { } if (optimizeLevel >= 3) { add("simplify-locals-nostructure"); // differs + add("vacuum"); + add("reorder-locals"); add("flatten"); add("local-cse"); } diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index d4d5124038..e5d4c36d36 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -455,7 +455,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -463,14 +463,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -478,7 +478,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -494,7 +494,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -503,21 +503,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -541,12 +541,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -836,16 +834,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -854,7 +851,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 6763c20cb3..97df4be6e5 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -380,7 +380,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -388,14 +388,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -403,7 +403,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -419,7 +419,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -428,21 +428,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -466,12 +466,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -889,14 +887,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -940,16 +937,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -974,7 +970,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 6c523bc98e..445bdb3810 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -452,7 +452,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -460,14 +460,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -475,7 +475,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -491,7 +491,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -500,21 +500,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -538,12 +538,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -833,16 +831,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -851,7 +848,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index ae323547d7..85835f0af9 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -387,7 +387,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -395,14 +395,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -410,7 +410,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -426,7 +426,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -435,21 +435,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -473,12 +473,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -872,14 +870,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -942,16 +939,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -976,7 +972,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 23e0132da5..93fdb0f4ce 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -371,7 +371,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -379,14 +379,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -394,7 +394,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -410,7 +410,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -419,21 +419,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -457,12 +457,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -752,16 +750,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -770,7 +767,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index bdab016514..0298582781 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -8,7 +8,7 @@ (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~start (; 0 ;) + (func $start:logical (; 0 ;) i32.const 2 global.set $logical/i i32.const 1 @@ -42,4 +42,7 @@ f64.const nan:0x8000000000000 global.set $logical/F ) + (func $~start (; 1 ;) + call $start:logical + ) ) diff --git a/tests/compiler/loop-flow.optimized.wat b/tests/compiler/loop-flow.optimized.wat index d0844c5dc4..8687add37b 100644 --- a/tests/compiler/loop-flow.optimized.wat +++ b/tests/compiler/loop-flow.optimized.wat @@ -24,10 +24,13 @@ i32.const 1 ) (func $loop-flow/whileAny (; 2 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1 + i32.eq + local.set $1 loop $while-continue|0 (result i32) - local.get $0 - i32.const 1 - i32.eq + local.get $1 if (result i32) i32.const 1 else @@ -45,10 +48,13 @@ end ) (func $loop-flow/forAny (; 3 ;) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1 + i32.eq + local.set $1 loop $for-loop|0 (result i32) - local.get $0 - i32.const 1 - i32.eq + local.get $1 if (result i32) i32.const 1 else diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index f6ca382524..e0b26f4929 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -373,7 +373,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -381,14 +381,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -396,7 +396,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -412,7 +412,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -421,21 +421,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -459,12 +459,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -753,16 +751,15 @@ local.tee $2 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -771,7 +768,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $3 + local.set $3 + local.get $2 + local.get $3 local.get $2 local.get $3 i32.gt_s diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 47022b1a79..6ee6bc5dbf 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -625,6 +625,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $1 loop $while-continue|4 local.get $5 i64.const 10 @@ -633,11 +636,10 @@ local.get $8 i64.const 10 i64.mul - local.tee $1 - local.get $10 - i64.extend_i32_s - i64.shr_u local.tee $3 + local.get $1 + i64.shr_u + local.tee $8 local.get $2 i64.extend_i32_s i64.or @@ -654,7 +656,7 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $8 i32.wrap_i64 i32.const 65535 i32.and @@ -666,7 +668,7 @@ i32.const 1 i32.sub local.set $4 - local.get $1 + local.get $3 local.get $12 i64.and local.tee $8 diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat index ad9f89271f..2c008fd7bc 100644 --- a/tests/compiler/possibly-null.optimized.wat +++ b/tests/compiler/possibly-null.optimized.wat @@ -49,10 +49,10 @@ local.get $0 if local.get $1 - if - local.get $1 - local.set $0 - end + local.get $0 + local.get $1 + select + local.set $0 br $while-continue|0 end end diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 3e0533db66..b721418e7e 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -370,7 +370,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -378,14 +378,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -393,7 +393,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -409,7 +409,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -418,21 +418,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -456,12 +456,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -751,16 +749,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -769,7 +766,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index f07384336e..f5a6d3f4c0 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -370,7 +370,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -378,14 +378,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -393,7 +393,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -409,7 +409,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -418,21 +418,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -456,12 +456,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -751,16 +749,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -769,7 +766,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 6ccc127e1a..827bbc98fe 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -370,7 +370,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -378,14 +378,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -393,7 +393,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -409,7 +409,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -418,21 +418,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -456,12 +456,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -751,16 +749,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -769,7 +766,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 97149897e3..1db915f750 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -461,7 +461,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -469,14 +469,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -484,7 +484,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -500,7 +500,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -509,21 +509,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -547,12 +547,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -946,14 +944,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1016,16 +1013,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1050,7 +1046,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 230b388667..3ff427f068 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -373,7 +373,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -381,14 +381,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -396,7 +396,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -412,7 +412,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -421,21 +421,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -459,12 +459,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -858,14 +856,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -928,16 +925,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -962,7 +958,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 83a507b9f7..7186480528 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -372,7 +372,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -380,14 +380,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -395,7 +395,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -411,7 +411,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -420,21 +420,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -458,12 +458,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -753,16 +751,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -771,7 +768,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 6d3d7678b7..1bc2006553 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -641,6 +641,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $1 loop $while-continue|4 local.get $5 i64.const 10 @@ -649,11 +652,10 @@ local.get $8 i64.const 10 i64.mul - local.tee $1 - local.get $10 - i64.extend_i32_s - i64.shr_u local.tee $3 + local.get $1 + i64.shr_u + local.tee $8 local.get $2 i64.extend_i32_s i64.or @@ -670,7 +672,7 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $8 i32.wrap_i64 i32.const 65535 i32.and @@ -682,7 +684,7 @@ i32.const 1 i32.sub local.set $4 - local.get $1 + local.get $3 local.get $12 i64.and local.tee $8 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 05a645b69f..b12a054b7a 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -305,6 +305,7 @@ (local $11 i64) (local $12 i64) (local $13 i64) + (local $14 i64) local.get $3 local.get $1 i64.sub @@ -565,6 +566,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $14 loop $while-continue|4 (result i32) local.get $5 i64.const 10 @@ -574,8 +578,7 @@ i64.const 10 i64.mul local.tee $3 - local.get $10 - i64.extend_i32_s + local.get $14 i64.shr_u local.tee $1 local.get $6 @@ -1142,7 +1145,6 @@ (local $8 i32) (local $9 i32) (local $10 i64) - (local $11 i64) local.get $1 f64.const 0 f64.lt @@ -1287,17 +1289,17 @@ i64.shr_u local.tee $10 i64.mul + local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $11 - local.get $5 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $11 + local.get $5 i64.mul i64.const 32 i64.shr_u @@ -1383,11 +1385,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 9ac855beef..54dfc78d2c 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -395,7 +395,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -403,14 +403,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -418,7 +418,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -434,7 +434,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -443,21 +443,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -481,12 +481,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -880,14 +878,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -950,16 +947,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -984,7 +980,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1587,6 +1585,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $1 loop $while-continue|4 local.get $5 i64.const 10 @@ -1595,11 +1596,10 @@ local.get $8 i64.const 10 i64.mul - local.tee $1 - local.get $10 - i64.extend_i32_s - i64.shr_u local.tee $3 + local.get $1 + i64.shr_u + local.tee $8 local.get $2 i64.extend_i32_s i64.or @@ -1616,7 +1616,7 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $8 i32.wrap_i64 i32.const 65535 i32.and @@ -1628,7 +1628,7 @@ i32.const 1 i32.sub local.set $4 - local.get $1 + local.get $3 local.get $12 i64.and local.tee $8 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 22db3c8758..ef7f97654d 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -387,7 +387,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -395,14 +395,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -410,7 +410,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -426,7 +426,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -435,21 +435,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -473,12 +473,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -896,14 +894,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -947,16 +944,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -981,7 +977,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1352,11 +1350,11 @@ local.get $1 i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + local.tee $1 + local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -1376,27 +1374,28 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $3 - local.tee $1 + local.get $1 + local.set $2 local.get $0 i32.load local.tee $4 + local.get $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $3 + local.get $1 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 ) diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index 16b3f021a5..efeb5784e2 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -369,7 +369,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -377,14 +377,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -392,7 +392,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -408,7 +408,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -417,21 +417,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -455,12 +455,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -750,16 +748,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -768,7 +765,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index a6f3cba94c..929d4708d3 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -373,7 +373,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -381,14 +381,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -396,7 +396,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -412,7 +412,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -421,21 +421,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -459,12 +459,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -858,14 +856,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -928,16 +925,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -962,7 +958,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 017d0ca459..b1080925c5 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -425,7 +425,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -433,14 +433,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -448,7 +448,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -464,7 +464,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -473,21 +473,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -511,12 +511,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -910,14 +908,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -980,16 +977,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1014,7 +1010,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a346ac4b1c..89c5512ce7 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -585,7 +585,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -593,14 +593,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -608,7 +608,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -624,7 +624,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -633,21 +633,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -671,12 +671,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -1094,14 +1092,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1144,16 +1141,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1178,7 +1174,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1568,7 +1566,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1590,25 +1588,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.tee $2 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -6560,6 +6557,7 @@ (local $11 i64) (local $12 i64) (local $13 i64) + (local $14 i64) local.get $3 local.get $1 i64.sub @@ -6820,6 +6818,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $14 loop $while-continue|4 (result i32) local.get $5 i64.const 10 @@ -6829,8 +6830,7 @@ i64.const 10 i64.mul local.tee $3 - local.get $10 - i64.extend_i32_s + local.get $14 i64.shr_u local.tee $1 local.get $6 @@ -7197,7 +7197,6 @@ (local $8 i32) (local $9 i32) (local $10 i64) - (local $11 i64) local.get $1 f64.const 0 f64.lt @@ -7342,17 +7341,17 @@ i64.shr_u local.tee $10 i64.mul + local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $11 - local.get $5 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $11 + local.get $5 i64.mul i64.const 32 i64.shr_u @@ -7438,11 +7437,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index f4f1c71442..889bbf7ae0 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -378,7 +378,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -386,14 +386,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -401,7 +401,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -417,7 +417,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -426,21 +426,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -464,12 +464,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -863,14 +861,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -933,16 +930,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -967,7 +963,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1583,11 +1581,11 @@ i32.const 1 local.get $1 i32.shl - local.tee $3 + local.tee $2 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 + local.tee $3 + local.get $2 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -1607,28 +1605,27 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 + local.get $3 + local.tee $1 local.get $0 i32.load local.tee $4 - local.get $1 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $3 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 ) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 48a4f542a8..c9fdc1f14f 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -386,7 +386,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -394,14 +394,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -409,7 +409,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -425,7 +425,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -434,21 +434,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -472,12 +472,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -871,14 +869,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -941,16 +938,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -975,7 +971,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 5f2397f815..a0e1acf109 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1242,6 +1242,7 @@ local.set $4 local.get $5 i32.wrap_i64 + local.set $6 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -1280,6 +1281,7 @@ i32.const 2147483647 i32.and local.tee $4 + local.get $6 i32.or i32.eqz if @@ -1601,7 +1603,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $1 + local.tee $2 i64.const 6 i64.shr_s i32.wrap_i64 @@ -1618,38 +1620,38 @@ local.get $7 i64.load offset=16 local.set $4 - local.get $1 + local.get $2 i64.const 63 i64.and - local.tee $1 + local.tee $2 i64.const 0 i64.ne if local.get $5 - local.get $1 + local.get $2 i64.shl local.get $3 i64.const 64 - local.get $1 + local.get $2 i64.sub - local.tee $2 + local.tee $1 i64.shr_u i64.or local.set $5 local.get $3 - local.get $1 + local.get $2 i64.shl local.get $4 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $3 local.get $4 - local.get $1 + local.get $2 i64.shl local.get $7 i64.load offset=24 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $4 @@ -1659,71 +1661,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.tee $2 + local.tee $1 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul + local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $6 - local.get $2 + local.tee $1 i64.mul - local.tee $9 + local.tee $6 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $1 + local.get $2 i64.const 32 i64.shr_u - local.tee $10 - local.get $6 + local.tee $9 + local.get $1 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $8 - local.get $10 + local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi - local.get $1 + local.get $2 local.get $5 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $1 + local.get $2 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $9 + local.get $6 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add i64.add - local.tee $1 + local.tee $2 local.get $3 i64.lt_u i64.extend_i32_u @@ -1731,7 +1733,7 @@ local.tee $8 i64.const 2 i64.shl - local.get $1 + local.get $2 i64.const 62 i64.shr_u i64.or @@ -1743,14 +1745,14 @@ i64.shr_s local.get $5 i64.xor - local.tee $2 + local.tee $1 i64.clz local.set $3 - local.get $2 + local.get $1 local.get $3 i64.shl local.get $4 - local.get $1 + local.get $2 i64.const 2 i64.shl i64.xor @@ -1760,20 +1762,20 @@ i64.sub i64.shr_u i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $1 + local.set $1 + local.get $2 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $2 + local.get $1 i64.const 3373259426 i64.mul - local.get $2 + local.get $1 i64.const 560513588 i64.mul local.tee $10 @@ -1784,7 +1786,7 @@ i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $9 i64.const 3373259426 i64.mul @@ -1792,7 +1794,7 @@ i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add @@ -1800,13 +1802,13 @@ local.get $10 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add - local.tee $2 + local.tee $1 f64.const 3.753184150245214e-04 - local.get $1 + local.get $2 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 @@ -1817,7 +1819,7 @@ f64.mul f64.add i64.trunc_f64_u - local.tee $1 + local.tee $2 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi @@ -1828,11 +1830,11 @@ f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $1 + local.get $2 local.get $6 i64.const 53 i64.shl - local.get $2 + local.get $1 i64.const 11 i64.shr_u i64.or diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 1138be7cbc..2d1cdf2e31 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -394,7 +394,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -402,14 +402,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -417,7 +417,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -433,7 +433,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -442,21 +442,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -480,12 +480,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -903,14 +901,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -953,16 +950,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -987,7 +983,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1728,7 +1726,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1749,25 +1747,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.tee $2 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -2098,7 +2095,6 @@ local.tee $2 local.set $5 call $~lib/rt/tlsf/maybeInitialize - local.set $6 local.get $3 i32.const 16 i32.sub @@ -2137,14 +2133,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 local.get $1 local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 + local.get $4 i32.add local.get $2 local.get $4 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 1ae7646516..89208f4497 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -2625,6 +2625,7 @@ local.set $4 local.get $5 i32.wrap_i64 + local.set $6 local.get $1 i64.reinterpret_f64 local.tee $5 @@ -2663,6 +2664,7 @@ i32.const 2147483647 i32.and local.tee $4 + local.get $6 i32.or i32.eqz if @@ -3308,7 +3310,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $1 + local.tee $2 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3325,38 +3327,38 @@ local.get $7 i64.load offset=16 local.set $4 - local.get $1 + local.get $2 i64.const 63 i64.and - local.tee $1 + local.tee $2 i64.const 0 i64.ne if local.get $5 - local.get $1 + local.get $2 i64.shl local.get $3 i64.const 64 - local.get $1 + local.get $2 i64.sub - local.tee $2 + local.tee $1 i64.shr_u i64.or local.set $5 local.get $3 - local.get $1 + local.get $2 i64.shl local.get $4 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $3 local.get $4 - local.get $1 + local.get $2 i64.shl local.get $7 i64.load offset=24 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $4 @@ -3366,71 +3368,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.tee $2 + local.tee $1 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul + local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $6 - local.get $2 + local.tee $1 i64.mul - local.tee $9 + local.tee $6 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $1 + local.get $2 i64.const 32 i64.shr_u - local.tee $10 - local.get $6 + local.tee $9 + local.get $1 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $8 - local.get $10 + local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi - local.get $1 + local.get $2 local.get $5 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $1 + local.get $2 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $9 + local.get $6 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add i64.add - local.tee $1 + local.tee $2 local.get $3 i64.lt_u i64.extend_i32_u @@ -3438,7 +3440,7 @@ local.tee $8 i64.const 2 i64.shl - local.get $1 + local.get $2 i64.const 62 i64.shr_u i64.or @@ -3450,14 +3452,14 @@ i64.shr_s local.get $5 i64.xor - local.tee $2 + local.tee $1 i64.clz local.set $3 - local.get $2 + local.get $1 local.get $3 i64.shl local.get $4 - local.get $1 + local.get $2 i64.const 2 i64.shl i64.xor @@ -3467,20 +3469,20 @@ i64.sub i64.shr_u i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $1 + local.set $1 + local.get $2 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $2 + local.get $1 i64.const 3373259426 i64.mul - local.get $2 + local.get $1 i64.const 560513588 i64.mul local.tee $10 @@ -3491,7 +3493,7 @@ i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $9 i64.const 3373259426 i64.mul @@ -3499,7 +3501,7 @@ i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add @@ -3507,13 +3509,13 @@ local.get $10 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add - local.tee $2 + local.tee $1 f64.const 3.753184150245214e-04 - local.get $1 + local.get $2 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 @@ -3524,7 +3526,7 @@ f64.mul f64.add i64.trunc_f64_u - local.tee $1 + local.tee $2 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi @@ -3535,11 +3537,11 @@ f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $1 + local.get $2 local.get $6 i64.const 53 i64.shl - local.get $2 + local.get $1 i64.const 11 i64.shr_u i64.or @@ -11084,10 +11086,10 @@ select end local.set $6 + f64.const 0.00833333333332249 global.get $~lib/math/rempio2_y0 + local.tee $0 local.tee $7 - f64.const 0.00833333333332249 - local.get $7 local.get $7 f64.mul local.tee $3 @@ -11110,7 +11112,8 @@ f64.add f64.mul f64.add - local.set $0 + local.set $4 + local.get $7 local.get $3 f64.const 0.5 global.get $~lib/math/rempio2_y1 @@ -11121,7 +11124,7 @@ local.get $7 f64.mul local.tee $2 - local.get $0 + local.get $4 f64.mul f64.sub f64.mul @@ -11136,19 +11139,19 @@ local.set $2 f64.const 1 f64.const 0.5 - local.get $7 - local.get $7 + local.get $0 + local.get $0 f64.mul local.tee $3 f64.mul - local.tee $1 + local.tee $7 f64.sub - local.tee $0 + local.tee $1 f64.const 1 - local.get $0 - f64.sub local.get $1 f64.sub + local.get $7 + f64.sub local.get $3 local.get $3 f64.const 0.0416666666666666 @@ -11164,8 +11167,8 @@ local.get $3 local.get $3 f64.mul - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 f64.mul f64.const -2.7557314351390663e-07 local.get $3 @@ -11179,7 +11182,7 @@ f64.mul f64.add f64.mul - local.get $7 + local.get $0 local.get $9 f64.mul f64.sub diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 14e32b281a..45b319b8c4 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -391,7 +391,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -399,14 +399,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -414,7 +414,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -430,7 +430,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -439,21 +439,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -477,12 +477,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -900,14 +898,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -950,16 +947,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -984,7 +980,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1719,7 +1717,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1740,25 +1738,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.tee $2 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -2089,7 +2086,6 @@ local.tee $2 local.set $5 call $~lib/rt/tlsf/maybeInitialize - local.set $6 local.get $3 i32.const 16 i32.sub @@ -2128,14 +2124,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 - local.get $6 local.get $1 local.get $5 call $~lib/rt/tlsf/reallocateBlock i32.const 16 i32.add local.tee $1 + local.get $4 i32.add local.get $2 local.get $4 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index c7bae0ce02..eb1af866a8 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -427,7 +427,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -435,14 +435,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -450,7 +450,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -466,7 +466,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -475,21 +475,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -513,12 +513,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -912,14 +910,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -982,16 +979,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1016,7 +1012,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 5a7955fc06..6c6c0830d9 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -706,7 +706,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -714,14 +714,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -729,7 +729,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -745,7 +745,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -754,21 +754,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -792,12 +792,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -1215,14 +1213,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1265,16 +1262,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1299,7 +1295,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1452,6 +1450,7 @@ loop $while-continue|0 local.get $2 if + local.get $5 local.get $4 local.get $2 i32.const 1 @@ -1464,7 +1463,6 @@ i32.add i32.load8_u local.tee $6 - local.get $5 i32.eq if (result i32) local.get $3 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 496288292a..41bc09b851 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -447,7 +447,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -455,14 +455,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -470,7 +470,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -486,7 +486,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -495,21 +495,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -533,12 +533,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -956,14 +954,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1006,16 +1003,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1040,7 +1036,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1866,23 +1864,22 @@ i32.sub i32.load offset=12 i32.add - local.set $5 + local.set $4 local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength local.tee $0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.tee $5 local.get $0 - local.get $4 i32.add local.get $1 i32.const 0 i32.ne i32.sub local.set $6 - local.get $4 + local.get $5 local.set $0 loop $while-continue|0 local.get $0 @@ -1928,7 +1925,7 @@ local.get $3 i32.const 2 i32.add - local.get $5 + local.get $4 i32.lt_u i32.const 0 local.get $2 @@ -2041,7 +2038,7 @@ end end local.get $3 - local.get $5 + local.get $4 i32.gt_u if i32.const 0 @@ -2057,7 +2054,7 @@ i32.const 0 i32.store8 end - local.get $4 + local.get $5 call $~lib/rt/pure/__retain ) (func $std/string-encoding/testUTF8Encode (; 28 ;) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 6179af48c7..95c776a240 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -931,7 +931,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -939,14 +939,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -954,7 +954,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -970,7 +970,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -979,21 +979,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -1017,12 +1017,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -1440,14 +1438,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1490,16 +1487,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1524,7 +1520,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -5878,6 +5876,7 @@ (local $11 i64) (local $12 i64) (local $13 i64) + (local $14 i64) local.get $3 local.get $1 i64.sub @@ -6138,6 +6137,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $14 loop $while-continue|4 (result i32) local.get $5 i64.const 10 @@ -6147,8 +6149,7 @@ i64.const 10 i64.mul local.tee $3 - local.get $10 - i64.extend_i32_s + local.get $14 i64.shr_u local.tee $1 local.get $6 @@ -6515,7 +6516,6 @@ (local $8 i32) (local $9 i32) (local $10 i64) - (local $11 i64) local.get $1 f64.const 0 f64.lt @@ -6660,17 +6660,17 @@ i64.shr_u local.tee $10 i64.mul + local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $11 - local.get $5 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $11 + local.get $5 i64.mul i64.const 32 i64.shr_u @@ -6756,11 +6756,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index dc545b089a..52a64011a1 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -557,7 +557,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -565,14 +565,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -580,7 +580,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -596,7 +596,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -605,21 +605,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -643,12 +643,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -1066,14 +1064,13 @@ local.get $1 i32.const 16 i32.add + local.tee $0 local.get $1 i32.load i32.const -4 i32.and i32.add - local.get $1 - i32.const 16 - i32.add + local.get $0 local.get $1 i32.load i32.const -4 @@ -1116,16 +1113,15 @@ local.tee $3 i32.eqz if + i32.const 16 memory.size local.tee $3 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $3 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl local.get $4 @@ -1150,7 +1146,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 + local.set $5 + local.get $3 + local.get $5 local.get $3 local.get $5 i32.gt_s @@ -1540,7 +1538,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1562,25 +1560,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.set $1 - local.get $2 + local.get $1 + local.tee $2 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -18065,6 +18062,7 @@ (local $11 i64) (local $12 i64) (local $13 i64) + (local $14 i64) local.get $3 local.get $1 i64.sub @@ -18325,6 +18323,9 @@ br $while-continue|0 end end + local.get $10 + i64.extend_i32_s + local.set $14 loop $while-continue|4 (result i32) local.get $5 i64.const 10 @@ -18334,8 +18335,7 @@ i64.const 10 i64.mul local.tee $3 - local.get $10 - i64.extend_i32_s + local.get $14 i64.shr_u local.tee $1 local.get $6 @@ -18702,7 +18702,6 @@ (local $8 i32) (local $9 i32) (local $10 i64) - (local $11 i64) local.get $1 f64.const 0 f64.lt @@ -18847,17 +18846,17 @@ i64.shr_u local.tee $10 i64.mul + local.get $5 local.get $3 i64.const 4294967295 i64.and - local.tee $11 - local.get $5 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 i64.and local.tee $2 - local.get $11 + local.get $5 i64.mul i64.const 32 i64.shr_u @@ -18943,11 +18942,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index d3f248a248..c8bf3e05fc 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -460,7 +460,7 @@ local.get $2 i32.const 4 i32.shr_u - local.set $4 + local.set $2 i32.const 0 else local.get $2 @@ -468,14 +468,14 @@ local.get $2 i32.clz i32.sub - local.tee $2 + local.tee $3 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor - local.set $4 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end @@ -483,7 +483,7 @@ i32.const 23 i32.lt_u if (result i32) - local.get $4 + local.get $2 i32.const 16 i32.lt_u else @@ -499,7 +499,7 @@ unreachable end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -508,21 +508,21 @@ i32.shl i32.add i32.load offset=96 - local.set $2 + local.set $4 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $2 + local.get $4 i32.store offset=20 - local.get $2 + local.get $4 if - local.get $2 + local.get $4 local.get $1 i32.store offset=16 end local.get $0 - local.get $4 + local.get $2 local.get $3 i32.const 4 i32.shl @@ -546,12 +546,10 @@ i32.shl i32.add local.tee $0 - i32.load offset=4 - local.set $1 local.get $0 - local.get $1 + i32.load offset=4 i32.const 1 - local.get $4 + local.get $2 i32.shl i32.or i32.store offset=4 @@ -841,16 +839,15 @@ local.tee $1 i32.eqz if + i32.const 16 memory.size local.tee $2 i32.const 16 - local.get $0 - i32.load offset=1568 - local.get $2 - i32.const 16 i32.shl i32.const 16 i32.sub + local.get $0 + i32.load offset=1568 i32.ne i32.shl i32.const 65551 @@ -859,7 +856,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.set $1 + local.get $2 + local.get $1 local.get $2 local.get $1 i32.gt_s From 8d12ecdc2d657a76b5f7f83bd7a094eb23c6cdc0 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 12:44:55 +0200 Subject: [PATCH 21/51] rebuild examples --- cli/asc.js | 4 +- examples/game-of-life/build/optimized.wasm | Bin 903 -> 896 bytes examples/game-of-life/build/optimized.wat | 110 ++++++++++----------- examples/n-body/build/optimized.wasm | Bin 1607 -> 1603 bytes examples/n-body/build/optimized.wat | 108 ++++++++++---------- 5 files changed, 108 insertions(+), 114 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 0ba7d3472c..f1cb3c850f 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -668,8 +668,8 @@ exports.main = function main(argv, options, callback) { } if (optimizeLevel >= 3) { add("simplify-locals-nostructure"); // differs - add("vacuum"); - add("reorder-locals"); + add("vacuum"); // differs + add("reorder-locals"); // differs add("flatten"); add("local-cse"); } diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 0e3135c28075a31f93b72463fe88ae4d14153efb..e4ac2a2a0f3937335b99798264c68476f6b99bc4 100644 GIT binary patch delta 382 zcmZ8dJ5Izf5Sv{M#+zhRa%ft`CwkEDhQJFgxU2ZHc^lDXnSR^W424XuO z>O_ISBV85VqBVUqN`+o2`RHQs=0`*<>usL@&L zl(p{TOh|JdRx>dOjMx4wqCv7VB%ge dnIm~GYaS(6|0Q)@7R-SfMp-^C$l*uce*wPYK3f0) delta 447 zcmZvYF>b>!3`Hr@vXTbKoI(pFb?6B?hl^44C{7m#LEFvVy0*v#dV(fbD0-3H#Gz0i zf$a_g$^RcIN}YRm9|!aOd3 fmYs!FkR}t8xe)el*!=%x`yae5^UnvfKjGIIkj+%i diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index 2c1b8fc7fc..a3e72635a7 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -89,55 +89,57 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) global.get $assembly/index/height - local.tee $8 + local.tee $9 i32.const 1 i32.sub - local.set $6 + local.set $4 global.get $assembly/index/width - local.tee $9 + local.tee $10 i32.const 1 i32.sub - local.set $7 + local.set $5 loop $for-loop|0 - local.get $1 - local.get $8 + local.get $2 + local.get $9 i32.lt_s if - local.get $1 + local.get $2 i32.const 1 i32.sub - local.get $6 - local.get $1 + local.get $4 + local.get $2 select - local.set $4 + local.set $6 i32.const 0 - local.get $1 + local.get $2 i32.const 1 i32.add - local.get $1 - local.get $6 + local.get $2 + local.get $4 i32.eq select - local.set $5 + local.set $11 i32.const 0 local.set $0 loop $for-loop|1 local.get $0 - local.get $9 + local.get $10 i32.lt_s if - local.get $4 + local.get $6 global.get $assembly/index/width i32.mul - local.tee $2 + local.tee $3 local.get $0 i32.const 1 i32.sub - local.get $7 + local.get $5 local.get $0 select - local.tee $3 + local.tee $7 i32.add i32.const 2 i32.shl @@ -145,9 +147,10 @@ i32.const 1 i32.and local.get $0 - local.get $4 + local.get $6 global.get $assembly/index/width i32.mul + local.tee $1 i32.add i32.const 2 i32.shl @@ -160,13 +163,11 @@ i32.const 1 i32.add local.get $0 - local.get $7 + local.get $5 i32.eq select - local.tee $2 - local.get $4 - global.get $assembly/index/width - i32.mul + local.tee $3 + local.get $1 i32.add i32.const 2 i32.shl @@ -174,10 +175,12 @@ i32.const 1 i32.and i32.add - local.get $3 - local.get $1 + local.get $7 + local.get $2 global.get $assembly/index/width + local.tee $1 i32.mul + local.tee $8 i32.add i32.const 2 i32.shl @@ -185,10 +188,8 @@ i32.const 1 i32.and i32.add - local.get $2 - local.get $1 - global.get $assembly/index/width - i32.mul + local.get $3 + local.get $8 i32.add i32.const 2 i32.shl @@ -196,10 +197,11 @@ i32.const 1 i32.and i32.add - local.get $3 - local.get $5 - global.get $assembly/index/width + local.get $7 + local.get $1 + local.get $11 i32.mul + local.tee $1 i32.add i32.const 2 i32.shl @@ -208,9 +210,7 @@ i32.and i32.add local.get $0 - local.get $5 - global.get $assembly/index/width - i32.mul + local.get $1 i32.add i32.const 2 i32.shl @@ -218,10 +218,8 @@ i32.const 1 i32.and i32.add - local.get $2 - local.get $5 - global.get $assembly/index/width - i32.mul + local.get $1 + local.get $3 i32.add i32.const 2 i32.shl @@ -229,11 +227,9 @@ i32.const 1 i32.and i32.add - local.set $2 + local.set $1 local.get $0 - local.get $1 - global.get $assembly/index/width - i32.mul + local.get $8 i32.add i32.const 2 i32.shl @@ -242,7 +238,7 @@ i32.const 1 i32.and if - local.get $2 + local.get $1 i32.const 14 i32.and i32.const 2 @@ -250,7 +246,7 @@ if local.get $0 global.get $assembly/index/offset - local.get $1 + local.get $2 global.get $assembly/index/width i32.mul i32.add @@ -265,9 +261,9 @@ i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select @@ -278,7 +274,7 @@ else local.get $0 global.get $assembly/index/offset - local.get $1 + local.get $2 global.get $assembly/index/width i32.mul i32.add @@ -291,13 +287,13 @@ i32.store end else - local.get $2 + local.get $1 i32.const 3 i32.eq if local.get $0 global.get $assembly/index/offset - local.get $1 + local.get $2 global.get $assembly/index/width i32.mul i32.add @@ -311,7 +307,7 @@ else local.get $0 global.get $assembly/index/offset - local.get $1 + local.get $2 global.get $assembly/index/width i32.mul i32.add @@ -326,9 +322,9 @@ i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select @@ -345,10 +341,10 @@ br $for-loop|1 end end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 2ad36bbb8785824ad2db0f1b9b3b8d798afb50c9..53c73f1d277a09f6b865e9d86e4e095be0096426 100644 GIT binary patch delta 286 zcmXAjF;2rk5Jh))%zEv$6C+Wi{JYgkX+r6WL_$JbB{dZkkx&i*&j$pHdHW*wfW+0x>7;ri{iljF~GKaGDWZ$ym4+Y9+Uh zXbHl_O}4}Y8EB<$w?PRn=OhN7BafIOi5|Rxi9H&&X7Cm^_P#p08U=C=7wh}ou$8YS#Fm5|(-rD~gYeIENR*%%^ikB+m4)EPab|M+Jsje$VH V4FTN|63ULk;Vo-r@$r>C%73`KGpGOn diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index bfba7cb2f6..ced5e64aaf 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -275,53 +275,53 @@ (func $assembly/index/NBodySystem#advance (; 4 ;) (param $0 i32) (local $1 i32) (local $2 f64) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 i32) (local $8 f64) (local $9 f64) - (local $10 f64) - (local $11 f64) - (local $12 i32) - (local $13 i32) + (local $10 i32) + (local $11 i32) + (local $12 f64) + (local $13 f64) (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) local.get $0 i32.load - local.tee $12 + local.tee $10 i32.const 16 i32.sub i32.load offset=12 i32.const 2 i32.shr_u - local.set $13 + local.set $11 loop $for-loop|0 - local.get $3 - local.get $13 + local.get $4 + local.get $11 i32.lt_u if - local.get $12 - local.get $3 + local.get $10 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $0 f64.load - local.set $14 + local.set $13 local.get $0 f64.load offset=8 - local.set $15 + local.set $14 local.get $0 f64.load offset=16 - local.set $16 + local.set $15 local.get $0 f64.load offset=24 - local.set $4 + local.set $2 local.get $0 f64.load offset=32 local.set $5 @@ -330,18 +330,19 @@ local.set $6 local.get $0 f64.load offset=48 - local.set $17 - local.get $3 + local.set $16 + local.get $4 i32.const 1 i32.add local.set $7 loop $for-loop|1 local.get $7 - local.get $13 + local.get $11 i32.lt_u if - local.get $14 - local.get $12 + local.get $2 + local.get $13 + local.get $10 local.get $7 i32.const 2 i32.shl @@ -350,79 +351,76 @@ local.tee $1 f64.load f64.sub - local.tee $2 - local.get $2 + local.tee $3 + local.get $1 + f64.load offset=48 + f64.const 0.01 + local.get $3 + local.get $3 f64.mul - local.get $15 + local.get $14 local.get $1 f64.load offset=8 f64.sub - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 f64.mul f64.add - local.get $16 + local.get $15 local.get $1 f64.load offset=16 f64.sub - local.tee $10 - local.get $10 + local.tee $9 + local.get $9 f64.mul f64.add - local.tee $8 - f64.sqrt - local.set $11 - local.get $4 + local.tee $2 local.get $2 - local.get $1 - f64.load offset=48 - f64.const 0.01 - local.get $8 - local.get $11 + f64.sqrt f64.mul f64.div - local.tee $11 + local.tee $17 f64.mul - local.tee $8 + local.tee $12 f64.mul f64.sub - local.set $4 + local.set $2 local.get $5 - local.get $9 local.get $8 + local.get $12 f64.mul f64.sub local.set $5 local.get $6 - local.get $10 - local.get $8 + local.get $9 + local.get $12 f64.mul f64.sub local.set $6 local.get $1 local.get $1 f64.load offset=24 - local.get $2 + local.get $3 + local.get $16 local.get $17 - local.get $11 f64.mul - local.tee $2 + local.tee $3 f64.mul f64.add f64.store offset=24 local.get $1 local.get $1 f64.load offset=32 - local.get $9 - local.get $2 + local.get $8 + local.get $3 f64.mul f64.add f64.store offset=32 local.get $1 local.get $1 f64.load offset=40 - local.get $10 - local.get $2 + local.get $9 + local.get $3 f64.mul f64.add f64.store offset=40 @@ -434,7 +432,7 @@ end end local.get $0 - local.get $4 + local.get $2 f64.store offset=24 local.get $0 local.get $5 @@ -446,7 +444,7 @@ local.get $0 f64.load f64.const 0.01 - local.get $4 + local.get $2 f64.mul f64.add f64.store @@ -466,10 +464,10 @@ f64.mul f64.add f64.store offset=16 - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end From 42b36ebb64f694d01f16ce0bd2017cd5192ae530 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 18:16:23 +0200 Subject: [PATCH 22/51] more --- cli/asc.js | 6 +- tests/compiler/logical.optimized.wat | 5 +- tests/compiler/number.optimized.wat | 19 +- tests/compiler/resolve-ternary.optimized.wat | 19 +- tests/compiler/std/libm.optimized.wat | 217 +++++++++--------- tests/compiler/std/math.optimized.wat | 217 +++++++++--------- .../std/operator-overloading.optimized.wat | 217 +++++++++--------- tests/compiler/std/typedarray.optimized.wat | 44 ++-- 8 files changed, 354 insertions(+), 390 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index f1cb3c850f..5030747f34 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -773,8 +773,7 @@ exports.main = function main(argv, options, callback) { add("vacuum"); // replace indirect calls with direct and inline if possible again. - add("directize"); - add("inlining-optimizing"); + // add("directize"); // move some code after early return which potentially could reduce computations // do this after CFG cleanup (originally it was done before) // moved from (1) @@ -783,6 +782,8 @@ exports.main = function main(argv, options, callback) { // this quite expensive so do this only for highest opt level add("simplify-globals"); if (optimizeLevel >= 3) { + add("directize"); + add("coalesce-locals-learning"); add("simplify-locals-nostructure"); add("vacuum"); @@ -791,6 +792,7 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("reorder-locals"); + add("inlining-optimizing"); } add("optimize-instructions"); add("simplify-globals-optimizing"); diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 0298582781..bdab016514 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -8,7 +8,7 @@ (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) (start $~start) - (func $start:logical (; 0 ;) + (func $~start (; 0 ;) i32.const 2 global.set $logical/i i32.const 1 @@ -42,7 +42,4 @@ f64.const nan:0x8000000000000 global.set $logical/F ) - (func $~start (; 1 ;) - call $start:logical - ) ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 6ee6bc5dbf..4978c26729 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1170,7 +1170,6 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -1221,30 +1220,25 @@ i32.const 2 i32.add local.get $3 - i64.const -9223372036854774784 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483648 i64.mul local.get $2 i64.const 2147483648 i64.mul local.get $2 i64.const 1024 - local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $1 i64.const 32 i64.shr_u i64.add local.get $3 i64.const 1024 i64.mul - local.get $4 + local.get $1 i64.const 4294967295 i64.and i64.add @@ -1261,18 +1255,13 @@ i32.add local.get $1 local.get $3 - i64.const 9223372036854775296 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483647 i64.mul local.get $2 i64.const 2147483647 i64.mul local.get $2 i64.const 4294966784 - local.tee $2 i64.mul i64.const 32 i64.shr_u diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 54dfc78d2c..62b845f426 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -2130,7 +2130,6 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -2181,30 +2180,25 @@ i32.const 1 i32.add local.get $3 - i64.const -9223372036854774784 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483648 i64.mul local.get $2 i64.const 2147483648 i64.mul local.get $2 i64.const 1024 - local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $1 i64.const 32 i64.shr_u i64.add local.get $3 i64.const 1024 i64.mul - local.get $4 + local.get $1 i64.const 4294967295 i64.and i64.add @@ -2221,18 +2215,13 @@ i32.add local.get $1 local.get $3 - i64.const 9223372036854775296 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483647 i64.mul local.get $2 i64.const 2147483647 i64.mul local.get $2 i64.const 4294966784 - local.tee $2 i64.mul i64.const 32 i64.shr_u diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index a0e1acf109..2ba862979b 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -3414,9 +3414,9 @@ f64.min ) (func $~lib/math/NativeMath.pow (; 42 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) + (local $2 i32) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) (local $6 i32) (local $7 i32) @@ -3430,9 +3430,8 @@ (local $15 i64) (local $16 f64) (local $17 i32) - (local $18 i32) - (local $19 f64) - (local $20 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -3489,7 +3488,7 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $20 + local.set $19 local.get $15 i64.const 32 i64.shr_u @@ -3497,7 +3496,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $4 + local.set $5 local.get $1 i64.reinterpret_f64 local.tee $15 @@ -3529,13 +3528,13 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $20 + local.get $19 i32.const 0 - local.get $4 + local.get $5 i32.const 2146435072 i32.eq select - local.get $4 + local.get $5 i32.const 2146435072 i32.gt_s select @@ -3571,7 +3570,7 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $5 + local.tee $2 select local.get $10 i32.sub @@ -3579,9 +3578,9 @@ i32.const 2 local.get $6 local.get $8 - local.get $5 + local.get $2 select - local.tee $5 + local.tee $2 local.get $9 i32.shr_u local.tee $10 @@ -3589,7 +3588,7 @@ i32.and i32.sub i32.const 0 - local.get $5 + local.get $2 local.get $10 local.get $9 i32.shl @@ -3599,7 +3598,7 @@ i32.const 0 end end - local.set $18 + local.set $2 end local.get $6 i32.eqz @@ -3608,13 +3607,13 @@ i32.const 2146435072 i32.eq if - local.get $20 - local.get $4 + local.get $19 + local.get $5 i32.const 1072693248 i32.sub i32.or if - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -3685,58 +3684,58 @@ end local.get $0 f64.abs - local.set $2 - local.get $20 + local.set $3 + local.get $19 i32.eqz if i32.const 1 - local.get $4 + local.get $5 i32.const 1072693248 i32.eq - local.get $4 + local.get $5 i32.const 2146435072 i32.eq i32.const 1 - local.get $4 + local.get $5 select select if f64.const 1 - local.get $2 + local.get $3 f64.div - local.get $2 + local.get $3 local.get $7 i32.const 0 i32.lt_s select - local.set $2 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $18 - local.get $4 + local.get $2 + local.get $5 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $2 + local.get $3 f64.neg + local.get $3 local.get $2 - local.get $18 i32.const 1 i32.eq select else - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $2 + local.get $3 end return end @@ -3747,7 +3746,7 @@ i32.const 0 i32.lt_s if - local.get $18 + local.get $2 i32.eqz if local.get $0 @@ -3760,7 +3759,7 @@ end f64.const -1 f64.const 1 - local.get $18 + local.get $2 i32.const 1 i32.eq select @@ -3774,7 +3773,7 @@ i32.const 1139802112 i32.gt_s if - local.get $4 + local.get $5 i32.const 1072693247 i32.le_s if @@ -3786,7 +3785,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -3799,7 +3798,7 @@ return end end - local.get $4 + local.get $5 i32.const 1072693247 i32.lt_s if @@ -3819,7 +3818,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.gt_s if @@ -3840,12 +3839,12 @@ return end f64.const 1.4426950216293335 - local.get $2 + local.get $3 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $2 + local.tee $3 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -3874,50 +3873,48 @@ local.set $12 local.get $0 local.get $12 - local.get $2 + local.get $3 f64.sub f64.sub else - i32.const 0 - local.set $6 - local.get $4 + local.get $5 i32.const 1048576 i32.lt_s if (result i32) - local.get $2 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $2 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 + local.set $5 i32.const -53 else i32.const 0 end - local.get $4 + local.get $5 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $4 + local.get $5 i32.const 1048575 i32.and - local.tee $5 + local.tee $2 i32.const 1072693248 i32.or - local.set $4 - local.get $5 + local.set $5 + local.get $2 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $5 + local.get $2 i32.const 767610 i32.lt_s if (result i32) @@ -3927,19 +3924,19 @@ i32.const 1 i32.add local.set $6 - local.get $4 + local.get $5 i32.const -1048576 i32.add - local.set $4 + local.set $5 i32.const 0 end end - local.set $5 - local.get $2 + local.set $2 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $4 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -3948,19 +3945,19 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $5 + local.get $2 select - local.tee $3 + local.tee $4 f64.sub - local.tee $2 + local.tee $3 f64.const 1 local.get $13 - local.get $3 + local.get $4 f64.add f64.div local.tee $0 f64.mul - local.tee $19 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and @@ -3974,8 +3971,8 @@ f64.const 3 local.get $12 f64.add - local.get $19 - local.get $19 + local.get $18 + local.get $18 f64.mul local.tee $14 local.get $14 @@ -4003,16 +4000,16 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 local.get $16 - local.get $4 + local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $5 + local.get $2 i32.const 18 i32.shl i32.add @@ -4026,15 +4023,15 @@ local.get $16 local.get $13 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $3 + local.tee $4 local.get $16 - local.get $19 + local.get $18 f64.add f64.mul f64.add @@ -4046,8 +4043,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 local.get $13 f64.mul local.get $0 @@ -4057,7 +4054,7 @@ local.get $12 f64.sub f64.sub - local.get $19 + local.get $18 f64.mul f64.add local.tee $0 @@ -4066,15 +4063,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $4 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $3 + local.get $4 f64.mul local.get $0 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -4082,16 +4079,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $2 select f64.add - local.tee $3 + local.tee $4 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $2 select - local.tee $2 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -4102,17 +4099,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $3 + local.get $4 local.get $12 local.get $0 f64.sub - local.get $2 + local.get $3 f64.sub local.get $13 f64.sub f64.sub end - local.set $2 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -4124,20 +4121,20 @@ local.get $12 f64.mul local.get $1 - local.get $2 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $3 + local.tee $4 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $5 + local.set $2 block $folding-inner1 block $folding-inner0 local.get $15 @@ -4148,7 +4145,7 @@ i32.const 1083179008 i32.ge_s if - local.get $5 + local.get $2 local.get $9 i32.const 1083179008 i32.sub @@ -4157,7 +4154,7 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $4 f64.sub f64.gt i32.or @@ -4169,14 +4166,14 @@ i32.const 1083231232 i32.ge_s i32.const 0 - local.get $5 + local.get $2 local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.le i32.or @@ -4191,7 +4188,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $5 + local.set $2 i32.const 0 local.set $6 local.get $10 @@ -4201,7 +4198,7 @@ i32.const 1048575 local.get $9 i32.const 1048576 - local.get $5 + local.get $2 i32.const 1 i32.add i32.shr_s @@ -4213,7 +4210,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $5 + local.tee $2 i32.shr_s i32.const -1 i32.xor @@ -4231,7 +4228,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $5 + local.get $2 i32.sub i32.shr_s local.tee $6 @@ -4242,13 +4239,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $4 local.get $0 f64.sub - local.set $3 + local.set $4 end local.get $1 - local.get $3 + local.get $4 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -4257,10 +4254,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $2 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.const 0.6931471805599453 @@ -4271,14 +4268,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul local.set $0 local.get $11 f64.const 1 - local.get $3 - local.get $3 + local.get $4 + local.get $4 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -4306,17 +4303,17 @@ f64.sub f64.div local.get $1 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $4 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $4 f64.sub f64.sub local.tee $0 @@ -4328,7 +4325,7 @@ i32.const 20 i32.shl i32.add - local.tee $5 + local.tee $2 i32.const 20 i32.shr_s i32.const 0 @@ -4342,7 +4339,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $2 i64.extend_i32_s i64.const 32 i64.shl diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 89208f4497..c75cf8b88d 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -7102,9 +7102,9 @@ call $std/math/check ) (func $~lib/math/NativeMath.pow (; 121 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) + (local $2 i32) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) (local $6 i32) (local $7 i32) @@ -7118,9 +7118,8 @@ (local $15 i64) (local $16 f64) (local $17 i32) - (local $18 i32) - (local $19 f64) - (local $20 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -7177,7 +7176,7 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $20 + local.set $19 local.get $15 i64.const 32 i64.shr_u @@ -7185,7 +7184,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $4 + local.set $5 local.get $1 i64.reinterpret_f64 local.tee $15 @@ -7217,13 +7216,13 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $20 + local.get $19 i32.const 0 - local.get $4 + local.get $5 i32.const 2146435072 i32.eq select - local.get $4 + local.get $5 i32.const 2146435072 i32.gt_s select @@ -7259,7 +7258,7 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $5 + local.tee $2 select local.get $10 i32.sub @@ -7267,9 +7266,9 @@ i32.const 2 local.get $6 local.get $8 - local.get $5 + local.get $2 select - local.tee $5 + local.tee $2 local.get $9 i32.shr_u local.tee $10 @@ -7277,7 +7276,7 @@ i32.and i32.sub i32.const 0 - local.get $5 + local.get $2 local.get $10 local.get $9 i32.shl @@ -7287,7 +7286,7 @@ i32.const 0 end end - local.set $18 + local.set $2 end local.get $6 i32.eqz @@ -7296,13 +7295,13 @@ i32.const 2146435072 i32.eq if - local.get $20 - local.get $4 + local.get $19 + local.get $5 i32.const 1072693248 i32.sub i32.or if - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -7373,58 +7372,58 @@ end local.get $0 f64.abs - local.set $2 - local.get $20 + local.set $3 + local.get $19 i32.eqz if i32.const 1 - local.get $4 + local.get $5 i32.const 1072693248 i32.eq - local.get $4 + local.get $5 i32.const 2146435072 i32.eq i32.const 1 - local.get $4 + local.get $5 select select if f64.const 1 - local.get $2 + local.get $3 f64.div - local.get $2 + local.get $3 local.get $7 i32.const 0 i32.lt_s select - local.set $2 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $18 - local.get $4 + local.get $2 + local.get $5 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $2 + local.get $3 f64.neg + local.get $3 local.get $2 - local.get $18 i32.const 1 i32.eq select else - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $2 + local.get $3 end return end @@ -7435,7 +7434,7 @@ i32.const 0 i32.lt_s if - local.get $18 + local.get $2 i32.eqz if local.get $0 @@ -7448,7 +7447,7 @@ end f64.const -1 f64.const 1 - local.get $18 + local.get $2 i32.const 1 i32.eq select @@ -7462,7 +7461,7 @@ i32.const 1139802112 i32.gt_s if - local.get $4 + local.get $5 i32.const 1072693247 i32.le_s if @@ -7474,7 +7473,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -7487,7 +7486,7 @@ return end end - local.get $4 + local.get $5 i32.const 1072693247 i32.lt_s if @@ -7507,7 +7506,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.gt_s if @@ -7528,12 +7527,12 @@ return end f64.const 1.4426950216293335 - local.get $2 + local.get $3 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $2 + local.tee $3 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -7562,50 +7561,48 @@ local.set $12 local.get $0 local.get $12 - local.get $2 + local.get $3 f64.sub f64.sub else - i32.const 0 - local.set $6 - local.get $4 + local.get $5 i32.const 1048576 i32.lt_s if (result i32) - local.get $2 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $2 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 + local.set $5 i32.const -53 else i32.const 0 end - local.get $4 + local.get $5 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $4 + local.get $5 i32.const 1048575 i32.and - local.tee $5 + local.tee $2 i32.const 1072693248 i32.or - local.set $4 - local.get $5 + local.set $5 + local.get $2 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $5 + local.get $2 i32.const 767610 i32.lt_s if (result i32) @@ -7615,19 +7612,19 @@ i32.const 1 i32.add local.set $6 - local.get $4 + local.get $5 i32.const -1048576 i32.add - local.set $4 + local.set $5 i32.const 0 end end - local.set $5 - local.get $2 + local.set $2 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $4 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -7636,19 +7633,19 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $5 + local.get $2 select - local.tee $3 + local.tee $4 f64.sub - local.tee $2 + local.tee $3 f64.const 1 local.get $13 - local.get $3 + local.get $4 f64.add f64.div local.tee $0 f64.mul - local.tee $19 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and @@ -7662,8 +7659,8 @@ f64.const 3 local.get $12 f64.add - local.get $19 - local.get $19 + local.get $18 + local.get $18 f64.mul local.tee $14 local.get $14 @@ -7691,16 +7688,16 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 local.get $16 - local.get $4 + local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $5 + local.get $2 i32.const 18 i32.shl i32.add @@ -7714,15 +7711,15 @@ local.get $16 local.get $13 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $3 + local.tee $4 local.get $16 - local.get $19 + local.get $18 f64.add f64.mul f64.add @@ -7734,8 +7731,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 local.get $13 f64.mul local.get $0 @@ -7745,7 +7742,7 @@ local.get $12 f64.sub f64.sub - local.get $19 + local.get $18 f64.mul f64.add local.tee $0 @@ -7754,15 +7751,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $4 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $3 + local.get $4 f64.mul local.get $0 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -7770,16 +7767,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $2 select f64.add - local.tee $3 + local.tee $4 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $2 select - local.tee $2 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -7790,17 +7787,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $3 + local.get $4 local.get $12 local.get $0 f64.sub - local.get $2 + local.get $3 f64.sub local.get $13 f64.sub f64.sub end - local.set $2 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -7812,20 +7809,20 @@ local.get $12 f64.mul local.get $1 - local.get $2 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $3 + local.tee $4 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $5 + local.set $2 block $folding-inner1 block $folding-inner0 local.get $15 @@ -7836,7 +7833,7 @@ i32.const 1083179008 i32.ge_s if - local.get $5 + local.get $2 local.get $9 i32.const 1083179008 i32.sub @@ -7845,7 +7842,7 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $4 f64.sub f64.gt i32.or @@ -7857,14 +7854,14 @@ i32.const 1083231232 i32.ge_s i32.const 0 - local.get $5 + local.get $2 local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.le i32.or @@ -7879,7 +7876,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $5 + local.set $2 i32.const 0 local.set $6 local.get $10 @@ -7889,7 +7886,7 @@ i32.const 1048575 local.get $9 i32.const 1048576 - local.get $5 + local.get $2 i32.const 1 i32.add i32.shr_s @@ -7901,7 +7898,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $5 + local.tee $2 i32.shr_s i32.const -1 i32.xor @@ -7919,7 +7916,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $5 + local.get $2 i32.sub i32.shr_s local.tee $6 @@ -7930,13 +7927,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $4 local.get $0 f64.sub - local.set $3 + local.set $4 end local.get $1 - local.get $3 + local.get $4 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -7945,10 +7942,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $2 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.const 0.6931471805599453 @@ -7959,14 +7956,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul local.set $0 local.get $11 f64.const 1 - local.get $3 - local.get $3 + local.get $4 + local.get $4 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -7994,17 +7991,17 @@ f64.sub f64.div local.get $1 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $4 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $4 f64.sub f64.sub local.tee $0 @@ -8016,7 +8013,7 @@ i32.const 20 i32.shl i32.add - local.tee $5 + local.tee $2 i32.const 20 i32.shr_s i32.const 0 @@ -8030,7 +8027,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $2 i64.extend_i32_s i64.const 32 i64.shl diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 486cbdcdfe..48120d3e86 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -234,9 +234,9 @@ f64.mul ) (func $~lib/math/NativeMath.pow (; 4 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) + (local $2 i32) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) (local $6 i32) (local $7 i32) @@ -250,9 +250,8 @@ (local $15 i64) (local $16 f64) (local $17 i32) - (local $18 i32) - (local $19 f64) - (local $20 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -309,7 +308,7 @@ i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $20 + local.set $19 local.get $15 i64.const 32 i64.shr_u @@ -317,7 +316,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $4 + local.set $5 local.get $1 i64.reinterpret_f64 local.tee $15 @@ -349,13 +348,13 @@ i32.const 2146435072 i32.gt_s i32.const 1 - local.get $20 + local.get $19 i32.const 0 - local.get $4 + local.get $5 i32.const 2146435072 i32.eq select - local.get $4 + local.get $5 i32.const 2146435072 i32.gt_s select @@ -391,7 +390,7 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $5 + local.tee $2 select local.get $10 i32.sub @@ -399,9 +398,9 @@ i32.const 2 local.get $6 local.get $8 - local.get $5 + local.get $2 select - local.tee $5 + local.tee $2 local.get $9 i32.shr_u local.tee $10 @@ -409,7 +408,7 @@ i32.and i32.sub i32.const 0 - local.get $5 + local.get $2 local.get $10 local.get $9 i32.shl @@ -419,7 +418,7 @@ i32.const 0 end end - local.set $18 + local.set $2 end local.get $6 i32.eqz @@ -428,13 +427,13 @@ i32.const 2146435072 i32.eq if - local.get $20 - local.get $4 + local.get $19 + local.get $5 i32.const 1072693248 i32.sub i32.or if - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -505,58 +504,58 @@ end local.get $0 f64.abs - local.set $2 - local.get $20 + local.set $3 + local.get $19 i32.eqz if i32.const 1 - local.get $4 + local.get $5 i32.const 1072693248 i32.eq - local.get $4 + local.get $5 i32.const 2146435072 i32.eq i32.const 1 - local.get $4 + local.get $5 select select if f64.const 1 - local.get $2 + local.get $3 f64.div - local.get $2 + local.get $3 local.get $7 i32.const 0 i32.lt_s select - local.set $2 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $18 - local.get $4 + local.get $2 + local.get $5 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $2 + local.get $3 f64.neg + local.get $3 local.get $2 - local.get $18 i32.const 1 i32.eq select else - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $2 + local.get $3 end return end @@ -567,7 +566,7 @@ i32.const 0 i32.lt_s if - local.get $18 + local.get $2 i32.eqz if local.get $0 @@ -580,7 +579,7 @@ end f64.const -1 f64.const 1 - local.get $18 + local.get $2 i32.const 1 i32.eq select @@ -594,7 +593,7 @@ i32.const 1139802112 i32.gt_s if - local.get $4 + local.get $5 i32.const 1072693247 i32.le_s if @@ -606,7 +605,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.ge_s if @@ -619,7 +618,7 @@ return end end - local.get $4 + local.get $5 i32.const 1072693247 i32.lt_s if @@ -639,7 +638,7 @@ select return end - local.get $4 + local.get $5 i32.const 1072693248 i32.gt_s if @@ -660,12 +659,12 @@ return end f64.const 1.4426950216293335 - local.get $2 + local.get $3 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $2 + local.tee $3 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -694,50 +693,48 @@ local.set $12 local.get $0 local.get $12 - local.get $2 + local.get $3 f64.sub f64.sub else - i32.const 0 - local.set $6 - local.get $4 + local.get $5 i32.const 1048576 i32.lt_s if (result i32) - local.get $2 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $2 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 + local.set $5 i32.const -53 else i32.const 0 end - local.get $4 + local.get $5 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $4 + local.get $5 i32.const 1048575 i32.and - local.tee $5 + local.tee $2 i32.const 1072693248 i32.or - local.set $4 - local.get $5 + local.set $5 + local.get $2 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $5 + local.get $2 i32.const 767610 i32.lt_s if (result i32) @@ -747,19 +744,19 @@ i32.const 1 i32.add local.set $6 - local.get $4 + local.get $5 i32.const -1048576 i32.add - local.set $4 + local.set $5 i32.const 0 end end - local.set $5 - local.get $2 + local.set $2 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $4 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -768,19 +765,19 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $5 + local.get $2 select - local.tee $3 + local.tee $4 f64.sub - local.tee $2 + local.tee $3 f64.const 1 local.get $13 - local.get $3 + local.get $4 f64.add f64.div local.tee $0 f64.mul - local.tee $19 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and @@ -794,8 +791,8 @@ f64.const 3 local.get $12 f64.add - local.get $19 - local.get $19 + local.get $18 + local.get $18 f64.mul local.tee $14 local.get $14 @@ -823,16 +820,16 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 local.get $16 - local.get $4 + local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $5 + local.get $2 i32.const 18 i32.shl i32.add @@ -846,15 +843,15 @@ local.get $16 local.get $13 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $3 + local.tee $4 local.get $16 - local.get $19 + local.get $18 f64.add f64.mul f64.add @@ -866,8 +863,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $2 - local.get $3 + local.tee $3 + local.get $4 local.get $13 f64.mul local.get $0 @@ -877,7 +874,7 @@ local.get $12 f64.sub f64.sub - local.get $19 + local.get $18 f64.mul f64.add local.tee $0 @@ -886,15 +883,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $4 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $3 + local.get $4 f64.mul local.get $0 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -902,16 +899,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $2 select f64.add - local.tee $3 + local.tee $4 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $2 select - local.tee $2 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -922,17 +919,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $3 + local.get $4 local.get $12 local.get $0 f64.sub - local.get $2 + local.get $3 f64.sub local.get $13 f64.sub f64.sub end - local.set $2 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -944,20 +941,20 @@ local.get $12 f64.mul local.get $1 - local.get $2 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $3 + local.tee $4 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $5 + local.set $2 block $folding-inner1 block $folding-inner0 local.get $15 @@ -968,7 +965,7 @@ i32.const 1083179008 i32.ge_s if - local.get $5 + local.get $2 local.get $9 i32.const 1083179008 i32.sub @@ -977,7 +974,7 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $4 f64.sub f64.gt i32.or @@ -989,14 +986,14 @@ i32.const 1083231232 i32.ge_s i32.const 0 - local.get $5 + local.get $2 local.get $9 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.le i32.or @@ -1011,7 +1008,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $5 + local.set $2 i32.const 0 local.set $6 local.get $10 @@ -1021,7 +1018,7 @@ i32.const 1048575 local.get $9 i32.const 1048576 - local.get $5 + local.get $2 i32.const 1 i32.add i32.shr_s @@ -1033,7 +1030,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $5 + local.tee $2 i32.shr_s i32.const -1 i32.xor @@ -1051,7 +1048,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $5 + local.get $2 i32.sub i32.shr_s local.tee $6 @@ -1062,13 +1059,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $4 local.get $0 f64.sub - local.set $3 + local.set $4 end local.get $1 - local.get $3 + local.get $4 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -1077,10 +1074,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $2 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $4 f64.sub f64.sub f64.const 0.6931471805599453 @@ -1091,14 +1088,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul local.set $0 local.get $11 f64.const 1 - local.get $3 - local.get $3 + local.get $4 + local.get $4 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -1126,17 +1123,17 @@ f64.sub f64.div local.get $1 + local.get $4 local.get $3 - local.get $2 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $4 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $4 f64.sub f64.sub local.tee $0 @@ -1148,7 +1145,7 @@ i32.const 20 i32.shl i32.add - local.tee $5 + local.tee $2 i32.const 20 i32.shr_s i32.const 0 @@ -1162,7 +1159,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $2 i64.extend_i32_s i64.const 32 i64.shl diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 52a64011a1..18a6ce3b16 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -19575,14 +19575,12 @@ local.set $0 i32.const 1 global.set $~argumentsLength - i32.const -1 - local.set $2 i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $2 i32.gt_u if i32.const 368 @@ -19592,24 +19590,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.set $2 + local.get $2 + local.set $3 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.tee $3 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $3 local.get $2 - i32.store offset=8 local.get $3 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 loop $for-loop|1 local.get $4 local.get $5 @@ -19618,7 +19616,7 @@ local.get $1 local.get $4 call $~lib/typedarray/Int8Array#__get - local.get $2 + local.get $3 local.get $4 call $~lib/typedarray/Int8Array#__get i32.ne @@ -19641,7 +19639,7 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 284 ;) @@ -19775,14 +19773,12 @@ local.set $0 i32.const 1 global.set $~argumentsLength - i32.const -1 - local.set $2 i32.const 0 local.get $0 i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $2 i32.gt_u if i32.const 368 @@ -19792,24 +19788,24 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.set $2 + local.get $2 + local.set $3 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $3 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $3 local.get $2 - i32.store offset=8 local.get $3 + i32.store offset=8 + local.get $2 local.get $0 i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 loop $for-loop|1 local.get $4 local.get $5 @@ -19818,7 +19814,7 @@ local.get $1 local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $2 + local.get $3 local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne @@ -19841,7 +19837,7 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 286 ;) From a3a58fd7cf7220545f69b39c33a77754024baa8f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 18:48:50 +0200 Subject: [PATCH 23/51] reorder for better compile perf --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index 5030747f34..305ea37c51 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -791,8 +791,8 @@ exports.main = function main(argv, options, callback) { add("simplify-locals-nostructure"); add("vacuum"); - add("reorder-locals"); add("inlining-optimizing"); + add("reorder-locals"); } add("optimize-instructions"); add("simplify-globals-optimizing"); From b2409cdf3eab2c16850f4111dcf9e68ecb125f6f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 22:46:06 +0200 Subject: [PATCH 24/51] better --- cli/asc.js | 5 +- tests/compiler/std/array.optimized.wat | 364 +++++++++--------- .../std/string-casemapping.optimized.wat | 142 ++++--- 3 files changed, 254 insertions(+), 257 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 305ea37c51..a5ee23571b 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -713,6 +713,9 @@ exports.main = function main(argv, options, callback) { add("reorder-locals"); add("coalesce-locals"); add("reorder-locals"); + if (optimizeLevel >= 3 || shrinkLevel >= 1) { // differs + add("merge-locals"); + } add("vacuum"); if (optimizeLevel >= 3 || shrinkLevel >= 1) { add("code-folding"); @@ -783,7 +786,7 @@ exports.main = function main(argv, options, callback) { add("simplify-globals"); if (optimizeLevel >= 3) { add("directize"); - add("coalesce-locals-learning"); + add("coalesce-locals"); add("simplify-locals-nostructure"); add("vacuum"); diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 89c5512ce7..836a29a3b4 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -9778,7 +9778,7 @@ i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -9802,7 +9802,7 @@ i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 call $std/array/isArraysEqual i32.eqz if @@ -9865,10 +9865,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $4 @@ -9917,7 +9917,7 @@ i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9942,7 +9942,7 @@ i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10008,10 +10008,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $4 @@ -10275,51 +10275,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $0 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $1 + local.get $0 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $1 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 0 i32.gt_s if - local.get $0 + local.get $1 i32.load offset=4 - local.tee $1 - local.get $2 + local.tee $0 + local.get $3 i32.const 2 i32.shl i32.add - local.set $2 + local.set $3 loop $do-continue|0 - local.get $1 + local.get $0 i32.load call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $1 - local.get $2 + local.tee $0 + local.get $3 i32.lt_u br_if $do-continue|0 end else - local.get $0 + local.get $1 i32.const 0 call $~lib/array/ensureSize end - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.load offset=12 if i32.const 0 @@ -10329,7 +10329,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor @@ -10337,7 +10337,7 @@ global.get $std/array/arr local.get $1 call $~lib/array/Array#concat - local.set $2 + local.set $3 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10362,7 +10362,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -10374,7 +10374,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 0 i32.const 2 i32.const 3 @@ -10396,7 +10396,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10409,7 +10409,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10422,7 +10422,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10445,7 +10445,7 @@ local.get $1 call $~lib/array/Array#concat local.set $0 - local.get $2 + local.get $3 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10569,7 +10569,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.load offset=12 if i32.const 0 @@ -10579,13 +10579,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 global.get $std/array/arr call $~lib/array/Array#concat - local.set $3 + local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 i32.load offset=12 i32.const 3 i32.ne @@ -10597,7 +10597,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.load offset=12 if i32.const 0 @@ -10609,11 +10609,11 @@ end local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10626,14 +10626,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $3 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11002,10 +11002,10 @@ end local.get $1 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $4 @@ -11224,7 +11224,7 @@ global.get $std/array/arr local.tee $1 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.lt_s if @@ -11243,10 +11243,10 @@ local.get $0 i32.const 4 i32.add - local.get $2 + local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $3 i32.const 2 i32.shl local.tee $5 @@ -11257,7 +11257,7 @@ i32.const 0 i32.store local.get $1 - local.get $2 + local.get $3 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11425,14 +11425,14 @@ unreachable end global.get $std/array/arr - local.tee $2 + local.tee $3 i32.load offset=12 local.tee $0 if - local.get $2 + local.get $3 i32.load offset=4 local.set $1 - local.get $2 + local.get $3 i32.load offset=4 local.get $0 i32.const 1 @@ -11448,13 +11448,13 @@ if local.get $1 i32.load - local.set $3 + local.set $2 local.get $1 local.get $0 i32.load i32.store local.get $0 - local.get $3 + local.get $2 i32.store local.get $1 i32.const 4 @@ -11708,10 +11708,10 @@ block $__inlined_func$~lib/array/Array#indexOf local.get $1 i32.load offset=12 - local.tee $2 + local.tee $3 if (result i32) i32.const 0 - local.get $2 + local.get $3 i32.ge_s else i32.const 1 @@ -11723,13 +11723,13 @@ end local.get $5 i32.load offset=4 - local.set $3 + local.set $2 loop $while-continue|022 local.get $0 - local.get $2 + local.get $3 i32.lt_s if - local.get $3 + local.get $2 local.get $0 i32.const 2 i32.shl @@ -11765,17 +11765,17 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 local.set $4 i32.const 0 local.set $0 block $__inlined_func$~lib/array/Array#indexOf - local.get $2 + local.get $3 i32.load offset=12 - local.tee $3 + local.tee $2 if (result i32) i32.const 0 - local.get $3 + local.get $2 i32.ge_s else i32.const 1 @@ -11790,7 +11790,7 @@ local.set $5 loop $while-continue|023 local.get $0 - local.get $3 + local.get $2 i32.lt_s if local.get $5 @@ -11825,7 +11825,7 @@ end local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11973,24 +11973,24 @@ i32.const 2272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 local.tee $3 + i32.load offset=12 + local.tee $2 if (result i32) i32.const 0 - local.get $3 + local.get $2 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $3 i32.load offset=4 local.set $4 loop $while-continue|024 local.get $1 - local.get $3 + local.get $2 i32.lt_s if i32.const 1 @@ -12032,7 +12032,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $0 + local.set $1 i32.const 0 i32.const 1 i32.const 3 @@ -12040,7 +12040,7 @@ i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 local.tee $5 if (result i32) @@ -12052,17 +12052,17 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $2 i32.load offset=4 local.set $6 loop $while-continue|025 - local.get $0 + local.get $1 local.get $5 i32.lt_s if i32.const 1 local.get $6 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add @@ -12079,10 +12079,10 @@ end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|025 end end @@ -12152,10 +12152,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 3 @@ -12865,7 +12865,7 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 1 call $~lib/array/Array#splice local.tee $5 @@ -12878,7 +12878,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.load offset=12 if i32.const 0 @@ -12894,7 +12894,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.load offset=4 local.tee $0 i32.const 1 @@ -12916,9 +12916,9 @@ i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $3 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.get $3 i32.const 2 call $~lib/array/Array#splice local.set $23 @@ -12966,7 +12966,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 3 i32.ne @@ -12978,7 +12978,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get local.tee $54 @@ -12993,7 +12993,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get local.tee $55 @@ -13008,7 +13008,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get local.tee $56 @@ -13108,8 +13108,8 @@ local.get $5 i32.const 1 call $~lib/array/Array#__get - local.tee $3 - local.get $3 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -13230,7 +13230,7 @@ call $~lib/rt/pure/__release local.get $57 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -13733,9 +13733,9 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $0 + local.set $1 global.get $std/array/arr - local.tee $3 + local.tee $2 i32.load offset=12 local.tee $4 i32.const 2 @@ -13743,13 +13743,13 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 i32.load offset=4 local.set $6 loop $for-loop|043 - local.get $0 + local.get $1 local.get $4 - local.get $3 + local.get $2 i32.load offset=12 local.tee $7 local.get $4 @@ -13760,11 +13760,11 @@ if i32.const 3 global.set $~argumentsLength - local.get $0 + local.get $1 i32.const 2 i32.shl local.tee $7 - local.get $3 + local.get $2 i32.load offset=4 i32.add i32.load @@ -13775,14 +13775,14 @@ i32.add local.get $18 f32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|043 end end - local.get $2 + local.get $0 i32.load offset=12 i32.const 4 i32.ne @@ -13794,7 +13794,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13903,7 +13903,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $2 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 @@ -14370,10 +14370,10 @@ i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 0 global.set $~argumentsLength - local.get $2 + local.get $1 call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) @@ -14387,7 +14387,7 @@ i32.const 0 local.set $0 i32.const 0 - local.get $2 + local.get $1 i32.load offset=12 local.tee $6 local.get $4 @@ -14396,7 +14396,7 @@ br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $2 + local.get $1 local.get $4 i32.eq br_if $__inlined_func$std/array/isArraysEqual @@ -14406,7 +14406,7 @@ local.get $6 i32.lt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/array/Array#__get local.tee $18 @@ -14425,7 +14425,7 @@ i32.eqz if i32.const 0 - local.get $2 + local.get $1 local.get $0 call $~lib/array/Array#__get local.get $4 @@ -14459,10 +14459,10 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $2 i32.const 0 global.set $~argumentsLength - local.get $3 + local.get $2 call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) @@ -14476,7 +14476,7 @@ i32.const 0 local.set $0 i32.const 0 - local.get $3 + local.get $2 i32.load offset=12 local.tee $8 local.get $6 @@ -14485,7 +14485,7 @@ br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $3 + local.get $2 local.get $6 i32.eq br_if $__inlined_func$std/array/isArraysEqual @@ -14495,7 +14495,7 @@ local.get $8 i32.lt_s if - local.get $3 + local.get $2 local.get $0 call $~lib/array/Array#__get local.tee $24 @@ -14514,7 +14514,7 @@ i32.eqz if i32.const 0 - local.get $3 + local.get $2 local.get $0 call $~lib/array/Array#__get local.get $6 @@ -14786,11 +14786,11 @@ local.get $13 i32.const 48 call $std/array/assertSorted - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release @@ -14831,25 +14831,25 @@ local.set $0 i32.const 257 call $std/array/createRandomOrderedArray - local.set $2 + local.set $1 local.get $0 i32.const 49 call $std/array/assertSorted local.get $0 i32.const 50 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 51 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 52 call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release i32.const 0 - local.set $0 + local.set $1 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -14857,45 +14857,45 @@ i32.const 2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $0 i32.const 2 i32.store offset=12 loop $for-loop|02 - local.get $0 + local.get $1 i32.const 2 i32.lt_s if i32.const 1 call $~lib/array/Array#constructor - local.tee $3 + local.tee $2 i32.const 0 i32.const 1 - local.get $0 + local.get $1 i32.sub call $~lib/array/Array#__set - local.get $2 local.get $0 - local.get $3 + local.get $1 + local.get $2 call $~lib/array/Array<~lib/array/Array>#__set - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|02 end end - local.get $2 + local.get $0 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 0 - local.set $0 + local.set $1 i32.const 16 i32.const 14 call $~lib/rt/tlsf/__alloc @@ -14903,14 +14903,14 @@ i32.const 512 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $2 + local.get $0 i32.const 512 i32.store offset=12 loop $for-loop|03 - local.get $0 + local.get $1 i32.const 512 i32.lt_s if @@ -14918,28 +14918,28 @@ i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.const 511 - local.get $0 + local.get $1 i32.sub i32.store - local.get $2 local.get $0 - local.get $3 + local.get $1 + local.get $2 call $~lib/array/Array<~lib/array/Array>#__set - local.get $3 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|03 end end - local.get $2 + local.get $0 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14947,33 +14947,33 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $3 + local.set $2 i32.const 1 global.set $~argumentsLength - local.get $2 + local.get $1 call $std/array/assertSorted<~lib/string/String | null>|trampoline block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 local.set $0 i32.const 0 - local.get $2 + local.get $1 i32.load offset=12 local.tee $7 - local.get $3 + local.get $2 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 + local.get $1 local.get $2 - local.get $3 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop @@ -14982,11 +14982,11 @@ local.get $7 i32.lt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/array/Array#__get local.tee $4 - local.get $3 + local.get $2 local.get $0 call $~lib/array/Array#__get local.tee $6 @@ -15029,9 +15029,9 @@ local.get $0 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -15046,8 +15046,8 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -15128,14 +15128,14 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $3 + local.tee $2 local.set $14 - local.get $3 + local.get $2 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -15174,7 +15174,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=4 local.tee $4 i32.const 0 @@ -15187,7 +15187,7 @@ i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $3 + local.get $2 call $~lib/array/Array#join local.tee $17 i32.const 7152 @@ -15246,7 +15246,7 @@ call $~lib/rt/pure/__release local.get $12 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release @@ -15254,7 +15254,7 @@ call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release @@ -15511,7 +15511,7 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 2 i32.const 2 i32.const 3 @@ -15519,7 +15519,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 2 i32.const 2 i32.const 3 @@ -15532,9 +15532,9 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 + local.tee $1 local.set $31 - local.get $2 + local.get $1 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15552,9 +15552,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $1 i32.load offset=4 - local.tee $3 + local.tee $2 i32.const 2 i32.const 0 i32.const 6 @@ -15562,7 +15562,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $2 i32.const 2 i32.const 0 i32.const 6 @@ -15570,14 +15570,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $3 + local.tee $2 local.set $32 - local.get $3 + local.get $2 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15595,7 +15595,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=4 i32.const 1 i32.const 2 @@ -15614,9 +15614,9 @@ i32.store local.get $27 i32.store - local.get $3 + local.get $2 i32.load offset=4 - local.get $3 + local.get $2 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $26 @@ -15680,7 +15680,7 @@ call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release local.get $23 call $~lib/rt/pure/__release @@ -15690,9 +15690,9 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~start (; 164 ;) diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 6c6c0830d9..16c9c5158c 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2328,8 +2328,6 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 call $~lib/string/String#get:length local.tee $7 @@ -2343,7 +2341,7 @@ i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $6 loop $for-loop|0 local.get $5 local.get $7 @@ -2379,7 +2377,7 @@ i32.shl i32.add i32.load16_u offset=2 - local.tee $3 + local.tee $2 i32.const 56319 i32.sub i32.const 1025 @@ -2389,11 +2387,11 @@ i32.const 1 i32.add local.set $5 - local.get $3 + local.get $2 i32.const 1023 i32.and local.get $1 - local.tee $8 + local.tee $4 i32.const 1023 i32.and i32.const 10 @@ -2405,21 +2403,21 @@ i32.const 131072 i32.ge_u if - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add - local.get $8 - local.get $3 + local.get $4 + local.get $2 i32.const 16 i32.shl i32.or i32.store - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-continue|0 end end @@ -2428,24 +2426,24 @@ i32.const 304 i32.eq if - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add i32.const 50790505 i32.store - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 else local.get $1 i32.const 931 i32.eq if - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add @@ -2454,30 +2452,27 @@ i32.gt_u if (result i32) block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - local.get $0 - local.set $8 i32.const 0 - local.set $9 + local.set $8 i32.const 0 local.get $5 - local.tee $3 local.tee $1 i32.const 30 i32.sub - local.tee $6 + local.tee $4 i32.const 0 - local.get $6 + local.get $4 i32.gt_s select - local.set $11 + local.set $9 loop $while-continue|1 local.get $1 - local.get $11 + local.get $9 i32.gt_s if block $~lib/util/string/codePointBefore|inlined.0 local.get $1 - local.tee $6 + local.tee $4 i32.const 0 i32.le_s if @@ -2485,8 +2480,8 @@ local.set $1 br $~lib/util/string/codePointBefore|inlined.0 end - local.get $8 - local.get $6 + local.get $0 + local.get $4 i32.const 1 i32.sub i32.const 1 @@ -2498,22 +2493,22 @@ i32.and i32.const 56320 i32.eq - local.get $6 + local.get $4 i32.const 2 i32.sub i32.const 0 i32.ge_s i32.and if - local.get $8 - local.get $6 + local.get $0 + local.get $4 i32.const 2 i32.sub i32.const 1 i32.shl i32.add i32.load16_u - local.tee $10 + local.tee $2 i32.const 64512 i32.and i32.const 55296 @@ -2522,7 +2517,7 @@ local.get $1 i32.const 1023 i32.and - local.get $10 + local.get $2 i32.const 1023 i32.and i32.const 10 @@ -2545,25 +2540,24 @@ end end local.get $1 - local.set $10 - local.get $1 + local.tee $2 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $10 + local.get $2 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if - local.get $1 + local.get $2 i32.const 127370 i32.lt_u if (result i32) i32.const 8752 - local.get $1 + local.get $2 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2574,10 +2568,10 @@ i32.const 0 br $~lib/util/string/isFinalSigma|inlined.0 end - local.set $9 + local.set $8 end - local.get $6 - local.get $1 + local.get $4 + local.get $2 i32.const 65536 i32.ge_s i32.const 1 @@ -2588,35 +2582,35 @@ end end i32.const 0 - local.get $9 + local.get $8 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop - local.get $3 + local.get $5 i32.const 1 i32.add local.tee $1 i32.const 30 i32.add - local.tee $3 + local.tee $2 local.get $7 - local.get $3 + local.get $2 local.get $7 i32.lt_s select - local.set $9 + local.set $8 loop $while-continue|2 local.get $1 - local.get $9 + local.get $8 i32.lt_s if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u - local.tee $3 + local.tee $2 i32.const 64512 i32.and i32.const 55296 @@ -2628,46 +2622,46 @@ i32.ne i32.and if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $6 + local.tee $4 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $3 + local.get $2 i32.const 10 i32.shl - local.get $6 + local.get $4 i32.add i32.const -56613888 i32.add - local.set $3 + local.set $2 end end - local.get $3 + local.get $2 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $3 + local.get $2 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if - local.get $3 + local.get $2 i32.const 127370 i32.lt_u if (result i32) i32.const 8752 - local.get $3 + local.get $2 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2676,7 +2670,7 @@ br $~lib/util/string/isFinalSigma|inlined.0 end local.get $1 - local.get $3 + local.get $2 i32.const 65536 i32.ge_u i32.const 1 @@ -2704,8 +2698,8 @@ i32.const 25 i32.le_u if - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add @@ -2723,16 +2717,16 @@ i32.const 65536 i32.lt_s if - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add local.get $1 i32.store16 else - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add @@ -2753,18 +2747,18 @@ i32.shl i32.or i32.store - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 end end end end end else - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl i32.add @@ -2785,15 +2779,15 @@ i32.const 1 i32.add local.set $5 - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $4 - local.get $2 + local.get $6 + local.get $3 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc From 0712e7603fdfc742da98eb8ee4720cc9fe586cbb Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Sun, 1 Mar 2020 22:53:18 +0200 Subject: [PATCH 25/51] perfect! --- cli/asc.js | 6 +- tests/compiler/for.optimized.wat | 22 +- .../implicit-getter-setter.optimized.wat | 7 +- tests/compiler/number.optimized.wat | 59 +- tests/compiler/resolve-binary.optimized.wat | 59 +- .../resolve-elementaccess.optimized.wat | 108 +- tests/compiler/resolve-ternary.optimized.wat | 59 +- .../retain-release-sanity.optimized.wat | 244 +- tests/compiler/std/array.optimized.wat | 458 ++-- tests/compiler/std/arraybuffer.optimized.wat | 63 +- tests/compiler/std/libm.optimized.wat | 640 ++--- tests/compiler/std/map.optimized.wat | 2144 +++++++++-------- tests/compiler/std/math.optimized.wat | 912 +++---- tests/compiler/std/set.optimized.wat | 678 +++--- .../std/string-casemapping.optimized.wat | 135 +- tests/compiler/std/string.optimized.wat | 171 +- tests/compiler/std/symbol.optimized.wat | 38 +- tests/compiler/std/typedarray.optimized.wat | 1458 +++++------ tests/compiler/while.optimized.wat | 18 +- 19 files changed, 3667 insertions(+), 3612 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index a5ee23571b..bfe703688b 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -704,9 +704,9 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("reorder-locals"); add("remove-unused-brs"); - if (optimizeLevel >= 3 || shrinkLevel >= 2) { - add("merge-locals"); - } + // if (optimizeLevel >= 3 || shrinkLevel >= 2) { // do it later + // add("merge-locals"); + // } add("coalesce-locals"); add("simplify-locals"); add("vacuum"); diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 445bdb3810..2c710903da 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1264,9 +1264,9 @@ i32.const 0 global.set $for/ran call $for/Ref#constructor - local.set $1 + local.set $0 loop $for-loop|06 - local.get $1 + local.get $0 if local.get $2 i32.const 1 @@ -1276,20 +1276,20 @@ i32.eq if i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end else call $for/Ref#constructor - local.set $0 - local.get $1 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end - local.get $0 - local.set $1 + local.get $1 + local.set $0 br $for-loop|06 end end @@ -1304,7 +1304,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 32 @@ -1315,7 +1315,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 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 85835f0af9..a16177b968 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -1167,17 +1167,18 @@ (local $2 i32) local.get $1 local.get $0 - i32.load local.tee $2 + i32.load + local.tee $0 i32.ne if local.get $1 call $~lib/rt/pure/__retain drop - local.get $2 + local.get $0 call $~lib/rt/pure/__release end - local.get $0 + local.get $2 local.get $1 i32.store ) diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 4978c26729..348d497e90 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -363,9 +363,6 @@ (local $10 i32) (local $11 i64) (local $12 i64) - (local $13 i32) - i32.const 0 - local.set $2 local.get $3 local.get $1 i64.sub @@ -420,7 +417,7 @@ local.get $6 i32.const 1000000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000000 i32.rem_u @@ -430,7 +427,7 @@ local.get $6 i32.const 100000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000000 i32.rem_u @@ -440,7 +437,7 @@ local.get $6 i32.const 10000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000000 i32.rem_u @@ -450,7 +447,7 @@ local.get $6 i32.const 1000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000 i32.rem_u @@ -460,7 +457,7 @@ local.get $6 i32.const 100000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000 i32.rem_u @@ -470,7 +467,7 @@ local.get $6 i32.const 10000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000 i32.rem_u @@ -480,7 +477,7 @@ local.get $6 i32.const 1000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000 i32.rem_u @@ -490,7 +487,7 @@ local.get $6 i32.const 100 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100 i32.rem_u @@ -500,7 +497,7 @@ local.get $6 i32.const 10 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10 i32.rem_u @@ -508,34 +505,33 @@ br $break|1 end local.get $6 - local.set $7 + local.set $2 i32.const 0 local.set $6 br $break|1 end i32.const 0 - local.set $7 + local.set $2 end local.get $2 local.get $7 i32.or if - local.get $2 - local.tee $13 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $13 + local.get $7 i32.const 1 i32.shl i32.add - local.get $7 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -567,7 +563,7 @@ i64.shl local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -619,7 +615,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 return end br $while-continue|0 @@ -640,19 +636,14 @@ local.get $1 i64.shr_u local.tee $8 - local.get $2 + local.get $7 i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $2 - local.tee $6 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -663,6 +654,10 @@ i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -694,7 +689,7 @@ i64.mul local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -746,7 +741,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 ) (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 1bc2006553..a52880c01a 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -379,9 +379,6 @@ (local $10 i32) (local $11 i64) (local $12 i64) - (local $13 i32) - i32.const 0 - local.set $2 local.get $3 local.get $1 i64.sub @@ -436,7 +433,7 @@ local.get $6 i32.const 1000000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000000 i32.rem_u @@ -446,7 +443,7 @@ local.get $6 i32.const 100000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000000 i32.rem_u @@ -456,7 +453,7 @@ local.get $6 i32.const 10000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000000 i32.rem_u @@ -466,7 +463,7 @@ local.get $6 i32.const 1000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000 i32.rem_u @@ -476,7 +473,7 @@ local.get $6 i32.const 100000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000 i32.rem_u @@ -486,7 +483,7 @@ local.get $6 i32.const 10000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000 i32.rem_u @@ -496,7 +493,7 @@ local.get $6 i32.const 1000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000 i32.rem_u @@ -506,7 +503,7 @@ local.get $6 i32.const 100 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100 i32.rem_u @@ -516,7 +513,7 @@ local.get $6 i32.const 10 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10 i32.rem_u @@ -524,34 +521,33 @@ br $break|1 end local.get $6 - local.set $7 + local.set $2 i32.const 0 local.set $6 br $break|1 end i32.const 0 - local.set $7 + local.set $2 end local.get $2 local.get $7 i32.or if - local.get $2 - local.tee $13 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $13 + local.get $7 i32.const 1 i32.shl i32.add - local.get $7 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -583,7 +579,7 @@ i64.shl local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -635,7 +631,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 return end br $while-continue|0 @@ -656,19 +652,14 @@ local.get $1 i64.shr_u local.tee $8 - local.get $2 + local.get $7 i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $2 - local.tee $6 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -679,6 +670,10 @@ i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -710,7 +705,7 @@ i64.mul local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -762,7 +757,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 ) (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index b12a054b7a..e16222a40d 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -299,33 +299,32 @@ ) (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) - (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $9 + local.set $8 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $13 + local.tee $12 i64.and - local.set $12 + local.set $11 local.get $3 - local.get $10 + local.get $9 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -349,10 +348,11 @@ block $case2|1 block $case1|1 local.get $4 + local.tee $2 i32.const 10 i32.ne if - local.get $4 + local.get $2 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -360,7 +360,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -370,7 +370,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -380,7 +380,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -390,7 +390,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -400,7 +400,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -410,7 +410,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -420,7 +420,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -430,7 +430,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -440,7 +440,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -448,43 +448,42 @@ br $break|1 end local.get $7 - local.set $8 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $8 + local.set $2 end + local.get $2 local.get $6 - local.get $8 i32.or if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add - local.get $8 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $12 + local.get $11 local.get $7 i64.extend_i32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl i64.add @@ -502,7 +501,7 @@ i32.const 1328 i32.add i64.load32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl local.set $3 @@ -518,19 +517,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $9 + local.get $8 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.lt_u select i32.const 0 @@ -541,7 +540,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $9 + local.get $8 i64.lt_u select select @@ -566,19 +565,19 @@ br $while-continue|0 end end - local.get $10 + local.get $9 i64.extend_i32_s - local.set $14 + local.set $13 loop $while-continue|4 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $12 + local.get $11 i64.const 10 i64.mul local.tee $3 - local.get $14 + local.get $13 i64.shr_u local.tee $1 local.get $6 @@ -587,13 +586,8 @@ i64.const 0 i64.ne if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add @@ -604,15 +598,19 @@ i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 local.get $3 - local.get $13 + local.get $12 i64.and - local.tee $12 + local.tee $11 local.get $5 i64.ge_u br_if $while-continue|4 @@ -620,9 +618,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $12 + local.get $11 local.set $1 - local.get $9 + local.get $8 i32.const 0 local.get $4 i32.sub @@ -649,13 +647,13 @@ local.get $1 i64.sub local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.lt_u @@ -664,7 +662,7 @@ local.get $5 local.get $1 i64.sub - local.get $11 + local.get $10 i64.ge_u i32.const 0 local.get $1 @@ -678,7 +676,7 @@ i32.sub local.set $4 local.get $1 - local.get $11 + local.get $10 i64.add local.set $1 br $while-continue|6 diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 62b845f426..874955982b 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1323,9 +1323,6 @@ (local $10 i32) (local $11 i64) (local $12 i64) - (local $13 i32) - i32.const 0 - local.set $2 local.get $3 local.get $1 i64.sub @@ -1380,7 +1377,7 @@ local.get $6 i32.const 1000000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000000 i32.rem_u @@ -1390,7 +1387,7 @@ local.get $6 i32.const 100000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000000 i32.rem_u @@ -1400,7 +1397,7 @@ local.get $6 i32.const 10000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000000 i32.rem_u @@ -1410,7 +1407,7 @@ local.get $6 i32.const 1000000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000000 i32.rem_u @@ -1420,7 +1417,7 @@ local.get $6 i32.const 100000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100000 i32.rem_u @@ -1430,7 +1427,7 @@ local.get $6 i32.const 10000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10000 i32.rem_u @@ -1440,7 +1437,7 @@ local.get $6 i32.const 1000 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 1000 i32.rem_u @@ -1450,7 +1447,7 @@ local.get $6 i32.const 100 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 100 i32.rem_u @@ -1460,7 +1457,7 @@ local.get $6 i32.const 10 i32.div_u - local.set $7 + local.set $2 local.get $6 i32.const 10 i32.rem_u @@ -1468,34 +1465,33 @@ br $break|1 end local.get $6 - local.set $7 + local.set $2 i32.const 0 local.set $6 br $break|1 end i32.const 0 - local.set $7 + local.set $2 end local.get $2 local.get $7 i32.or if - local.get $2 - local.tee $13 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $13 + local.get $7 i32.const 1 i32.shl i32.add - local.get $7 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -1527,7 +1523,7 @@ i64.shl local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -1579,7 +1575,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 return end br $while-continue|0 @@ -1600,19 +1596,14 @@ local.get $1 i64.shr_u local.tee $8 - local.get $2 + local.get $7 i64.extend_i32_s i64.or i64.const 0 i64.ne if - local.get $2 - local.tee $6 - i32.const 1 - i32.add - local.set $2 local.get $0 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.add @@ -1623,6 +1614,10 @@ i32.const 48 i32.add i32.store16 + local.get $7 + i32.const 1 + i32.add + local.set $7 end local.get $4 i32.const 1 @@ -1654,7 +1649,7 @@ i64.mul local.set $3 local.get $0 - local.get $2 + local.get $7 i32.const 1 i32.sub i32.const 1 @@ -1706,7 +1701,7 @@ local.get $0 local.get $4 i32.store16 - local.get $2 + local.get $7 ) (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index ef7f97654d..5bc45ec7ee 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1350,11 +1350,11 @@ local.get $1 i32.const 2 i32.shl - local.tee $3 + local.tee $2 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $3 + local.tee $3 + local.get $2 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -1374,28 +1374,27 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 + local.get $3 + local.tee $1 local.get $0 i32.load local.tee $4 - local.get $1 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $3 i32.store offset=4 local.get $0 - local.get $3 + local.get $2 i32.store offset=8 local.get $0 ) @@ -1824,67 +1823,67 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 480 - local.get $0 - select - local.set $2 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $1 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat (result i32) + local.get $0 i32.const 480 - local.set $0 + local.get $0 + select + local.set $2 local.get $1 - i32.const 480 - i32.ne + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz if - local.get $1 - call $~lib/rt/pure/__release + i32.const 480 + local.set $1 + local.get $0 + i32.const 480 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 480 + local.set $0 end - i32.const 480 - local.set $1 - end - block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $1 + local.get $0 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $0 + local.tee $1 i32.eqz if - i32.const 400 - local.set $0 - local.get $1 + local.get $0 call $~lib/rt/pure/__release + i32.const 400 + local.tee $1 br $__inlined_func$~lib/string/String#concat end - local.get $0 + local.get $1 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 local.get $2 local.get $3 call $~lib/memory/memory.copy - local.get $0 + local.get $1 local.get $3 i32.add - local.get $1 + local.get $0 local.get $4 call $~lib/memory/memory.copy - local.get $1 + local.get $0 call $~lib/rt/pure/__release + local.get $1 end - local.get $0 ) (func $start:retain-release-sanity (; 27 ;) (local $0 i32) @@ -1899,20 +1898,20 @@ call $~lib/rt/pure/__retain i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 3 i32.store offset=12 - local.get $0 + local.get $1 call $~lib/array/Array#push - local.get $0 + local.get $1 call $~lib/array/Array#push - local.get $0 - local.tee $4 + local.get $1 + local.tee $3 i32.load offset=12 - local.tee $1 + local.tee $0 i32.const 1 i32.lt_s if @@ -1923,21 +1922,21 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=4 - local.get $1 + local.get $0 i32.const 1 i32.sub - local.tee $1 + local.tee $0 i32.const 2 i32.shl i32.add i32.load drop - local.get $4 - local.get $1 - i32.store offset=12 + local.get $3 local.get $0 + i32.store offset=12 + local.get $1 call $~lib/rt/pure/__release i32.const 16 i32.const 5 @@ -1945,10 +1944,10 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $4 + local.get $3 i32.const 0 i32.store offset=12 loop $for-loop|0 @@ -1962,46 +1961,46 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 i32.const 0 - local.set $3 + local.set $0 loop $for-loop|1 - local.get $3 + local.get $0 i32.const 10 i32.lt_s if - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=12 - local.tee $1 + local.tee $4 i32.const 1 i32.add local.tee $5 call $~lib/array/ensureSize - local.get $0 - i32.load offset=4 local.get $1 + i32.load offset=4 + local.get $4 i32.const 2 i32.shl i32.add i32.const 400 i32.store - local.get $0 + local.get $1 local.get $5 i32.store offset=12 - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|1 end end - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $2 i32.const 1 @@ -2010,138 +2009,131 @@ br $for-loop|0 end end - local.get $4 + local.get $3 call $~lib/rt/pure/__release i32.const 416 i32.const 448 call $~lib/string/String.__concat - local.tee $4 + local.tee $3 i32.const 512 call $~lib/string/String.__concat - local.get $4 + local.get $3 call $~lib/rt/pure/__release call $~lib/rt/pure/__release i32.const 4 i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 i32.store - local.get $0 + local.get $3 i32.const 4 i32.const 7 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $4 + local.tee $1 i32.const 0 i32.store - local.get $4 - local.tee $3 - local.get $0 + local.get $1 + local.tee $0 + local.get $3 i32.load - local.tee $1 + local.tee $2 i32.ne if - local.get $3 + local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $1 + local.set $0 + local.get $2 call $~lib/rt/pure/__release end - local.get $3 - i32.store - local.get $4 - local.set $2 - local.get $0 - local.set $1 - local.get $4 local.get $0 + i32.store + local.get $1 + local.tee $2 + local.get $3 + local.tee $0 i32.load - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end - local.get $1 + local.get $0 local.get $2 i32.store - local.get $4 - local.set $2 local.get $0 - local.get $4 + local.tee $2 + local.get $1 + local.tee $0 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $4 call $~lib/rt/pure/__release end + local.get $0 local.get $2 - local.get $1 i32.store + local.get $3 + local.tee $2 local.get $0 - local.set $1 - local.get $0 - local.get $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $2 - local.get $1 - i32.store local.get $0 - local.set $1 local.get $2 - local.tee $3 + i32.store local.get $0 - i32.load + local.get $3 local.tee $2 + i32.load + local.tee $4 i32.ne if - local.get $3 + local.get $0 call $~lib/rt/pure/__retain - local.set $3 - local.get $2 + local.set $0 + local.get $4 call $~lib/rt/pure/__release end - local.get $1 - local.get $3 + local.get $2 + local.get $0 i32.store + local.get $3 local.get $1 - local.set $2 - local.get $0 - local.get $4 i32.load - local.tee $1 + local.tee $0 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $1 + local.get $0 call $~lib/rt/pure/__release end - local.get $4 + local.get $1 local.get $2 i32.store - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 836a29a3b4..7b519e378d 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1566,7 +1566,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1588,24 +1588,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -2667,6 +2667,7 @@ (local $5 i32) (local $6 i32) local.get $2 + local.tee $4 local.get $0 i32.load offset=12 local.tee $3 @@ -2693,9 +2694,9 @@ end local.tee $1 i32.sub - local.tee $4 - local.get $2 + local.tee $2 local.get $4 + local.get $2 i32.lt_s select local.tee $2 @@ -5040,7 +5041,7 @@ (local $4 i32) local.get $0 i32.load offset=12 - local.tee $2 + local.tee $3 i32.const 1 i32.le_s if @@ -5050,48 +5051,49 @@ end local.get $0 i32.load offset=4 - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 2 i32.eq if - local.get $3 + local.get $2 i32.load offset=4 - local.set $2 - local.get $3 + local.set $3 + local.get $2 i32.load local.set $4 i32.const 2 global.set $~argumentsLength - local.get $2 + local.get $3 local.get $4 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $3 + local.get $2 local.get $4 i32.store offset=4 - local.get $3 local.get $2 + local.get $3 i32.store end local.get $0 call $~lib/rt/pure/__retain return end - local.get $2 + local.get $3 + local.tee $4 i32.const 256 i32.lt_s if - local.get $3 local.get $2 + local.get $4 local.get $1 call $~lib/util/sort/insertionSort else - local.get $3 local.get $2 + local.get $4 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -5722,67 +5724,67 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 5232 - local.get $0 - select - local.set $2 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $1 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat (result i32) + local.get $0 i32.const 5232 - local.set $0 + local.get $0 + select + local.set $2 local.get $1 - i32.const 5232 - i32.ne + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz if - local.get $1 - call $~lib/rt/pure/__release + i32.const 5232 + local.set $1 + local.get $0 + i32.const 5232 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 5232 + local.set $0 end - i32.const 5232 - local.set $1 - end - block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $1 + local.get $0 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $0 + local.tee $1 i32.eqz if - i32.const 5120 - local.set $0 - local.get $1 + local.get $0 call $~lib/rt/pure/__release + i32.const 5120 + local.tee $1 br $__inlined_func$~lib/string/String#concat end - local.get $0 + local.get $1 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 local.get $2 local.get $3 call $~lib/memory/memory.copy - local.get $0 + local.get $1 local.get $3 i32.add - local.get $1 + local.get $0 local.get $4 call $~lib/memory/memory.copy - local.get $1 + local.get $0 call $~lib/rt/pure/__release + local.get $1 end - local.get $0 ) (func $std/array/createRandomStringArray (; 123 ;) (result i32) (local $0 i32) @@ -5793,7 +5795,6 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) i32.const 16 i32.const 16 call $~lib/rt/tlsf/__alloc @@ -5830,7 +5831,6 @@ if local.get $0 local.tee $1 - local.tee $7 block $__inlined_func$~lib/string/String#charAt (result i32) i32.const 5120 call $~lib/math/NativeMath.random @@ -5860,11 +5860,11 @@ local.get $4 call $~lib/rt/pure/__retain end - local.tee $8 + local.tee $7 call $~lib/string/String.__concat local.tee $4 local.tee $0 - local.get $7 + local.get $1 i32.ne if local.get $0 @@ -5873,7 +5873,7 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $8 + local.get $7 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release @@ -6551,33 +6551,32 @@ ) (func $~lib/util/number/genDigits (; 136 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) - (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $9 + local.set $8 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $13 + local.tee $12 i64.and - local.set $12 + local.set $11 local.get $3 - local.get $10 + local.get $9 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -6601,10 +6600,11 @@ block $case2|1 block $case1|1 local.get $4 + local.tee $2 i32.const 10 i32.ne if - local.get $4 + local.get $2 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -6612,7 +6612,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -6622,7 +6622,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -6632,7 +6632,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -6642,7 +6642,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -6652,7 +6652,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -6662,7 +6662,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -6672,7 +6672,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -6682,7 +6682,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -6692,7 +6692,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -6700,43 +6700,42 @@ br $break|1 end local.get $7 - local.set $8 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $8 + local.set $2 end + local.get $2 local.get $6 - local.get $8 i32.or if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add - local.get $8 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $12 + local.get $11 local.get $7 i64.extend_i32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl i64.add @@ -6754,7 +6753,7 @@ i32.const 6880 i32.add i64.load32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl local.set $3 @@ -6770,19 +6769,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $9 + local.get $8 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.lt_u select i32.const 0 @@ -6793,7 +6792,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $9 + local.get $8 i64.lt_u select select @@ -6818,19 +6817,19 @@ br $while-continue|0 end end - local.get $10 + local.get $9 i64.extend_i32_s - local.set $14 + local.set $13 loop $while-continue|4 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $12 + local.get $11 i64.const 10 i64.mul local.tee $3 - local.get $14 + local.get $13 i64.shr_u local.tee $1 local.get $6 @@ -6839,13 +6838,8 @@ i64.const 0 i64.ne if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add @@ -6856,15 +6850,19 @@ i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 local.get $3 - local.get $13 + local.get $12 i64.and - local.tee $12 + local.tee $11 local.get $5 i64.ge_u br_if $while-continue|4 @@ -6872,9 +6870,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $12 + local.get $11 local.set $1 - local.get $9 + local.get $8 i32.const 0 local.get $4 i32.sub @@ -6901,13 +6899,13 @@ local.get $1 i64.sub local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.lt_u @@ -6916,7 +6914,7 @@ local.get $5 local.get $1 i64.sub - local.get $11 + local.get $10 i64.ge_u i32.const 0 local.get $1 @@ -6930,7 +6928,7 @@ i32.sub local.set $4 local.get $1 - local.get $11 + local.get $10 i64.add local.set $1 br $while-continue|6 @@ -7724,21 +7722,21 @@ (local $7 i32) (local $8 i32) (local $9 i32) - local.get $2 - local.set $5 local.get $1 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 0 i32.lt_s if i32.const 5120 return end + local.get $2 + local.set $7 i32.const 0 local.set $2 - local.get $6 + local.get $5 i32.eqz if local.get $0 @@ -7762,42 +7760,42 @@ end i32.const 5120 local.set $1 - local.get $5 + local.get $7 call $~lib/string/String#get:length local.set $8 loop $for-loop|0 local.get $4 - local.get $6 + local.get $5 i32.lt_s if local.get $2 - local.tee $3 local.get $0 local.get $4 i32.const 2 i32.shl i32.add i32.load - local.tee $2 + local.tee $3 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $2 call $~lib/rt/pure/__release end - local.get $2 + local.get $3 + local.tee $2 if local.get $2 call $~lib/rt/pure/__retain local.tee $3 local.get $1 - local.get $1 local.get $3 call $~lib/string/String.__concat local.tee $9 local.tee $3 + local.get $1 i32.ne if local.get $3 @@ -7816,9 +7814,9 @@ if local.get $1 local.tee $3 - local.get $5 + local.get $7 call $~lib/string/String.__concat - local.tee $7 + local.tee $6 local.tee $1 local.get $3 i32.ne @@ -7829,7 +7827,7 @@ local.get $3 call $~lib/rt/pure/__release end - local.get $7 + local.get $6 call $~lib/rt/pure/__release end local.get $4 @@ -7841,7 +7839,7 @@ end local.get $2 local.get $0 - local.get $6 + local.get $5 i32.const 2 i32.shl i32.add @@ -7856,31 +7854,32 @@ call $~lib/rt/pure/__release end local.get $3 + local.tee $0 if - local.get $3 + local.get $0 call $~lib/rt/pure/__retain - local.tee $0 - local.get $1 + local.tee $2 local.get $1 - local.get $0 + local.get $2 call $~lib/string/String.__concat - local.tee $0 local.tee $2 + local.tee $3 + local.get $1 i32.ne if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 local.get $1 call $~lib/rt/pure/__release end 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.set $1 end - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) @@ -7914,17 +7913,17 @@ if local.get $0 i32.load - local.tee $4 + local.tee $3 if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 + local.set $3 end - local.get $4 + local.get $3 call $~lib/rt/pure/__release i32.const 7104 i32.const 5120 - local.get $4 + local.get $3 select return end @@ -7934,28 +7933,28 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $4 + local.get $3 local.get $5 i32.lt_s if - local.get $3 - local.tee $2 local.get $0 - local.get $4 + local.get $3 i32.const 2 i32.shl i32.add i32.load - local.tee $3 + local.tee $2 + local.get $4 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $3 + local.get $2 + local.tee $4 if local.get $1 local.get $1 @@ -7996,10 +7995,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -8010,37 +8009,38 @@ i32.add i32.load local.tee $2 - local.get $3 + local.get $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $2 + local.tee $0 if local.get $1 local.get $1 i32.const 7104 call $~lib/string/String.__concat - local.tee $0 - local.tee $3 + local.tee $4 + local.tee $2 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $1 call $~lib/rt/pure/__release end - local.get $0 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $2 local.set $1 end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) @@ -8891,24 +8891,24 @@ local.get $5 i32.lt_s if - local.get $4 - local.tee $2 local.get $0 local.get $3 i32.const 2 i32.shl i32.add i32.load - local.tee $4 + local.tee $2 + local.get $4 i32.ne if - local.get $4 - call $~lib/rt/pure/__retain - local.set $4 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $2 + local.tee $4 if local.get $4 i32.const 5360 @@ -8978,32 +8978,33 @@ call $~lib/rt/pure/__release end local.get $2 + local.tee $0 if - local.get $2 + local.get $0 i32.const 5360 call $~lib/array/Array#join - local.tee $0 + local.tee $2 local.get $1 local.get $1 - local.get $0 + local.get $2 call $~lib/string/String.__concat - local.tee $0 - local.tee $4 + local.tee $3 + local.tee $2 i32.ne if - local.get $4 + local.get $2 call $~lib/rt/pure/__retain - local.set $4 + local.set $2 local.get $1 call $~lib/rt/pure/__release end call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 local.set $1 end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) @@ -9197,24 +9198,24 @@ local.get $5 i32.lt_s if - local.get $4 - local.tee $2 local.get $0 local.get $3 i32.const 2 i32.shl i32.add i32.load - local.tee $4 + local.tee $2 + local.get $4 i32.ne if - local.get $4 - call $~lib/rt/pure/__retain - local.set $4 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $2 + local.tee $4 if local.get $1 local.get $1 @@ -9283,31 +9284,32 @@ call $~lib/rt/pure/__release end local.get $2 + local.tee $0 if local.get $1 local.get $1 - local.get $2 + local.get $0 call $~lib/array/Array#toString - local.tee $0 + local.tee $4 call $~lib/string/String.__concat local.tee $3 - local.tee $4 + local.tee $2 i32.ne if - local.get $4 + local.get $2 call $~lib/rt/pure/__retain - local.set $4 + local.set $2 local.get $1 call $~lib/rt/pure/__release end - local.get $0 + local.get $4 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 local.set $1 end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) @@ -9362,24 +9364,24 @@ local.get $5 i32.lt_s if - local.get $4 - local.tee $2 local.get $0 local.get $3 i32.const 2 i32.shl i32.add i32.load - local.tee $4 + local.tee $2 + local.get $4 i32.ne if - local.get $4 - call $~lib/rt/pure/__retain - local.set $4 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $2 + local.tee $4 if local.get $4 i32.const 5360 @@ -9449,32 +9451,33 @@ call $~lib/rt/pure/__release end local.get $2 + local.tee $0 if - local.get $2 + local.get $0 i32.const 5360 call $~lib/array/Array#join - local.tee $0 + local.tee $2 local.get $1 local.get $1 - local.get $0 + local.get $2 call $~lib/string/String.__concat - local.tee $0 - local.tee $4 + local.tee $3 + local.tee $2 i32.ne if - local.get $4 + local.get $2 call $~lib/rt/pure/__retain - local.set $4 + local.set $2 local.get $1 call $~lib/rt/pure/__release end call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 local.set $1 end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) @@ -9535,24 +9538,24 @@ local.get $5 i32.lt_s if - local.get $4 - local.tee $2 local.get $0 local.get $3 i32.const 2 i32.shl i32.add i32.load - local.tee $4 + local.tee $2 + local.get $4 i32.ne if - local.get $4 - call $~lib/rt/pure/__retain - local.set $4 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $2 + local.tee $4 if local.get $1 local.get $1 @@ -9621,31 +9624,32 @@ call $~lib/rt/pure/__release end local.get $2 + local.tee $0 if local.get $1 local.get $1 - local.get $2 + local.get $0 call $~lib/array/Array<~lib/array/Array>#toString - local.tee $0 + local.tee $4 call $~lib/string/String.__concat local.tee $3 - local.tee $4 + local.tee $2 i32.ne if - local.get $4 + local.get $2 call $~lib/rt/pure/__retain - local.set $4 + local.set $2 local.get $1 call $~lib/rt/pure/__release end - local.get $0 + local.get $4 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $2 local.set $1 end - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 ) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 889bbf7ae0..d7c8e4d254 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1581,11 +1581,11 @@ i32.const 1 local.get $1 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + local.tee $1 + local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -1605,27 +1605,28 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $3 - local.tee $1 + local.get $1 + local.set $2 local.get $0 i32.load local.tee $4 + local.get $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $3 + local.get $1 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 ) @@ -1744,7 +1745,7 @@ i32.const 0 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $0 + local.tee $1 i32.const 16 i32.sub i32.load offset=12 @@ -1758,7 +1759,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 local.get $2 i32.eq if @@ -1773,10 +1774,9 @@ i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.tee $1 i32.const 16 i32.sub i32.load offset=12 @@ -1834,10 +1834,9 @@ i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.tee $1 i32.const 16 i32.sub i32.load offset=12 @@ -1855,10 +1854,10 @@ i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -1876,10 +1875,10 @@ i32.const -4 i32.const 42 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $3 local.get $0 + call $~lib/rt/pure/__release + local.get $3 i32.const 16 i32.sub i32.load offset=12 @@ -1898,7 +1897,7 @@ i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice local.set $1 - local.get $0 + local.get $3 call $~lib/rt/pure/__release local.get $1 i32.const 16 @@ -1928,7 +1927,7 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $4 + local.set $3 i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc @@ -1936,16 +1935,16 @@ i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $3 + local.tee $4 i32.const 368 i32.const 8 call $~lib/memory/memory.copy local.get $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain i32.store local.get $0 - local.get $3 + local.get $4 i32.store offset=4 local.get $0 i32.const 8 @@ -1961,10 +1960,10 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $3 + local.set $4 i32.const 1 global.set $~argumentsLength - local.get $4 + local.get $3 i32.load call $~lib/dataview/DataView#constructor|trampoline local.set $5 @@ -1972,10 +1971,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 2ba862979b..d1696d4b72 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -2095,21 +2095,21 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $3 f64.const -1.984126982985795e-04 - local.get $1 + local.get $3 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $3 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -2117,21 +2117,21 @@ f64.add local.set $6 local.get $0 - local.get $1 + local.get $3 f64.const 0.5 local.get $2 f64.mul - local.get $1 + local.get $3 local.get $0 f64.mul - local.tee $3 + local.tee $0 local.get $6 f64.mul f64.sub f64.mul local.get $2 f64.sub - local.get $3 + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -4424,34 +4424,34 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $2 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $1 + local.set $2 local.get $0 - local.get $2 + local.get $1 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $2 local.get $1 + local.get $2 f64.mul f64.add f64.mul @@ -4487,17 +4487,17 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $2 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $2 + local.get $3 f64.const 6.077100506506192e-11 f64.mul local.tee $1 f64.sub - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4510,12 +4510,12 @@ i32.const 16 i32.gt_u if - local.get $2 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 6.077100506303966e-11 f64.mul local.tee $1 @@ -4530,7 +4530,7 @@ local.get $0 local.get $1 f64.sub - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4543,12 +4543,12 @@ i32.const 49 i32.gt_u if - local.get $2 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul local.tee $1 @@ -4562,18 +4562,18 @@ local.get $0 local.get $1 f64.sub - local.set $3 + local.set $2 end end - local.get $3 + local.get $2 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $2 f64.sub local.get $1 f64.sub global.set $~lib/math/rempio2_y1 - local.get $2 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end @@ -4590,7 +4590,7 @@ global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $2 + local.set $3 local.get $5 i32.const 1 i32.and @@ -4602,13 +4602,13 @@ f64.mul local.tee $1 f64.mul - local.tee $3 + local.tee $2 f64.sub local.tee $6 f64.const 1 local.get $6 f64.sub - local.get $3 + local.get $2 f64.sub local.get $1 local.get $1 @@ -4625,8 +4625,8 @@ local.get $1 local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const -2.7557314351390663e-07 local.get $1 @@ -4641,7 +4641,7 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 f64.mul f64.sub f64.add @@ -4651,21 +4651,21 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $1 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -4673,21 +4673,21 @@ f64.add local.set $6 local.get $0 - local.get $1 - f64.const 0.5 local.get $2 + f64.const 0.5 + local.get $3 f64.mul - local.get $1 + local.get $2 local.get $0 f64.mul - local.tee $3 + local.tee $0 local.get $6 f64.mul f64.sub f64.mul - local.get $2 - f64.sub local.get $3 + f64.sub + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -5739,22 +5739,23 @@ end ) (func $~lib/math/NativeMathf.asin (; 64 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) (local $3 f64) local.get $0 + local.tee $1 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1065353216 i32.ge_u if - local.get $1 + local.get $2 i32.const 1065353216 i32.eq if - local.get $0 + local.get $1 f32.const 1.5707963705062866 f32.mul f32.const 7.52316384526264e-37 @@ -5762,32 +5763,32 @@ return end f32.const 0 - local.get $0 - local.get $0 + local.get $1 + local.get $1 f32.sub f32.div return end - local.get $1 + local.get $2 i32.const 1056964608 i32.lt_u if - local.get $1 + local.get $2 i32.const 8388608 i32.ge_u i32.const 0 - local.get $1 + local.get $2 i32.const 964689920 i32.lt_u select if - local.get $0 + local.get $1 return end - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.get $1 + local.get $1 + local.get $1 + local.get $1 f32.mul call $~lib/math/Rf f32.mul @@ -5797,17 +5798,17 @@ f64.const 1.5707963705062866 f64.const 2 f32.const 0.5 - local.get $0 + local.get $1 f32.abs f32.const 0.5 f32.mul f32.sub - local.tee $2 + local.tee $0 f64.promote_f32 f64.sqrt local.tee $3 local.get $3 - local.get $2 + local.get $0 call $~lib/math/Rf f64.promote_f32 f64.mul @@ -5815,7 +5816,7 @@ f64.mul f64.sub f32.demote_f64 - local.get $0 + local.get $1 f32.copysign ) (func $../../lib/libm/assembly/libmf/asin (; 65 ;) (param $0 f32) (result f32) @@ -6297,8 +6298,9 @@ block $case2|1 block $case1|1 local.get $2 + local.tee $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -6463,30 +6465,30 @@ ) (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) + (local $2 f64) + (local $3 i32) + (local $4 i32) (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) (local $11 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $7 - local.get $2 + local.set $10 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -6498,24 +6500,24 @@ local.tee $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6524,7 +6526,7 @@ f32.demote_f64 return end - local.get $2 + local.get $4 i32.const 2139095040 i32.ge_u if @@ -6534,7 +6536,7 @@ return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $2 + local.get $4 i32.const 1305022427 i32.lt_u if @@ -6558,105 +6560,105 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $2 + local.get $4 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $8 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $6 + local.tee $9 i64.load - local.set $9 - local.get $6 + local.set $6 + local.get $9 i64.load offset=8 - local.set $5 - local.get $8 + local.set $7 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $5 i64.const 32 i64.gt_u if (result i64) + local.get $7 local.get $5 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $6 + local.get $9 i64.load offset=16 i64.const 96 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $5 + local.get $7 i64.const 32 - local.get $4 + local.get $5 i64.sub i64.shr_u end - local.set $10 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $11 - local.get $9 - local.get $4 - i64.shl + local.tee $8 + local.get $6 local.get $5 + i64.shl + local.get $7 i64.const 64 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $10 + local.get $8 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $6 i64.const 2 i64.shl - local.tee $5 + local.tee $8 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $6 i64.const 62 i64.shr_u - local.get $5 + local.get $8 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $7 + local.get $3 + local.get $10 select end - local.set $2 + local.set $3 global.get $~lib/math/rempio2f_y local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.and if (result f32) @@ -6664,24 +6666,24 @@ local.get $1 local.get $1 f64.mul - local.tee $3 + local.tee $2 local.get $1 f64.mul local.tee $1 f64.const -0.16666666641626524 - local.get $3 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -6692,24 +6694,24 @@ local.get $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6718,7 +6720,7 @@ f32.demote_f64 end local.set $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 2 @@ -7384,16 +7386,17 @@ block $~lib/math/NativeMathf.imul|inlined.0 (result f32) f32.const 0 local.get $0 + local.tee $2 local.get $1 f32.add - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 f32.sub f32.const 0 f32.ne br_if $~lib/math/NativeMathf.imul|inlined.0 drop - local.get $0 + local.get $2 f64.promote_f32 call $~lib/math/dtoi32 local.get $1 @@ -7798,7 +7801,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 @@ -7810,7 +7813,7 @@ local.tee $5 local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 8388608 i32.sub i32.const 2130706432 @@ -7819,7 +7822,7 @@ if local.get $5 if - local.get $3 + local.get $2 i32.const 1 i32.shl i32.eqz @@ -7828,7 +7831,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1065353216 i32.eq if @@ -7837,12 +7840,12 @@ br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const -16777216 @@ -7855,7 +7858,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 2130706432 @@ -7865,11 +7868,11 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.eqz - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 2130706432 @@ -7886,7 +7889,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 1 @@ -7898,36 +7901,36 @@ local.get $0 f32.mul local.set $0 - local.get $2 + local.get $3 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) i32.const 0 - local.get $3 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 2 - local.get $2 + local.get $3 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 0 - local.get $3 + local.get $2 i32.const 1 i32.const 150 - local.get $2 + local.get $3 i32.sub i32.shl - local.tee $2 + local.tee $3 i32.const 1 i32.sub i32.and @@ -7951,7 +7954,7 @@ f32.neg local.set $0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -7962,50 +7965,51 @@ end br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) i32.const 0 - local.get $3 + local.get $2 + local.tee $5 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $5 + local.tee $2 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 - local.get $5 + local.get $2 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 0 - local.get $3 + local.get $5 i32.const 1 i32.const 150 - local.get $5 + local.get $2 i32.sub i32.shl - local.tee $5 + local.tee $2 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 1 - local.get $3 + local.get $2 local.get $5 i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 end - local.tee $3 + local.tee $2 i32.eqz if local.get $0 @@ -8019,17 +8023,17 @@ end i32.const 65536 i32.const 0 - local.get $3 + local.get $2 i32.const 1 i32.eq select local.set $7 - local.get $2 + local.get $3 i32.const 2147483647 i32.and - local.set $2 + local.set $3 end - local.get $2 + local.get $3 i32.const 8388608 i32.lt_u if @@ -8041,21 +8045,21 @@ i32.and i32.const 192937984 i32.sub - local.set $2 + local.set $3 end end - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.const 1060306944 i32.sub - local.tee $3 + local.tee $2 i32.const -8388608 i32.and - local.tee $2 + local.tee $5 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $3 + local.get $2 i32.const 19 i32.shr_u i32.const 15 @@ -8064,7 +8068,7 @@ i32.shl i32.const 288 i32.add - local.tee $3 + local.tee $2 f64.load f64.mul f64.const 1 @@ -8087,9 +8091,9 @@ f64.const 1.4426950408774342 local.get $4 f64.mul - local.get $3 - f64.load offset=8 local.get $2 + f64.load offset=8 + local.get $5 i32.const 23 i32.shr_s f64.convert_i32_s @@ -8217,31 +8221,31 @@ ) (func $~lib/math/NativeMathf.sin (; 101 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) + (local $2 f64) + (local $3 i32) + (local $4 i32) (local $5 i64) (local $6 f64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $8 - local.get $2 + local.set $11 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -8250,29 +8254,29 @@ end local.get $0 f64.promote_f32 - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul - local.tee $1 - local.get $3 + local.tee $6 + local.get $2 f64.mul - local.set $6 - local.get $3 - local.get $6 - f64.const -0.16666666641626524 + local.set $1 + local.get $2 local.get $1 + f64.const -0.16666666641626524 + local.get $6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $1 local.get $1 + local.get $6 + local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $1 + local.get $6 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -8281,7 +8285,7 @@ f32.demote_f64 return end - local.get $2 + local.get $4 i32.const 2139095040 i32.ge_u if @@ -8291,7 +8295,7 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $2 + local.get $4 i32.const 1305022427 i32.lt_u if @@ -8315,129 +8319,129 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $2 + local.get $4 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $7 + local.tee $10 i64.load - local.set $10 - local.get $7 + local.set $7 + local.get $10 i64.load offset=8 - local.set $5 - local.get $9 + local.set $8 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $5 i64.const 32 i64.gt_u if (result i64) + local.get $8 local.get $5 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $7 + local.get $10 i64.load offset=16 i64.const 96 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $5 + local.get $8 i64.const 32 - local.get $4 + local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $4 - i64.shl + local.tee $9 + local.get $7 local.get $5 + i64.shl + local.get $8 i64.const 64 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $7 i64.const 2 i64.shl - local.tee $5 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $7 i64.const 62 i64.shr_u - local.get $5 + local.get $9 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $8 + local.get $3 + local.get $11 select end - local.set $2 + local.set $3 global.get $~lib/math/rempio2f_y local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.and if (result f32) local.get $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8449,24 +8453,24 @@ local.get $1 local.get $1 f64.mul - local.tee $3 + local.tee $2 local.get $1 f64.mul local.tee $1 f64.const -0.16666666641626524 - local.get $3 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -8475,7 +8479,7 @@ f32.demote_f64 end local.set $0 - local.get $2 + local.get $3 i32.const 2 i32.and if @@ -8571,31 +8575,31 @@ ) (func $~lib/math/NativeMathf.tan (; 106 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) - (local $5 f64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $8 - local.get $2 + local.set $11 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $5 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $5 i32.const 964689920 i32.lt_u if @@ -8604,36 +8608,36 @@ end local.get $0 f64.promote_f32 - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.tee $1 - local.get $3 + local.tee $2 + local.get $4 f64.mul - local.set $5 - local.get $3 - local.get $5 - f64.const 0.3333313950307914 + local.set $1 + local.get $4 local.get $1 + f64.const 0.3333313950307914 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $1 local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.mul f64.const 0.05338123784456704 - local.get $1 + local.get $2 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $1 + f64.const 0.002974357433599673 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.add @@ -8644,7 +8648,7 @@ f32.demote_f64 return end - local.get $2 + local.get $5 i32.const 2139095040 i32.ge_u if @@ -8654,7 +8658,7 @@ return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $2 + local.get $5 i32.const 1305022427 i32.lt_u if @@ -8678,132 +8682,132 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $2 + local.get $5 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $7 + local.tee $10 i64.load - local.set $10 - local.get $7 + local.set $7 + local.get $10 i64.load offset=8 - local.set $6 - local.get $9 + local.set $8 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $6 i64.const 32 i64.gt_u if (result i64) + local.get $8 local.get $6 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $7 + local.get $10 i64.load offset=16 i64.const 96 - local.get $4 + local.get $6 i64.sub i64.shr_u i64.or else - local.get $6 + local.get $8 i64.const 32 - local.get $4 + local.get $6 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $5 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $4 - i64.shl + local.tee $9 + local.get $7 local.get $6 + i64.shl + local.get $8 i64.const 64 - local.get $4 + local.get $6 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $7 i64.const 2 i64.shl - local.tee $6 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $7 i64.const 62 i64.shr_u - local.get $6 + local.get $9 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $8 + local.get $3 + local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.tee $1 - local.get $3 + local.tee $2 + local.get $4 f64.mul - local.set $5 - local.get $3 - local.get $5 - f64.const 0.3333313950307914 + local.set $1 + local.get $4 local.get $1 + f64.const 0.3333313950307914 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $1 local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.mul f64.const 0.05338123784456704 - local.get $1 + local.get $2 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $1 + f64.const 0.002974357433599673 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.add diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 2d1cdf2e31..9afb123903 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1467,53 +1467,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_s i32.store8 - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load8_s call $~lib/util/hash/hash8 @@ -1522,69 +1523,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1726,7 +1730,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1747,24 +1751,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -2282,7 +2286,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 local.set $3 @@ -2309,16 +2312,15 @@ i32.and i32.eqz if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 local.get $1 - local.get $6 + local.get $0 local.get $5 i32.load offset=4 call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 end local.get $2 i32.const 1 @@ -2425,53 +2427,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_s i32.store8 - local.get $3 + local.get $4 local.get $2 i32.load8_s offset=1 i32.store8 offset=1 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load8_s call $~lib/util/hash/hash8 @@ -2480,69 +2483,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2761,53 +2767,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load i32.store - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load call $~lib/util/hash/hash32 @@ -2816,69 +2823,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3253,65 +3263,62 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $0 local.get $1 i32.load offset=16 - local.set $3 + local.set $6 i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $4 local.get $3 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $4 + local.get $6 i32.lt_s if - local.get $6 - local.get $2 + local.get $0 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $4 - local.get $5 + local.get $3 local.get $7 + local.get $5 i32.load8_s call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end - local.get $4 - local.get $0 + local.get $3 + local.get $7 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 i32.const 24 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -3337,18 +3344,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $5 - local.get $4 + local.get $3 i32.load offset=12 i32.ge_u if @@ -3359,18 +3365,18 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $0 + local.get $3 i32.load offset=4 i32.add i32.load8_s - local.set $0 - local.get $6 - local.get $5 + local.set $5 + local.get $7 + local.get $0 call $~lib/array/Array#__get - local.set $7 + local.set $6 local.get $1 - local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -3382,7 +3388,7 @@ unreachable end local.get $1 - local.get $7 + local.get $6 i32.const 20 i32.sub call $~lib/map/Map#has @@ -3396,19 +3402,19 @@ unreachable end local.get $2 - local.get $0 - local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 i32.const 1 i32.add local.set $0 @@ -3427,7 +3433,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3604,13 +3610,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -3637,53 +3643,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_u i32.store8 - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load8_u call $~lib/util/hash/hash8 @@ -3692,69 +3699,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3881,53 +3891,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_u i32.store8 - local.get $3 + local.get $4 local.get $2 i32.load8_u offset=1 i32.store8 offset=1 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load8_u call $~lib/util/hash/hash8 @@ -3936,69 +3947,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -4398,65 +4412,62 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $0 local.get $1 i32.load offset=16 - local.set $3 + local.set $6 i32.const 16 i32.const 9 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $4 local.get $3 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $4 + local.get $6 i32.lt_s if - local.get $6 - local.get $2 + local.get $0 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $4 - local.get $5 + local.get $3 local.get $7 + local.get $5 i32.load8_u call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end - local.get $4 - local.get $0 + local.get $3 + local.get $7 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 i32.const 24 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -4482,18 +4493,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $5 - local.get $4 + local.get $3 i32.load offset=12 i32.ge_u if @@ -4504,18 +4514,18 @@ call $~lib/builtins/abort unreachable end - local.get $5 - local.get $4 + local.get $0 + local.get $3 i32.load offset=4 i32.add i32.load8_u - local.set $0 - local.get $6 - local.get $5 + local.set $5 + local.get $7 + local.get $0 call $~lib/array/Array#__get - local.set $7 + local.set $6 local.get $1 - local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -4527,7 +4537,7 @@ unreachable end local.get $1 - local.get $7 + local.get $6 i32.const 20 i32.sub call $~lib/map/Map#has @@ -4541,19 +4551,19 @@ unreachable end local.get $2 - local.get $0 - local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 i32.const 1 i32.add local.set $0 @@ -4572,7 +4582,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4741,13 +4751,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -4834,53 +4844,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_s i32.store16 - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load16_s call $~lib/util/hash/hash16 @@ -4889,69 +4900,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5132,53 +5146,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_s i32.store16 - local.get $3 + local.get $4 local.get $2 i32.load16_s offset=2 i32.store16 offset=2 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load16_s call $~lib/util/hash/hash16 @@ -5187,69 +5202,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5667,65 +5685,62 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $0 local.get $1 i32.load offset=16 - local.set $3 + local.set $6 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $4 local.get $3 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $4 + local.get $6 i32.lt_s if - local.get $6 - local.get $2 + local.get $0 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $4 - local.get $5 + local.get $3 local.get $7 + local.get $5 i32.load16_s call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end - local.get $4 - local.get $0 + local.get $3 + local.get $7 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 i32.const 24 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -5751,18 +5766,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $5 - local.get $4 + local.get $3 i32.load offset=12 i32.ge_u if @@ -5773,20 +5787,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=4 - local.get $5 + local.get $0 i32.const 1 i32.shl i32.add i32.load16_s - local.set $0 - local.get $6 - local.get $5 + local.set $5 + local.get $7 + local.get $0 call $~lib/array/Array#__get - local.set $7 + local.set $6 local.get $1 - local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -5798,7 +5812,7 @@ unreachable end local.get $1 - local.get $7 + local.get $6 i32.const 20 i32.sub call $~lib/map/Map#has @@ -5812,19 +5826,19 @@ unreachable end local.get $2 - local.get $0 - local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 i32.const 1 i32.add local.set $0 @@ -5843,7 +5857,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -6020,13 +6034,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -6053,53 +6067,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_u i32.store16 - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load16_u call $~lib/util/hash/hash16 @@ -6108,69 +6123,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6297,53 +6315,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_u i32.store16 - local.get $3 + local.get $4 local.get $2 i32.load16_u offset=2 i32.store16 offset=2 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i32.load16_u call $~lib/util/hash/hash16 @@ -6352,69 +6371,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6814,65 +6836,62 @@ end local.get $1 i32.load offset=8 - local.set $6 + local.set $0 local.get $1 i32.load offset=16 - local.set $3 + local.set $6 i32.const 16 i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $4 local.get $3 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $2 - local.get $3 + local.get $4 + local.get $6 i32.lt_s if - local.get $6 - local.get $2 + local.get $0 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $4 - local.get $5 + local.get $3 local.get $7 + local.get $5 i32.load16_u call $~lib/array/Array#__set + local.get $7 + i32.const 1 + i32.add + local.set $7 end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $for-loop|0 end end - local.get $4 - local.get $0 + local.get $3 + local.get $7 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $6 + local.set $7 i32.const 24 i32.const 16 call $~lib/rt/tlsf/__alloc @@ -6898,18 +6917,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 + local.set $4 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $4 + local.get $3 i32.load offset=12 i32.lt_s if local.get $0 - local.tee $5 - local.get $4 + local.get $3 i32.load offset=12 i32.ge_u if @@ -6920,20 +6938,20 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=4 - local.get $5 + local.get $0 i32.const 1 i32.shl i32.add i32.load16_u - local.set $0 - local.get $6 - local.get $5 + local.set $5 + local.get $7 + local.get $0 call $~lib/array/Array#__get - local.set $7 + local.set $6 local.get $1 - local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -6945,7 +6963,7 @@ unreachable end local.get $1 - local.get $7 + local.get $6 i32.const 20 i32.sub call $~lib/map/Map#has @@ -6959,19 +6977,19 @@ unreachable end local.get $2 - local.get $0 - local.get $0 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.const 20 i32.sub - local.tee $0 - local.get $0 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $5 + local.get $0 i32.const 1 i32.add local.set $0 @@ -6990,7 +7008,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7159,13 +7177,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -7424,69 +7442,68 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $0 local.get $1 i32.load offset=8 - local.set $2 + local.set $4 local.get $1 i32.load offset=16 - local.tee $6 + local.tee $2 call $~lib/array/Array#constructor - local.set $4 - i32.const 0 - local.set $0 + local.set $5 loop $for-loop|01 - local.get $3 - local.get $6 + local.get $0 + local.get $2 i32.lt_s if - local.get $2 - local.get $3 + local.get $4 + local.get $0 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $4 local.get $5 - local.get $7 + local.get $3 + local.get $6 i32.load call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|01 end end - local.get $4 - local.get $0 + local.get $5 + local.get $3 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $5 - call $~lib/map/Map#constructor local.set $3 + call $~lib/map/Map#constructor + local.set $4 i32.const 0 local.set $0 loop $for-loop|2 local.get $0 - local.get $4 + local.get $5 i32.load offset=12 i32.lt_s if - local.get $4 + local.get $5 local.get $0 call $~lib/array/Array#__get local.set $2 @@ -7520,12 +7537,12 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 local.get $2 local.get $2 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $4 local.get $7 i32.const 20 i32.sub @@ -7540,7 +7557,7 @@ br $for-loop|2 end end - local.get $5 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7552,7 +7569,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7713,14 +7730,14 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) @@ -7913,63 +7930,62 @@ call $~lib/builtins/abort unreachable end + i32.const 0 + local.set $0 local.get $1 i32.load offset=8 - local.set $6 + local.set $3 local.get $1 i32.load offset=16 - local.set $3 + local.set $4 i32.const 16 i32.const 18 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $4 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $5 i32.const 0 i32.store offset=12 local.get $5 - local.get $3 + local.get $4 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|00 + local.get $0 local.get $4 - local.get $3 i32.lt_s if - local.get $6 - local.get $4 + local.get $3 + local.get $0 i32.const 12 i32.mul i32.add - local.tee $7 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 local.get $5 local.get $2 - local.get $7 + local.get $6 i32.load call $~lib/array/Array#__set + local.get $2 + i32.const 1 + i32.add + local.set $2 end - local.get $4 + local.get $0 i32.const 1 i32.add - local.set $4 + local.set $0 br $for-loop|00 end end local.get $5 - local.get $0 + local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values @@ -8406,53 +8422,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i64.load i64.store - local.get $3 + local.get $4 local.get $2 i32.load offset=8 i32.store offset=8 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i64.load call $~lib/util/hash/hash64 @@ -8461,69 +8478,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=12 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 16 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 86 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) @@ -8691,7 +8711,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i32.load offset=8 local.set $3 @@ -8718,16 +8737,15 @@ i32.and i32.eqz if - local.get $0 - local.tee $6 - i32.const 1 - i32.add - local.set $0 local.get $1 - local.get $6 + local.get $0 local.get $5 i32.load offset=8 call $~lib/array/Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 end local.get $2 i32.const 1 @@ -8806,53 +8824,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i64.load i64.store - local.get $3 + local.get $4 local.get $2 i64.load offset=8 i64.store offset=8 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 i64.load call $~lib/util/hash/hash64 @@ -8861,69 +8880,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=16 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 24 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 24 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) @@ -9122,7 +9144,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) i32.const 24 i32.const 20 call $~lib/rt/tlsf/__alloc @@ -9310,59 +9331,58 @@ end local.get $1 i32.load offset=8 - local.set $8 + local.set $4 local.get $1 i32.load offset=16 - local.set $3 + local.set $5 i32.const 16 i32.const 21 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $5 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $4 - local.get $3 + local.get $6 + local.get $5 i32.store offset=12 loop $for-loop|00 + local.get $2 local.get $5 - local.get $3 i32.lt_s if - local.get $8 - local.get $5 + local.get $4 + local.get $2 i32.const 4 i32.shl i32.add - local.tee $9 + local.tee $8 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $2 - local.tee $6 - i32.const 1 - i32.add - local.set $2 - local.get $4 local.get $6 - local.get $9 + local.get $3 + local.get $8 i64.load call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $for-loop|00 end end - local.get $4 - local.get $2 + local.get $6 + local.get $3 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values @@ -9392,21 +9412,21 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $6 + local.set $3 loop $for-loop|2 local.get $7 - local.get $4 + local.get $6 i32.load offset=12 i32.lt_s if - local.get $4 + local.get $6 local.get $7 call $~lib/array/Array#__get local.set $0 local.get $5 local.get $7 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $1 local.get $0 call $~lib/map/Map#has @@ -9420,7 +9440,7 @@ unreachable end local.get $1 - local.get $3 + local.get $4 i32.const 20 i32.sub i64.extend_i32_s @@ -9439,12 +9459,12 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $7 @@ -9466,7 +9486,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -9629,13 +9649,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -9650,7 +9670,6 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) i32.const 24 i32.const 23 call $~lib/rt/tlsf/__alloc @@ -9838,59 +9857,58 @@ end local.get $1 i32.load offset=8 - local.set $8 + local.set $4 local.get $1 i32.load offset=16 - local.set $3 + local.set $5 i32.const 16 i32.const 24 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $5 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $4 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $4 - local.get $3 + local.get $6 + local.get $5 i32.store offset=12 loop $for-loop|00 + local.get $2 local.get $5 - local.get $3 i32.lt_s if - local.get $8 - local.get $5 + local.get $4 + local.get $2 i32.const 4 i32.shl i32.add - local.tee $9 + local.tee $8 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $2 - local.tee $6 - i32.const 1 - i32.add - local.set $2 - local.get $4 local.get $6 - local.get $9 + local.get $3 + local.get $8 i64.load call $~lib/array/Array#__set + local.get $3 + i32.const 1 + i32.add + local.set $3 end - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $for-loop|00 end end - local.get $4 - local.get $2 + local.get $6 + local.get $3 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values @@ -9920,21 +9938,21 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $6 + local.set $3 loop $for-loop|2 local.get $7 - local.get $4 + local.get $6 i32.load offset=12 i32.lt_s if - local.get $4 + local.get $6 local.get $7 call $~lib/array/Array#__get local.set $0 local.get $5 local.get $7 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $1 local.get $0 call $~lib/map/Map#has @@ -9948,7 +9966,7 @@ unreachable end local.get $1 - local.get $3 + local.get $4 i32.const 20 i32.sub i64.extend_i32_s @@ -9967,12 +9985,12 @@ local.get $0 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $6 local.get $3 + local.get $4 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $7 @@ -9994,7 +10012,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -10157,13 +10175,13 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $6 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -10230,53 +10248,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f32.load f32.store - local.get $3 + local.get $4 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 f32.load i32.reinterpret_f32 @@ -10286,69 +10305,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 101 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) @@ -10468,59 +10490,53 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 f32) + (local $6 f32) local.get $0 i32.load offset=8 - local.set $6 + local.set $5 local.get $0 i32.load offset=16 - local.set $3 + local.set $2 i32.const 16 i32.const 27 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.const 12 i32.mul i32.add - local.tee $5 + local.tee $4 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $5 + local.get $4 f32.load - local.set $7 - local.get $2 + local.set $6 + local.get $0 local.get $1 i32.load offset=12 i32.ge_u if - local.get $2 + local.get $0 i32.const 0 i32.lt_s if @@ -10532,29 +10548,33 @@ unreachable end local.get $1 - local.get $2 + local.get $0 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 call $~lib/array/ensureSize local.get $1 - local.get $5 + local.get $4 i32.store offset=12 end local.get $1 i32.load offset=4 - local.get $2 + local.get $0 i32.const 2 i32.shl i32.add - local.get $7 + local.get $6 f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -10574,53 +10594,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 12 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f32.load f32.store - local.get $3 + local.get $4 local.get $2 f32.load offset=4 f32.store offset=4 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 f32.load i32.reinterpret_f32 @@ -10630,69 +10651,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 12 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 12 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 105 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) @@ -10704,7 +10728,7 @@ local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $4 + local.tee $5 call $~lib/map/Map#find local.tee $3 if @@ -10746,11 +10770,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $4 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $4 i32.const 12 i32.mul i32.add @@ -10769,7 +10793,7 @@ local.get $3 local.get $0 i32.load - local.get $4 + local.get $5 local.get $0 i32.load offset=4 i32.and @@ -11398,53 +11422,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f64.load f64.store - local.get $3 + local.get $4 local.get $2 i32.load offset=8 i32.store offset=8 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 f64.load i64.reinterpret_f64 @@ -11454,69 +11479,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=12 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 16 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 16 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 111 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) @@ -11636,59 +11664,53 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 f64) + (local $6 f64) local.get $0 i32.load offset=8 - local.set $6 + local.set $5 local.get $0 i32.load offset=16 - local.set $3 + local.set $2 i32.const 16 i32.const 30 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $3 + local.get $2 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor local.tee $1 i32.const 0 i32.store offset=12 local.get $1 - local.get $3 + local.get $2 i32.store offset=12 i32.const 0 local.set $0 loop $for-loop|0 - local.get $4 local.get $3 + local.get $2 i32.lt_s if - local.get $6 - local.get $4 + local.get $5 + local.get $3 i32.const 4 i32.shl i32.add - local.tee $5 + local.tee $4 i32.load offset=12 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $5 + local.get $4 f64.load - local.set $7 - local.get $2 + local.set $6 + local.get $0 local.get $1 i32.load offset=12 i32.ge_u if - local.get $2 + local.get $0 i32.const 0 i32.lt_s if @@ -11700,29 +11722,33 @@ unreachable end local.get $1 - local.get $2 + local.get $0 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 3 call $~lib/array/ensureSize local.get $1 - local.get $5 + local.get $4 i32.store offset=12 end local.get $1 i32.load offset=4 - local.get $2 + local.get $0 i32.const 3 i32.shl i32.add - local.get $7 + local.get $6 f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end @@ -11742,53 +11768,54 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $3 local.get $0 i32.load offset=16 i32.const 24 i32.mul i32.add - local.set $7 - local.get $4 - local.set $3 + local.set $8 + local.get $5 + local.set $4 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $3 + local.get $8 i32.ne if - local.get $2 + local.get $3 + local.tee $2 i32.load offset=16 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f64.load f64.store - local.get $3 + local.get $4 local.get $2 f64.load offset=8 f64.store offset=8 - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 f64.load i64.reinterpret_f64 @@ -11798,69 +11825,72 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=16 - local.get $8 - local.get $3 + local.get $2 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 24 i32.add - local.set $3 + local.set $4 end - local.get $2 + local.get $3 i32.const 24 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index c75cf8b88d..e146c15d97 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -1790,22 +1790,23 @@ end ) (func $~lib/math/NativeMathf.asin (; 56 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) (local $3 f64) local.get $0 + local.tee $1 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1065353216 i32.ge_u if - local.get $1 + local.get $2 i32.const 1065353216 i32.eq if - local.get $0 + local.get $1 f32.const 1.5707963705062866 f32.mul f32.const 7.52316384526264e-37 @@ -1813,32 +1814,32 @@ return end f32.const 0 - local.get $0 - local.get $0 + local.get $1 + local.get $1 f32.sub f32.div return end - local.get $1 + local.get $2 i32.const 1056964608 i32.lt_u if - local.get $1 + local.get $2 i32.const 8388608 i32.ge_u i32.const 0 - local.get $1 + local.get $2 i32.const 964689920 i32.lt_u select if - local.get $0 + local.get $1 return end - local.get $0 - local.get $0 - local.get $0 - local.get $0 + local.get $1 + local.get $1 + local.get $1 + local.get $1 f32.mul call $~lib/math/Rf f32.mul @@ -1848,17 +1849,17 @@ f64.const 1.5707963705062866 f64.const 2 f32.const 0.5 - local.get $0 + local.get $1 f32.abs f32.const 0.5 f32.mul f32.sub - local.tee $2 + local.tee $0 f64.promote_f32 f64.sqrt local.tee $3 local.get $3 - local.get $2 + local.get $0 call $~lib/math/Rf f64.promote_f32 f64.mul @@ -1866,7 +1867,7 @@ f64.mul f64.sub f32.demote_f64 - local.get $0 + local.get $1 f32.copysign ) (func $std/math/test_asinf (; 57 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) @@ -2980,8 +2981,9 @@ block $case2|1 block $case1|1 local.get $2 + local.tee $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -3802,21 +3804,21 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $3 f64.const -1.984126982985795e-04 - local.get $1 + local.get $3 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $3 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -3824,21 +3826,21 @@ f64.add local.set $6 local.get $0 - local.get $1 + local.get $3 f64.const 0.5 local.get $2 f64.mul - local.get $1 + local.get $3 local.get $0 f64.mul - local.tee $3 + local.tee $0 local.get $6 f64.mul f64.sub f64.mul local.get $2 f64.sub - local.get $3 + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3927,30 +3929,30 @@ ) (func $~lib/math/NativeMathf.cos (; 79 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) + (local $2 f64) + (local $3 i32) + (local $4 i32) (local $5 i64) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) + (local $6 i64) + (local $7 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) (local $11 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $7 - local.get $2 + local.set $10 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -3962,24 +3964,24 @@ local.tee $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -3988,7 +3990,7 @@ f32.demote_f64 return end - local.get $2 + local.get $4 i32.const 2139095040 i32.ge_u if @@ -3998,7 +4000,7 @@ return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $2 + local.get $4 i32.const 1305022427 i32.lt_u if @@ -4022,105 +4024,105 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $2 + local.get $4 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $8 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $6 + local.tee $9 i64.load - local.set $9 - local.get $6 + local.set $6 + local.get $9 i64.load offset=8 - local.set $5 - local.get $8 + local.set $7 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $5 i64.const 32 i64.gt_u if (result i64) + local.get $7 local.get $5 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $6 + local.get $9 i64.load offset=16 i64.const 96 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $5 + local.get $7 i64.const 32 - local.get $4 + local.get $5 i64.sub i64.shr_u end - local.set $10 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $11 - local.get $9 - local.get $4 - i64.shl + local.tee $8 + local.get $6 local.get $5 + i64.shl + local.get $7 i64.const 64 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $10 + local.get $8 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $6 i64.const 2 i64.shl - local.tee $5 + local.tee $8 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $6 i64.const 62 i64.shr_u - local.get $5 + local.get $8 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $7 + local.get $3 + local.get $10 select end - local.set $2 + local.set $3 global.get $~lib/math/rempio2f_y local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.and if (result f32) @@ -4128,24 +4130,24 @@ local.get $1 local.get $1 f64.mul - local.tee $3 + local.tee $2 local.get $1 f64.mul local.tee $1 f64.const -0.16666666641626524 - local.get $3 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -4156,24 +4158,24 @@ local.get $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -4182,7 +4184,7 @@ f32.demote_f64 end local.set $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 2 @@ -8131,7 +8133,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 @@ -8143,7 +8145,7 @@ local.tee $5 local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 8388608 i32.sub i32.const 2130706432 @@ -8152,7 +8154,7 @@ if local.get $5 if - local.get $3 + local.get $2 i32.const 1 i32.shl i32.eqz @@ -8161,7 +8163,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1065353216 i32.eq if @@ -8170,12 +8172,12 @@ br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const -16777216 @@ -8188,7 +8190,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 2130706432 @@ -8198,11 +8200,11 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.eqz - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 2130706432 @@ -8219,7 +8221,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const 1 @@ -8231,36 +8233,36 @@ local.get $0 f32.mul local.set $0 - local.get $2 + local.get $3 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) i32.const 0 - local.get $3 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 2 - local.get $2 + local.get $3 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 0 - local.get $3 + local.get $2 i32.const 1 i32.const 150 - local.get $2 + local.get $3 i32.sub i32.shl - local.tee $2 + local.tee $3 i32.const 1 i32.sub i32.and @@ -8284,7 +8286,7 @@ f32.neg local.set $0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -8295,50 +8297,51 @@ end br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) i32.const 0 - local.get $3 + local.get $2 + local.tee $5 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $5 + local.tee $2 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 - local.get $5 + local.get $2 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 0 - local.get $3 + local.get $5 i32.const 1 i32.const 150 - local.get $5 + local.get $2 i32.sub i32.shl - local.tee $5 + local.tee $2 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 1 - local.get $3 + local.get $2 local.get $5 i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 end - local.tee $3 + local.tee $2 i32.eqz if local.get $0 @@ -8352,17 +8355,17 @@ end i32.const 65536 i32.const 0 - local.get $3 + local.get $2 i32.const 1 i32.eq select local.set $7 - local.get $2 + local.get $3 i32.const 2147483647 i32.and - local.set $2 + local.set $3 end - local.get $2 + local.get $3 i32.const 8388608 i32.lt_u if @@ -8374,21 +8377,21 @@ i32.and i32.const 192937984 i32.sub - local.set $2 + local.set $3 end end - local.get $2 - local.get $2 + local.get $3 + local.get $3 i32.const 1060306944 i32.sub - local.tee $3 + local.tee $2 i32.const -8388608 i32.and - local.tee $2 + local.tee $5 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $3 + local.get $2 i32.const 19 i32.shr_u i32.const 15 @@ -8397,7 +8400,7 @@ i32.shl i32.const 2672 i32.add - local.tee $3 + local.tee $2 f64.load f64.mul f64.const 1 @@ -8420,9 +8423,9 @@ f64.const 1.4426950408774342 local.get $4 f64.mul - local.get $3 - f64.load offset=8 local.get $2 + f64.load offset=8 + local.get $5 i32.const 23 i32.shr_s f64.convert_i32_s @@ -8951,30 +8954,33 @@ (local $6 i32) (local $7 f32) (local $8 i32) - local.get $1 + local.get $0 i32.reinterpret_f32 - local.tee $4 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $5 - i32.const 1 - local.get $1 + local.set $2 local.get $1 - f32.ne - local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $5 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $3 + local.set $6 + local.get $3 + local.set $4 + i32.const 1 + local.get $1 + local.get $1 + f32.ne + local.get $2 i32.const 255 i32.eq i32.const 1 - local.get $4 + local.get $5 i32.const 1 i32.shl select @@ -8988,7 +8994,7 @@ f32.div return end - local.get $2 + local.get $4 i32.const 1 i32.shl i32.eqz @@ -8996,60 +9002,60 @@ local.get $0 return end - local.get $2 + local.get $3 i32.const 31 i32.shr_u - local.get $3 + local.get $2 if (result i32) - local.get $2 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $2 + local.get $4 i32.const 1 - local.get $3 local.get $2 + local.get $4 i32.const 9 i32.shl i32.clz i32.sub - local.tee $3 + local.tee $2 i32.sub i32.shl end - local.set $2 - local.get $5 + local.set $3 + local.get $6 if (result i32) - local.get $4 + local.get $5 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $4 + local.get $5 i32.const 1 + local.get $6 local.get $5 - local.get $4 i32.const 9 i32.shl i32.clz i32.sub - local.tee $5 + local.tee $6 i32.sub i32.shl end - local.set $6 + local.set $5 i32.const 0 local.set $4 block $do-break|0 - local.get $3 - local.get $5 + local.get $2 + local.get $6 i32.lt_s if - local.get $5 - local.get $3 + local.get $6 + local.get $2 i32.const 1 i32.add i32.eq @@ -9058,84 +9064,84 @@ return end loop $while-continue|1 - local.get $3 - local.get $5 + local.get $2 + local.get $6 i32.gt_s if - local.get $2 - local.get $6 + local.get $3 + local.get $5 i32.ge_u if (result i32) local.get $4 i32.const 1 i32.add local.set $4 - local.get $2 - local.get $6 + local.get $3 + local.get $5 i32.sub else - local.get $2 + local.get $3 end i32.const 1 i32.shl - local.set $2 + local.set $3 local.get $4 i32.const 1 i32.shl local.set $4 - local.get $3 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 br $while-continue|1 end end - local.get $2 - local.get $6 + local.get $3 + local.get $5 i32.ge_u if local.get $4 i32.const 1 i32.add local.set $4 - local.get $2 - local.get $6 + local.get $3 + local.get $5 i32.sub - local.set $2 + local.set $3 end - local.get $2 + local.get $3 i32.eqz if i32.const -30 - local.set $3 + local.set $2 else - local.get $3 local.get $2 + local.get $3 i32.const 8 i32.shl i32.clz - local.tee $6 + local.tee $5 i32.sub - local.set $3 - local.get $2 - local.get $6 - i32.shl local.set $2 + local.get $3 + local.get $5 + i32.shl + local.set $3 end end - local.get $2 + local.get $3 i32.const 8388608 i32.sub - local.get $3 + local.get $2 i32.const 23 i32.shl i32.or - local.get $2 - i32.const 1 local.get $3 + i32.const 1 + local.get $2 i32.sub i32.shr_u - local.get $3 + local.get $2 i32.const 0 i32.gt_s select @@ -9165,14 +9171,14 @@ f32.gt select i32.const 0 - local.get $5 - local.get $3 + local.get $6 + local.get $2 i32.const 1 i32.add i32.eq select - local.get $3 - local.get $5 + local.get $2 + local.get $6 i32.eq select select @@ -9228,34 +9234,34 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $1 f64.const -1.984126982985795e-04 - local.get $2 + local.get $1 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $1 + local.get $1 + local.get $1 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $1 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $1 + local.set $2 local.get $0 - local.get $2 + local.get $1 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $2 local.get $1 + local.get $2 f64.mul f64.add f64.mul @@ -9291,17 +9297,17 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $2 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $2 + local.get $3 f64.const 6.077100506506192e-11 f64.mul local.tee $1 f64.sub - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9314,12 +9320,12 @@ i32.const 16 i32.gt_u if - local.get $2 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 6.077100506303966e-11 f64.mul local.tee $1 @@ -9334,7 +9340,7 @@ local.get $0 local.get $1 f64.sub - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9347,12 +9353,12 @@ i32.const 49 i32.gt_u if - local.get $2 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul local.tee $1 @@ -9366,18 +9372,18 @@ local.get $0 local.get $1 f64.sub - local.set $3 + local.set $2 end end - local.get $3 + local.get $2 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $2 f64.sub local.get $1 f64.sub global.set $~lib/math/rempio2_y1 - local.get $2 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end @@ -9394,7 +9400,7 @@ global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $2 + local.set $3 local.get $5 i32.const 1 i32.and @@ -9406,13 +9412,13 @@ f64.mul local.tee $1 f64.mul - local.tee $3 + local.tee $2 f64.sub local.tee $6 f64.const 1 local.get $6 f64.sub - local.get $3 + local.get $2 f64.sub local.get $1 local.get $1 @@ -9429,8 +9435,8 @@ local.get $1 local.get $1 f64.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const -2.7557314351390663e-07 local.get $1 @@ -9445,7 +9451,7 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 f64.mul f64.sub f64.add @@ -9455,21 +9461,21 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $1 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -9477,21 +9483,21 @@ f64.add local.set $6 local.get $0 - local.get $1 - f64.const 0.5 local.get $2 + f64.const 0.5 + local.get $3 f64.mul - local.get $1 + local.get $2 local.get $0 f64.mul - local.tee $3 + local.tee $0 local.get $6 f64.mul f64.sub f64.mul - local.get $2 - f64.sub local.get $3 + f64.sub + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -9526,31 +9532,31 @@ ) (func $~lib/math/NativeMathf.sin (; 138 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) + (local $2 f64) + (local $3 i32) + (local $4 i32) (local $5 i64) (local $6 f64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $8 - local.get $2 + local.set $11 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -9559,29 +9565,29 @@ end local.get $0 f64.promote_f32 - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul - local.tee $1 - local.get $3 + local.tee $6 + local.get $2 f64.mul - local.set $6 - local.get $3 - local.get $6 - f64.const -0.16666666641626524 + local.set $1 + local.get $2 local.get $1 + f64.const -0.16666666641626524 + local.get $6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $1 local.get $1 + local.get $6 + local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $1 + local.get $6 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9590,7 +9596,7 @@ f32.demote_f64 return end - local.get $2 + local.get $4 i32.const 2139095040 i32.ge_u if @@ -9600,7 +9606,7 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $2 + local.get $4 i32.const 1305022427 i32.lt_u if @@ -9624,129 +9630,129 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $2 + local.get $4 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $7 + local.tee $10 i64.load - local.set $10 - local.get $7 + local.set $7 + local.get $10 i64.load offset=8 - local.set $5 - local.get $9 + local.set $8 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $5 i64.const 32 i64.gt_u if (result i64) + local.get $8 local.get $5 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $7 + local.get $10 i64.load offset=16 i64.const 96 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $5 + local.get $8 i64.const 32 - local.get $4 + local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $4 - i64.shl + local.tee $9 + local.get $7 local.get $5 + i64.shl + local.get $8 i64.const 64 - local.get $4 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $7 i64.const 2 i64.shl - local.tee $5 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $7 i64.const 62 i64.shr_u - local.get $5 + local.get $9 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $8 + local.get $3 + local.get $11 select end - local.set $2 + local.set $3 global.get $~lib/math/rempio2f_y local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.and if (result f32) local.get $1 local.get $1 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul - local.set $3 + local.set $1 f64.const 1 - local.get $1 + local.get $2 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $1 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $1 + local.get $2 f64.mul f64.const -0.001388676377460993 - local.get $1 + local.get $2 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -9758,24 +9764,24 @@ local.get $1 local.get $1 f64.mul - local.tee $3 + local.tee $2 local.get $1 f64.mul local.tee $1 f64.const -0.16666666641626524 - local.get $3 + local.get $2 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add local.get $1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $2 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9784,7 +9790,7 @@ f32.demote_f64 end local.set $0 - local.get $2 + local.get $3 i32.const 2 i32.and if @@ -10370,31 +10376,31 @@ ) (func $~lib/math/NativeMathf.tan (; 149 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i64) - (local $5 f64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $8 - local.get $2 + local.set $11 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $5 i32.const 1061752794 i32.le_u if - local.get $2 + local.get $5 i32.const 964689920 i32.lt_u if @@ -10403,36 +10409,36 @@ end local.get $0 f64.promote_f32 - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.tee $1 - local.get $3 + local.tee $2 + local.get $4 f64.mul - local.set $5 - local.get $3 - local.get $5 - f64.const 0.3333313950307914 + local.set $1 + local.get $4 local.get $1 + f64.const 0.3333313950307914 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $1 local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.mul f64.const 0.05338123784456704 - local.get $1 + local.get $2 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $1 + f64.const 0.002974357433599673 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.add @@ -10443,7 +10449,7 @@ f32.demote_f64 return end - local.get $2 + local.get $5 i32.const 2139095040 i32.ge_u if @@ -10453,7 +10459,7 @@ return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $2 + local.get $5 i32.const 1305022427 i32.lt_u if @@ -10477,132 +10483,132 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $2 + local.get $5 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $3 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $7 + local.tee $10 i64.load - local.set $10 - local.get $7 + local.set $7 + local.get $10 i64.load offset=8 - local.set $6 - local.get $9 + local.set $8 + local.get $3 i32.const 63 i32.and i64.extend_i32_s - local.tee $4 + local.tee $6 i64.const 32 i64.gt_u if (result i64) + local.get $8 local.get $6 - local.get $4 i64.const 32 i64.sub i64.shl - local.get $7 + local.get $10 i64.load offset=16 i64.const 96 - local.get $4 + local.get $6 i64.sub i64.shr_u i64.or else - local.get $6 + local.get $8 i64.const 32 - local.get $4 + local.get $6 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $5 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $4 - i64.shl + local.tee $9 + local.get $7 local.get $6 + i64.shl + local.get $8 i64.const 64 - local.get $4 + local.get $6 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $7 i64.const 2 i64.shl - local.tee $6 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $4 + local.get $7 i64.const 62 i64.shr_u - local.get $6 + local.get $9 i64.const 63 i64.shr_u i64.add i32.wrap_i64 - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $8 + local.get $3 + local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.tee $1 - local.get $3 + local.tee $2 + local.get $4 f64.mul - local.set $5 - local.get $3 - local.get $5 - f64.const 0.3333313950307914 + local.set $1 + local.get $4 local.get $1 + f64.const 0.3333313950307914 + local.get $2 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $5 - local.get $1 local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 + local.tee $1 f64.mul f64.const 0.05338123784456704 - local.get $1 + local.get $2 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $1 + f64.const 0.002974357433599673 + local.get $2 f64.const 0.009465647849436732 f64.mul f64.add @@ -10827,9 +10833,9 @@ (local $2 f64) (local $3 f64) (local $4 f64) - (local $5 i32) + (local $5 f64) (local $6 i32) - (local $7 f64) + (local $7 i32) (local $8 i64) (local $9 f64) local.get $0 @@ -10838,18 +10844,18 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $5 + local.tee $6 i32.const 31 i32.shr_u - local.set $6 - local.get $5 + local.set $7 + local.get $6 i32.const 2147483647 i32.and - local.tee $5 + local.tee $6 i32.const 1072243195 i32.le_u if - local.get $5 + local.get $6 i32.const 1044816030 i32.lt_u if @@ -10863,34 +10869,34 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $1 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $2 + local.set $1 local.get $0 - local.get $1 + local.get $4 local.get $0 f64.mul f64.const -0.16666666666666632 + local.get $4 local.get $1 - local.get $2 f64.mul f64.add f64.mul @@ -10903,13 +10909,13 @@ f64.mul local.tee $1 f64.mul - local.tee $2 + local.tee $3 f64.sub - local.tee $4 + local.tee $5 f64.const 1 - local.get $4 + local.get $5 f64.sub - local.get $2 + local.get $3 f64.sub local.get $1 local.get $1 @@ -10926,8 +10932,8 @@ local.get $1 local.get $1 f64.mul - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul f64.const -2.7557314351390663e-07 local.get $1 @@ -10950,7 +10956,7 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $5 + local.get $6 i32.const 2139095040 i32.ge_u if @@ -10970,28 +10976,28 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $5 + local.tee $6 i32.const 1094263291 i32.lt_u if - local.get $5 + local.get $6 i32.const 20 i32.shr_u - local.tee $6 + local.tee $7 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $2 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $1 - local.get $2 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $4 + local.tee $5 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11006,12 +11012,12 @@ i32.const 16 i32.gt_u if - local.get $2 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $1 local.get $1 - local.get $2 + local.get $3 f64.const 6.077100506303966e-11 f64.mul local.tee $0 @@ -11021,10 +11027,10 @@ local.get $0 f64.sub f64.sub - local.set $4 - local.get $6 + local.set $5 + local.get $7 local.get $1 - local.get $4 + local.get $5 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11039,12 +11045,12 @@ i32.const 49 i32.gt_u if - local.get $2 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $1 local.get $1 - local.get $2 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul local.tee $0 @@ -11054,9 +11060,9 @@ local.get $0 f64.sub f64.sub - local.set $4 + local.set $5 local.get $1 - local.get $4 + local.get $5 f64.sub local.set $0 end @@ -11066,111 +11072,111 @@ local.get $1 local.get $0 f64.sub - local.get $4 + local.get $5 f64.sub global.set $~lib/math/rempio2_y1 - local.get $2 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.3 end i32.const 0 local.get $8 call $~lib/math/pio2_large_quot - local.tee $5 + local.tee $6 i32.sub - local.get $5 local.get $6 + local.get $7 select end - local.set $6 + local.set $7 f64.const 0.00833333333332249 global.get $~lib/math/rempio2_y0 local.tee $0 - local.tee $7 - local.get $7 + local.tee $4 + local.get $4 f64.mul - local.tee $3 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $3 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $4 - local.get $7 - local.get $3 + local.set $5 + local.get $4 + local.get $2 f64.const 0.5 global.get $~lib/math/rempio2_y1 local.tee $9 local.tee $1 f64.mul - local.get $3 - local.get $7 - f64.mul - local.tee $2 + local.get $2 local.get $4 f64.mul + local.tee $3 + local.get $5 + f64.mul f64.sub f64.mul local.get $1 f64.sub - local.get $2 + local.get $3 f64.const -0.16666666666666632 f64.mul f64.sub f64.sub - local.tee $4 - local.set $2 + local.tee $5 + local.set $3 f64.const 1 f64.const 0.5 local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $2 f64.mul - local.tee $7 + local.tee $4 f64.sub local.tee $1 f64.const 1 local.get $1 f64.sub - local.get $7 + local.get $4 f64.sub - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $3 + local.get $2 f64.const -0.001388888888887411 - local.get $3 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.mul local.tee $1 local.get $1 f64.mul f64.const -2.7557314351390663e-07 - local.get $3 + local.get $2 f64.const 2.087572321298175e-09 - local.get $3 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -11187,27 +11193,27 @@ f64.add local.tee $0 local.set $1 - local.get $6 + local.get $7 i32.const 1 i32.and if - local.get $4 + local.get $5 f64.neg local.set $1 local.get $0 - local.set $2 + local.set $3 end - local.get $6 + local.get $7 i32.const 2 i32.and if (result f64) local.get $1 f64.neg local.set $1 - local.get $2 + local.get $3 f64.neg else - local.get $2 + local.get $3 end global.set $~lib/math/NativeMath.sincos_sin local.get $1 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 45b319b8c4..ac4d89d340 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1492,38 +1492,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -1534,7 +1535,7 @@ i32.load8_s i32.store8 local.get $3 - local.get $5 + local.get $6 local.get $2 i32.load8_s call $~lib/util/hash/hash8 @@ -1543,10 +1544,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -1554,58 +1555,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 25 ;) (param $0 i32) (param $1 i32) (result i32) @@ -1717,7 +1721,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1738,24 +1742,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -2695,38 +2699,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -2737,7 +2742,7 @@ i32.load8_u i32.store8 local.get $3 - local.get $5 + local.get $6 local.get $2 i32.load8_u call $~lib/util/hash/hash8 @@ -2746,10 +2751,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -2757,58 +2762,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 38 ;) (param $0 i32) (param $1 i32) (result i32) @@ -3453,38 +3461,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -3495,7 +3504,7 @@ i32.load16_s i32.store16 local.get $3 - local.get $5 + local.get $6 local.get $2 i32.load16_s call $~lib/util/hash/hash16 @@ -3504,10 +3513,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -3515,58 +3524,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 47 ;) (param $0 i32) (param $1 i32) (result i32) @@ -4203,38 +4215,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -4245,7 +4258,7 @@ i32.load16_u i32.store16 local.get $3 - local.get $5 + local.get $6 local.get $2 i32.load16_u call $~lib/util/hash/hash16 @@ -4254,10 +4267,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -4265,58 +4278,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 55 ;) (param $0 i32) (param $1 i32) (result i32) @@ -4973,38 +4989,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -5015,7 +5032,7 @@ i32.load i32.store local.get $3 - local.get $5 + local.get $6 local.get $2 i32.load call $~lib/util/hash/hash32 @@ -5024,10 +5041,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -5035,58 +5052,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 64 ;) (param $0 i32) (param $1 i32) (result i32) @@ -6224,38 +6244,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=8 i32.const 1 i32.and @@ -6266,7 +6287,7 @@ i64.load i64.store local.get $3 - local.get $5 + local.get $6 local.get $2 i64.load call $~lib/util/hash/hash64 @@ -6275,10 +6296,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -6286,58 +6307,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 16 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 77 ;) (param $0 i32) (param $1 i64) (result i32) @@ -6348,7 +6372,7 @@ local.get $1 local.get $1 call $~lib/util/hash/hash64 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if @@ -6386,11 +6410,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $3 i32.const 1 i32.add i32.store offset=16 - local.get $4 + local.get $3 i32.const 4 i32.shl i32.add @@ -6406,7 +6430,7 @@ local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.and @@ -7374,38 +7398,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=4 i32.const 1 i32.and @@ -7416,7 +7441,7 @@ f32.load f32.store local.get $3 - local.get $5 + local.get $6 local.get $2 f32.load i32.reinterpret_f32 @@ -7426,10 +7451,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=4 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -7437,58 +7462,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 8 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 88 ;) (param $0 i32) (param $1 f32) (result i32) @@ -7500,7 +7528,7 @@ local.get $1 i32.reinterpret_f32 call $~lib/util/hash/hash32 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if @@ -7538,11 +7566,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $3 i32.const 1 i32.add i32.store offset=16 - local.get $4 + local.get $3 i32.const 3 i32.shl i32.add @@ -7558,7 +7586,7 @@ local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.and @@ -8147,38 +8175,39 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $5 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $6 + local.tee $7 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 - local.tee $2 + local.tee $4 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $7 - local.get $4 + local.set $8 + local.get $5 local.set $3 loop $while-continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $8 i32.ne if - local.get $2 + local.get $4 + local.tee $2 i32.load offset=8 i32.const 1 i32.and @@ -8189,7 +8218,7 @@ f64.load f64.store local.get $3 - local.get $5 + local.get $6 local.get $2 f64.load i64.reinterpret_f64 @@ -8199,10 +8228,10 @@ i32.const 2 i32.shl i32.add - local.tee $8 + local.tee $2 i32.load i32.store offset=8 - local.get $8 + local.get $2 local.get $3 i32.store local.get $3 @@ -8210,58 +8239,61 @@ i32.add local.set $3 end - local.get $2 + local.get $4 i32.const 16 i32.add - local.set $2 + local.set $4 br $while-continue|0 end end - local.get $5 - local.tee $2 + local.get $6 + local.tee $3 local.get $0 + local.tee $2 i32.load - local.tee $3 + local.tee $4 i32.ne if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 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 $2 + local.get $3 i32.store - local.get $0 + local.get $2 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 - local.get $0 - i32.load offset=8 + local.get $2 + local.set $1 + local.get $5 local.tee $2 + local.get $1 + i32.load offset=8 + local.tee $3 i32.ne if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 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 $1 + local.get $2 i32.store offset=8 - local.get $0 - local.get $6 + local.get $1 + local.get $7 i32.store offset=12 - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.load offset=20 i32.store offset=16 - local.get $5 + local.get $6 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 97 ;) (param $0 i32) (param $1 f64) (result i32) @@ -8273,7 +8305,7 @@ local.get $1 i64.reinterpret_f64 call $~lib/util/hash/hash64 - local.tee $3 + local.tee $4 call $~lib/set/Set#find i32.eqz if @@ -8311,11 +8343,11 @@ local.get $0 local.get $0 i32.load offset=16 - local.tee $4 + local.tee $3 i32.const 1 i32.add i32.store offset=16 - local.get $4 + local.get $3 i32.const 4 i32.shl i32.add @@ -8331,7 +8363,7 @@ local.get $2 local.get $0 i32.load - local.get $3 + local.get $4 local.get $0 i32.load offset=4 i32.and diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 16c9c5158c..1e782f73c4 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2328,6 +2328,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $0 call $~lib/string/String#get:length local.tee $7 @@ -2341,14 +2343,14 @@ i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $6 + local.set $5 loop $for-loop|0 - local.get $5 + local.get $6 local.get $7 i32.lt_u if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add @@ -2358,7 +2360,7 @@ i32.shr_u if block $for-continue|0 - local.get $5 + local.get $6 local.get $7 i32.const 1 i32.sub @@ -2372,26 +2374,26 @@ select if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $2 + local.tee $8 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 - local.get $2 + local.set $6 + local.get $8 i32.const 1023 i32.and local.get $1 - local.tee $4 + local.tee $2 i32.const 1023 i32.and i32.const 10 @@ -2403,13 +2405,13 @@ i32.const 131072 i32.ge_u if - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl i32.add - local.get $4 local.get $2 + local.get $8 i32.const 16 i32.shl i32.or @@ -2426,7 +2428,7 @@ i32.const 304 i32.eq if - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2442,7 +2444,7 @@ i32.const 931 i32.eq if - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2452,56 +2454,58 @@ i32.gt_u if (result i32) block $~lib/util/string/isFinalSigma|inlined.0 (result i32) - i32.const 0 + local.get $0 local.set $8 i32.const 0 - local.get $5 + local.set $10 + i32.const 0 + local.get $6 + local.tee $9 local.tee $1 i32.const 30 i32.sub - local.tee $4 + local.tee $2 i32.const 0 - local.get $4 + local.get $2 i32.gt_s select - local.set $9 + local.set $11 loop $while-continue|1 local.get $1 - local.get $9 + local.get $11 i32.gt_s if - block $~lib/util/string/codePointBefore|inlined.0 + block $~lib/util/string/codePointBefore|inlined.0 (result i32) + local.get $1 + local.set $2 + i32.const -1 local.get $1 - local.tee $4 i32.const 0 i32.le_s - if - i32.const -1 - local.set $1 - br $~lib/util/string/codePointBefore|inlined.0 - end - local.get $0 - local.get $4 + br_if $~lib/util/string/codePointBefore|inlined.0 + drop + local.get $8 + local.get $2 i32.const 1 i32.sub i32.const 1 i32.shl i32.add i32.load16_u - local.tee $1 + local.tee $4 i32.const 64512 i32.and i32.const 56320 i32.eq - local.get $4 + local.get $2 i32.const 2 i32.sub i32.const 0 i32.ge_s i32.and if - local.get $0 - local.get $4 + local.get $8 + local.get $2 i32.const 2 i32.sub i32.const 1 @@ -2514,7 +2518,7 @@ i32.const 55296 i32.eq if - local.get $1 + local.get $4 i32.const 1023 i32.and local.get $2 @@ -2525,33 +2529,33 @@ i32.add i32.const 65536 i32.add - local.set $1 br $~lib/util/string/codePointBefore|inlined.0 end end - local.get $1 + i32.const 65533 + local.get $4 + local.get $4 i32.const 63488 i32.and i32.const 55296 i32.eq - if - i32.const 65533 - local.set $1 - end + select end - local.get $1 local.tee $2 + local.set $4 + local.get $2 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $2 + local.get $4 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if + i32.const 0 local.get $2 i32.const 127370 i32.lt_u @@ -2562,15 +2566,13 @@ else i32.const 0 end - if (result i32) - i32.const 1 - else - i32.const 0 - br $~lib/util/string/isFinalSigma|inlined.0 - end - local.set $8 + i32.eqz + br_if $~lib/util/string/isFinalSigma|inlined.0 + drop + i32.const 1 + local.set $10 end - local.get $4 + local.get $1 local.get $2 i32.const 65536 i32.ge_s @@ -2582,11 +2584,11 @@ end end i32.const 0 - local.get $8 + local.get $10 i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop - local.get $5 + local.get $9 i32.const 1 i32.add local.tee $1 @@ -2598,13 +2600,13 @@ local.get $7 i32.lt_s select - local.set $8 + local.set $9 loop $while-continue|2 local.get $1 - local.get $8 + local.get $9 i32.lt_s if - local.get $0 + local.get $8 local.get $1 i32.const 1 i32.shl @@ -2622,7 +2624,7 @@ i32.ne i32.and if - local.get $0 + local.get $8 local.get $1 i32.const 1 i32.shl @@ -2645,11 +2647,13 @@ end end local.get $2 + local.set $4 + local.get $2 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $2 + local.get $4 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2657,11 +2661,12 @@ i32.eqz if local.get $2 + local.tee $1 i32.const 127370 i32.lt_u if (result i32) i32.const 8752 - local.get $2 + local.get $1 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2698,7 +2703,7 @@ i32.const 25 i32.le_u if - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2717,7 +2722,7 @@ i32.const 65536 i32.lt_s if - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2725,7 +2730,7 @@ local.get $1 i32.store16 else - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2757,7 +2762,7 @@ end end else - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl @@ -2775,10 +2780,10 @@ i32.or i32.store16 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $3 i32.const 1 i32.add @@ -2786,7 +2791,7 @@ br $for-loop|0 end end - local.get $6 + local.get $5 local.get $3 i32.const 1 i32.shl diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 95c776a240..fbb5ed25f4 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -3557,6 +3557,7 @@ local.set $4 i32.const 0 local.get $0 + local.tee $3 i32.load16_u i32.const 32 i32.or @@ -3564,7 +3565,7 @@ i32.ne br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $0 + local.get $3 i32.const 2 i32.add local.tee $3 @@ -3996,67 +3997,67 @@ (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.const 640 - local.get $0 - select - local.set $2 - local.get $1 - call $~lib/rt/pure/__retain - local.tee $1 - i32.eqz - if + block $__inlined_func$~lib/string/String#concat (result i32) + local.get $0 i32.const 640 - local.set $0 + local.get $0 + select + local.set $2 local.get $1 - i32.const 640 - i32.ne + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz if - local.get $1 - call $~lib/rt/pure/__release + i32.const 640 + local.set $1 + local.get $0 + i32.const 640 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__release + end + i32.const 640 + local.set $0 end - i32.const 640 - local.set $1 - end - block $__inlined_func$~lib/string/String#concat local.get $2 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $3 - local.get $1 + local.get $0 call $~lib/string/String#get:length i32.const 1 i32.shl local.tee $4 i32.add - local.tee $0 + local.tee $1 i32.eqz if - i32.const 272 - local.set $0 - local.get $1 + local.get $0 call $~lib/rt/pure/__release + i32.const 272 + local.tee $1 br $__inlined_func$~lib/string/String#concat end - local.get $0 + local.get $1 i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 local.get $2 local.get $3 call $~lib/memory/memory.copy - local.get $0 + local.get $1 local.get $3 i32.add - local.get $1 + local.get $0 local.get $4 call $~lib/memory/memory.copy - local.get $1 + local.get $0 call $~lib/rt/pure/__release + local.get $1 end - local.get $0 ) (func $~lib/string/String.__gt (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5870,33 +5871,32 @@ ) (func $~lib/util/number/genDigits (; 68 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) - (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $9 + local.set $8 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $13 + local.tee $12 i64.and - local.set $12 + local.set $11 local.get $3 - local.get $10 + local.get $9 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -5920,10 +5920,11 @@ block $case2|1 block $case1|1 local.get $4 + local.tee $2 i32.const 10 i32.ne if - local.get $4 + local.get $2 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -5931,7 +5932,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -5941,7 +5942,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -5951,7 +5952,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -5961,7 +5962,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -5971,7 +5972,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -5981,7 +5982,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -5991,7 +5992,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -6001,7 +6002,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -6011,7 +6012,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -6019,43 +6020,42 @@ br $break|1 end local.get $7 - local.set $8 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $8 + local.set $2 end + local.get $2 local.get $6 - local.get $8 i32.or if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add - local.get $8 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $12 + local.get $11 local.get $7 i64.extend_i32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl i64.add @@ -6073,7 +6073,7 @@ i32.const 15280 i32.add i64.load32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl local.set $3 @@ -6089,19 +6089,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $9 + local.get $8 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.lt_u select i32.const 0 @@ -6112,7 +6112,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $9 + local.get $8 i64.lt_u select select @@ -6137,19 +6137,19 @@ br $while-continue|0 end end - local.get $10 + local.get $9 i64.extend_i32_s - local.set $14 + local.set $13 loop $while-continue|4 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $12 + local.get $11 i64.const 10 i64.mul local.tee $3 - local.get $14 + local.get $13 i64.shr_u local.tee $1 local.get $6 @@ -6158,13 +6158,8 @@ i64.const 0 i64.ne if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add @@ -6175,15 +6170,19 @@ i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 local.get $3 - local.get $13 + local.get $12 i64.and - local.tee $12 + local.tee $11 local.get $5 i64.ge_u br_if $while-continue|4 @@ -6191,9 +6190,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $12 + local.get $11 local.set $1 - local.get $9 + local.get $8 i32.const 0 local.get $4 i32.sub @@ -6220,13 +6219,13 @@ local.get $1 i64.sub local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.lt_u @@ -6235,7 +6234,7 @@ local.get $5 local.get $1 i64.sub - local.get $11 + local.get $10 i64.ge_u i32.const 0 local.get $1 @@ -6249,7 +6248,7 @@ i32.sub local.set $4 local.get $1 - local.get $11 + local.get $10 i64.add local.set $1 br $while-continue|6 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index c5dfee9779..6055d65efe 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -621,12 +621,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 @@ -635,7 +635,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 local.tee $2 @@ -645,7 +645,7 @@ i32.mul i32.add local.set $7 - local.get $4 + local.get $5 local.set $3 loop $while-continue|0 local.get $2 @@ -667,7 +667,7 @@ i32.load offset=4 i32.store offset=4 local.get $3 - local.get $5 + local.get $4 local.get $2 i32.load call $~lib/util/hash/hashStr @@ -694,7 +694,7 @@ br $while-continue|0 end end - local.get $5 + local.get $4 local.tee $2 local.get $0 i32.load @@ -706,14 +706,11 @@ local.get $0 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 local.get $0 i32.load offset=8 - i32.ne drop local.get $0 - local.get $1 + local.get $5 i32.store offset=8 local.get $0 local.get $6 @@ -893,12 +890,12 @@ local.get $1 i32.const 1 i32.add - local.tee $4 + local.tee $2 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $4 + local.set $4 + local.get $2 i32.const 3 i32.shl i32.const 3 @@ -907,7 +904,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 + local.set $5 local.get $0 i32.load offset=8 local.tee $2 @@ -917,7 +914,7 @@ i32.mul i32.add local.set $7 - local.get $4 + local.get $5 local.set $3 loop $while-continue|0 local.get $2 @@ -939,7 +936,7 @@ i32.load offset=4 i32.store offset=4 local.get $3 - local.get $5 + local.get $4 local.get $2 i32.load call $~lib/util/hash/hash32 @@ -966,7 +963,7 @@ br $while-continue|0 end end - local.get $5 + local.get $4 local.tee $2 local.get $0 i32.load @@ -978,14 +975,11 @@ local.get $0 local.get $1 i32.store offset=4 - local.get $4 - local.tee $1 local.get $0 i32.load offset=8 - i32.ne drop local.get $0 - local.get $1 + local.get $5 i32.store offset=8 local.get $0 local.get $6 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 18a6ce3b16..ecb9561cfa 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1538,7 +1538,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1560,24 +1560,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -4404,8 +4404,7 @@ i32.const 16 i32.add ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 92 ;) - (local $0 i32) + (func $~lib/typedarray/Int8Array#filter (; 92 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4413,98 +4412,101 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - i32.const 6 - call $~lib/typedarray/Int8Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set local.get $0 - local.set $1 - i32.const 0 - local.set $0 - local.get $1 + local.tee $6 i32.load offset=8 - local.set $5 + local.set $3 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $5 + local.set $1 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 + local.set $4 + local.get $0 i32.load offset=4 - local.set $8 + local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $0 local.get $3 - local.get $5 i32.lt_s if - local.get $3 - local.get $8 + local.get $0 + local.get $7 i32.add i32.load8_s - local.set $7 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 + local.get $5 + local.get $0 + local.get $6 call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 + local.get $2 local.get $4 - local.get $6 i32.add - local.get $7 + local.get $5 i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|0 end end + local.get $1 + local.get $4 local.get $2 - local.get $6 - local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $4 + local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $0 i32.store offset=8 - local.get $2 - local.get $4 + local.get $1 + local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 93 ;) + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Int8Array#constructor 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 5 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $0 + call $~lib/typedarray/Int8Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4514,7 +4516,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.ne @@ -4526,7 +4528,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -4539,7 +4541,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -4552,7 +4554,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 5 @@ -4565,20 +4567,19 @@ call $~lib/builtins/abort unreachable end - local.get $1 - 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/Uint8Array,u8>~anonymous|0 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 94 ;) - (local $0 i32) + (func $~lib/typedarray/Uint8Array#filter (; 95 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4586,98 +4587,101 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set local.get $0 - local.set $1 - i32.const 0 - local.set $0 - local.get $1 + local.tee $6 i32.load offset=8 - local.set $5 + local.set $3 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $5 + local.set $1 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 + local.set $4 + local.get $0 i32.load offset=4 - local.set $8 + local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $0 local.get $3 - local.get $5 i32.lt_s if - local.get $3 - local.get $8 + local.get $0 + local.get $7 i32.add i32.load8_u - local.set $7 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 + local.get $5 + local.get $0 + local.get $6 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 + local.get $2 local.get $4 - local.get $6 i32.add - local.get $7 + local.get $5 i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|0 end end + local.get $1 + local.get $4 local.get $2 - local.get $6 - local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $4 + local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $0 i32.store offset=8 - local.get $2 - local.get $4 + local.get $1 + local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 96 ;) + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor 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 5 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + call $~lib/typedarray/Uint8Array#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4687,7 +4691,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.ne @@ -4699,7 +4703,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 3 @@ -4712,7 +4716,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -4725,7 +4729,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 5 @@ -4738,13 +4742,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - 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/Uint8ClampedArray,u8> (; 95 ;) - (local $0 i32) + (func $~lib/typedarray/Uint8ClampedArray#filter (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4752,98 +4755,101 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 - local.set $1 - i32.const 0 - local.set $0 - local.get $1 + local.tee $6 i32.load offset=8 - local.set $5 + local.set $3 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $5 + local.set $1 + local.get $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $6 - local.get $1 + local.set $4 + local.get $0 i32.load offset=4 - local.set $8 + local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $0 local.get $3 - local.get $5 i32.lt_s if - local.get $3 - local.get $8 + local.get $0 + local.get $7 i32.add i32.load8_u - local.set $7 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $7 - local.get $3 - local.get $1 + local.get $5 + local.get $0 + local.get $6 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if - local.get $0 - local.tee $4 - i32.const 1 - i32.add - local.set $0 + local.get $2 local.get $4 - local.get $6 i32.add - local.get $7 + local.get $5 i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 end - local.get $3 + local.get $0 i32.const 1 i32.add - local.set $3 + local.set $0 br $for-loop|0 end end + local.get $1 + local.get $4 local.get $2 - local.get $6 - local.get $0 call $~lib/rt/tlsf/__realloc - local.tee $4 + local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $1 local.get $2 - local.get $0 i32.store offset=8 - local.get $2 - local.get $4 + local.get $1 + local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 98 ;) + (local $0 i32) + (local $1 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor 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 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#filter + local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4853,7 +4859,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 3 i32.ne @@ -4865,7 +4871,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 @@ -4878,7 +4884,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -4891,7 +4897,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 @@ -4904,12 +4910,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - 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/Int16Array,i16>~anonymous|0 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -4918,7 +4924,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 97 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4926,84 +4932,85 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 + local.tee $6 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $1 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $1 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $3 + local.get $1 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_s - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength + local.get $5 + local.get $3 local.get $6 - local.get $2 - local.get $0 call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 if - local.get $3 - local.tee $8 + local.get $4 + local.get $0 i32.const 1 + i32.shl i32.add - local.set $3 local.get $5 - local.get $8 + i32.store16 + local.get $0 i32.const 1 - i32.shl i32.add - local.get $6 - i32.store16 + local.set $0 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $1 - local.get $5 - local.get $3 + local.get $2 + local.get $4 + local.get $0 i32.const 1 i32.shl - local.tee $0 + local.tee $1 call $~lib/rt/tlsf/__realloc - local.tee $3 + local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $2 local.get $1 - local.get $0 i32.store offset=8 - local.get $1 - local.get $3 + local.get $2 + local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 98 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 101 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5098,14 +5105,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 100 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5113,84 +5120,85 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 + local.tee $6 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $1 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $1 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 local.set $7 + i32.const 0 + local.set $0 loop $for-loop|0 - local.get $2 - local.get $4 + local.get $3 + local.get $1 i32.lt_s if local.get $7 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_u - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength + local.get $5 + local.get $3 local.get $6 - local.get $2 - local.get $0 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 if - local.get $3 - local.tee $8 + local.get $4 + local.get $0 i32.const 1 + i32.shl i32.add - local.set $3 local.get $5 - local.get $8 + i32.store16 + local.get $0 i32.const 1 - i32.shl i32.add - local.get $6 - i32.store16 + local.set $0 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end - local.get $1 - local.get $5 - local.get $3 + local.get $2 + local.get $4 + local.get $0 i32.const 1 i32.shl - local.tee $0 + local.tee $1 call $~lib/rt/tlsf/__realloc - local.tee $3 + local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $2 local.get $1 - local.get $0 i32.store offset=8 - local.get $1 - local.get $3 + local.get $2 + local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 101 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 104 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5285,95 +5293,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 105 ;) (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 (; 103 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 106 ;) (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.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 2 i32.shl i32.add i32.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 i32.const 2 i32.gt_s if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 2 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 104 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 107 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5468,95 +5476,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 108 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 106 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 109 ;) (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.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 2 i32.shl i32.add i32.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 i32.const 2 i32.gt_u if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 2 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 107 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 110 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5651,95 +5659,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 108 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 109 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) + (local $5 i64) + (local $6 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 3 i32.shl i32.add i64.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 i64.const 2 i64.gt_s if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 3 i32.shl i32.add - local.get $6 + local.get $5 i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 3 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 110 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 113 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5834,95 +5842,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 111 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 114 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 112 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) - (local $7 i32) + (local $5 i64) + (local $6 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 3 i32.shl i32.add i64.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 i64.const 2 i64.gt_u if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 3 i32.shl i32.add - local.get $6 + local.get $5 i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 3 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 113 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 116 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6017,95 +6025,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 114 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 117 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 115 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 118 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 f32) - (local $7 i32) + (local $5 f32) + (local $6 i32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 f32.const 2 f32.gt if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 2 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 116 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 119 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6200,95 +6208,95 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 117 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 120 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 118 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 121 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 i32) + (local $5 f64) + (local $6 i32) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $4 + local.set $2 + local.get $3 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $4 local.get $0 i32.load offset=4 - local.set $7 + local.set $6 + i32.const 0 + local.set $0 loop $for-loop|0 + local.get $1 local.get $3 - local.get $4 i32.lt_s if - local.get $7 - local.get $3 + local.get $6 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $5 i32.const 3 global.set $~argumentsLength - local.get $6 + local.get $5 f64.const 2 f64.gt if - local.get $2 - local.tee $0 - i32.const 1 - i32.add - local.set $2 - local.get $5 + local.get $4 local.get $0 i32.const 3 i32.shl i32.add - local.get $6 + local.get $5 f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|0 end end - local.get $1 - local.get $5 local.get $2 + local.get $4 + local.get $0 i32.const 3 i32.shl local.tee $0 call $~lib/rt/tlsf/__realloc - local.tee $2 + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $2 local.get $0 i32.store offset=8 - local.get $1 local.get $2 - i32.store offset=4 local.get $1 + i32.store offset=4 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 119 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 122 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6383,14 +6391,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 123 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 121 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 124 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6429,13 +6437,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#some (; 123 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 126 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6474,14 +6482,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 125 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 128 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6524,13 +6532,13 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $~lib/typedarray/Uint16Array#some (; 127 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 130 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6573,12 +6581,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 131 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 129 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 132 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6621,16 +6629,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 130 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 133 ;) (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 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 134 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 132 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 135 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6673,16 +6681,16 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 133 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 136 ;) (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 (; 134 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 137 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6725,17 +6733,17 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 136 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 139 ;) (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 (; 137 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 140 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 141 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6778,12 +6786,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 139 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 142 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 140 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6822,14 +6830,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 142 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6868,7 +6876,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#findIndex (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 146 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6911,14 +6919,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 145 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6961,7 +6969,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#findIndex (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 149 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7004,12 +7012,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 151 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7052,12 +7060,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 149 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 152 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 150 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 153 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7100,12 +7108,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 151 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 154 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 152 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7148,12 +7156,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 153 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 156 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7163,7 +7171,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 158 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7203,13 +7211,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 159 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 157 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 160 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7249,7 +7257,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 158 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7259,7 +7267,7 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 159 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7303,7 +7311,7 @@ i32.const 1 end ) - (func $~lib/typedarray/Uint16Array#every (; 160 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 163 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7347,13 +7355,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 162 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 165 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7397,13 +7405,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 163 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 164 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 167 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7447,13 +7455,13 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 165 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 168 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $~lib/math/NativeMathf.mod (; 166 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 169 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7600,13 +7608,13 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 167 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 170 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 168 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7650,7 +7658,7 @@ i32.const 1 end ) - (func $~lib/math/NativeMath.mod (; 169 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 172 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -7804,13 +7812,13 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 170 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 173 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 174 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7854,7 +7862,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -7899,7 +7907,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 173 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 176 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7932,7 +7940,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -7977,7 +7985,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -8018,7 +8026,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 176 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 179 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8055,7 +8063,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 177 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 180 ;) (param $0 i64) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -8097,7 +8105,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 178 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 181 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8134,7 +8142,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 179 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 182 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -8176,7 +8184,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 180 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 183 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -8218,7 +8226,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#reverse (; 181 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 184 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8270,7 +8278,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 182 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 185 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8426,7 +8434,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 183 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 186 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8478,7 +8486,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 184 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 187 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8539,7 +8547,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 185 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 188 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8688,7 +8696,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 186 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8749,7 +8757,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 190 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8898,7 +8906,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 188 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 191 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8956,7 +8964,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9024,7 +9032,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 190 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 193 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9179,7 +9187,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 191 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 194 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9237,7 +9245,7 @@ end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 195 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9305,7 +9313,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 193 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 196 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9454,7 +9462,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 194 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 197 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9512,7 +9520,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 195 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 198 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9656,7 +9664,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 196 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9724,7 +9732,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 197 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 200 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9867,7 +9875,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 198 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 201 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9925,7 +9933,7 @@ end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 202 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9993,7 +10001,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 200 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 203 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10139,7 +10147,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 201 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10207,7 +10215,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 202 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 205 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10353,7 +10361,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 203 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 206 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10411,7 +10419,7 @@ end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 207 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10479,7 +10487,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 205 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 208 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10625,7 +10633,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (; 206 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 209 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10683,7 +10691,7 @@ end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 207 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 210 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10830,7 +10838,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (; 208 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 211 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -10892,7 +10900,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 209 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 212 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -10949,7 +10957,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 210 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 213 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -10970,7 +10978,7 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 211 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 214 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11390,7 +11398,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 212 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 215 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11807,7 +11815,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 213 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 216 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12224,7 +12232,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 214 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 217 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -12290,7 +12298,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 218 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -12351,7 +12359,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 216 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 219 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -12374,7 +12382,7 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 217 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 220 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12793,7 +12801,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 218 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 221 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13210,7 +13218,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 219 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 222 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -13274,7 +13282,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 220 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 223 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -13333,7 +13341,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 221 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 224 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -13356,7 +13364,7 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 222 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 225 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13772,7 +13780,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 223 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 226 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14187,7 +14195,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 224 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 227 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -14251,7 +14259,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 225 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 228 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -14310,7 +14318,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 226 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 229 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -14333,7 +14341,7 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 227 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 230 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14749,7 +14757,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 228 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 231 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15165,7 +15173,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 229 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 232 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -15229,7 +15237,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 230 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 233 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -15288,7 +15296,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 231 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 234 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15311,7 +15319,7 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 232 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 235 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15727,7 +15735,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 233 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 236 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -15791,7 +15799,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 234 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 237 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -15850,7 +15858,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 235 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 238 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15873,7 +15881,7 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 236 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 239 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16290,7 +16298,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount32 (; 237 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 240 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -16338,7 +16346,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -16365,7 +16373,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 239 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 242 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16407,7 +16415,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#get:length (; 240 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 243 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -16415,7 +16423,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/number/itoa_stream (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 244 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -16470,7 +16478,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 242 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 245 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16544,7 +16552,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 243 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 246 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16647,14 +16655,14 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#join (; 244 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#join (; 247 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (; 245 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -16730,7 +16738,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 246 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 249 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -16764,7 +16772,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/utoa32 (; 247 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 250 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -16787,7 +16795,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -16817,7 +16825,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 249 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 252 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16920,14 +16928,14 @@ end local.get $2 ) - (func $~lib/typedarray/Uint8Array#join (; 250 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#join (; 253 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 254 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -16982,7 +16990,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 252 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17089,7 +17097,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#join (; 253 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (; 256 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17098,7 +17106,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 254 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17128,7 +17136,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17235,7 +17243,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint16Array#join (; 256 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (; 259 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17244,7 +17252,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17286,7 +17294,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17393,7 +17401,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#join (; 259 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#join (; 262 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17402,7 +17410,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 263 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17426,7 +17434,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17533,7 +17541,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint32Array#join (; 262 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#join (; 265 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17542,7 +17550,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount64 (; 263 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 266 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -17595,7 +17603,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 264 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 267 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -17625,7 +17633,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -17686,7 +17694,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 266 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i64) (local $4 i32) @@ -17851,7 +17859,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#join (; 267 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 270 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17860,7 +17868,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 271 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -17900,7 +17908,7 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 272 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -18045,7 +18053,7 @@ end local.get $2 ) - (func $~lib/typedarray/Uint64Array#join (; 270 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 273 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -18054,35 +18062,34 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 271 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 274 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) + (local $8 i64) + (local $9 i32) + (local $10 i64) (local $11 i64) (local $12 i64) (local $13 i64) - (local $14 i64) local.get $3 local.get $1 i64.sub - local.set $9 + local.set $8 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub - local.tee $13 + local.tee $12 i64.and - local.set $12 + local.set $11 local.get $3 - local.get $10 + local.get $9 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -18106,10 +18113,11 @@ block $case2|1 block $case1|1 local.get $4 + local.tee $2 i32.const 10 i32.ne if - local.get $4 + local.get $2 i32.const 1 i32.sub br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 @@ -18117,7 +18125,7 @@ local.get $7 i32.const 1000000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000000 i32.rem_u @@ -18127,7 +18135,7 @@ local.get $7 i32.const 100000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000000 i32.rem_u @@ -18137,7 +18145,7 @@ local.get $7 i32.const 10000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000000 i32.rem_u @@ -18147,7 +18155,7 @@ local.get $7 i32.const 1000000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000000 i32.rem_u @@ -18157,7 +18165,7 @@ local.get $7 i32.const 100000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100000 i32.rem_u @@ -18167,7 +18175,7 @@ local.get $7 i32.const 10000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10000 i32.rem_u @@ -18177,7 +18185,7 @@ local.get $7 i32.const 1000 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 1000 i32.rem_u @@ -18187,7 +18195,7 @@ local.get $7 i32.const 100 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 100 i32.rem_u @@ -18197,7 +18205,7 @@ local.get $7 i32.const 10 i32.div_u - local.set $8 + local.set $2 local.get $7 i32.const 10 i32.rem_u @@ -18205,43 +18213,42 @@ br $break|1 end local.get $7 - local.set $8 + local.set $2 i32.const 0 local.set $7 br $break|1 end i32.const 0 - local.set $8 + local.set $2 end + local.get $2 local.get $6 - local.get $8 i32.or if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add - local.get $8 + local.get $2 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $12 + local.get $11 local.get $7 i64.extend_i32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl i64.add @@ -18259,7 +18266,7 @@ i32.const 3104 i32.add i64.load32_u - local.get $10 + local.get $9 i64.extend_i32_s i64.shl local.set $3 @@ -18275,19 +18282,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $9 + local.get $8 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $9 + local.get $8 i64.lt_u select i32.const 0 @@ -18298,7 +18305,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $9 + local.get $8 i64.lt_u select select @@ -18323,19 +18330,19 @@ br $while-continue|0 end end - local.get $10 + local.get $9 i64.extend_i32_s - local.set $14 + local.set $13 loop $while-continue|4 (result i32) local.get $5 i64.const 10 i64.mul local.set $5 - local.get $12 + local.get $11 i64.const 10 i64.mul local.tee $3 - local.get $14 + local.get $13 i64.shr_u local.tee $1 local.get $6 @@ -18344,13 +18351,8 @@ i64.const 0 i64.ne if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 local.get $0 - local.get $2 + local.get $6 i32.const 1 i32.shl i32.add @@ -18361,15 +18363,19 @@ i32.const 48 i32.add i32.store16 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $4 i32.const 1 i32.sub local.set $4 local.get $3 - local.get $13 + local.get $12 i64.and - local.tee $12 + local.tee $11 local.get $5 i64.ge_u br_if $while-continue|4 @@ -18377,9 +18383,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $12 + local.get $11 local.set $1 - local.get $9 + local.get $8 i32.const 0 local.get $4 i32.sub @@ -18406,13 +18412,13 @@ local.get $1 i64.sub local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $11 + local.get $10 i64.add local.get $3 i64.lt_u @@ -18421,7 +18427,7 @@ local.get $5 local.get $1 i64.sub - local.get $11 + local.get $10 i64.ge_u i32.const 0 local.get $1 @@ -18435,7 +18441,7 @@ i32.sub local.set $4 local.get $1 - local.get $11 + local.get $10 i64.add local.set $1 br $while-continue|6 @@ -18447,7 +18453,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 275 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -18692,7 +18698,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 273 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 276 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) (local $4 i32) @@ -18985,7 +18991,7 @@ local.get $8 i32.add ) - (func $~lib/util/number/dtoa (; 274 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 277 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -19039,7 +19045,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 275 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 278 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -19110,7 +19116,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 276 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 279 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -19220,7 +19226,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#join (; 277 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#join (; 280 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -19229,7 +19235,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $~lib/util/string/joinFloatArray (; 278 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 281 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -19336,7 +19342,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#join (; 279 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#join (; 282 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -19345,7 +19351,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 280 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 283 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -19368,7 +19374,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 281 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 284 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $2of2 @@ -19456,7 +19462,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 282 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -19526,7 +19532,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 283 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 286 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19642,7 +19648,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 284 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 287 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19726,7 +19732,7 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 285 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 288 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19840,7 +19846,7 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 286 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 289 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19965,7 +19971,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 287 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 290 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20088,7 +20094,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 288 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 291 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20209,7 +20215,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 289 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 292 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20330,7 +20336,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 290 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20452,7 +20458,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 291 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 294 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20574,7 +20580,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 292 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 295 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20696,7 +20702,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 293 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 296 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20818,7 +20824,7 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 294 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 297 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20869,7 +20875,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 295 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 298 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20929,7 +20935,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 296 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 299 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -20987,7 +20993,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 297 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 300 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -21009,7 +21015,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 298 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 301 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -21067,7 +21073,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 299 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 302 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -21093,7 +21099,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 300 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 303 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21347,14 +21353,14 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/array/Array#__unchecked_get (; 301 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 304 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_u ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 302 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 305 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21414,7 +21420,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 303 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 306 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21668,7 +21674,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 304 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 307 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21728,7 +21734,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 305 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 308 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) local.get $2 @@ -21814,7 +21820,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 306 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 309 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -21896,7 +21902,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 307 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 310 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22267,7 +22273,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 308 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 311 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22322,7 +22328,7 @@ end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 309 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 312 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22392,7 +22398,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 310 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 313 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22454,7 +22460,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 311 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 314 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22506,7 +22512,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 312 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 315 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -22536,7 +22542,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 313 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 316 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22593,7 +22599,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 314 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 317 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22855,7 +22861,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 315 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 318 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22925,7 +22931,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 316 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 319 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23187,7 +23193,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 317 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 320 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -23228,7 +23234,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 318 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 321 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23290,7 +23296,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 319 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 322 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23352,7 +23358,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 320 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 323 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23404,7 +23410,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 321 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 324 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23466,7 +23472,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 322 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 325 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23523,7 +23529,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 323 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 326 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23786,7 +23792,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 324 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 327 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23848,7 +23854,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 325 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 328 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24111,7 +24117,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 326 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 329 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24166,7 +24172,7 @@ end end ) - (func $~lib/array/Array#__unchecked_get (; 327 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 330 ;) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -24175,7 +24181,7 @@ i32.add i64.load ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 328 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 331 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -24237,7 +24243,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 329 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 332 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -24267,7 +24273,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 330 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 333 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24319,7 +24325,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 331 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 334 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24381,7 +24387,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 332 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 335 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24438,7 +24444,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 333 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 336 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24700,7 +24706,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 334 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 337 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -24762,7 +24768,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 335 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 338 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25024,7 +25030,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 336 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 339 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -25094,7 +25100,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 337 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 340 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25457,7 +25463,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 338 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 341 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -25525,7 +25531,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 339 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 342 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25932,7 +25938,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 340 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 343 ;) (param $0 i32) (param $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -26006,7 +26012,7 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 341 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 344 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -26078,7 +26084,7 @@ end end ) - (func $start:std/typedarray (; 342 ;) + (func $start:std/typedarray (; 345 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -32206,7 +32212,7 @@ call $~lib/builtins/abort unreachable ) - (func $~start (; 343 ;) + (func $~start (; 346 ;) global.get $~started if return @@ -32216,7 +32222,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 344 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 347 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index c8bf3e05fc..d2b0dee305 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1156,17 +1156,17 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $1 + local.set $0 loop $while-continue|01 - local.get $1 + local.get $0 i32.const 1 i32.add - local.tee $1 + local.tee $0 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1194,18 +1194,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $1 + local.set $0 loop $while-continue|02 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|02 end end - local.get $1 + local.get $0 if i32.const 0 i32.const 32 From 38e9771455c351a2c4a5f81ec16f0ad09d8c177d Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 05:04:07 +0200 Subject: [PATCH 26/51] rebuild --- tests/compiler/do.optimized.wat | 208 ++++++--------------- tests/compiler/reexport.optimized.wat | 1 - tests/compiler/while.optimized.wat | 248 ++++++-------------------- 3 files changed, 109 insertions(+), 348 deletions(-) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 0f5426ed7f..984be93e9a 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -105,105 +105,7 @@ i32.const 1 global.set $do/ran ) - (func $do/testAlwaysTrue (; 8 ;) - (local $0 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $do-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 56 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testContinue (; 9 ;) - (local $0 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $do-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 116 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $do/testNestedContinue (; 10 ;) - (local $0 i32) - (local $1 i32) - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - if - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.const 10 - i32.rem_s - br_if $do-continue|1 - end - br $do-continue|0 - end - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 134 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 90 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 135 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) + (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1167,7 +1069,7 @@ if i32.const 0 i32.const 32 - i32.const 150 + i32.const 10 i32.const 2 call $~lib/builtins/abort unreachable @@ -1178,7 +1080,7 @@ if i32.const 0 i32.const 32 - i32.const 151 + i32.const 11 i32.const 2 call $~lib/builtins/abort unreachable @@ -1204,27 +1106,13 @@ if i32.const 0 i32.const 32 - i32.const 170 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 171 + i32.const 21 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 1 global.set $do/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $start:do (; 24 ;) - (local $0 i32) i32.const 0 global.set $do/ran call $do/testNested @@ -1265,6 +1153,28 @@ i32.const 1 global.set $do/ran i32.const 0 + local.set $0 + loop $do-continue|02 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $do-continue|02 + end + local.get $0 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 70 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 global.set $do/ran i32.const 1 global.set $do/ran @@ -1280,14 +1190,14 @@ global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|02 + loop $do-continue|03 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|02 + br_if $do-continue|03 end local.get $0 i32.const 10 @@ -1295,7 +1205,7 @@ if i32.const 0 i32.const 32 - i32.const 107 + i32.const 116 i32.const 2 call $~lib/builtins/abort unreachable @@ -1308,7 +1218,7 @@ local.set $0 i32.const 0 local.set $1 - loop $do-continue|03 + loop $do-continue|04 local.get $0 i32.const 1 i32.add @@ -1325,7 +1235,7 @@ i32.rem_s br_if $do-continue|1 end - br $do-continue|03 + br $do-continue|04 end end local.get $0 @@ -1334,7 +1244,7 @@ if i32.const 0 i32.const 32 - i32.const 125 + i32.const 134 i32.const 2 call $~lib/builtins/abort unreachable @@ -1345,40 +1255,18 @@ if i32.const 0 i32.const 32 - i32.const 126 + i32.const 135 i32.const 2 call $~lib/builtins/abort unreachable end - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $do-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 70 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - global.set $do/ran i32.const 1 global.set $do/ran i32.const 0 global.set $do/ran call $do/Ref#constructor local.set $0 - loop $do-continue|04 + loop $do-continue|05 local.get $2 i32.const 1 i32.add @@ -1401,7 +1289,7 @@ end local.get $1 local.tee $0 - br_if $do-continue|04 + br_if $do-continue|05 end local.get $2 i32.const 10 @@ -1409,10 +1297,16 @@ if i32.const 0 i32.const 32 - i32.const 121 + i32.const 150 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if i32.const 0 i32.const 32 - i32.const 142 + i32.const 151 i32.const 2 call $~lib/builtins/abort unreachable @@ -1426,7 +1320,7 @@ if i32.const 0 i32.const 32 - i32.const 140 + i32.const 156 i32.const 0 call $~lib/builtins/abort unreachable @@ -1437,7 +1331,7 @@ local.set $2 call $do/Ref#constructor local.set $0 - loop $do-continue|05 + loop $do-continue|06 block $do-break|0 local.get $2 i32.const 1 @@ -1461,7 +1355,7 @@ local.tee $1 call $~lib/rt/pure/__release local.get $1 - br_if $do-continue|05 + br_if $do-continue|06 end end local.get $2 @@ -1470,10 +1364,16 @@ if i32.const 0 i32.const 32 - i32.const 156 + i32.const 170 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if i32.const 0 i32.const 32 - i32.const 162 + i32.const 171 i32.const 2 call $~lib/builtins/abort unreachable diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 234f8ff88d..f2454a358a 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -25,7 +25,6 @@ (export "exportstar.renamed_c" (global $export/c)) (export "exportstar.ns.two" (func $export/ns.one)) (export "exportstar.default.two" (func $export/ns.one)) - (start $~start) (func $export/add (; 0 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 2bbaa30d74..8e34820459 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -111,151 +111,6 @@ global.set $while/ran ) (func $~lib/rt/tlsf/removeBlock (; 6 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - i32.const 1 - local.set $0 - loop $while-continue|0 - local.get $0 - local.tee $2 - i32.const 1 - i32.sub - local.set $0 - local.get $2 - if (result i32) - local.get $1 - i32.const 1 - i32.add - local.tee $1 - else - i32.const 0 - end - br_if $while-continue|0 - end - local.get $0 - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 45 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 46 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testAlwaysTrue (; 8 ;) - (local $0 i32) - loop $while-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $while-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 58 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testContinue (; 9 ;) - (local $0 i32) - i32.const 10 - local.set $0 - loop $while-continue|0 - local.get $0 - if - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 117 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $while/testNestedContinue (; 10 ;) - (local $0 i32) - (local $1 i32) - i32.const 10 - local.set $0 - i32.const 10 - local.set $1 - loop $while-continue|0 - local.get $0 - if - loop $while-continue|1 - local.get $1 - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|1 - end - end - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $while-continue|0 - end - end - local.get $0 - if - i32.const 0 - i32.const 32 - i32.const 135 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $1 - if - i32.const 0 - i32.const 32 - i32.const 136 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $while/ran - ) - (func $~lib/rt/tlsf/removeBlock (; 11 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1233,7 +1088,7 @@ if i32.const 0 i32.const 32 - i32.const 151 + i32.const 11 i32.const 2 call $~lib/builtins/abort unreachable @@ -1248,8 +1103,8 @@ if i32.const 0 i32.const 32 - i32.const 152 - i32.const 2 + i32.const 39 + i32.const 0 call $~lib/builtins/abort unreachable end @@ -1280,7 +1135,7 @@ if i32.const 0 i32.const 32 - i32.const 171 + i32.const 45 i32.const 2 call $~lib/builtins/abort unreachable @@ -1291,18 +1146,13 @@ if i32.const 0 i32.const 32 - i32.const 172 + i32.const 46 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 1 global.set $while/ran - local.get $0 - call $~lib/rt/pure/__release - ) - (func $start:while (; 24 ;) - (local $0 i32) i32.const 0 global.set $while/ran i32.const 0 @@ -1330,6 +1180,28 @@ i32.const 1 global.set $while/ran i32.const 0 + local.set $0 + loop $while-continue|02 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 10 + i32.ne + br_if $while-continue|02 + end + local.get $0 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 32 + i32.const 72 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 global.set $while/ran i32.const 1 global.set $while/ran @@ -1345,21 +1217,21 @@ global.set $while/ran i32.const 10 local.set $0 - loop $while-continue|02 + loop $while-continue|03 local.get $0 if local.get $0 i32.const 1 i32.sub local.set $0 - br $while-continue|02 + br $while-continue|03 end end local.get $0 if i32.const 0 i32.const 32 - i32.const 108 + i32.const 117 i32.const 2 call $~lib/builtins/abort unreachable @@ -1372,7 +1244,7 @@ local.set $0 i32.const 10 local.set $1 - loop $while-continue|03 + loop $while-continue|04 local.get $0 if loop $while-continue|1 @@ -1389,14 +1261,14 @@ i32.const 1 i32.sub local.set $0 - br $while-continue|03 + br $while-continue|04 end end local.get $0 if i32.const 0 i32.const 32 - i32.const 126 + i32.const 135 i32.const 2 call $~lib/builtins/abort unreachable @@ -1405,33 +1277,11 @@ if i32.const 0 i32.const 32 - i32.const 127 + i32.const 136 i32.const 2 call $~lib/builtins/abort unreachable end - loop $while-continue|0 - local.get $0 - i32.const 1 - i32.add - local.tee $0 - i32.const 10 - i32.ne - br_if $while-continue|0 - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 32 - i32.const 72 - i32.const 0 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - global.set $while/ran i32.const 1 global.set $while/ran i32.const 0 @@ -1440,7 +1290,7 @@ local.set $2 call $while/Ref#constructor local.set $0 - loop $while-continue|04 + loop $while-continue|05 local.get $0 if local.get $2 @@ -1465,7 +1315,7 @@ end local.get $1 local.set $0 - br $while-continue|04 + br $while-continue|05 end end local.get $2 @@ -1474,10 +1324,16 @@ if i32.const 0 i32.const 32 - i32.const 122 + i32.const 151 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if i32.const 0 i32.const 32 - i32.const 143 + i32.const 152 i32.const 2 call $~lib/builtins/abort unreachable @@ -1491,7 +1347,7 @@ if i32.const 0 i32.const 32 - i32.const 141 + i32.const 157 i32.const 0 call $~lib/builtins/abort unreachable @@ -1502,7 +1358,7 @@ local.set $2 call $while/Ref#constructor local.set $0 - loop $while-continue|05 + loop $while-continue|06 block $while-break|0 call $while/Ref#constructor local.tee $1 @@ -1527,7 +1383,7 @@ local.set $0 br $while-break|0 end - br $while-continue|05 + br $while-continue|06 end end end @@ -1537,10 +1393,16 @@ if i32.const 0 i32.const 32 - i32.const 157 + i32.const 171 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + if i32.const 0 i32.const 32 - i32.const 163 + i32.const 172 i32.const 2 call $~lib/builtins/abort unreachable From f7519ef30a47d0f172768bf47556f9a4d15bc42a Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 14:01:07 +0200 Subject: [PATCH 27/51] cleanups --- cli/asc.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 0e71da9877..ef3f4b6cb6 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -780,8 +780,6 @@ exports.main = function main(argv, options, callback) { add("remove-unused-brs"); add("vacuum"); - // replace indirect calls with direct and inline if possible again. - // add("directize"); // move some code after early return which potentially could reduce computations // do this after CFG cleanup (originally it was done before) // moved from (1) @@ -790,6 +788,7 @@ exports.main = function main(argv, options, callback) { // this quite expensive so do this only for highest opt level add("simplify-globals"); if (optimizeLevel >= 3) { + // replace indirect calls with direct and inline if possible again. add("directize"); add("coalesce-locals"); add("simplify-locals-nostructure"); From a1f73ff7cd576db1878537e746da8af3346cd224 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:43:01 +0200 Subject: [PATCH 28/51] add finalize dead arg elim pass --- cli/asc.js | 1 + tests/compiler/rc/optimize.optimized.wat | 221 ++++-------------- .../resolve-function-expression.optimized.wat | 157 +++---------- 3 files changed, 87 insertions(+), 292 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index ef3f4b6cb6..1ad3a4608f 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -801,6 +801,7 @@ exports.main = function main(argv, options, callback) { add("inlining-optimizing"); add("reorder-locals"); } + add("dae-optimizing"); add("optimize-instructions"); add("simplify-globals-optimizing"); } diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 1db915f750..2184a4868f 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1,13 +1,12 @@ (module (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 (func (param i32 i32) (result i32))) (type $none_=>_i32 (func (result i32))) - (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_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32))) (import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32))) @@ -756,57 +755,16 @@ end local.get $0 ) - (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - local.get $1 - i32.const 256 - i32.lt_u - if (result i32) - local.get $1 - i32.const 4 - i32.shr_u - local.set $1 - i32.const 0 - else - local.get $1 - i32.const 536870904 - i32.lt_u - if - local.get $1 - i32.const 1 - i32.const 27 - local.get $1 - i32.clz - i32.sub - i32.shl - i32.add - i32.const 1 - i32.sub - local.set $1 - end - local.get $1 - i32.const 31 - local.get $1 - i32.clz - i32.sub - local.tee $2 - i32.const 4 - i32.sub - i32.shr_u - i32.const 16 - i32.xor - local.set $1 - local.get $2 - i32.const 7 - i32.sub - end - local.tee $2 + i32.const 1 + local.set $2 + i32.const 0 i32.const 23 i32.lt_u if (result i32) - local.get $1 - i32.const 16 - i32.lt_u + i32.const 1 else i32.const 0 end @@ -820,24 +778,14 @@ unreachable end local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add i32.load offset=4 - i32.const -1 - local.get $1 - i32.shl + i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 - i32.ctz local.get $2 - i32.const 4 - i32.shl - i32.add + i32.ctz i32.const 2 i32.shl i32.add @@ -845,23 +793,19 @@ else local.get $0 i32.load - i32.const -1 - local.get $2 - i32.const 1 - i32.add - i32.shl + i32.const -2 i32.and local.tee $1 if (result i32) local.get $0 local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -872,9 +816,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add @@ -887,46 +831,32 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) + (local $2 i32) (local $3 i32) - (local $4 i32) local.get $1 i32.load - local.set $3 - local.get $2 - i32.const 15 - i32.and - if - i32.const 0 - i32.const 80 - i32.const 365 - i32.const 13 - call $~lib/builtins/abort - unreachable - end - local.get $3 + local.tee $2 i32.const -4 i32.and - local.get $2 + i32.const 16 i32.sub - local.tee $4 + local.tee $3 i32.const 32 i32.ge_u if local.get $1 local.get $2 - local.get $3 i32.const 2 i32.and + i32.const 16 i32.or i32.store - local.get $2 local.get $1 - i32.const 16 - i32.add + i32.const 32 i32.add local.tee $1 - local.get $4 + local.get $3 i32.const 16 i32.sub i32.const 1 @@ -937,7 +867,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - local.get $3 + local.get $2 i32.const -2 i32.and i32.store @@ -962,10 +892,9 @@ i32.store end ) - (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/rt/tlsf/allocateBlock (; 16 ;) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -975,32 +904,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 1073741808 - i32.ge_u - if - i32.const 128 - i32.const 80 - i32.const 457 - i32.const 29 - call $~lib/builtins/abort - unreachable - end local.get $0 - local.get $1 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $3 - i32.const 16 - local.get $3 - i32.const 16 - i32.gt_u - select - local.tee $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 1 @@ -1008,14 +914,13 @@ i32.const 0 global.set $~lib/rt/tlsf/collectLock local.get $0 - local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 16 memory.size - local.tee $3 + local.tee $1 i32.const 16 i32.shl i32.const 16 @@ -1024,40 +929,24 @@ i32.load offset=1568 i32.ne i32.shl - local.get $4 - i32.const 1 - i32.const 27 - local.get $4 - i32.clz - i32.sub - i32.shl - i32.const 1 - i32.sub - i32.add - local.get $4 - local.get $4 - i32.const 536870904 - i32.lt_u - select - i32.add - i32.const 65535 + i32.const 65551 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.set $5 - local.get $3 - local.get $5 - local.get $3 - local.get $5 + local.set $2 + local.get $1 + local.get $2 + local.get $1 + local.get $2 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $5 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -1066,7 +955,7 @@ end end local.get $0 - local.get $3 + local.get $1 i32.const 16 i32.shl memory.size @@ -1074,9 +963,8 @@ i32.shl call $~lib/rt/tlsf/addMemory local.get $0 - local.get $4 call $~lib/rt/tlsf/searchBlock - local.tee $3 + local.tee $1 i32.eqz if i32.const 0 @@ -1088,11 +976,11 @@ end end end - local.get $3 + local.get $1 i32.load i32.const -4 i32.and - local.get $4 + i32.const 16 i32.lt_u if i32.const 0 @@ -1102,37 +990,32 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 - local.get $2 + local.get $1 + i32.const 3 i32.store offset=8 - local.get $3 local.get $1 + i32.const 0 i32.store offset=12 local.get $0 - local.get $3 + local.get $1 call $~lib/rt/tlsf/removeBlock local.get $0 - local.get $3 - local.get $4 + local.get $1 call $~lib/rt/tlsf/prepareBlock - local.get $3 + local.get $1 call $~lib/rt/rtrace/onalloc - local.get $3 + local.get $1 ) - (func $~lib/rt/tlsf/__alloc (; 17 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/tlsf/__alloc (; 17 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize - local.get $0 - local.get $1 call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add ) (func $rc/optimize/getRef (; 18 ;) (result i32) - i32.const 0 - i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) @@ -1148,8 +1031,6 @@ end ) (func $rc/optimize/eliminated_rr (; 20 ;) (param $0 i32) (result i32) - i32.const 0 - i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 49c5177f38..6a7980b190 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1,8 +1,9 @@ (module - (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param 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 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -19,46 +20,28 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/__alloc (; 2 ;) (param $0 i32) (result i32) + (func $~lib/rt/stub/__alloc (; 2 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 1073741808 - i32.gt_u - if - unreachable - end global.get $~lib/rt/stub/offset i32.const 16 i32.add - local.tee $3 - local.get $0 - i32.const 15 - i32.add - i32.const -16 - i32.and - local.tee $1 - i32.const 16 - local.get $1 + local.tee $2 i32.const 16 - i32.gt_u - select - local.tee $5 i32.add - local.tee $1 + local.tee $0 memory.size - local.tee $4 + local.tee $3 i32.const 16 i32.shl - local.tee $2 + local.tee $1 i32.gt_u if - local.get $4 + local.get $3 + local.get $0 local.get $1 - local.get $2 i32.sub i32.const 65535 i32.add @@ -66,16 +49,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $2 - local.get $4 - local.get $2 + local.tee $1 + local.get $3 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -84,132 +67,63 @@ end end end - local.get $1 + local.get $0 global.set $~lib/rt/stub/offset - local.get $3 + local.get $2 i32.const 16 i32.sub - local.tee $1 - local.get $5 + local.tee $0 + i32.const 16 i32.store - local.get $1 + local.get $0 i32.const 1 i32.store offset=4 - local.get $1 + local.get $0 i32.const 1 i32.store offset=8 - local.get $1 local.get $0 + i32.const 4 i32.store offset=12 - local.get $3 + local.get $2 ) - (func $~lib/util/number/itoa32 (; 3 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 3 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.eqz - if - i32.const 112 - return - end - local.get $0 - i32.const 0 - i32.lt_s - local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $1 - i32.const 1 + i32.const 42 + local.set $0 i32.const 2 - local.get $0 - i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 - local.get $0 - i32.const 10000 - i32.lt_u - select - local.get $0 - i32.const 1000 - i32.lt_u - select - local.get $0 - i32.const 100 - i32.lt_u - select - i32.const 6 - i32.const 7 - local.get $0 - i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 - local.get $0 - i32.const 1000000000 - i32.lt_u - select - local.get $0 - i32.const 100000000 - i32.lt_u - select - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - i32.add - local.tee $2 - i32.const 1 - i32.shl + local.set $1 call $~lib/rt/stub/__alloc - local.tee $3 - local.set $4 + local.tee $2 + local.set $3 loop $do-continue|0 local.get $0 i32.const 10 i32.rem_u - local.set $5 + local.set $4 local.get $0 i32.const 10 i32.div_u local.set $0 - local.get $4 - local.get $2 + local.get $3 + 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 $4 i32.const 48 i32.add i32.store16 local.get $0 br_if $do-continue|0 end - local.get $1 - if - local.get $3 - i32.const 45 - i32.store16 - end - local.get $3 + local.get $2 ) (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) local.get $0 @@ -309,7 +223,6 @@ global.set $~argumentsLength block $__inlined_func$~lib/string/String.__eq (result i32) i32.const 1 - i32.const 42 call $~lib/util/number/itoa32 local.tee $0 i32.const 144 From a3ca9c9de80815403c31b18fba5bb80a1b168581 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:44:34 +0200 Subject: [PATCH 29/51] more --- cli/asc.js | 1 + tests/compiler/rc/optimize.optimized.wat | 158 +++++++++--------- .../resolve-function-expression.optimized.wat | 69 ++++---- 3 files changed, 108 insertions(+), 120 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 1ad3a4608f..8c473bc130 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -802,6 +802,7 @@ exports.main = function main(argv, options, callback) { add("reorder-locals"); } add("dae-optimizing"); + add("inlining-optimizing"); add("optimize-instructions"); add("simplify-globals-optimizing"); } diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 2184a4868f..72c1db3382 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -831,70 +831,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (; 15 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - local.get $1 - i32.load - local.tee $2 - i32.const -4 - i32.and - i32.const 16 - i32.sub - local.tee $3 - i32.const 32 - i32.ge_u - if - local.get $1 - local.get $2 - i32.const 2 - i32.and - i32.const 16 - i32.or - i32.store - local.get $1 - i32.const 32 - i32.add - local.tee $1 - local.get $3 - i32.const 16 - 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 $2 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 16 - 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 (; 16 ;) (param $0 i32) (result i32) + (func $~lib/rt/tlsf/allocateBlock (; 15 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) global.get $~lib/rt/tlsf/collectLock if i32.const 0 @@ -920,7 +860,7 @@ if i32.const 16 memory.size - local.tee $1 + local.tee $2 i32.const 16 i32.shl i32.const 16 @@ -935,18 +875,18 @@ i32.and i32.const 16 i32.shr_u - local.set $2 - local.get $1 + local.set $1 local.get $2 local.get $1 local.get $2 + local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $2 + local.get $1 memory.grow i32.const 0 i32.lt_s @@ -955,7 +895,7 @@ end end local.get $0 - local.get $1 + local.get $2 i32.const 16 i32.shl memory.size @@ -1002,24 +942,75 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 - call $~lib/rt/tlsf/prepareBlock + i32.load + local.tee $2 + i32.const -4 + i32.and + i32.const 16 + i32.sub + local.tee $3 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + i32.const 2 + i32.and + i32.const 16 + i32.or + i32.store + local.get $1 + i32.const 32 + i32.add + local.tee $2 + local.get $3 + i32.const 16 + 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 $2 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + 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 call $~lib/rt/rtrace/onalloc local.get $1 ) - (func $~lib/rt/tlsf/__alloc (; 17 ;) (result i32) + (func $rc/optimize/getRef (; 16 ;) (result i32) call $~lib/rt/tlsf/maybeInitialize call $~lib/rt/tlsf/allocateBlock i32.const 16 i32.add - ) - (func $rc/optimize/getRef (; 18 ;) (result i32) - call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain ) - (func $~lib/rt/pure/__release (; 19 ;) (param $0 i32) + (func $~lib/rt/pure/__release (; 17 ;) (param $0 i32) local.get $0 i32.const 196 i32.gt_u @@ -1030,11 +1021,14 @@ call $~lib/rt/pure/decrement end ) - (func $rc/optimize/eliminated_rr (; 20 ;) (param $0 i32) (result i32) - call $~lib/rt/tlsf/__alloc + (func $rc/optimize/eliminated_rr (; 18 ;) (param $0 i32) (result i32) + call $~lib/rt/tlsf/maybeInitialize + call $~lib/rt/tlsf/allocateBlock + i32.const 16 + i32.add call $~lib/rt/pure/__retain ) - (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 21 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $rc/optimize/OptimizeARC.eliminates.balancedInsideOutsideLoopWithBranch (; 19 ;) (param $0 i32) (param $1 i32) (param $2 i32) loop $while-continue|0 local.get $1 if @@ -1046,7 +1040,7 @@ end end ) - (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 22 ;) (param $0 i32) (param $1 i32) + (func $rc/optimize/OptimizeARC.keeps.partialRetains (; 20 ;) (param $0 i32) (param $1 i32) local.get $1 if (result i32) local.get $0 @@ -1056,7 +1050,7 @@ end call $~lib/rt/pure/__release ) - (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 23 ;) (param $0 i32) (param $1 i32) (result i32) + (func $rc/optimize/OptimizeARC.keeps.reachesReturn (; 21 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -1069,16 +1063,16 @@ call $~lib/rt/pure/__release i32.const 0 ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 24 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRetain (; 22 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__retain drop ) - (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 25 ;) (param $0 i32) + (func $rc/optimize/FinalizeARC.keeps.dynamicRelease (; 23 ;) (param $0 i32) local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/rt/pure/decrement (; 26 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 24 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 6a7980b190..3bdb6f5239 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -1,8 +1,8 @@ (module - (type $none_=>_i32 (func (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -20,28 +20,34 @@ local.get $0 global.set $~argumentsLength ) - (func $~lib/rt/stub/__alloc (; 2 ;) (result i32) + (func $~lib/util/number/itoa32 (; 2 ;) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 42 + local.set $1 + i32.const 2 + local.set $5 global.get $~lib/rt/stub/offset i32.const 16 i32.add - local.tee $2 + local.tee $4 i32.const 16 i32.add local.tee $0 memory.size - local.tee $3 + local.tee $2 i32.const 16 i32.shl - local.tee $1 + local.tee $3 i32.gt_u if - local.get $3 + local.get $2 local.get $0 - local.get $1 + local.get $3 i32.sub i32.const 65535 i32.add @@ -49,16 +55,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $3 + local.get $2 local.get $3 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -69,7 +75,7 @@ end local.get $0 global.set $~lib/rt/stub/offset - local.get $2 + local.get $4 i32.const 16 i32.sub local.tee $0 @@ -84,48 +90,35 @@ local.get $0 i32.const 4 i32.store offset=12 - local.get $2 - ) - (func $~lib/util/number/itoa32 (; 3 ;) (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 42 + local.get $4 local.set $0 - i32.const 2 - local.set $1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.set $3 loop $do-continue|0 - local.get $0 + local.get $1 i32.const 10 i32.rem_u - local.set $4 - local.get $0 + local.set $2 + local.get $1 i32.const 10 i32.div_u - local.set $0 - local.get $3 - local.get $1 + local.set $1 + local.get $0 + local.get $5 i32.const 1 i32.sub - local.tee $1 + local.tee $5 i32.const 1 i32.shl i32.add - local.get $4 + local.get $2 i32.const 48 i32.add i32.store16 - local.get $0 + local.get $1 br_if $do-continue|0 end - local.get $2 + local.get $4 ) - (func $~lib/string/String#get:length (; 4 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -133,7 +126,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (; 5 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/compareImpl (; 4 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -208,7 +201,7 @@ end i32.const 0 ) - (func $~start (; 6 ;) + (func $~start (; 5 ;) (local $0 i32) (local $1 i32) i32.const 1 From fe90d14ae927bd8a4c91b649a382beca1dea5235 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:46:12 +0200 Subject: [PATCH 30/51] better --- cli/asc.js | 4 ++-- tests/compiler/rc/optimize.optimized.wat | 8 ++++---- tests/compiler/resolve-function-expression.optimized.wat | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 8c473bc130..2bf878179e 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -801,10 +801,10 @@ exports.main = function main(argv, options, callback) { add("inlining-optimizing"); add("reorder-locals"); } - add("dae-optimizing"); - add("inlining-optimizing"); add("optimize-instructions"); add("simplify-globals-optimizing"); + add("dae-optimizing"); + add("inlining-optimizing"); } // remove unused elements of table and pack / reduce memory add("duplicate-function-elimination"); // differs diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 72c1db3382..3fdbcc2f7b 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -783,11 +783,11 @@ i32.and local.tee $2 if (result i32) - local.get $0 local.get $2 i32.ctz i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=96 else @@ -797,12 +797,12 @@ i32.and local.tee $1 if (result i32) - local.get $0 local.get $1 i32.ctz local.tee $2 i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=4 local.tee $1 @@ -815,7 +815,6 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.ctz local.get $2 @@ -824,6 +823,7 @@ i32.add i32.const 2 i32.shl + local.get $0 i32.add i32.load offset=96 else @@ -988,11 +988,11 @@ i32.const -4 i32.and i32.add - local.get $0 local.get $1 i32.load i32.const -4 i32.and + local.get $0 i32.add i32.load i32.const -3 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 3bdb6f5239..c0997e6c14 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -101,13 +101,13 @@ i32.const 10 i32.div_u local.set $1 - local.get $0 local.get $5 i32.const 1 i32.sub local.tee $5 i32.const 1 i32.shl + local.get $0 i32.add local.get $2 i32.const 48 From 06c43270ad7f2dd0fc6779fa6e62cc24451bab37 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:48:15 +0200 Subject: [PATCH 31/51] better --- cli/asc.js | 3 +-- tests/compiler/rc/optimize.optimized.wat | 26 +++++++++---------- .../resolve-function-expression.optimized.wat | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 2bf878179e..c2dde2e5d6 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -798,13 +798,12 @@ exports.main = function main(argv, options, callback) { add("simplify-locals-nostructure"); add("vacuum"); + add("dae-optimizing"); add("inlining-optimizing"); add("reorder-locals"); } add("optimize-instructions"); add("simplify-globals-optimizing"); - add("dae-optimizing"); - add("inlining-optimizing"); } // remove unused elements of table and pack / reduce memory add("duplicate-function-elimination"); // differs diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 3fdbcc2f7b..bd53e86249 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -759,7 +759,7 @@ (local $1 i32) (local $2 i32) i32.const 1 - local.set $2 + local.set $1 i32.const 0 i32.const 23 i32.lt_u @@ -781,13 +781,13 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) - local.get $2 + local.get $0 + local.get $1 i32.ctz i32.const 2 i32.shl - local.get $0 i32.add i32.load offset=96 else @@ -795,17 +795,17 @@ i32.load i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) - local.get $1 + local.get $0 + local.get $2 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl - local.get $0 i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -815,15 +815,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - i32.ctz + local.get $0 local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add i32.const 2 i32.shl - local.get $0 i32.add i32.load offset=96 else @@ -988,11 +988,11 @@ i32.const -4 i32.and i32.add + local.get $0 local.get $1 i32.load i32.const -4 i32.and - local.get $0 i32.add i32.load i32.const -3 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index c0997e6c14..3bdb6f5239 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -101,13 +101,13 @@ i32.const 10 i32.div_u local.set $1 + local.get $0 local.get $5 i32.const 1 i32.sub local.tee $5 i32.const 1 i32.shl - local.get $0 i32.add local.get $2 i32.const 48 From 58fb875b844c9b2aee491e5974a1858a48e1fbfc Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:54:01 +0200 Subject: [PATCH 32/51] more --- cli/asc.js | 3 +-- tests/compiler/rc/optimize.optimized.wat | 19 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index c2dde2e5d6..fd7722fd74 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -789,6 +789,7 @@ exports.main = function main(argv, options, callback) { add("simplify-globals"); if (optimizeLevel >= 3) { // replace indirect calls with direct and inline if possible again. + add("dae-optimizing"); add("directize"); add("coalesce-locals"); add("simplify-locals-nostructure"); @@ -797,8 +798,6 @@ exports.main = function main(argv, options, callback) { add("precompute-propagate"); add("simplify-locals-nostructure"); add("vacuum"); - - add("dae-optimizing"); add("inlining-optimizing"); add("reorder-locals"); } diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index bd53e86249..b29e2644ac 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -758,25 +758,6 @@ (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 1 - local.set $1 - i32.const 0 - i32.const 23 - i32.lt_u - if (result i32) - i32.const 1 - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 338 - i32.const 13 - call $~lib/builtins/abort - unreachable - end local.get $0 i32.load offset=4 i32.const -2 From da5f69128bcb58a392bde3c952248a2357a392af Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 16:56:47 +0200 Subject: [PATCH 33/51] rebuild examples --- examples/game-of-life/build/optimized.d.ts | 4 ++++ examples/mandelbrot/build/optimized.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/examples/game-of-life/build/optimized.d.ts b/examples/game-of-life/build/optimized.d.ts index 83e5b54edd..61dc763198 100644 --- a/examples/game-of-life/build/optimized.d.ts +++ b/examples/game-of-life/build/optimized.d.ts @@ -2,9 +2,13 @@ declare module ASModule { type i8 = number; type i16 = number; type i32 = number; + type i64 = BigInt; + type isize = number; type u8 = number; type u16 = number; type u32 = number; + type u64 = BigInt; + type usize = number; type f32 = number; type f64 = number; type bool = any; diff --git a/examples/mandelbrot/build/optimized.d.ts b/examples/mandelbrot/build/optimized.d.ts index a244640900..96b2f699b0 100644 --- a/examples/mandelbrot/build/optimized.d.ts +++ b/examples/mandelbrot/build/optimized.d.ts @@ -2,9 +2,13 @@ declare module ASModule { type i8 = number; type i16 = number; type i32 = number; + type i64 = BigInt; + type isize = number; type u8 = number; type u16 = number; type u32 = number; + type u64 = BigInt; + type usize = number; type f32 = number; type f64 = number; type bool = any; From 08577d205827228b7b00e6ea06ec578a723eced4 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 3 Mar 2020 17:32:57 +0200 Subject: [PATCH 34/51] better --- cli/asc.js | 2 +- tests/compiler/resolve-binary.optimized.wat | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index fd7722fd74..b00d9a4352 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -794,11 +794,11 @@ exports.main = function main(argv, options, callback) { add("coalesce-locals"); add("simplify-locals-nostructure"); add("vacuum"); - add("precompute-propagate"); add("simplify-locals-nostructure"); add("vacuum"); add("inlining-optimizing"); + add("precompute-propagate"); add("reorder-locals"); } add("optimize-instructions"); diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index a52880c01a..333203eaf8 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1188,14 +1188,7 @@ global.set $~lib/util/number/_frc_minus i32.const -61 global.set $~lib/util/number/_exp - i32.const 340 - f64.const 347 - i32.trunc_f64_s - i32.const 3 - i32.shr_s - i32.const 3 - i32.shl - i32.sub + i32.const -4 global.set $~lib/util/number/_K i32.const 784 i64.load From 42ed39c1e7460d5db47f4728a8249463d26335ca Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 4 Mar 2020 01:57:00 +0200 Subject: [PATCH 35/51] add special case for high shrink level as well --- cli/asc.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index e1ef536d10..02235e5782 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -684,9 +684,11 @@ exports.main = function main(argv, options, callback) { module.setFlexibleInlineMaxSize(70); module.setOneCallerInlineMaxSize(200); } else { - module.setAlwaysInlineMaxSize(4); // default: 2 - module.setFlexibleInlineMaxSize(65); // default: 20 - module.setOneCallerInlineMaxSize(80); // default: 15 + shrinkLevel >= 2 + ? module.setAlwaysInlineMaxSize(2) + : module.setAlwaysInlineMaxSize(4); // default: 2 + module.setFlexibleInlineMaxSize(65); // default: 20 + module.setOneCallerInlineMaxSize(80); // default: 15 } // Optimize the module if requested From 94bea8fe849985db299a1f7dba288ea179330961 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 04:21:48 +0200 Subject: [PATCH 36/51] extra merge locals --- cli/asc.js | 1 + .../retain-release-sanity.optimized.wat | 87 ++++++++++--------- tests/compiler/std/math.optimized.wat | 2 +- .../std/string-casemapping.optimized.wat | 54 ++++++------ 4 files changed, 72 insertions(+), 72 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 02235e5782..b40ed4671d 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -824,6 +824,7 @@ exports.main = function main(argv, options, callback) { add("dae-optimizing"); add("directize"); add("coalesce-locals"); + add("merge-locals"); add("simplify-locals-nostructure"); add("vacuum"); add("precompute-propagate"); diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 5bc45ec7ee..4923583a93 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1898,17 +1898,17 @@ call $~lib/rt/pure/__retain i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 i32.const 3 i32.store offset=12 - local.get $1 + local.get $2 call $~lib/array/Array#push - local.get $1 + local.get $2 call $~lib/array/Array#push - local.get $1 + local.get $2 local.tee $3 i32.load offset=12 local.tee $0 @@ -1936,7 +1936,7 @@ local.get $3 local.get $0 i32.store offset=12 - local.get $1 + local.get $3 call $~lib/rt/pure/__release i32.const 16 i32.const 5 @@ -1951,7 +1951,7 @@ i32.const 0 i32.store offset=12 loop $for-loop|0 - local.get $2 + local.get $1 i32.const 10 i32.lt_s if @@ -1961,10 +1961,10 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 i32.const 0 i32.store offset=12 i32.const 0 @@ -1974,15 +1974,15 @@ i32.const 10 i32.lt_s if - local.get $1 - local.get $1 + local.get $2 + local.get $2 i32.load offset=12 local.tee $4 i32.const 1 i32.add local.tee $5 call $~lib/array/ensureSize - local.get $1 + local.get $2 i32.load offset=4 local.get $4 i32.const 2 @@ -1990,7 +1990,7 @@ i32.add i32.const 400 i32.store - local.get $1 + local.get $2 local.get $5 i32.store offset=12 local.get $0 @@ -2000,12 +2000,12 @@ br $for-loop|1 end end - local.get $1 - call $~lib/rt/pure/__release local.get $2 + call $~lib/rt/pure/__release + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end @@ -2027,82 +2027,83 @@ local.tee $3 i32.const 0 i32.store - local.get $3 i32.const 4 i32.const 7 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 0 i32.store - local.get $1 + local.get $2 local.tee $0 local.get $3 + local.tee $4 i32.load - local.tee $2 + local.tee $1 i32.ne if local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $2 + local.get $1 call $~lib/rt/pure/__release end + local.get $4 local.get $0 i32.store - local.get $1 - local.tee $2 - local.get $3 + local.get $2 + local.tee $1 + local.get $4 local.tee $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.tee $2 - local.get $1 + local.tee $1 + local.get $2 local.tee $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $3 - local.tee $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 local.get $3 - local.tee $2 + local.tee $1 i32.load local.tee $4 i32.ne @@ -2113,27 +2114,27 @@ local.get $4 call $~lib/rt/pure/__release end - local.get $2 + local.get $1 local.get $0 i32.store local.get $3 - local.get $1 + local.get $2 i32.load local.tee $0 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $0 call $~lib/rt/pure/__release end - local.get $1 local.get $2 + local.get $1 i32.store local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release call $~lib/rt/pure/__collect ) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index e146c15d97..ee28c52fd6 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -9002,7 +9002,7 @@ local.get $0 return end - local.get $3 + local.get $4 i32.const 31 i32.shr_u local.get $2 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 89e4ad4d2e..8e2b19ddb1 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -2343,14 +2343,14 @@ i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $6 loop $for-loop|0 - local.get $6 + local.get $5 local.get $7 i32.lt_u if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add @@ -2360,7 +2360,7 @@ i32.shr_u if block $for-continue|0 - local.get $6 + local.get $5 local.get $7 i32.const 1 i32.sub @@ -2374,7 +2374,7 @@ select if local.get $0 - local.get $6 + local.get $5 i32.const 1 i32.shl i32.add @@ -2385,10 +2385,10 @@ i32.const 1025 i32.lt_u if - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 local.get $8 i32.const 1023 i32.and @@ -2405,7 +2405,7 @@ i32.const 131072 i32.ge_u if - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2428,7 +2428,7 @@ i32.const 304 i32.eq if - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2444,7 +2444,7 @@ i32.const 931 i32.eq if - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2458,9 +2458,9 @@ local.set $8 i32.const 0 local.set $10 + local.get $5 i32.const 0 - local.get $6 - local.tee $9 + local.get $5 local.tee $1 i32.const 30 i32.sub @@ -2484,7 +2484,7 @@ i32.le_s br_if $~lib/util/string/codePointBefore|inlined.0 drop - local.get $8 + local.get $0 local.get $2 i32.const 1 i32.sub @@ -2504,7 +2504,7 @@ i32.ge_s i32.and if - local.get $8 + local.get $0 local.get $2 i32.const 2 i32.sub @@ -2588,7 +2588,6 @@ i32.eqz br_if $~lib/util/string/isFinalSigma|inlined.0 drop - local.get $9 i32.const 1 i32.add local.tee $1 @@ -2606,7 +2605,7 @@ local.get $9 i32.lt_s if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl @@ -2624,7 +2623,7 @@ i32.ne i32.and if - local.get $8 + local.get $0 local.get $1 i32.const 1 i32.shl @@ -2647,8 +2646,7 @@ end end local.get $2 - local.set $4 - local.get $2 + local.tee $4 i32.const 918000 i32.lt_u if (result i32) @@ -2660,7 +2658,7 @@ end i32.eqz if - local.get $2 + local.get $4 local.tee $1 i32.const 127370 i32.lt_u @@ -2675,7 +2673,7 @@ br $~lib/util/string/isFinalSigma|inlined.0 end local.get $1 - local.get $2 + local.get $4 i32.const 65536 i32.ge_u i32.const 1 @@ -2703,7 +2701,7 @@ i32.const 25 i32.le_u if - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2722,7 +2720,7 @@ i32.const 65536 i32.lt_s if - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2730,7 +2728,7 @@ local.get $1 i32.store16 else - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2762,7 +2760,7 @@ end end else - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl @@ -2780,10 +2778,10 @@ i32.or i32.store16 end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 local.get $3 i32.const 1 i32.add @@ -2791,7 +2789,7 @@ br $for-loop|0 end end - local.get $5 + local.get $6 local.get $3 i32.const 1 i32.shl From 8c31f6338a19c7da929404e69202534e8ad7d0a9 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 04:26:08 +0200 Subject: [PATCH 37/51] better --- cli/asc.js | 4 +--- tests/compiler/do.optimized.wat | 2 -- tests/compiler/resolve-binary.optimized.wat | 19 ++++--------------- .../retain-release-sanity.optimized.wat | 3 --- tests/compiler/std/array.optimized.wat | 3 --- tests/compiler/std/staticarray.optimized.wat | 11 ++++------- tests/compiler/std/string.optimized.wat | 5 ----- tests/compiler/while.optimized.wat | 2 -- 8 files changed, 9 insertions(+), 40 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index b40ed4671d..def4e11505 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -823,13 +823,11 @@ exports.main = function main(argv, options, callback) { // replace indirect calls with direct and inline if possible again. add("dae-optimizing"); add("directize"); + add("precompute-propagate"); add("coalesce-locals"); add("merge-locals"); add("simplify-locals-nostructure"); add("vacuum"); - add("precompute-propagate"); - add("simplify-locals-nostructure"); - add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); add("reorder-locals"); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 984be93e9a..40ad00a216 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1340,8 +1340,6 @@ i32.const 10 i32.eq if - i32.const 0 - local.set $1 local.get $0 if local.get $0 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 333203eaf8..cf562aae70 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -1181,7 +1181,6 @@ (local $1 i64) (local $2 i64) (local $3 i64) - (local $4 i64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -1232,30 +1231,25 @@ i32.const 3 i32.add local.get $3 - i64.const -9223372036854774784 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483648 i64.mul local.get $2 i64.const 2147483648 i64.mul local.get $2 i64.const 1024 - local.tee $1 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $4 + local.tee $1 i64.const 32 i64.shr_u i64.add local.get $3 i64.const 1024 i64.mul - local.get $4 + local.get $1 i64.const 4294967295 i64.and i64.add @@ -1272,18 +1266,13 @@ i32.add local.get $1 local.get $3 - i64.const 9223372036854775296 - local.tee $1 - i64.const 32 - i64.shr_u - local.tee $4 + i64.const 2147483647 i64.mul local.get $2 i64.const 2147483647 i64.mul local.get $2 i64.const 4294966784 - local.tee $2 i64.mul i64.const 32 i64.shr_u diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 4923583a93..731f2c0be5 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1834,8 +1834,6 @@ local.tee $0 i32.eqz if - i32.const 480 - local.set $1 local.get $0 i32.const 480 i32.ne @@ -1863,7 +1861,6 @@ local.get $0 call $~lib/rt/pure/__release i32.const 400 - local.tee $1 br $__inlined_func$~lib/string/String#concat end local.get $1 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 19ccd14b3c..813862ca1e 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -5735,8 +5735,6 @@ local.tee $0 i32.eqz if - i32.const 5232 - local.set $1 local.get $0 i32.const 5232 i32.ne @@ -5764,7 +5762,6 @@ local.get $0 call $~lib/rt/pure/__release i32.const 5120 - local.tee $1 br $__inlined_func$~lib/string/String#concat end local.get $1 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index eb1af866a8..3dc80fe1b3 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1354,7 +1354,6 @@ ) (func $start:std/staticarray (; 21 ;) (local $0 i32) - (local $1 i32) i32.const 32 i32.const 1 call $~lib/staticarray/StaticArray#__get @@ -1542,20 +1541,18 @@ i32.store offset=4 local.get $0 global.set $std/staticarray/arr4 - i32.const 0 - local.set $0 global.get $std/staticarray/arr3 - local.tee $1 + local.tee $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 global.set $std/staticarray/arr3 global.get $std/staticarray/arr4 - local.tee $1 + local.tee $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 3b82fd3cf6..6c1633fb37 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -4008,8 +4008,6 @@ local.tee $0 i32.eqz if - i32.const 640 - local.set $1 local.get $0 i32.const 640 i32.ne @@ -4037,7 +4035,6 @@ local.get $0 call $~lib/rt/pure/__release i32.const 272 - local.tee $1 br $__inlined_func$~lib/string/String#concat end local.get $1 @@ -7295,8 +7292,6 @@ local.tee $2 i32.eqz if - i32.const 640 - local.set $1 i32.const 608 call $~lib/rt/pure/__release i32.const 640 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 8e34820459..10f49d4c98 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1372,8 +1372,6 @@ i32.const 10 i32.eq if - i32.const 0 - local.set $1 local.get $0 if local.get $0 From 2e46863cb88e9ceedd79173de61aba0c1df46b05 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 05:28:21 +0200 Subject: [PATCH 38/51] move dae-optimizing after directize --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index def4e11505..12e86e40ce 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -821,8 +821,8 @@ exports.main = function main(argv, options, callback) { add("simplify-globals"); if (optimizeLevel >= 3) { // replace indirect calls with direct and inline if possible again. - add("dae-optimizing"); add("directize"); + add("dae-optimizing"); add("precompute-propagate"); add("coalesce-locals"); add("merge-locals"); From 23ac0a7e00265435eea53e4b8690810a9adeea6d Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 05:44:15 +0200 Subject: [PATCH 39/51] remove unnecessary reorder-local --- cli/asc.js | 6 +- tests/compiler/do.optimized.wat | 138 +- .../extends-baseaggregate.optimized.wat | 144 +- tests/compiler/for.optimized.wat | 36 +- .../implicit-getter-setter.optimized.wat | 20 +- tests/compiler/infer-array.optimized.wat | 54 +- tests/compiler/infer-generic.optimized.wat | 12 +- tests/compiler/issues/1095.optimized.wat | 36 +- tests/compiler/managed-cast.optimized.wat | 36 +- tests/compiler/mandelbrot.optimized.wat | 138 +- tests/compiler/memcpy.optimized.wat | 24 +- tests/compiler/memmove.optimized.wat | 22 +- tests/compiler/number.optimized.wat | 145 +- tests/compiler/rc/local-init.optimized.wat | 36 +- .../rc/logical-and-mismatch.optimized.wat | 36 +- .../rc/logical-or-mismatch.optimized.wat | 36 +- tests/compiler/rc/optimize.optimized.wat | 36 +- tests/compiler/rc/rereturn.optimized.wat | 20 +- .../rc/ternary-mismatch.optimized.wat | 36 +- tests/compiler/resolve-access.optimized.wat | 74 +- tests/compiler/resolve-binary.optimized.wat | 105 +- .../resolve-elementaccess.optimized.wat | 100 +- .../resolve-function-expression.optimized.wat | 22 +- tests/compiler/resolve-ternary.optimized.wat | 125 +- .../retain-release-sanity.optimized.wat | 266 +- tests/compiler/retain-release.optimized.wat | 1 + tests/compiler/retain-return.optimized.wat | 36 +- tests/compiler/rt/stub-realloc.optimized.wat | 54 +- tests/compiler/runtime-full.optimized.wat | 20 +- .../compiler/std/array-literal.optimized.wat | 20 +- tests/compiler/std/array.optimized.wat | 2134 ++++----- tests/compiler/std/arraybuffer.optimized.wat | 204 +- tests/compiler/std/dataview.optimized.wat | 74 +- tests/compiler/std/hash.optimized.wat | 12 +- tests/compiler/std/libm.optimized.wat | 1732 ++++---- tests/compiler/std/map.optimized.wat | 882 ++-- tests/compiler/std/math.optimized.wat | 2088 ++++----- .../compiler/std/object-literal.optimized.wat | 22 +- .../std/operator-overloading.optimized.wat | 276 +- tests/compiler/std/pointer.optimized.wat | 58 +- tests/compiler/std/set.optimized.wat | 1746 ++++---- tests/compiler/std/static-array.optimized.wat | 96 +- tests/compiler/std/staticarray.optimized.wat | 74 +- .../std/string-casemapping.optimized.wat | 534 +-- .../std/string-encoding.optimized.wat | 188 +- tests/compiler/std/string.optimized.wat | 2232 +++++----- tests/compiler/std/symbol.optimized.wat | 68 +- tests/compiler/std/typedarray.optimized.wat | 3842 ++++++++--------- tests/compiler/while.optimized.wat | 148 +- 49 files changed, 9124 insertions(+), 9120 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 12e86e40ce..f8f6e30544 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -816,10 +816,9 @@ exports.main = function main(argv, options, callback) { // do this after CFG cleanup (originally it was done before) // moved from (1) add("code-pushing"); - - // this quite expensive so do this only for highest opt level - add("simplify-globals"); if (optimizeLevel >= 3) { + // this quite expensive so do this only for highest opt level + add("simplify-globals"); // replace indirect calls with direct and inline if possible again. add("directize"); add("dae-optimizing"); @@ -830,7 +829,6 @@ exports.main = function main(argv, options, callback) { add("vacuum"); add("inlining-optimizing"); add("precompute-propagate"); - add("reorder-locals"); } add("optimize-instructions"); add("simplify-globals-optimizing"); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 40ad00a216..e19b279872 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -668,16 +668,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -689,18 +689,18 @@ unreachable end i32.const 208 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 208 @@ -715,7 +715,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -732,10 +732,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -748,7 +748,7 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) @@ -757,10 +757,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -771,17 +771,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -792,9 +792,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add @@ -1053,19 +1053,19 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $1 + local.set $0 loop $do-continue|0 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.tee $1 + local.tee $0 br_if $do-continue|0 end - local.get $1 + local.get $0 if i32.const 0 i32.const 32 @@ -1074,7 +1074,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1090,17 +1090,17 @@ i32.const 0 global.set $do/ran i32.const 10 - local.set $0 + local.set $1 loop $do-continue|00 - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 br_if $do-continue|00 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -1129,17 +1129,17 @@ i32.const 0 global.set $do/ran i32.const 0 - local.set $0 + local.set $1 loop $do-continue|01 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $do-continue|01 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1153,17 +1153,17 @@ i32.const 1 global.set $do/ran i32.const 0 - local.set $0 + local.set $1 loop $do-continue|02 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $do-continue|02 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1189,17 +1189,17 @@ i32.const 0 global.set $do/ran i32.const 0 - local.set $0 + local.set $1 loop $do-continue|03 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $do-continue|03 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1215,22 +1215,22 @@ i32.const 0 global.set $do/ran i32.const 0 - local.set $0 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 loop $do-continue|04 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne if loop $do-continue|1 - local.get $1 + local.get $0 i32.const 1 i32.add - local.tee $1 + local.tee $0 i32.const 10 i32.rem_s br_if $do-continue|1 @@ -1238,7 +1238,7 @@ br $do-continue|04 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1249,7 +1249,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 90 i32.ne if @@ -1265,7 +1265,7 @@ i32.const 0 global.set $do/ran call $do/Ref#constructor - local.set $0 + local.set $1 loop $do-continue|05 local.get $2 i32.const 1 @@ -1275,20 +1275,20 @@ i32.eq if i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end else call $do/Ref#constructor - local.set $1 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 - local.tee $0 + local.get $0 + local.tee $1 br_if $do-continue|05 end local.get $2 @@ -1302,7 +1302,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1313,7 +1313,7 @@ end i32.const 1 global.set $do/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $do/ran i32.eqz @@ -1330,7 +1330,7 @@ i32.const 0 local.set $2 call $do/Ref#constructor - local.set $0 + local.set $1 loop $do-continue|06 block $do-break|0 local.get $2 @@ -1340,19 +1340,19 @@ i32.const 10 i32.eq if - local.get $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end i32.const 0 - local.set $0 + local.set $1 br $do-break|0 end call $do/Ref#constructor - local.tee $1 + local.tee $0 call $~lib/rt/pure/__release - local.get $1 + local.get $0 br_if $do-continue|06 end end @@ -1367,7 +1367,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1378,7 +1378,7 @@ end i32.const 1 global.set $do/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $do/ran i32.eqz diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 97df4be6e5..95ab36fe91 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -593,16 +593,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -614,18 +614,18 @@ unreachable end i32.const 560 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2128 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 560 @@ -640,7 +640,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -657,10 +657,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -673,7 +673,7 @@ i32.const 560 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 5 ;) (param $0 i32) (result i32) local.get $0 @@ -1148,7 +1148,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1170,32 +1170,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1203,10 +1203,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1220,7 +1220,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1228,18 +1228,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1254,22 +1254,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1277,18 +1277,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1297,16 +1297,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1864,27 +1864,27 @@ (local $4 i32) (local $5 i32) global.get $~lib/rt/pure/ROOTS - local.tee $5 - local.tee $2 + local.tee $0 + local.tee $4 local.set $3 global.get $~lib/rt/pure/CUR - local.set $0 + local.set $1 loop $for-loop|0 local.get $3 - local.get $0 + local.get $1 i32.lt_u if local.get $3 i32.load - local.tee $4 + local.tee $2 i32.load offset=4 - local.tee $1 + local.tee $5 i32.const 1879048192 i32.and i32.const 805306368 i32.eq if (result i32) - local.get $1 + local.get $5 i32.const 268435455 i32.and i32.const 0 @@ -1893,32 +1893,32 @@ i32.const 0 end if - local.get $4 - call $~lib/rt/pure/markGray local.get $2 + call $~lib/rt/pure/markGray local.get $4 - i32.store local.get $2 + i32.store + local.get $4 i32.const 4 i32.add - local.set $2 + local.set $4 else i32.const 0 - local.get $1 + local.get $5 i32.const 268435455 i32.and i32.eqz - local.get $1 + local.get $5 i32.const 1879048192 i32.and select if global.get $~lib/rt/tlsf/ROOT - local.get $4 + local.get $2 call $~lib/rt/tlsf/freeBlock else - local.get $4 - local.get $1 + local.get $2 + local.get $5 i32.const 2147483647 i32.and i32.store offset=4 @@ -1931,50 +1931,50 @@ br $for-loop|0 end end - local.get $2 + local.get $4 global.set $~lib/rt/pure/CUR - local.get $5 - local.set $0 + local.get $0 + local.set $1 loop $for-loop|1 - local.get $0 - local.get $2 + local.get $1 + local.get $4 i32.lt_u if - local.get $0 + local.get $1 i32.load call $~lib/rt/pure/scan - local.get $0 + local.get $1 i32.const 4 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $5 - local.set $0 + local.get $0 + local.set $1 loop $for-loop|2 - local.get $0 - local.get $2 + local.get $1 + local.get $4 i32.lt_u if - local.get $0 - i32.load - local.tee $1 local.get $1 + i32.load + local.tee $5 + local.get $5 i32.load offset=4 i32.const 2147483647 i32.and i32.store offset=4 - local.get $1 + local.get $5 call $~lib/rt/pure/collectWhite - local.get $0 + local.get $1 i32.const 4 i32.add - local.set $0 + local.set $1 br $for-loop|2 end end - local.get $5 + local.get $0 global.set $~lib/rt/pure/CUR ) (func $~lib/rt/pure/decrement (; 23 ;) (param $0 i32) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2c710903da..bae59e94d9 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -665,16 +665,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -686,18 +686,18 @@ unreachable end i32.const 208 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 208 @@ -712,7 +712,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -729,10 +729,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -745,7 +745,7 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) @@ -754,10 +754,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -768,17 +768,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -789,9 +789,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index a16177b968..d74ce46073 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -600,16 +600,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -621,18 +621,18 @@ unreachable end i32.const 224 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1792 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 224 @@ -647,7 +647,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -664,10 +664,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -680,7 +680,7 @@ i32.const 224 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index 6cee555feb..f54d0dac30 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -118,7 +118,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -140,32 +140,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -173,10 +173,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -190,7 +190,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -198,18 +198,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -224,22 +224,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -247,18 +247,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -267,16 +267,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/infer-generic.optimized.wat b/tests/compiler/infer-generic.optimized.wat index aaaad1e619..fbac8d83c4 100644 --- a/tests/compiler/infer-generic.optimized.wat +++ b/tests/compiler/infer-generic.optimized.wat @@ -41,22 +41,22 @@ (local $3 i32) i32.const 124 i32.load - local.set $1 + local.set $2 loop $for-loop|0 local.get $0 - local.get $1 + local.get $2 i32.const 124 i32.load - local.tee $2 - local.get $1 + local.tee $3 local.get $2 + local.get $3 i32.lt_s select i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $3 + local.get $1 i32.const 116 i32.load local.get $0 @@ -67,7 +67,7 @@ local.get $0 i32.const 112 call $start:infer-generic~anonymous|0 - local.set $3 + local.set $1 local.get $0 i32.const 1 i32.add diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 93fdb0f4ce..35cc20cbef 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -584,16 +584,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -605,18 +605,18 @@ unreachable end i32.const 256 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1824 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 256 @@ -631,7 +631,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -648,10 +648,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -664,7 +664,7 @@ i32.const 256 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -673,10 +673,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -687,17 +687,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -708,9 +708,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index e0b26f4929..9b3093a5af 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -586,16 +586,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -607,18 +607,18 @@ unreachable end i32.const 272 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1840 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 272 @@ -633,7 +633,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -650,10 +650,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -666,7 +666,7 @@ i32.const 272 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -675,10 +675,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -689,17 +689,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -710,9 +710,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 39a8179beb..6ca5a4ea41 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -175,11 +175,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) local.get $0 @@ -223,7 +223,7 @@ return end i32.const -54 - local.set $8 + local.set $4 local.get $0 f64.const 18014398509481984 f64.mul @@ -279,11 +279,11 @@ local.get $0 f64.add f64.div - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $3 - local.get $8 + local.get $4 local.get $1 i32.const 20 i32.shr_u @@ -298,25 +298,25 @@ f64.mul local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $6 + local.tee $7 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $7 + local.set $8 local.get $0 - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub - local.get $4 local.get $5 + local.get $6 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -351,7 +351,7 @@ f64.mul f64.add local.tee $0 - local.get $6 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -360,25 +360,25 @@ f64.mul f64.add local.get $9 - local.get $7 + local.get $8 f64.sub local.get $10 f64.add f64.add - local.get $7 + local.get $8 f64.add ) (func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) - (local $6 i32) - (local $7 i32) + (local $6 f64) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 f64) + (local $12 i32) + (local $13 i32) (local $14 f64) local.get $0 f64.convert_i32_u @@ -391,27 +391,27 @@ local.get $1 i32.const 3 i32.mul - local.tee $6 + local.tee $13 local.get $2 i32.const 2 i32.shl local.tee $2 - local.get $6 + local.get $13 local.get $2 i32.lt_s select f64.convert_i32_s f64.div - local.tee $9 + local.tee $11 f64.mul local.set $10 local.get $1 f64.convert_i32_u f64.const 0.625 f64.mul - local.get $9 + local.get $11 f64.mul - local.set $12 + local.set $8 local.get $0 local.get $1 i32.mul @@ -422,7 +422,7 @@ local.get $3 f64.convert_i32_u f64.div - local.set $13 + local.set $7 i32.const 8 local.get $3 i32.const 8 @@ -431,123 +431,123 @@ select local.set $0 i32.const 0 - local.set $6 + local.set $13 loop $for-loop|0 - local.get $6 + local.get $13 local.get $1 i32.lt_u if - local.get $6 + local.get $13 f64.convert_i32_u - local.get $9 + local.get $11 f64.mul - local.get $12 + local.get $8 f64.sub - local.set $11 - f64.const 0 - local.set $4 + local.set $9 f64.const 0 local.set $5 + f64.const 0 + local.set $14 i32.const 0 - local.set $7 + local.set $12 loop $while-continue|1 - local.get $4 - local.get $4 - f64.mul - local.tee $14 local.get $5 local.get $5 f64.mul - local.tee $8 + local.tee $6 + local.get $14 + local.get $14 + f64.mul + local.tee $4 f64.add f64.const 4 f64.le if block $while-break|1 f64.const 2 - local.get $4 - f64.mul local.get $5 f64.mul + local.get $14 + f64.mul local.get $10 f64.add - local.set $5 - local.get $14 - local.get $8 + local.set $14 + local.get $6 + local.get $4 f64.sub - local.get $11 + local.get $9 f64.add - local.set $4 - local.get $7 + local.set $5 + local.get $12 local.get $3 i32.ge_u br_if $while-break|1 - local.get $7 + local.get $12 i32.const 1 i32.add - local.set $7 + local.set $12 br $while-continue|1 end end end loop $while-continue|2 - local.get $7 + local.get $12 local.get $0 i32.lt_u if - local.get $4 - local.get $4 - f64.mul local.get $5 local.get $5 f64.mul + local.get $14 + local.get $14 + f64.mul f64.sub - local.get $11 + local.get $9 f64.add f64.const 2 - local.get $4 - f64.mul local.get $5 f64.mul + local.get $14 + f64.mul local.get $10 f64.add + local.set $14 local.set $5 - local.set $4 - local.get $7 + local.get $12 i32.const 1 i32.add - local.set $7 + local.set $12 br $while-continue|2 end end local.get $2 - local.get $6 + local.get $13 i32.const 1 i32.shl i32.add - local.get $4 - local.get $4 - f64.mul local.get $5 local.get $5 f64.mul + local.get $14 + local.get $14 + f64.mul f64.add - local.tee $8 + local.tee $4 f64.const 1 f64.gt if (result i32) f64.const 2047 - local.get $7 + local.get $12 i32.const 1 i32.add f64.convert_i32_u f64.const 0.5 - local.get $8 + local.get $4 call $~lib/math/NativeMath.log f64.mul call $~lib/math/NativeMath.log2 f64.sub - local.get $13 + local.get $7 f64.mul f64.const 0 f64.max @@ -559,10 +559,10 @@ i32.const 2047 end i32.store16 - local.get $6 + local.get $13 i32.const 1 i32.add - local.set $6 + local.set $13 br $for-loop|0 end end diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 8654966590..f1cef15ad9 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -15,7 +15,7 @@ (local $5 i32) (local $6 i32) local.get $0 - local.set $6 + local.set $5 loop $while-continue|0 local.get $1 i32.const 3 @@ -166,7 +166,7 @@ i32.load8_u i32.store8 end - local.get $6 + local.get $5 return end local.get $2 @@ -195,7 +195,7 @@ end local.get $1 i32.load - local.set $5 + local.set $6 local.get $0 local.get $1 i32.load8_u @@ -245,7 +245,7 @@ local.tee $3 i32.const 8 i32.shl - local.get $5 + local.get $6 i32.const 24 i32.shr_u i32.or @@ -287,7 +287,7 @@ i32.const 13 i32.add i32.load - local.tee $5 + local.tee $6 i32.const 8 i32.shl local.get $3 @@ -314,7 +314,7 @@ end local.get $1 i32.load - local.set $5 + local.set $6 local.get $0 local.get $1 i32.load8_u @@ -354,7 +354,7 @@ local.tee $3 i32.const 16 i32.shl - local.get $5 + local.get $6 i32.const 16 i32.shr_u i32.or @@ -396,7 +396,7 @@ i32.const 14 i32.add i32.load - local.tee $5 + local.tee $6 i32.const 16 i32.shl local.get $3 @@ -423,7 +423,7 @@ end local.get $1 i32.load - local.set $5 + local.set $6 local.get $0 local.tee $3 i32.const 1 @@ -455,7 +455,7 @@ local.tee $3 i32.const 24 i32.shl - local.get $5 + local.get $6 i32.const 8 i32.shr_u i32.or @@ -497,7 +497,7 @@ i32.const 15 i32.add i32.load - local.tee $5 + local.tee $6 i32.const 24 i32.shl local.get $3 @@ -859,7 +859,7 @@ i32.load8_u i32.store8 end - local.get $6 + local.get $5 ) (func $start:memcpy (; 2 ;) i32.const 8 diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index 4c976e8548..52297981f3 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -13,12 +13,12 @@ (local $4 i32) (local $5 i32) local.get $0 - local.set $3 + local.set $5 local.get $0 local.get $1 i32.eq if - local.get $3 + local.get $5 return end local.get $0 @@ -41,7 +41,7 @@ local.get $2 i32.eqz if - local.get $3 + local.get $5 return end local.get $2 @@ -49,17 +49,17 @@ i32.sub local.set $2 local.get $0 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $5 + local.tee $4 i32.const 1 i32.add local.set $1 + local.get $3 local.get $4 - local.get $5 i32.load8_u i32.store8 br $while-continue|0 @@ -94,17 +94,17 @@ local.get $2 if local.get $0 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $5 + local.tee $4 i32.const 1 i32.add local.set $1 + local.get $3 local.get $4 - local.get $5 i32.load8_u i32.store8 local.get $2 @@ -133,7 +133,7 @@ local.get $2 i32.eqz if - local.get $3 + local.get $5 return end local.get $0 @@ -188,7 +188,7 @@ end end end - local.get $3 + local.get $5 ) (func $start:memmove (; 2 ;) i32.const 8 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 348d497e90..ed4a9209e2 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -357,8 +357,8 @@ ) (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $7 i64) + (local $8 i32) (local $9 i64) (local $10 i32) (local $11 i64) @@ -380,7 +380,7 @@ i64.sub local.tee $12 i64.and - local.set $8 + local.set $7 local.get $3 local.get $10 i64.extend_i32_s @@ -514,11 +514,11 @@ local.set $2 end local.get $2 - local.get $7 + local.get $8 i32.or if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -528,16 +528,16 @@ i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $8 + local.get $7 local.get $6 i64.extend_i32_u local.get $10 @@ -563,7 +563,7 @@ i64.shl local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -580,11 +580,11 @@ local.get $1 local.get $3 i64.add - local.tee $8 + local.tee $7 local.get $9 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $9 i64.lt_u select @@ -615,7 +615,7 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 return end br $while-continue|0 @@ -629,35 +629,35 @@ i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $7 i64.const 10 i64.mul local.tee $3 local.get $1 i64.shr_u - local.tee $8 - local.get $7 + local.tee $7 + local.get $8 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add - local.get $8 + local.get $7 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 @@ -666,7 +666,7 @@ local.get $3 local.get $12 i64.and - local.tee $8 + local.tee $7 local.get $5 i64.ge_u br_if $while-continue|4 @@ -675,7 +675,7 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 + local.get $7 local.set $1 local.get $9 i32.const 0 @@ -689,7 +689,7 @@ i64.mul local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -706,11 +706,11 @@ local.get $1 local.get $11 i64.add - local.tee $8 + local.tee $7 local.get $3 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $3 i64.lt_u select @@ -741,14 +741,14 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 ) (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -770,32 +770,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -803,10 +803,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -820,7 +820,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -828,18 +828,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -854,22 +854,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -877,18 +877,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -897,16 +897,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1165,6 +1165,7 @@ (local $1 i64) (local $2 i64) (local $3 i64) + (local $4 f64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 @@ -1295,7 +1296,7 @@ call $~lib/rt/stub/__alloc local.tee $2 call $~lib/util/number/dtoa_core - local.tee $0 + local.tee $3 i32.const 28 i32.eq if @@ -1303,7 +1304,7 @@ return end local.get $2 - local.set $4 + local.set $0 block $__inlined_func$~lib/string/String#substring i32.const 0 local.get $2 @@ -1313,42 +1314,42 @@ local.get $1 i32.lt_s select - local.tee $3 - local.get $0 + local.tee $4 + local.get $3 i32.const 0 - local.get $0 + local.get $3 i32.const 0 i32.gt_s select - local.tee $0 + local.tee $3 local.get $1 - local.get $0 + local.get $3 local.get $1 i32.lt_s select - local.tee $0 + local.tee $3 + local.get $4 local.get $3 - local.get $0 i32.gt_s select i32.const 1 i32.shl local.tee $5 + local.get $4 local.get $3 - local.get $0 + local.get $4 local.get $3 - local.get $0 i32.lt_s select i32.const 1 i32.shl - local.tee $3 + local.tee $4 i32.sub - local.tee $0 + local.tee $3 i32.eqz if i32.const 1264 - local.set $4 + local.set $0 br $__inlined_func$~lib/string/String#substring end i32.const 0 @@ -1357,19 +1358,19 @@ i32.const 1 i32.shl i32.eq - local.get $3 + local.get $4 select br_if $__inlined_func$~lib/string/String#substring - local.get $0 + local.get $3 call $~lib/rt/stub/__alloc local.tee $1 - local.get $3 + local.get $0 local.get $4 i32.add - local.get $0 + local.get $3 call $~lib/memory/memory.copy local.get $1 - local.set $4 + local.set $0 end local.get $2 i32.const 15 @@ -1412,7 +1413,7 @@ local.get $1 global.set $~lib/rt/stub/offset end - local.get $4 + local.get $0 ) (func $~lib/number/F32.isSafeInteger (; 13 ;) (param $0 f32) (result i32) local.get $0 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index b721418e7e..2c7d504573 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -583,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -604,18 +604,18 @@ unreachable end i32.const 192 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1760 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 192 @@ -630,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -647,10 +647,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -663,7 +663,7 @@ i32.const 192 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -672,10 +672,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -686,17 +686,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -707,9 +707,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index f5a6d3f4c0..540f432f25 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -583,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -604,18 +604,18 @@ unreachable end i32.const 176 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 176 @@ -630,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -647,10 +647,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -663,7 +663,7 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -672,10 +672,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -686,17 +686,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -707,9 +707,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index 827bbc98fe..d8b0f05c8e 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -583,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -604,18 +604,18 @@ unreachable end i32.const 176 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 176 @@ -630,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -647,10 +647,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -663,7 +663,7 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -672,10 +672,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -686,17 +686,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -707,9 +707,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index b29e2644ac..78e294b7a9 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -673,16 +673,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -694,18 +694,18 @@ unreachable end i32.const 208 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 208 @@ -720,7 +720,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -737,10 +737,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -753,7 +753,7 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (result i32) (local $1 i32) @@ -762,10 +762,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -776,17 +776,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -797,9 +797,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 3ff427f068..3499305b9c 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -586,16 +586,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -607,18 +607,18 @@ unreachable end i32.const 224 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1792 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 224 @@ -633,7 +633,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -650,10 +650,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -666,7 +666,7 @@ i32.const 224 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index 7186480528..f84c8a4d3d 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -585,16 +585,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -606,18 +606,18 @@ unreachable end i32.const 176 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 176 @@ -632,7 +632,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -649,10 +649,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -665,7 +665,7 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) @@ -674,10 +674,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -688,17 +688,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -709,9 +709,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 06a1408e43..b631fd6aee 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -110,9 +110,9 @@ (local $3 i32) (local $4 i32) i32.const 32 - local.set $2 - i32.const 8 local.set $1 + i32.const 8 + local.set $4 block $~lib/util/memory/memmove|inlined.0 local.get $0 i32.const 32 @@ -132,76 +132,76 @@ i32.const 7 i32.and if - local.get $1 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.set $1 + local.set $4 local.get $0 - local.tee $3 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.tee $4 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $2 + local.set $1 + local.get $2 local.get $3 - local.get $4 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $1 + local.get $4 i32.const 8 i32.ge_u if local.get $0 - local.get $2 + local.get $1 i64.load i64.store - local.get $1 + local.get $4 i32.const 8 i32.sub - local.set $1 + local.set $4 local.get $0 i32.const 8 i32.add local.set $0 - local.get $2 + local.get $1 i32.const 8 i32.add - local.set $2 + local.set $1 br $while-continue|1 end end end loop $while-continue|2 - local.get $1 + local.get $4 if local.get $0 - local.tee $3 + local.tee $2 i32.const 1 i32.add local.set $0 - local.get $2 - local.tee $4 + local.get $1 + local.tee $3 i32.const 1 i32.add - local.set $2 + local.set $1 + local.get $2 local.get $3 - local.get $4 i32.load8_u i32.store8 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.set $1 + local.set $4 br $while-continue|2 end end @@ -213,21 +213,21 @@ if loop $while-continue|3 local.get $0 - local.get $1 + local.get $4 i32.add i32.const 7 i32.and if - local.get $1 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 local.get $0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.add - local.get $1 + local.get $4 i32.const 32 i32.add i32.load8_u @@ -236,17 +236,17 @@ end end loop $while-continue|4 - local.get $1 + local.get $4 i32.const 8 i32.ge_u if local.get $0 - local.get $1 + local.get $4 i32.const 8 i32.sub - local.tee $1 + local.tee $4 i32.add - local.get $1 + local.get $4 i32.const 32 i32.add i64.load @@ -256,15 +256,15 @@ end end loop $while-continue|5 - local.get $1 + local.get $4 if local.get $0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.add - local.get $1 + local.get $4 i32.const 32 i32.add i32.load8_u diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index cf562aae70..0f4defe7bc 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -373,8 +373,8 @@ ) (func $~lib/util/number/genDigits (; 8 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $7 i64) + (local $8 i32) (local $9 i64) (local $10 i32) (local $11 i64) @@ -396,7 +396,7 @@ i64.sub local.tee $12 i64.and - local.set $8 + local.set $7 local.get $3 local.get $10 i64.extend_i32_s @@ -530,11 +530,11 @@ local.set $2 end local.get $2 - local.get $7 + local.get $8 i32.or if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -544,16 +544,16 @@ i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $8 + local.get $7 local.get $6 i64.extend_i32_u local.get $10 @@ -579,7 +579,7 @@ i64.shl local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -596,11 +596,11 @@ local.get $1 local.get $3 i64.add - local.tee $8 + local.tee $7 local.get $9 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $9 i64.lt_u select @@ -631,7 +631,7 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 return end br $while-continue|0 @@ -645,35 +645,35 @@ i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $7 i64.const 10 i64.mul local.tee $3 local.get $1 i64.shr_u - local.tee $8 - local.get $7 + local.tee $7 + local.get $8 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add - local.get $8 + local.get $7 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 @@ -682,7 +682,7 @@ local.get $3 local.get $12 i64.and - local.tee $8 + local.tee $7 local.get $5 i64.ge_u br_if $while-continue|4 @@ -691,7 +691,7 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 + local.get $7 local.set $1 local.get $9 i32.const 0 @@ -705,7 +705,7 @@ i64.mul local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -722,11 +722,11 @@ local.get $1 local.get $11 i64.add - local.tee $8 + local.tee $7 local.get $3 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $3 i64.lt_u select @@ -757,14 +757,14 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 ) (func $~lib/memory/memory.copy (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -786,32 +786,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -819,10 +819,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -836,7 +836,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -844,18 +844,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -870,22 +870,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -893,18 +893,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -913,16 +913,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1181,6 +1181,7 @@ (local $1 i64) (local $2 i64) (local $3 i64) + (local $4 f64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index e16222a40d..329e21dbd5 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -300,31 +300,31 @@ (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) local.get $3 local.get $1 i64.sub - local.set $8 + local.set $9 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $9 + local.tee $10 i64.extend_i32_s i64.shl - local.tee $10 + local.tee $11 i64.const 1 i64.sub local.tee $12 i64.and - local.set $11 + local.set $8 local.get $3 - local.get $9 + local.get $10 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -480,10 +480,10 @@ i32.const 1 i32.sub local.set $4 - local.get $11 + local.get $8 local.get $7 i64.extend_i32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl i64.add @@ -501,7 +501,7 @@ i32.const 1328 i32.add i64.load32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl local.set $3 @@ -517,19 +517,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $8 + local.get $9 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.lt_u select i32.const 0 @@ -540,7 +540,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $8 + local.get $9 i64.lt_u select select @@ -565,7 +565,7 @@ br $while-continue|0 end end - local.get $9 + local.get $10 i64.extend_i32_s local.set $13 loop $while-continue|4 (result i32) @@ -573,7 +573,7 @@ i64.const 10 i64.mul local.set $5 - local.get $11 + local.get $8 i64.const 10 i64.mul local.tee $3 @@ -610,7 +610,7 @@ local.get $3 local.get $12 i64.and - local.tee $11 + local.tee $8 local.get $5 i64.ge_u br_if $while-continue|4 @@ -618,9 +618,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $11 - local.set $1 local.get $8 + local.set $1 + local.get $9 i32.const 0 local.get $4 i32.sub @@ -647,13 +647,13 @@ local.get $1 i64.sub local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.lt_u @@ -662,7 +662,7 @@ local.get $5 local.get $1 i64.sub - local.get $10 + local.get $11 i64.ge_u i32.const 0 local.get $1 @@ -676,7 +676,7 @@ i32.sub local.set $4 local.get $1 - local.get $10 + local.get $11 i64.add local.set $1 br $while-continue|6 @@ -693,7 +693,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -715,32 +715,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -748,10 +748,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -765,7 +765,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -773,18 +773,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -799,22 +799,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -822,18 +822,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -842,16 +842,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 3bdb6f5239..641f34c2e2 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -131,7 +131,7 @@ (local $3 i32) (local $4 i32) i32.const 144 - local.set $2 + local.set $3 local.get $0 i32.const 7 i32.and @@ -145,7 +145,7 @@ loop $do-continue|0 local.get $0 i64.load - local.get $2 + local.get $3 i64.load i64.eq if @@ -153,10 +153,10 @@ i32.const 8 i32.add local.set $0 - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 local.get $1 i32.const 4 i32.sub @@ -169,21 +169,21 @@ end loop $while-continue|1 local.get $1 - local.tee $3 + local.tee $2 i32.const 1 i32.sub local.set $1 - local.get $3 + local.get $2 if local.get $0 i32.load16_u - local.tee $3 - local.get $2 + local.tee $2 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $3 + local.get $2 local.get $4 i32.sub return @@ -192,10 +192,10 @@ i32.const 2 i32.add local.set $0 - local.get $2 + local.get $3 i32.const 2 i32.add - local.set $2 + local.set $3 br $while-continue|1 end end diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 874955982b..c3662a9384 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -608,16 +608,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -629,18 +629,18 @@ unreachable end i32.const 1536 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 3104 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 1536 @@ -655,7 +655,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -672,10 +672,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -688,7 +688,7 @@ i32.const 1536 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1317,8 +1317,8 @@ ) (func $~lib/util/number/genDigits (; 16 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (result i32) (local $6 i32) - (local $7 i32) - (local $8 i64) + (local $7 i64) + (local $8 i32) (local $9 i64) (local $10 i32) (local $11 i64) @@ -1340,7 +1340,7 @@ i64.sub local.tee $12 i64.and - local.set $8 + local.set $7 local.get $3 local.get $10 i64.extend_i32_s @@ -1474,11 +1474,11 @@ local.set $2 end local.get $2 - local.get $7 + local.get $8 i32.or if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add @@ -1488,16 +1488,16 @@ i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 i32.sub local.set $4 - local.get $8 + local.get $7 local.get $6 i64.extend_i32_u local.get $10 @@ -1523,7 +1523,7 @@ i64.shl local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -1540,11 +1540,11 @@ local.get $1 local.get $3 i64.add - local.tee $8 + local.tee $7 local.get $9 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $9 i64.lt_u select @@ -1575,7 +1575,7 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 return end br $while-continue|0 @@ -1589,35 +1589,35 @@ i64.const 10 i64.mul local.set $5 - local.get $8 + local.get $7 i64.const 10 i64.mul local.tee $3 local.get $1 i64.shr_u - local.tee $8 - local.get $7 + local.tee $7 + local.get $8 i64.extend_i32_s i64.or i64.const 0 i64.ne if local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.shl i32.add - local.get $8 + local.get $7 i32.wrap_i64 i32.const 65535 i32.and i32.const 48 i32.add i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 end local.get $4 i32.const 1 @@ -1626,7 +1626,7 @@ local.get $3 local.get $12 i64.and - local.tee $8 + local.tee $7 local.get $5 i64.ge_u br_if $while-continue|4 @@ -1635,7 +1635,7 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $8 + local.get $7 local.set $1 local.get $9 i32.const 0 @@ -1649,7 +1649,7 @@ i64.mul local.set $3 local.get $0 - local.get $7 + local.get $8 i32.const 1 i32.sub i32.const 1 @@ -1666,11 +1666,11 @@ local.get $1 local.get $11 i64.add - local.tee $8 + local.tee $7 local.get $3 i64.sub i64.gt_u - local.get $8 + local.get $7 local.get $3 i64.lt_u select @@ -1701,14 +1701,14 @@ local.get $0 local.get $4 i32.store16 - local.get $7 + local.get $8 ) (func $~lib/memory/memory.copy (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1730,32 +1730,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1763,10 +1763,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1780,7 +1780,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1788,18 +1788,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1814,22 +1814,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1837,18 +1837,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1857,16 +1857,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -2125,6 +2125,7 @@ (local $1 i64) (local $2 i64) (local $3 i64) + (local $4 f64) i64.const -9223372036854774784 global.set $~lib/util/number/_frc_plus i64.const 9223372036854775296 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 731f2c0be5..b20dbff518 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -600,16 +600,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -621,18 +621,18 @@ unreachable end i32.const 720 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2288 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 720 @@ -647,7 +647,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -664,10 +664,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -680,7 +680,7 @@ i32.const 720 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -1350,11 +1350,11 @@ local.get $1 i32.const 2 i32.shl - local.tee $2 + local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 + local.tee $2 + local.get $3 call $~lib/memory/memory.fill local.get $0 i32.eqz @@ -1374,7 +1374,7 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $3 + local.get $2 local.tee $1 local.get $0 i32.load @@ -1391,10 +1391,10 @@ local.get $1 i32.store local.get $0 - local.get $3 + local.get $2 i32.store offset=4 local.get $0 - local.get $2 + local.get $3 i32.store offset=8 local.get $0 ) @@ -1445,7 +1445,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1467,32 +1467,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1500,10 +1500,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1517,7 +1517,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1525,18 +1525,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1551,22 +1551,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1574,18 +1574,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1594,16 +1594,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1906,9 +1906,9 @@ local.get $2 call $~lib/array/Array#push local.get $2 - local.tee $3 - i32.load offset=12 local.tee $0 + i32.load offset=12 + local.tee $1 i32.const 1 i32.lt_s if @@ -1919,21 +1919,21 @@ call $~lib/builtins/abort unreachable end - local.get $3 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 i32.const 2 i32.shl i32.add i32.load drop - local.get $3 local.get $0 + local.get $1 i32.store offset=12 - local.get $3 + local.get $0 call $~lib/rt/pure/__release i32.const 16 i32.const 5 @@ -1941,14 +1941,14 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $3 + local.get $0 i32.const 0 i32.store offset=12 loop $for-loop|0 - local.get $1 + local.get $3 i32.const 10 i32.lt_s if @@ -1965,9 +1965,9 @@ i32.const 0 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 10 i32.lt_s if @@ -1990,38 +1990,38 @@ local.get $2 local.get $5 i32.store offset=12 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end local.get $2 call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $0 call $~lib/rt/pure/__release i32.const 416 i32.const 448 call $~lib/string/String.__concat - local.tee $3 + local.tee $0 i32.const 512 call $~lib/string/String.__concat - local.get $3 + local.get $0 call $~lib/rt/pure/__release call $~lib/rt/pure/__release i32.const 4 i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 0 i32.store i32.const 4 @@ -2032,104 +2032,104 @@ i32.const 0 i32.store local.get $2 - local.tee $0 - local.get $3 + local.tee $1 + local.get $0 local.tee $4 i32.load - local.tee $1 + local.tee $3 i32.ne if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 call $~lib/rt/pure/__release end local.get $4 - local.get $0 + local.get $1 i32.store local.get $2 - local.tee $1 + local.tee $3 local.get $4 - local.tee $0 + local.tee $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 + local.set $3 local.get $4 call $~lib/rt/pure/__release end - local.get $0 local.get $1 + local.get $3 i32.store - local.get $0 - local.tee $1 + local.get $1 + local.tee $3 local.get $2 - local.tee $0 + local.tee $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 + local.set $3 local.get $4 call $~lib/rt/pure/__release end - local.get $0 local.get $1 - i32.store local.get $3 - local.tee $1 + i32.store local.get $0 + local.tee $3 + local.get $1 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 + local.set $3 local.get $4 call $~lib/rt/pure/__release end - local.get $0 local.get $1 + local.get $3 i32.store + local.get $1 local.get $0 - local.get $3 - local.tee $1 + local.tee $3 i32.load local.tee $4 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 + local.set $1 local.get $4 call $~lib/rt/pure/__release end + local.get $3 local.get $1 - local.get $0 i32.store - local.get $3 + local.get $0 local.get $2 i32.load - local.tee $0 + local.tee $1 i32.ne if - local.get $1 + local.get $3 call $~lib/rt/pure/__retain - local.set $1 - local.get $0 + local.set $3 + local.get $1 call $~lib/rt/pure/__release end local.get $2 - local.get $1 - i32.store local.get $3 + i32.store + local.get $0 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release @@ -2250,27 +2250,27 @@ (local $4 i32) (local $5 i32) global.get $~lib/rt/pure/ROOTS - local.tee $5 - local.tee $2 + local.tee $0 + local.tee $4 local.set $3 global.get $~lib/rt/pure/CUR - local.set $0 + local.set $1 loop $for-loop|0 local.get $3 - local.get $0 + local.get $1 i32.lt_u if local.get $3 i32.load - local.tee $4 + local.tee $2 i32.load offset=4 - local.tee $1 + local.tee $5 i32.const 1879048192 i32.and i32.const 805306368 i32.eq if (result i32) - local.get $1 + local.get $5 i32.const 268435455 i32.and i32.const 0 @@ -2279,32 +2279,32 @@ i32.const 0 end if - local.get $4 - call $~lib/rt/pure/markGray local.get $2 + call $~lib/rt/pure/markGray local.get $4 - i32.store local.get $2 + i32.store + local.get $4 i32.const 4 i32.add - local.set $2 + local.set $4 else i32.const 0 - local.get $1 + local.get $5 i32.const 268435455 i32.and i32.eqz - local.get $1 + local.get $5 i32.const 1879048192 i32.and select if global.get $~lib/rt/tlsf/ROOT - local.get $4 + local.get $2 call $~lib/rt/tlsf/freeBlock else - local.get $4 - local.get $1 + local.get $2 + local.get $5 i32.const 2147483647 i32.and i32.store offset=4 @@ -2317,50 +2317,50 @@ br $for-loop|0 end end - local.get $2 + local.get $4 global.set $~lib/rt/pure/CUR - local.get $5 - local.set $0 + local.get $0 + local.set $1 loop $for-loop|1 - local.get $0 - local.get $2 + local.get $1 + local.get $4 i32.lt_u if - local.get $0 + local.get $1 i32.load call $~lib/rt/pure/scan - local.get $0 + local.get $1 i32.const 4 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $5 - local.set $0 + local.get $0 + local.set $1 loop $for-loop|2 - local.get $0 - local.get $2 + local.get $1 + local.get $4 i32.lt_u if - local.get $0 - i32.load - local.tee $1 local.get $1 + i32.load + local.tee $5 + local.get $5 i32.load offset=4 i32.const 2147483647 i32.and i32.store offset=4 - local.get $1 + local.get $5 call $~lib/rt/pure/collectWhite - local.get $0 + local.get $1 i32.const 4 i32.add - local.set $0 + local.set $1 br $for-loop|2 end end - local.get $5 + local.get $0 global.set $~lib/rt/pure/CUR ) (func $~lib/rt/pure/decrement (; 34 ;) (param $0 i32) diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index bb79b2231a..324c32b8ab 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -160,6 +160,7 @@ drop ) (func $retain-release/assignGlobal (; 7 ;) + (local $0 i32) global.get $retain-release/REF global.set $retain-release/glo ) diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index efeb5784e2..a20d680328 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -582,16 +582,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -603,18 +603,18 @@ unreachable end i32.const 176 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 176 @@ -629,7 +629,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -646,10 +646,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -662,7 +662,7 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (result i32) (local $1 i32) @@ -671,10 +671,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -685,17 +685,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -706,9 +706,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index 0fff930a82..9c6c9930c0 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -130,7 +130,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -152,32 +152,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -185,10 +185,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -202,7 +202,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -210,18 +210,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -236,22 +236,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -259,18 +259,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -279,16 +279,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 929d4708d3..14665fe025 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -586,16 +586,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -607,18 +607,18 @@ unreachable end i32.const 208 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 208 @@ -633,7 +633,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -650,10 +650,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -666,7 +666,7 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index b1080925c5..15447bd57e 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -638,16 +638,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -659,18 +659,18 @@ unreachable end i32.const 528 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2096 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 528 @@ -685,7 +685,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -702,10 +702,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -718,7 +718,7 @@ i32.const 528 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 813862ca1e..76841eb45c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -798,16 +798,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -819,18 +819,18 @@ unreachable end i32.const 8304 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 9872 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 8304 @@ -845,7 +845,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -862,10 +862,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -878,7 +878,7 @@ i32.const 8304 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) local.get $0 @@ -1645,7 +1645,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1667,32 +1667,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1700,10 +1700,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1717,7 +1717,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1725,18 +1725,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1751,22 +1751,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1774,18 +1774,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1794,16 +1794,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -2667,16 +2667,16 @@ (local $5 i32) (local $6 i32) local.get $2 - local.tee $4 + local.tee $3 local.get $0 i32.load offset=12 - local.tee $3 + local.tee $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add local.tee $1 i32.const 0 @@ -2686,16 +2686,16 @@ select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end local.tee $1 i32.sub local.tee $2 - local.get $4 + local.get $3 local.get $2 i32.lt_s select @@ -2711,7 +2711,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.load offset=4 local.get $0 i32.load offset=4 @@ -2725,7 +2725,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $3 + local.get $4 local.get $1 local.get $2 i32.add @@ -2738,7 +2738,7 @@ i32.const 2 i32.shl i32.add - local.get $3 + local.get $4 local.get $1 i32.sub i32.const 2 @@ -2746,11 +2746,11 @@ call $~lib/memory/memory.copy end local.get $0 - local.get $3 + local.get $4 local.get $2 i32.sub i32.store offset=12 - local.get $4 + local.get $3 ) (func $~lib/array/Array#splice (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3785,74 +3785,74 @@ (local $6 f32) (local $7 i32) loop $for-loop|0 - local.get $4 + local.get $7 local.get $1 i32.lt_s if local.get $0 - local.get $4 + local.get $7 i32.const 2 i32.shl i32.add f32.load - local.set $5 - local.get $4 + local.set $6 + local.get $7 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $while-continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add f32.load - local.set $6 + local.set $5 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 + local.get $5 local.get $2 call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $3 - local.tee $7 + local.get $4 + local.tee $3 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 - local.get $7 + local.get $3 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 f32.store br $while-continue|1 end end end local.get $0 - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 f32.store - local.get $4 + local.get $7 i32.const 1 i32.add - local.set $4 + local.set $7 br $for-loop|0 end end @@ -4233,74 +4233,74 @@ (local $6 f64) (local $7 i32) loop $for-loop|0 - local.get $4 + local.get $7 local.get $1 i32.lt_s if local.get $0 - local.get $4 + local.get $7 i32.const 3 i32.shl i32.add f64.load - local.set $5 - local.get $4 + local.set $6 + local.get $7 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $while-continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.add f64.load - local.set $6 + local.set $5 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 + local.get $5 local.get $2 call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $3 - local.tee $7 + local.get $4 + local.tee $3 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 - local.get $7 + local.get $3 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $6 + local.get $5 f64.store br $while-continue|1 end end end local.get $0 - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 f64.store - local.get $4 + local.get $7 i32.const 1 i32.add - local.set $4 + local.set $7 br $for-loop|0 end end @@ -4702,74 +4702,74 @@ (local $6 i32) (local $7 i32) loop $for-loop|0 - local.get $4 + local.get $7 local.get $1 i32.lt_s if local.get $0 - local.get $4 + local.get $7 i32.const 2 i32.shl i32.add i32.load - local.set $5 - local.get $4 + local.set $6 + local.get $7 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $while-continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load - local.set $6 + local.set $5 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 + local.get $5 local.get $2 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.ge_s br_if $while-break|1 - local.get $3 - local.tee $7 + local.get $4 + local.tee $3 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 - local.get $7 + local.get $3 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $6 + local.get $5 i32.store br $while-continue|1 end end end local.get $0 - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 i32.store - local.get $4 + local.get $7 i32.const 1 i32.add - local.set $4 + local.set $7 br $for-loop|0 end end @@ -5051,30 +5051,30 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $4 local.get $3 i32.const 2 i32.eq if - local.get $2 + local.get $4 i32.load offset=4 local.set $3 - local.get $2 + local.get $4 i32.load - local.set $4 + local.set $2 i32.const 2 global.set $~argumentsLength local.get $3 - local.get $4 + local.get $2 local.get $1 call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if - local.get $2 local.get $4 - i32.store offset=4 local.get $2 + i32.store offset=4 + local.get $4 local.get $3 i32.store end @@ -5083,17 +5083,17 @@ return end local.get $3 - local.tee $4 + local.tee $2 i32.const 256 i32.lt_s if - local.get $2 local.get $4 + local.get $2 local.get $1 call $~lib/util/sort/insertionSort else - local.get $2 local.get $4 + local.get $2 local.get $1 call $~lib/util/sort/weakHeapSort end @@ -5799,35 +5799,35 @@ i32.const 400 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 400 i32.store offset=12 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 400 i32.lt_s if - local.get $1 - local.set $5 + local.get $0 + local.set $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s local.set $6 i32.const 0 - local.set $3 + local.set $4 i32.const 5120 - local.set $0 + local.set $1 loop $for-loop|00 - local.get $3 + local.get $4 local.get $6 i32.lt_s if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 block $__inlined_func$~lib/string/String#charAt (result i32) i32.const 5120 call $~lib/math/NativeMath.random @@ -5837,7 +5837,7 @@ f64.mul f64.floor i32.trunc_f64_s - local.tee $0 + local.tee $1 i32.const 4080 call $~lib/string/String#get:length i32.ge_u @@ -5846,55 +5846,55 @@ i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $0 + local.tee $5 + local.get $1 i32.const 1 i32.shl i32.const 4080 i32.add i32.load16_u i32.store16 - local.get $4 + local.get $5 call $~lib/rt/pure/__retain end local.tee $7 call $~lib/string/String.__concat - local.tee $4 - local.tee $0 - local.get $1 + local.tee $5 + local.tee $1 + local.get $0 i32.ne if - 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 call $~lib/rt/pure/__release end local.get $7 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|00 end end + local.get $3 local.get $2 - local.get $5 - local.get $0 + local.get $1 call $~lib/array/Array<~lib/array/Array>#__set - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $2 + local.get $3 ) (func $~lib/string/String#substring (; 124 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6549,31 +6549,31 @@ (func $~lib/util/number/genDigits (; 136 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) local.get $3 local.get $1 i64.sub - local.set $8 + local.set $9 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $9 + local.tee $10 i64.extend_i32_s i64.shl - local.tee $10 + local.tee $11 i64.const 1 i64.sub local.tee $12 i64.and - local.set $11 + local.set $8 local.get $3 - local.get $9 + local.get $10 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -6729,10 +6729,10 @@ i32.const 1 i32.sub local.set $4 - local.get $11 + local.get $8 local.get $7 i64.extend_i32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl i64.add @@ -6750,7 +6750,7 @@ i32.const 6880 i32.add i64.load32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl local.set $3 @@ -6766,19 +6766,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $8 + local.get $9 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.lt_u select i32.const 0 @@ -6789,7 +6789,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $8 + local.get $9 i64.lt_u select select @@ -6814,7 +6814,7 @@ br $while-continue|0 end end - local.get $9 + local.get $10 i64.extend_i32_s local.set $13 loop $while-continue|4 (result i32) @@ -6822,7 +6822,7 @@ i64.const 10 i64.mul local.set $5 - local.get $11 + local.get $8 i64.const 10 i64.mul local.tee $3 @@ -6859,7 +6859,7 @@ local.get $3 local.get $12 i64.and - local.tee $11 + local.tee $8 local.get $5 i64.ge_u br_if $while-continue|4 @@ -6867,9 +6867,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $11 - local.set $1 local.get $8 + local.set $1 + local.get $9 i32.const 0 local.get $4 i32.sub @@ -6896,13 +6896,13 @@ local.get $1 i64.sub local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.lt_u @@ -6911,7 +6911,7 @@ local.get $5 local.get $1 i64.sub - local.get $10 + local.get $11 i64.ge_u i32.const 0 local.get $1 @@ -6925,7 +6925,7 @@ i32.sub local.set $4 local.get $1 - local.get $10 + local.get $11 i64.add local.set $1 br $while-continue|6 @@ -7722,7 +7722,7 @@ local.get $1 i32.const 1 i32.sub - local.tee $5 + local.tee $6 i32.const 0 i32.lt_s if @@ -7730,44 +7730,44 @@ return end local.get $2 - local.set $7 + local.set $4 i32.const 0 local.set $2 - local.get $5 + local.get $6 i32.eqz if local.get $0 i32.load - local.tee $4 + local.tee $5 if - local.get $4 + local.get $5 call $~lib/rt/pure/__retain - local.set $4 + local.set $5 end - local.get $4 + local.get $5 if (result i32) - local.get $4 + local.get $5 call $~lib/rt/pure/__retain else i32.const 5120 end - local.get $4 + local.get $5 call $~lib/rt/pure/__release return end i32.const 5120 local.set $1 - local.get $7 + local.get $4 call $~lib/string/String#get:length local.set $8 loop $for-loop|0 - local.get $4 local.get $5 + local.get $6 i32.lt_s if local.get $2 local.get $0 - local.get $4 + local.get $5 i32.const 2 i32.shl i32.add @@ -7811,9 +7811,9 @@ if local.get $1 local.tee $3 - local.get $7 + local.get $4 call $~lib/string/String.__concat - local.tee $6 + local.tee $7 local.tee $1 local.get $3 i32.ne @@ -7824,19 +7824,19 @@ local.get $3 call $~lib/rt/pure/__release end - local.get $6 + local.get $7 call $~lib/rt/pure/__release end - local.get $4 + local.get $5 i32.const 1 i32.add - local.set $4 + local.set $5 br $for-loop|0 end end local.get $2 local.get $0 - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add @@ -7910,17 +7910,17 @@ if local.get $0 i32.load - local.tee $3 + local.tee $4 if - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - local.set $3 + local.set $4 end - local.get $3 + local.get $4 call $~lib/rt/pure/__release i32.const 7104 i32.const 5120 - local.get $3 + local.get $4 select return end @@ -7930,28 +7930,28 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $3 + local.get $4 local.get $5 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 - local.tee $4 + local.tee $3 if local.get $1 local.get $1 @@ -7992,10 +7992,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -8006,13 +8006,13 @@ i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 @@ -8022,7 +8022,7 @@ local.get $1 i32.const 7104 call $~lib/string/String.__concat - local.tee $4 + local.tee $3 local.tee $2 i32.ne if @@ -8032,7 +8032,7 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $2 local.set $1 @@ -8860,21 +8860,21 @@ if local.get $0 i32.load - local.tee $3 + local.tee $4 if - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - local.set $3 + local.set $4 end - local.get $3 + local.get $4 if (result i32) - local.get $3 + local.get $4 i32.const 5360 call $~lib/array/Array#join else i32.const 5120 end - local.get $3 + local.get $4 call $~lib/rt/pure/__release return end @@ -8884,30 +8884,30 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $3 + local.get $4 local.get $5 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 - local.tee $4 + local.tee $3 if - local.get $4 + local.get $3 i32.const 5360 call $~lib/array/Array#join local.tee $2 @@ -8951,10 +8951,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -8965,13 +8965,13 @@ i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 @@ -8985,7 +8985,7 @@ local.get $1 local.get $2 call $~lib/string/String.__concat - local.tee $3 + local.tee $4 local.tee $2 i32.ne if @@ -8996,7 +8996,7 @@ call $~lib/rt/pure/__release end call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $2 local.set $1 @@ -9168,20 +9168,20 @@ if local.get $0 i32.load - local.tee $3 + local.tee $4 if - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - local.set $3 + local.set $4 end - local.get $3 + local.get $4 if (result i32) - local.get $3 + local.get $4 call $~lib/array/Array#toString else i32.const 5120 end - local.get $3 + local.get $4 call $~lib/rt/pure/__release return end @@ -9191,32 +9191,32 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $3 + local.get $4 local.get $5 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 - local.tee $4 + local.tee $3 if local.get $1 local.get $1 - local.get $4 + local.get $3 call $~lib/array/Array#toString local.tee $6 call $~lib/string/String.__concat @@ -9257,10 +9257,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -9271,13 +9271,13 @@ i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 @@ -9287,9 +9287,9 @@ local.get $1 local.get $0 call $~lib/array/Array#toString - local.tee $4 - call $~lib/string/String.__concat local.tee $3 + call $~lib/string/String.__concat + local.tee $4 local.tee $2 i32.ne if @@ -9299,10 +9299,10 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $4 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $2 local.set $1 end @@ -9333,21 +9333,21 @@ if local.get $0 i32.load - local.tee $3 + local.tee $4 if - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - local.set $3 + local.set $4 end - local.get $3 + local.get $4 if (result i32) - local.get $3 + local.get $4 i32.const 5360 call $~lib/array/Array#join else i32.const 5120 end - local.get $3 + local.get $4 call $~lib/rt/pure/__release return end @@ -9357,30 +9357,30 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $3 + local.get $4 local.get $5 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 - local.tee $4 + local.tee $3 if - local.get $4 + local.get $3 i32.const 5360 call $~lib/array/Array#join local.tee $2 @@ -9424,10 +9424,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -9438,13 +9438,13 @@ i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 @@ -9458,7 +9458,7 @@ local.get $1 local.get $2 call $~lib/string/String.__concat - local.tee $3 + local.tee $4 local.tee $2 i32.ne if @@ -9469,7 +9469,7 @@ call $~lib/rt/pure/__release end call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release local.get $2 local.set $1 @@ -9508,20 +9508,20 @@ if local.get $0 i32.load - local.tee $3 + local.tee $4 if - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - local.set $3 + local.set $4 end - local.get $3 + local.get $4 if (result i32) - local.get $3 + local.get $4 call $~lib/array/Array<~lib/array/Array>#toString else i32.const 5120 end - local.get $3 + local.get $4 call $~lib/rt/pure/__release return end @@ -9531,32 +9531,32 @@ call $~lib/string/String#get:length local.set $7 loop $for-loop|0 - local.get $3 + local.get $4 local.get $5 i32.lt_s if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 - local.tee $4 + local.tee $3 if local.get $1 local.get $1 - local.get $4 + local.get $3 call $~lib/array/Array<~lib/array/Array>#toString local.tee $6 call $~lib/string/String.__concat @@ -9597,10 +9597,10 @@ local.get $6 call $~lib/rt/pure/__release end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end @@ -9611,13 +9611,13 @@ i32.add i32.load local.tee $2 - local.get $4 + local.get $3 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $4 + local.get $3 call $~lib/rt/pure/__release end local.get $2 @@ -9627,9 +9627,9 @@ local.get $1 local.get $0 call $~lib/array/Array<~lib/array/Array>#toString - local.tee $4 - call $~lib/string/String.__concat local.tee $3 + call $~lib/string/String.__concat + local.tee $4 local.tee $2 i32.ne if @@ -9639,10 +9639,10 @@ local.get $1 call $~lib/rt/pure/__release end - local.get $4 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release local.get $2 local.set $1 end @@ -9669,31 +9669,31 @@ (local $15 i32) (local $16 i32) (local $17 i32) - (local $18 f32) + (local $18 i32) (local $19 i32) (local $20 i32) (local $21 i32) (local $22 i32) (local $23 i32) - (local $24 f64) + (local $24 i32) (local $25 i32) (local $26 i32) - (local $27 i32) + (local $27 i64) (local $28 i32) (local $29 i32) (local $30 i32) (local $31 i32) (local $32 i32) - (local $33 i64) + (local $33 i32) (local $34 i32) (local $35 i32) - (local $36 i32) + (local $36 f64) (local $37 i32) (local $38 i32) (local $39 i32) (local $40 i32) (local $41 i32) - (local $42 i32) + (local $42 f32) (local $43 i32) (local $44 i32) (local $45 i32) @@ -9722,7 +9722,7 @@ i32.const 1 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $1 + local.set $0 global.get $std/array/arr i32.eqz if @@ -9734,7 +9734,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -9742,20 +9742,20 @@ i32.const 384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 416 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -9766,20 +9766,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $57 call $std/array/isArraysEqual i32.eqz if @@ -9790,20 +9790,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 call $std/array/isArraysEqual i32.eqz if @@ -9814,20 +9814,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $55 call $std/array/isArraysEqual i32.eqz if @@ -9838,20 +9838,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 6 i32.const 656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $56 call $std/array/isArraysEqual i32.eqz if @@ -9862,17 +9862,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $57 call $~lib/rt/pure/__release - local.get $5 + local.get $58 call $~lib/rt/pure/__release - local.get $4 + local.get $55 + call $~lib/rt/pure/__release + local.get $56 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -9880,20 +9880,20 @@ i32.const 688 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9905,20 +9905,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9930,20 +9930,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9955,20 +9955,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $55 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9980,20 +9980,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 7 i32.const 928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10005,17 +10005,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $57 call $~lib/rt/pure/__release - local.get $5 + local.get $58 call $~lib/rt/pure/__release - local.get $4 + local.get $55 + call $~lib/rt/pure/__release + local.get $56 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -10276,51 +10276,51 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=4 local.tee $0 + i32.load offset=4 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $3 + local.tee $57 i32.const 0 i32.gt_s if - local.get $1 + local.get $0 i32.load offset=4 - local.tee $0 - local.get $3 + local.tee $1 + local.get $57 i32.const 2 i32.shl i32.add - local.set $3 + local.set $57 loop $do-continue|0 - local.get $0 + local.get $1 i32.load call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 4 i32.add - local.tee $0 - local.get $3 + local.tee $1 + local.get $57 i32.lt_u br_if $do-continue|0 end else - local.get $1 + local.get $0 i32.const 0 call $~lib/array/ensureSize end - local.get $1 + local.get $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 i32.load offset=12 if i32.const 0 @@ -10330,15 +10330,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $1 + local.set $0 global.get $std/array/arr - local.get $1 + local.get $0 call $~lib/array/Array#concat - local.set $3 + local.set $57 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10363,7 +10363,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.load offset=12 i32.const 3 i32.ne @@ -10375,14 +10375,14 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 0 i32.const 2 i32.const 3 i32.const 1024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $55 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10397,7 +10397,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10410,7 +10410,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10423,7 +10423,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10436,17 +10436,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 46 call $~lib/array/Array#push - local.get $1 + local.get $0 i32.const 47 call $~lib/array/Array#push global.get $std/array/arr - local.get $1 + local.get $0 call $~lib/array/Array#concat - local.set $0 - local.get $3 + local.set $1 + local.get $57 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10460,7 +10460,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=12 i32.const 2 i32.ne @@ -10472,7 +10472,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=12 i32.const 5 i32.ne @@ -10484,7 +10484,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10497,7 +10497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10510,7 +10510,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10523,7 +10523,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -10536,7 +10536,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -10549,10 +10549,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/array/Array#pop drop - local.get $0 + local.get $1 i32.load offset=12 i32.const 4 i32.ne @@ -10570,7 +10570,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $57 i32.load offset=12 if i32.const 0 @@ -10580,13 +10580,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 global.get $std/array/arr call $~lib/array/Array#concat - local.set $2 - local.get $0 + local.set $58 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $58 i32.load offset=12 i32.const 3 i32.ne @@ -10598,7 +10598,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.load offset=12 if i32.const 0 @@ -10608,13 +10608,13 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $5 + local.get $55 call $~lib/rt/pure/__release - local.get $3 + local.get $57 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10622,19 +10622,19 @@ i32.const 1056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10652,22 +10652,22 @@ i32.const 1152 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $55 i32.const 5 i32.const 2 i32.const 3 i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10685,21 +10685,21 @@ i32.const 1248 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $6 + local.tee $54 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $37 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10717,21 +10717,21 @@ i32.const 1344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $7 + local.tee $53 i32.const 5 i32.const 2 i32.const 3 i32.const 1392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $52 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10749,21 +10749,21 @@ i32.const 1440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $9 + local.tee $51 i32.const 5 i32.const 2 i32.const 3 i32.const 1488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10781,21 +10781,21 @@ i32.const 1536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $11 + local.tee $49 i32.const 5 i32.const 2 i32.const 3 i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10813,21 +10813,21 @@ i32.const 1632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $46 i32.const 5 i32.const 2 i32.const 3 i32.const 1680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10845,21 +10845,21 @@ i32.const 1728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $44 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $32 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10877,21 +10877,21 @@ i32.const 1824 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $17 + local.tee $43 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10909,21 +10909,21 @@ i32.const 1920 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $19 + local.tee $41 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10941,22 +10941,22 @@ i32.const 2016 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $21 + local.tee $39 i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10974,22 +10974,22 @@ i32.const 2112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 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 2160 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11001,55 +11001,55 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $57 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $5 + local.get $55 call $~lib/rt/pure/__release - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release - local.get $23 + local.get $37 call $~lib/rt/pure/__release - local.get $7 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $52 call $~lib/rt/pure/__release - local.get $9 + local.get $51 call $~lib/rt/pure/__release - local.get $10 + local.get $50 call $~lib/rt/pure/__release - local.get $11 + local.get $49 call $~lib/rt/pure/__release - local.get $12 + local.get $48 call $~lib/rt/pure/__release - local.get $14 + local.get $46 call $~lib/rt/pure/__release - local.get $15 + local.get $45 call $~lib/rt/pure/__release - local.get $16 + local.get $44 call $~lib/rt/pure/__release - local.get $28 + local.get $32 call $~lib/rt/pure/__release - local.get $17 + local.get $43 call $~lib/rt/pure/__release - local.get $13 + local.get $47 call $~lib/rt/pure/__release - local.get $19 + local.get $41 call $~lib/rt/pure/__release - local.get $20 + local.get $40 call $~lib/rt/pure/__release - local.get $21 + local.get $39 call $~lib/rt/pure/__release - local.get $22 + local.get $38 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $25 + local.get $35 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -11223,9 +11223,9 @@ unreachable end global.get $std/array/arr - local.tee $1 + local.tee $0 i32.load offset=12 - local.tee $3 + local.tee $57 i32.const 1 i32.lt_s if @@ -11236,29 +11236,29 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=4 - local.tee $0 + local.tee $1 i32.load - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.const 4 i32.add - local.get $3 + local.get $57 i32.const 1 i32.sub - local.tee $3 + local.tee $57 i32.const 2 i32.shl - local.tee $5 + local.tee $55 call $~lib/memory/memory.copy - local.get $0 - local.get $5 + local.get $1 + local.get $55 i32.add i32.const 0 i32.store - local.get $1 - local.get $3 + local.get $0 + local.get $57 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11426,45 +11426,45 @@ unreachable end global.get $std/array/arr - local.tee $3 + local.tee $57 i32.load offset=12 - local.tee $0 + local.tee $1 if - local.get $3 + local.get $57 i32.load offset=4 - local.set $1 - local.get $3 + local.set $0 + local.get $57 i32.load offset=4 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 2 i32.shl i32.add - local.set $0 + local.set $1 loop $while-continue|0 - local.get $1 local.get $0 + local.get $1 i32.lt_u if - local.get $1 - i32.load - local.set $2 - local.get $1 local.get $0 i32.load - i32.store + local.set $58 local.get $0 - local.get $2 + local.get $1 + i32.load i32.store local.get $1 + local.get $58 + i32.store + local.get $0 i32.const 4 i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 4 i32.sub - local.set $0 + local.set $1 br $while-continue|0 end end @@ -11702,36 +11702,36 @@ i32.const 2208 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 - local.set $5 + local.tee $0 + local.set $55 i32.const 0 - local.set $0 + local.set $1 block $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $0 i32.load offset=12 - local.tee $3 + local.tee $57 if (result i32) i32.const 0 - local.get $3 + local.get $57 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $0 + local.set $1 br $__inlined_func$~lib/array/Array#indexOf end - local.get $5 + local.get $55 i32.load offset=4 - local.set $2 + local.set $58 loop $while-continue|022 - local.get $0 - local.get $3 + local.get $1 + local.get $57 i32.lt_s if - local.get $2 - local.get $0 + local.get $58 + local.get $1 i32.const 2 i32.shl i32.add @@ -11739,17 +11739,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|022 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11766,36 +11766,36 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 - local.set $4 + local.tee $57 + local.set $56 i32.const 0 - local.set $0 + local.set $1 block $__inlined_func$~lib/array/Array#indexOf - local.get $3 + local.get $57 i32.load offset=12 - local.tee $2 + local.tee $58 if (result i32) i32.const 0 - local.get $2 + local.get $58 i32.ge_s else i32.const 1 end if i32.const -1 - local.set $0 + local.set $1 br $__inlined_func$~lib/array/Array#indexOf end - local.get $4 + local.get $56 i32.load offset=4 - local.set $5 + local.set $55 loop $while-continue|023 - local.get $0 - local.get $2 + local.get $1 + local.get $58 i32.lt_s if - local.get $5 - local.get $0 + local.get $55 + local.get $1 i32.const 3 i32.shl i32.add @@ -11803,17 +11803,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|023 end end i32.const -1 - local.set $0 + local.set $1 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -11824,9 +11824,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $57 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11966,7 +11966,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $1 + local.set $0 i32.const 0 i32.const 1 i32.const 2 @@ -11974,49 +11974,49 @@ i32.const 2272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $57 i32.load offset=12 - local.tee $2 + local.tee $58 if (result i32) i32.const 0 - local.get $2 + local.get $58 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $3 + local.get $57 i32.load offset=4 - local.set $4 + local.set $56 loop $while-continue|024 - local.get $1 - local.get $2 + local.get $0 + local.get $58 i32.lt_s if i32.const 1 - local.get $4 - local.get $1 + local.get $56 + local.get $0 i32.const 2 i32.shl i32.add f32.load - local.tee $18 + local.tee $42 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $18 - local.get $18 + local.get $42 + local.get $42 f32.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|024 end end @@ -12033,7 +12033,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $1 + local.set $0 i32.const 0 i32.const 1 i32.const 3 @@ -12041,49 +12041,49 @@ i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.load offset=12 - local.tee $5 + local.tee $55 if (result i32) i32.const 0 - local.get $5 + local.get $55 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $2 + local.get $58 i32.load offset=4 - local.set $6 + local.set $54 loop $while-continue|025 - local.get $1 - local.get $5 + local.get $0 + local.get $55 i32.lt_s if i32.const 1 - local.get $6 - local.get $1 + local.get $54 + local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $24 + local.tee $36 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $24 - local.get $24 + local.get $36 + local.get $36 f64.ne end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|025 end end @@ -12153,9 +12153,9 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12163,18 +12163,18 @@ i32.const 2336 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $4 + local.tee $56 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12186,14 +12186,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 i32.const 2 i32.const 3 i32.const 2432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12211,21 +12211,21 @@ i32.const 2448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $8 + local.tee $52 i32.const 0 i32.const 2 i32.const 3 i32.const 2496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12237,14 +12237,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 2512 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12262,21 +12262,21 @@ i32.const 2560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $11 + local.tee $49 i32.const 3 i32.const 2 i32.const 3 i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12288,14 +12288,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 i32.const 2 i32.const 3 i32.const 2640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $46 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12313,21 +12313,21 @@ i32.const 2672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $15 + local.tee $45 i32.const 2 i32.const 2 i32.const 3 i32.const 2720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12339,14 +12339,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $43 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12364,20 +12364,20 @@ i32.const 2784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $13 + local.tee $47 i32.const 1 i32.const 2 i32.const 3 i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12389,14 +12389,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12414,20 +12414,20 @@ i32.const 2896 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $21 + local.tee $39 i32.const 1 i32.const 2 i32.const 3 i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12439,14 +12439,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 2976 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $35 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12464,13 +12464,13 @@ i32.const 3008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $29 + local.tee $31 i32.const 2 i32.const 2 i32.const 3 @@ -12489,14 +12489,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 3 i32.const 2 i32.const 3 i32.const 3088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $29 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12514,20 +12514,20 @@ i32.const 3120 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $32 + local.tee $28 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $34 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12539,14 +12539,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12564,20 +12564,20 @@ i32.const 3232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $34 + local.tee $26 i32.const 1 i32.const 2 i32.const 3 i32.const 3280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12589,14 +12589,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 2 i32.const 3 i32.const 3312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $36 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12614,20 +12614,20 @@ i32.const 3344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $37 + local.tee $23 i32.const 0 i32.const 2 i32.const 3 i32.const 3392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12639,14 +12639,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3408 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $39 + local.tee $21 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12664,20 +12664,20 @@ i32.const 3456 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $40 + local.tee $20 i32.const 0 i32.const 2 i32.const 3 i32.const 3504 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12689,14 +12689,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $42 + local.tee $18 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12714,20 +12714,20 @@ i32.const 3568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.tee $1 i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $43 + local.tee $17 i32.const 0 i32.const 2 i32.const 3 i32.const 3616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12739,14 +12739,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12764,21 +12764,21 @@ i32.const 3680 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $46 + local.tee $14 i32.const 0 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12790,14 +12790,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12815,21 +12815,21 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 - local.get $1 + local.set $58 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $58 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $49 + local.tee $11 i32.const 0 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12841,14 +12841,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $58 i32.const 5 i32.const 2 i32.const 3 i32.const 3856 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12866,10 +12866,10 @@ i32.const 3904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 1 call $~lib/array/Array#splice - local.tee $5 + local.tee $55 i32.load offset=12 if i32.const 0 @@ -12879,7 +12879,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=12 if i32.const 0 @@ -12895,37 +12895,37 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $57 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $1 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $0 + local.get $1 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $0 + local.get $1 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $57 i32.const 2 call $~lib/array/Array#splice - local.set $23 - local.get $5 + local.set $37 + local.get $55 call $~lib/rt/pure/__release - local.get $23 + local.get $37 i32.load offset=12 i32.const 2 i32.ne @@ -12937,10 +12937,10 @@ call $~lib/builtins/abort unreachable end - local.get $23 + local.get $37 i32.const 0 call $~lib/array/Array#__get - local.tee $52 + local.tee $8 i32.load i32.const 3 i32.ne @@ -12952,10 +12952,10 @@ call $~lib/builtins/abort unreachable end - local.get $23 + local.get $37 i32.const 1 call $~lib/array/Array#__get - local.tee $53 + local.tee $7 i32.load i32.const 4 i32.ne @@ -12967,7 +12967,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.load offset=12 i32.const 3 i32.ne @@ -12979,10 +12979,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 0 call $~lib/array/Array#__get - local.tee $54 + local.tee $6 i32.load i32.const 1 i32.ne @@ -12994,10 +12994,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 1 call $~lib/array/Array#__get - local.tee $55 + local.tee $5 i32.load i32.const 2 i32.ne @@ -13009,10 +13009,10 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $57 i32.const 2 call $~lib/array/Array#__get - local.tee $56 + local.tee $4 i32.load i32.const 5 i32.ne @@ -13030,22 +13030,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $55 i32.load offset=4 - local.tee $0 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $1 i32.const 0 i32.store offset=4 - local.get $0 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $55 call $~lib/array/Array#splice - local.tee $28 + local.tee $32 i32.load offset=12 i32.const 1 i32.ne @@ -13057,11 +13057,11 @@ call $~lib/builtins/abort unreachable end - local.get $28 + local.get $32 i32.const 0 call $~lib/array/Array#__get - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 0 @@ -13082,7 +13082,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $55 i32.load offset=12 i32.const 2 i32.ne @@ -13094,10 +13094,10 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $55 i32.const 0 call $~lib/array/Array#__get - local.tee $57 + local.tee $3 if i32.const 0 i32.const 304 @@ -13106,11 +13106,11 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $55 i32.const 1 call $~lib/array/Array#__get - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.eqz if i32.const 0 @@ -13131,108 +13131,108 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $6 + local.get $58 call $~lib/rt/pure/__release - local.get $7 + local.get $56 call $~lib/rt/pure/__release - local.get $8 + local.get $54 call $~lib/rt/pure/__release - local.get $9 + local.get $53 call $~lib/rt/pure/__release - local.get $10 + local.get $52 call $~lib/rt/pure/__release - local.get $11 + local.get $51 call $~lib/rt/pure/__release - local.get $12 + local.get $50 call $~lib/rt/pure/__release - local.get $14 + local.get $49 call $~lib/rt/pure/__release - local.get $15 + local.get $48 call $~lib/rt/pure/__release - local.get $16 + local.get $46 call $~lib/rt/pure/__release - local.get $17 + local.get $45 call $~lib/rt/pure/__release - local.get $13 + local.get $44 call $~lib/rt/pure/__release - local.get $19 + local.get $43 call $~lib/rt/pure/__release - local.get $20 + local.get $47 call $~lib/rt/pure/__release - local.get $21 + local.get $41 call $~lib/rt/pure/__release - local.get $22 + local.get $40 call $~lib/rt/pure/__release - local.get $25 + local.get $39 call $~lib/rt/pure/__release - local.get $29 + local.get $38 call $~lib/rt/pure/__release - local.get $30 + local.get $35 call $~lib/rt/pure/__release local.get $31 call $~lib/rt/pure/__release - local.get $32 + local.get $30 call $~lib/rt/pure/__release - local.get $26 + local.get $29 call $~lib/rt/pure/__release - local.get $27 + local.get $28 call $~lib/rt/pure/__release local.get $34 call $~lib/rt/pure/__release - local.get $35 + local.get $33 call $~lib/rt/pure/__release - local.get $36 + local.get $26 call $~lib/rt/pure/__release - local.get $37 + local.get $25 call $~lib/rt/pure/__release - local.get $38 + local.get $24 call $~lib/rt/pure/__release - local.get $39 + local.get $23 call $~lib/rt/pure/__release - local.get $40 + local.get $22 call $~lib/rt/pure/__release - local.get $41 + local.get $21 call $~lib/rt/pure/__release - local.get $42 + local.get $20 call $~lib/rt/pure/__release - local.get $43 + local.get $19 call $~lib/rt/pure/__release - local.get $44 + local.get $18 call $~lib/rt/pure/__release - local.get $45 + local.get $17 call $~lib/rt/pure/__release - local.get $46 + local.get $16 call $~lib/rt/pure/__release - local.get $47 + local.get $15 call $~lib/rt/pure/__release - local.get $48 + local.get $14 call $~lib/rt/pure/__release - local.get $49 + local.get $13 call $~lib/rt/pure/__release - local.get $50 + local.get $12 call $~lib/rt/pure/__release - local.get $51 + local.get $11 call $~lib/rt/pure/__release - local.get $52 + local.get $10 call $~lib/rt/pure/__release - local.get $53 + local.get $9 call $~lib/rt/pure/__release - local.get $54 + local.get $8 call $~lib/rt/pure/__release - local.get $55 + local.get $7 call $~lib/rt/pure/__release - local.get $56 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $57 + local.get $4 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 i32.const 0 @@ -13705,19 +13705,19 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -13734,56 +13734,56 @@ i32.const 3 call $~lib/array/Array#push i32.const 0 - local.set $1 + local.set $0 global.get $std/array/arr - local.tee $2 + local.tee $58 i32.load offset=12 - local.tee $4 + local.tee $56 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.load offset=4 - local.set $6 + local.set $54 loop $for-loop|043 - local.get $1 - local.get $4 - local.get $2 + local.get $0 + local.get $56 + local.get $58 i32.load offset=12 - local.tee $7 - local.get $4 - local.get $7 + local.tee $53 + local.get $56 + local.get $53 i32.lt_s select i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $1 + local.get $0 i32.const 2 i32.shl - local.tee $7 - local.get $2 + local.tee $53 + local.get $58 i32.load offset=4 i32.add i32.load f32.convert_i32_s - local.set $18 - local.get $6 - local.get $7 + local.set $42 + local.get $53 + local.get $54 i32.add - local.get $18 + local.get $42 f32.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|043 end end - local.get $0 + local.get $1 i32.load offset=12 i32.const 4 i32.ne @@ -13795,7 +13795,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -13904,12 +13904,12 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 26 call $~lib/array/Array#filter - local.tee $0 + local.tee $1 i32.load offset=12 i32.const 2 i32.ne @@ -14014,7 +14014,7 @@ global.get $std/array/arr i32.const 3 call $~lib/array/Array#push - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 30 @@ -14322,10 +14322,10 @@ call $~lib/array/Array#push call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $33 + local.set $27 i32.const 1 global.set $~lib/math/random_seeded - local.get $33 + local.get $27 call $~lib/math/murmurHash3 global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 @@ -14333,7 +14333,7 @@ i64.xor call $~lib/math/murmurHash3 global.set $~lib/math/random_state1_64 - local.get $33 + local.get $27 i32.wrap_i64 call $~lib/math/splitMix32 global.set $~lib/math/random_state0_32 @@ -14371,10 +14371,10 @@ i32.const 4272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $0 i32.const 0 global.set $~argumentsLength - local.get $1 + local.get $0 call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) @@ -14384,41 +14384,41 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $56 i32.const 0 - local.set $0 + local.set $1 i32.const 0 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $6 - local.get $4 + local.tee $54 + local.get $56 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $1 - local.get $4 + local.get $0 + local.get $56 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|00 - local.get $0 - local.get $6 + local.get $1 + local.get $54 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/array/Array#__get - local.tee $18 - local.get $18 + local.tee $42 + local.get $42 f32.ne if (result i32) - local.get $4 - local.get $0 + local.get $56 + local.get $1 call $~lib/array/Array#__get - local.tee $18 - local.get $18 + local.tee $42 + local.get $42 f32.ne else i32.const 0 @@ -14426,20 +14426,20 @@ i32.eqz if i32.const 0 - local.get $1 local.get $0 + local.get $1 call $~lib/array/Array#__get - local.get $4 - local.get $0 + local.get $56 + local.get $1 call $~lib/array/Array#__get f32.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|00 end end @@ -14460,10 +14460,10 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $58 i32.const 0 global.set $~argumentsLength - local.get $2 + local.get $58 call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) @@ -14473,41 +14473,41 @@ i32.const 4448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $54 i32.const 0 - local.set $0 + local.set $1 i32.const 0 - local.get $2 + local.get $58 i32.load offset=12 - local.tee $8 - local.get $6 + local.tee $52 + local.get $54 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $2 - local.get $6 + local.get $54 + local.get $58 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 - local.get $0 - local.get $8 + local.get $1 + local.get $52 i32.lt_s if - local.get $2 - local.get $0 + local.get $58 + local.get $1 call $~lib/array/Array#__get - local.tee $24 - local.get $24 + local.tee $36 + local.get $36 f64.ne if (result i32) - local.get $6 - local.get $0 + local.get $54 + local.get $1 call $~lib/array/Array#__get - local.tee $24 - local.get $24 + local.tee $36 + local.get $36 f64.ne else i32.const 0 @@ -14515,20 +14515,20 @@ i32.eqz if i32.const 0 - local.get $2 - local.get $0 + local.get $58 + local.get $1 call $~lib/array/Array#__get - local.get $6 - local.get $0 + local.get $54 + local.get $1 call $~lib/array/Array#__get f64.ne br_if $__inlined_func$std/array/isArraysEqual drop end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|01 end end @@ -14549,21 +14549,21 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $53 i32.const 0 global.set $~argumentsLength - local.get $7 + local.get $53 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $7 + local.get $53 i32.const 5 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14581,21 +14581,21 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 + local.set $52 i32.const 0 global.set $~argumentsLength - local.get $8 + local.get $52 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $8 + local.get $52 i32.const 5 i32.const 2 i32.const 7 i32.const 4672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14613,64 +14613,64 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $17 + local.set $43 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $9 + local.set $51 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $10 + local.set $50 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $11 + local.set $49 i32.const 4 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $0 + local.set $1 i32.const 64 call $std/array/createReverseOrderedArray - local.set $12 + local.set $48 i32.const 128 call $std/array/createReverseOrderedArray - local.set $14 + local.set $46 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $15 + local.set $45 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $16 + local.set $44 i32.const 512 call $std/array/createRandomOrderedArray - local.set $13 - local.get $17 + local.set $47 + local.get $43 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $51 i32.const 48 call $std/array/assertSorted - local.get $9 + local.get $51 i32.const 1 i32.const 2 i32.const 3 i32.const 4928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14682,17 +14682,17 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $50 i32.const 48 call $std/array/assertSorted - local.get $10 + local.get $50 i32.const 2 i32.const 2 i32.const 3 i32.const 4960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14704,11 +14704,11 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $49 i32.const 48 call $std/array/assertSorted - local.get $11 - local.get $0 + local.get $49 + local.get $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14720,11 +14720,11 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $48 i32.const 48 call $std/array/assertSorted - local.get $12 - local.get $0 + local.get $48 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14736,11 +14736,11 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $46 i32.const 48 call $std/array/assertSorted - local.get $14 - local.get $0 + local.get $46 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14752,11 +14752,11 @@ call $~lib/builtins/abort unreachable end - local.get $15 + local.get $45 i32.const 48 call $std/array/assertSorted - local.get $15 - local.get $0 + local.get $45 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14768,11 +14768,11 @@ call $~lib/builtins/abort unreachable end - local.get $16 + local.get $44 i32.const 48 call $std/array/assertSorted - local.get $16 - local.get $0 + local.get $44 + local.get $1 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -14784,73 +14784,73 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $47 i32.const 48 call $std/array/assertSorted - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release - local.get $7 + local.get $53 call $~lib/rt/pure/__release - local.get $19 + local.get $41 call $~lib/rt/pure/__release - local.get $8 + local.get $52 call $~lib/rt/pure/__release - local.get $20 + local.get $40 call $~lib/rt/pure/__release - local.get $17 + local.get $43 call $~lib/rt/pure/__release - local.get $9 + local.get $51 call $~lib/rt/pure/__release - local.get $10 + local.get $50 call $~lib/rt/pure/__release - local.get $11 + local.get $49 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $12 + local.get $48 call $~lib/rt/pure/__release - local.get $14 + local.get $46 call $~lib/rt/pure/__release - local.get $15 + local.get $45 call $~lib/rt/pure/__release - local.get $16 + local.get $44 call $~lib/rt/pure/__release - local.get $13 + local.get $47 call $~lib/rt/pure/__release - local.get $21 + local.get $39 call $~lib/rt/pure/__release - local.get $22 + local.get $38 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray - local.set $0 + local.set $1 i32.const 257 call $std/array/createRandomOrderedArray - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 49 call $std/array/assertSorted - local.get $0 + local.get $1 i32.const 50 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 51 call $std/array/assertSorted - local.get $1 + local.get $0 i32.const 52 call $std/array/assertSorted - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 0 - local.set $1 + local.set $0 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc @@ -14858,45 +14858,45 @@ i32.const 2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 2 i32.store offset=12 loop $for-loop|02 - local.get $1 + local.get $0 i32.const 2 i32.lt_s if i32.const 1 call $~lib/array/Array#constructor - local.tee $2 + local.tee $58 i32.const 0 i32.const 1 - local.get $1 + local.get $0 i32.sub call $~lib/array/Array#__set - local.get $0 local.get $1 - local.get $2 + local.get $0 + local.get $58 call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|02 end end - local.get $0 + local.get $1 i32.const 53 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 - local.set $1 + local.set $0 i32.const 16 i32.const 14 call $~lib/rt/tlsf/__alloc @@ -14904,14 +14904,14 @@ i32.const 512 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $0 + local.get $1 i32.const 512 i32.store offset=12 loop $for-loop|03 - local.get $1 + local.get $0 i32.const 512 i32.lt_s if @@ -14919,28 +14919,28 @@ i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.const 511 - local.get $1 + local.get $0 i32.sub i32.store - local.get $0 local.get $1 - local.get $2 + local.get $0 + local.get $58 call $~lib/array/Array<~lib/array/Array>#__set - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|03 end end - local.get $0 + local.get $1 i32.const 54 call $std/array/assertSorted<~lib/array/Array> - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -14948,67 +14948,67 @@ i32.const 5136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $1 + local.set $0 i32.const 7 i32.const 2 i32.const 15 i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $2 + local.set $58 i32.const 1 global.set $~argumentsLength - local.get $1 + local.get $0 call $std/array/assertSorted<~lib/string/String | null>|trampoline block $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> (result i32) i32.const 0 - local.set $0 + local.set $1 i32.const 0 - local.get $1 + local.get $0 i32.load offset=12 - local.tee $7 - local.get $2 + local.tee $53 + local.get $58 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 - local.get $1 - local.get $2 + local.get $0 + local.get $58 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 - local.get $0 - local.get $7 + local.get $1 + local.get $53 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/array/Array#__get - local.tee $4 - local.get $2 - local.get $0 + local.tee $56 + local.get $58 + local.get $1 call $~lib/array/Array#__get - local.tee $6 + local.tee $54 call $~lib/string/String.__eq i32.eqz if - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|04 end end @@ -15024,17 +15024,17 @@ unreachable end call $std/array/createRandomStringArray - local.set $0 + local.set $1 i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $1 i32.const 56 call $std/array/assertSorted<~lib/array/Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -15042,13 +15042,13 @@ i32.const 5264 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.load offset=4 - local.get $0 + local.get $1 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 i32.const 5392 call $~lib/string/String.__eq i32.eqz @@ -15066,10 +15066,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $53 i32.const 5120 call $~lib/array/Array#join - local.tee $8 + local.tee $52 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15087,10 +15087,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $51 i32.const 5568 call $~lib/array/Array#join - local.tee $10 + local.tee $50 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15108,10 +15108,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $49 i32.const 5632 call $~lib/array/Array#join - local.tee $12 + local.tee $48 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15129,14 +15129,14 @@ i32.const 5728 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $2 - local.set $14 - local.get $2 + local.tee $58 + local.set $46 + local.get $58 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -15154,10 +15154,10 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $45 i32.const 5120 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $16 + local.tee $44 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15175,22 +15175,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.load offset=4 - local.tee $4 + local.tee $56 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $4 + local.get $56 i32.const 0 i32.store offset=4 - local.get $4 + local.get $56 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $2 + local.get $58 call $~lib/array/Array#join - local.tee $17 + local.tee $43 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -15208,19 +15208,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $56 i32.load offset=4 - local.tee $13 + local.tee $47 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $13 + local.get $47 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $4 + local.get $56 call $~lib/array/Array#join - local.tee $13 + local.tee $47 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -15232,36 +15232,36 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $7 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $52 call $~lib/rt/pure/__release - local.get $9 + local.get $51 call $~lib/rt/pure/__release - local.get $10 + local.get $50 call $~lib/rt/pure/__release - local.get $11 + local.get $49 call $~lib/rt/pure/__release - local.get $12 + local.get $48 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $14 + local.get $46 call $~lib/rt/pure/__release - local.get $15 + local.get $45 call $~lib/rt/pure/__release - local.get $16 + local.get $44 call $~lib/rt/pure/__release - local.get $2 + local.get $58 call $~lib/rt/pure/__release - local.get $17 + local.get $43 call $~lib/rt/pure/__release - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $13 + local.get $47 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15269,33 +15269,33 @@ i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $4 + local.set $56 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $6 + local.set $54 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $7 + local.set $53 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $8 - local.get $4 + local.set $52 + local.get $56 i32.const 5360 call $~lib/array/Array#join - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.const 5120 call $~lib/string/String.__eq i32.eqz @@ -15307,12 +15307,12 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $54 i32.const 5360 call $~lib/array/Array#join - local.tee $0 - local.set $15 - local.get $0 + local.tee $1 + local.set $45 + local.get $1 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15324,12 +15324,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $53 i32.const 5360 call $~lib/array/Array#join - local.tee $0 - local.set $16 - local.get $0 + local.tee $1 + local.set $44 + local.get $1 i32.const 7424 call $~lib/string/String.__eq i32.eqz @@ -15341,12 +15341,12 @@ call $~lib/builtins/abort unreachable end - local.get $8 + local.get $52 i32.const 5360 call $~lib/array/Array#join - local.tee $0 - local.set $17 - local.get $0 + local.tee $1 + local.set $43 + local.get $1 i32.const 7456 call $~lib/string/String.__eq i32.eqz @@ -15364,14 +15364,14 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $51 i32.load offset=4 - local.get $9 + local.get $51 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $13 - local.get $0 + local.tee $1 + local.set $47 + local.get $1 i32.const 7520 call $~lib/string/String.__eq i32.eqz @@ -15389,14 +15389,14 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $50 i32.load offset=4 - local.get $10 + local.get $50 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $19 - local.get $0 + local.tee $1 + local.set $41 + local.get $1 i32.const 7584 call $~lib/string/String.__eq i32.eqz @@ -15414,14 +15414,14 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $49 i32.load offset=4 - local.get $11 + local.get $49 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $20 - local.get $0 + local.tee $1 + local.set $40 + local.get $1 i32.const 7680 call $~lib/string/String.__eq i32.eqz @@ -15439,14 +15439,14 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $48 i32.load offset=4 - local.get $12 + local.get $48 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.tee $0 - local.set $21 - local.get $0 + local.tee $1 + local.set $39 + local.get $1 i32.const 7792 call $~lib/string/String.__eq i32.eqz @@ -15464,12 +15464,12 @@ i32.const 7904 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $38 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $0 - local.set $25 - local.get $0 + local.tee $1 + local.set $35 + local.get $1 i32.const 7952 call $~lib/string/String.__eq i32.eqz @@ -15487,12 +15487,12 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $31 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $0 + local.tee $1 local.set $30 - local.get $0 + local.get $1 i32.const 8096 call $~lib/string/String.__eq i32.eqz @@ -15510,9 +15510,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $0 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $0 i32.const 2 i32.const 2 i32.const 3 @@ -15520,7 +15520,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $0 i32.const 2 i32.const 2 i32.const 3 @@ -15528,14 +15528,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $0 + local.get $1 i32.load offset=4 - local.get $0 + local.get $1 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $1 - local.set $31 - local.get $1 + local.tee $0 + local.set $29 + local.get $0 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15553,9 +15553,9 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.load offset=4 - local.tee $2 + local.tee $58 i32.const 2 i32.const 0 i32.const 6 @@ -15563,7 +15563,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $58 i32.const 2 i32.const 0 i32.const 6 @@ -15571,14 +15571,14 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $2 - local.set $32 - local.get $2 + local.tee $58 + local.set $28 + local.get $58 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15596,7 +15596,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $58 i32.load offset=4 i32.const 1 i32.const 2 @@ -15604,7 +15604,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $33 i32.load offset=4 i32.const 1 i32.const 2 @@ -15613,16 +15613,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $27 + local.get $33 i32.store - local.get $2 + local.get $58 i32.load offset=4 - local.get $2 + local.get $58 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.tee $26 - local.set $27 - local.get $26 + local.tee $34 + local.set $33 + local.get $34 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15634,66 +15634,66 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $56 call $~lib/rt/pure/__release - local.get $6 + local.get $54 call $~lib/rt/pure/__release - local.get $7 + local.get $53 call $~lib/rt/pure/__release - local.get $8 + local.get $52 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $15 + local.get $45 call $~lib/rt/pure/__release - local.get $16 + local.get $44 call $~lib/rt/pure/__release - local.get $17 + local.get $43 call $~lib/rt/pure/__release - local.get $9 + local.get $51 call $~lib/rt/pure/__release - local.get $13 + local.get $47 call $~lib/rt/pure/__release - local.get $10 + local.get $50 call $~lib/rt/pure/__release - local.get $19 + local.get $41 call $~lib/rt/pure/__release - local.get $11 + local.get $49 call $~lib/rt/pure/__release - local.get $20 + local.get $40 call $~lib/rt/pure/__release - local.get $12 + local.get $48 call $~lib/rt/pure/__release - local.get $21 + local.get $39 call $~lib/rt/pure/__release - local.get $22 + local.get $38 call $~lib/rt/pure/__release - local.get $25 + local.get $35 call $~lib/rt/pure/__release - local.get $29 + local.get $31 call $~lib/rt/pure/__release local.get $30 call $~lib/rt/pure/__release - local.get $31 + local.get $29 call $~lib/rt/pure/__release - local.get $32 + local.get $28 call $~lib/rt/pure/__release - local.get $27 + local.get $33 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $23 + local.get $57 call $~lib/rt/pure/__release - local.get $5 + local.get $37 call $~lib/rt/pure/__release - local.get $28 + local.get $55 call $~lib/rt/pure/__release - local.get $0 + local.get $32 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 + call $~lib/rt/pure/__release + local.get $58 call $~lib/rt/pure/__release ) (func $~start (; 164 ;) diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index d7c8e4d254..0f710b1f89 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -591,16 +591,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -612,18 +612,18 @@ unreachable end i32.const 432 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2000 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 432 @@ -638,7 +638,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -655,10 +655,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -671,7 +671,7 @@ i32.const 432 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1312,7 +1312,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1334,32 +1334,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1367,10 +1367,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1384,7 +1384,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1392,18 +1392,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1418,22 +1418,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1441,18 +1441,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1461,16 +1461,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1649,13 +1649,13 @@ i32.const 16 i32.sub i32.load offset=12 - local.set $2 + local.set $1 end - local.get $2 - local.tee $3 + local.get $1 + local.tee $2 i32.const 1073741808 i32.gt_u - local.get $2 + local.get $1 local.get $0 i32.const 16 i32.sub @@ -1674,39 +1674,39 @@ i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $3 i32.const 0 i32.store - local.get $1 + local.get $3 i32.const 0 i32.store offset=4 - local.get $1 + local.get $3 i32.const 0 i32.store offset=8 local.get $0 - local.set $2 + local.set $1 local.get $0 - local.get $1 + local.get $3 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end + local.get $3 local.get $1 - local.get $2 i32.store - local.get $1 + local.get $3 local.get $0 i32.store offset=4 - local.get $1 local.get $3 + local.get $2 i32.store offset=8 - local.get $1 + local.get $3 ) (func $~setArgumentsLength (; 20 ;) (param $0 i32) local.get $0 @@ -1722,12 +1722,12 @@ i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $0 + local.tee $1 i32.const 8 call $~lib/memory/memory.fill - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 16 i32.sub i32.load offset=12 @@ -1741,11 +1741,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 0 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1759,8 +1759,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $2 + local.get $0 + local.get $5 i32.eq if i32.const 0 @@ -1770,13 +1770,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1790,13 +1790,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const -1 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1810,13 +1810,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 1 i32.const 3 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1830,13 +1830,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 1 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 16 i32.sub i32.load offset=12 @@ -1850,14 +1850,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const -3 i32.const -1 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const 16 i32.sub i32.load offset=12 @@ -1871,14 +1871,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const -4 i32.const 42 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $3 - local.get $0 + local.set $4 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 16 i32.sub i32.load offset=12 @@ -1892,14 +1892,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $5 i32.const 42 i32.const 1073741808 call $~lib/arraybuffer/ArrayBuffer#slice - local.set $1 - local.get $3 + local.set $0 + local.get $4 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -1911,7 +1911,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -1927,32 +1927,32 @@ call $~lib/rt/pure/__retain i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $3 + local.set $4 i32.const 16 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $0 + local.set $1 i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $3 i32.const 368 i32.const 8 call $~lib/memory/memory.copy - local.get $0 - local.get $4 + local.get $1 + local.get $3 call $~lib/rt/pure/__retain i32.store - local.get $0 - local.get $4 + local.get $1 + local.get $3 i32.store offset=4 - local.get $0 + local.get $1 i32.const 8 i32.store offset=8 - local.get $0 + local.get $1 i32.const 2 i32.store offset=12 - local.get $0 + local.get $1 call $~lib/rt/pure/__retain i32.const 12 i32.const 9 @@ -1960,23 +1960,23 @@ call $~lib/rt/pure/__retain i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.set $4 + local.set $3 i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $4 i32.load call $~lib/dataview/DataView#constructor|trampoline - local.set $5 - local.get $2 + local.set $2 + local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release ) (func $~start (; 22 ;) diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index c9fdc1f14f..c4e3fa0f03 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -599,16 +599,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -620,18 +620,18 @@ unreachable end i32.const 512 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2080 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 512 @@ -646,7 +646,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -663,10 +663,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -679,7 +679,7 @@ i32.const 512 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1124,43 +1124,43 @@ i32.const 8 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 8 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 1 i32.add i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 2 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 3 i32.sub i32.const 0 i32.store8 - local.get $1 + local.get $2 i32.const 3 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 i32.const 4 i32.sub i32.const 0 @@ -1183,25 +1183,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $1 + local.get $2 + local.set $1 + local.get $2 local.get $0 i32.load local.tee $3 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $3 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 i32.const 8 @@ -1256,41 +1256,41 @@ i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.const 0 i32.store - local.get $3 + local.get $4 i32.const 0 i32.store offset=4 - local.get $3 + local.get $4 i32.const 0 i32.store offset=8 local.get $0 - local.set $4 + local.set $3 local.get $0 - local.get $3 + local.get $4 i32.load local.tee $5 i32.ne if - local.get $4 + local.get $3 call $~lib/rt/pure/__retain - local.set $4 + local.set $3 local.get $5 call $~lib/rt/pure/__release end - local.get $3 local.get $4 - i32.store local.get $3 + i32.store + local.get $4 local.get $0 local.get $1 i32.add i32.store offset=4 - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 ) (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 18 ;) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index db2556137b..555f58a789 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -13,13 +13,13 @@ (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $1 + local.set $2 local.get $0 - local.tee $2 + local.tee $1 if i32.const 0 local.set $0 - local.get $2 + local.get $1 i32.const 16 i32.sub i32.load offset=12 @@ -33,15 +33,15 @@ local.get $3 i32.lt_u if - local.get $1 - local.get $0 local.get $2 + local.get $0 + local.get $1 i32.add i32.load8_u i32.xor i32.const 16777619 i32.mul - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index d1696d4b72..e7362c0dd0 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -298,8 +298,8 @@ (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 i64) - (local $6 f64) + (local $5 f64) + (local $6 i64) (local $7 f64) i32.const 1 local.set $3 @@ -372,7 +372,7 @@ local.get $0 f64.add i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -388,7 +388,7 @@ i32.lt_s if (result f64) f64.const 1 - local.get $5 + local.get $6 f64.reinterpret_i64 local.tee $1 local.get $0 @@ -408,8 +408,8 @@ else f64.const 0 end - local.set $7 - local.get $5 + local.set $5 + local.get $6 i64.const 4294967295 i64.and local.get $2 @@ -434,8 +434,8 @@ local.tee $4 local.get $4 f64.mul - local.tee $6 - local.get $6 + local.tee $7 + local.get $7 f64.mul local.set $0 local.get $4 @@ -445,7 +445,7 @@ local.get $1 f64.mul local.tee $4 - local.get $6 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -479,7 +479,7 @@ local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $7 + local.get $5 f64.add f64.add local.get $4 @@ -857,22 +857,22 @@ call $~lib/math/NativeMath.asin ) (func $../../lib/libm/assembly/libm/asinh (; 9 ;) (param $0 f64) (result f64) - (local $1 i64) - (local $2 f64) + (local $1 f64) + (local $2 i64) local.get $0 - local.tee $2 - i64.reinterpret_f64 local.tee $1 + i64.reinterpret_f64 + local.tee $2 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 local.set $0 - local.get $1 + local.get $2 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $1 + local.tee $2 i64.const 1049 i64.ge_u if @@ -882,7 +882,7 @@ f64.add local.set $0 else - local.get $1 + local.get $2 i64.const 1024 i64.ge_u if @@ -903,7 +903,7 @@ call $~lib/math/NativeMath.log local.set $0 else - local.get $1 + local.get $2 i64.const 997 i64.ge_u if @@ -926,16 +926,16 @@ end end local.get $0 - local.get $2 + local.get $1 f64.copysign ) (func $~lib/math/NativeMath.atan (; 10 ;) (param $0 f64) (result f64) (local $1 f64) - (local $2 i32) - (local $3 f64) + (local $2 f64) + (local $3 i32) (local $4 f64) local.get $0 - local.set $3 + local.set $1 local.get $0 i64.reinterpret_f64 i64.const 32 @@ -943,7 +943,7 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1141899264 i32.ge_u if @@ -955,15 +955,15 @@ return end f64.const 1.5707963267948966 - local.get $3 + local.get $1 f64.copysign return end - local.get $2 + local.get $3 i32.const 1071382528 i32.lt_u if - local.get $2 + local.get $3 i32.const 1044381696 i32.lt_u if @@ -971,21 +971,21 @@ return end i32.const -1 - local.set $2 + local.set $3 else local.get $0 f64.abs local.set $0 - local.get $2 + local.get $3 i32.const 1072889856 i32.lt_u if (result f64) - local.get $2 + local.get $3 i32.const 1072037888 i32.lt_u if (result f64) i32.const 0 - local.set $2 + local.set $3 f64.const 2 local.get $0 f64.mul @@ -997,7 +997,7 @@ f64.div else i32.const 1 - local.set $2 + local.set $3 local.get $0 f64.const 1 f64.sub @@ -1007,12 +1007,12 @@ f64.div end else - local.get $2 + local.get $3 i32.const 1073971200 i32.lt_u if (result f64) i32.const 2 - local.set $2 + local.set $3 local.get $0 f64.const 1.5 f64.sub @@ -1024,7 +1024,7 @@ f64.div else i32.const 3 - local.set $2 + local.set $3 f64.const -1 local.get $0 f64.div @@ -1038,19 +1038,19 @@ local.tee $4 local.get $4 f64.mul - local.set $1 + local.set $2 local.get $0 local.get $4 f64.const 0.3333333333333293 - local.get $1 + local.get $2 f64.const 0.14285714272503466 - local.get $1 + local.get $2 f64.const 0.09090887133436507 - local.get $1 + local.get $2 f64.const 0.06661073137387531 - local.get $1 + local.get $2 f64.const 0.049768779946159324 - local.get $1 + local.get $2 f64.const 0.016285820115365782 f64.mul f64.add @@ -1063,15 +1063,15 @@ f64.mul f64.add f64.mul - local.get $1 + local.get $2 f64.const -0.19999999999876483 - local.get $1 + local.get $2 f64.const -0.11111110405462356 - local.get $1 + local.get $2 f64.const -0.0769187620504483 - local.get $1 + local.get $2 f64.const -0.058335701337905735 - local.get $1 + local.get $2 f64.const -0.036531572744216916 f64.mul f64.add @@ -1084,13 +1084,13 @@ f64.mul f64.add f64.mul - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if local.get $0 - local.get $1 + local.get $2 f64.sub return end @@ -1099,15 +1099,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $2 + local.get $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f64.const 0.4636476090008061 - local.get $1 + local.get $2 f64.const 2.2698777452961687e-17 f64.sub local.get $0 @@ -1117,7 +1117,7 @@ br $break|0 end f64.const 0.7853981633974483 - local.get $1 + local.get $2 f64.const 3.061616997868383e-17 f64.sub local.get $0 @@ -1127,7 +1127,7 @@ br $break|0 end f64.const 0.982793723247329 - local.get $1 + local.get $2 f64.const 1.3903311031230998e-17 f64.sub local.get $0 @@ -1137,7 +1137,7 @@ br $break|0 end f64.const 1.5707963267948966 - local.get $1 + local.get $2 f64.const 6.123233995736766e-17 f64.sub local.get $0 @@ -1149,7 +1149,7 @@ unreachable end local.get $0 - local.get $3 + local.get $1 f64.copysign ) (func $../../lib/libm/assembly/libm/atan (; 11 ;) (param $0 f64) (result f64) @@ -1239,21 +1239,21 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 + local.set $6 local.get $5 i32.wrap_i64 - local.set $6 + local.set $2 local.get $1 i64.reinterpret_f64 local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $7 local.get $5 i32.wrap_i64 - local.tee $7 - local.get $2 + local.tee $4 + local.get $7 i32.const 1072693248 i32.sub i32.or @@ -1263,25 +1263,25 @@ call $~lib/math/NativeMath.atan return end - local.get $2 + local.get $7 i32.const 30 i32.shr_u i32.const 2 i32.and - local.get $4 + local.get $6 i32.const 31 i32.shr_u i32.or local.set $3 - local.get $2 + local.get $7 i32.const 2147483647 i32.and - local.set $2 - local.get $4 + local.set $7 + local.get $6 i32.const 2147483647 i32.and - local.tee $4 - local.get $6 + local.tee $6 + local.get $2 i32.or i32.eqz if @@ -1311,16 +1311,16 @@ end end block $folding-inner0 - local.get $2 + local.get $4 local.get $7 i32.or i32.eqz br_if $folding-inner0 - local.get $2 + local.get $7 i32.const 2146435072 i32.eq if - local.get $4 + local.get $6 i32.const 2146435072 i32.eq if @@ -1350,20 +1350,20 @@ return end i32.const 1 - local.get $4 + local.get $6 i32.const 2146435072 i32.eq - local.get $2 + local.get $7 i32.const 67108864 i32.add - local.get $4 + local.get $6 i32.lt_u select br_if $folding-inner0 - local.get $4 + local.get $6 i32.const 67108864 i32.add - local.get $2 + local.get $7 i32.lt_u i32.const 0 local.get $3 @@ -1385,9 +1385,9 @@ block $case2|1 block $case1|1 local.get $3 - local.tee $6 + local.tee $2 if - local.get $6 + local.get $2 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -1870,31 +1870,31 @@ i32.wrap_i64 ) (func $~lib/math/NativeMath.cos (; 21 ;) (param $0 f64) (result f64) - (local $1 f64) + (local $1 i64) (local $2 f64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 f64) - (local $7 i64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $5 i32.const 31 i32.shr_u - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $5 i32.const 1044816030 i32.lt_u if @@ -1906,38 +1906,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $3 + local.tee $4 f64.const 1 - local.get $3 - f64.sub - local.get $1 + local.get $4 f64.sub local.get $2 - local.get $2 + f64.sub + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $2 + local.get $3 f64.const -0.001388888888887411 - local.get $2 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $3 f64.const 2.087572321298175e-09 - local.get $2 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -1954,7 +1954,7 @@ f64.add return end - local.get $4 + local.get $5 i32.const 2146435072 i32.ge_u if @@ -1964,36 +1964,36 @@ return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $7 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $4 + local.get $5 i32.const 20 i32.shr_u - local.tee $5 + local.tee $6 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $2 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $2 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $3 + local.tee $4 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -2006,27 +2006,27 @@ i32.const 16 i32.gt_u if - local.get $2 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $5 + local.set $2 + local.get $6 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $3 + local.tee $4 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -2039,55 +2039,55 @@ i32.const 49 i32.gt_u if - local.get $2 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $3 + local.set $4 end end - local.get $3 + local.get $4 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $4 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $2 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end i32.const 0 - local.get $7 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $5 i32.sub - local.get $4 local.get $5 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $2 - local.get $5 + local.set $3 + local.get $6 i32.const 1 i32.and if (result f64) @@ -2095,41 +2095,41 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $3 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 + local.set $7 local.get $0 - local.get $3 + local.get $4 f64.const 0.5 - local.get $2 - f64.mul local.get $3 + f64.mul + local.get $4 local.get $0 f64.mul local.tee $0 - local.get $6 + local.get $7 f64.mul f64.sub f64.mul - local.get $2 + local.get $3 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -2142,38 +2142,38 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.mul - local.tee $3 + local.tee $4 f64.sub - local.tee $6 + local.tee $7 f64.const 1 - local.get $6 + local.get $7 f64.sub - local.get $3 + local.get $4 f64.sub - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $1 + local.get $2 f64.const -0.001388888888887411 - local.get $1 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul f64.const -2.7557314351390663e-07 - local.get $1 + local.get $2 f64.const 2.087572321298175e-09 - local.get $1 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -2183,14 +2183,14 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 f64.mul f64.sub f64.add f64.add end local.set $0 - local.get $5 + local.get $6 i32.const 1 i32.add i32.const 2 @@ -2555,26 +2555,26 @@ f64.mul ) (func $~lib/math/NativeMath.exp (; 25 ;) (param $0 f64) (result f64) - (local $1 i32) - (local $2 f64) - (local $3 i32) - (local $4 f64) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $6 f64) + (local $7 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $1 + local.tee $2 i32.const 31 i32.shr_u - local.set $6 - local.get $1 + local.set $7 + local.get $2 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1082532651 i32.ge_u if @@ -2603,13 +2603,13 @@ end end i32.const 0 - local.set $1 - local.get $3 + local.set $2 + local.get $4 i32.const 1071001154 i32.gt_u if local.get $0 - local.get $3 + local.get $4 i32.const 1072734898 i32.ge_u if (result i32) @@ -2623,26 +2623,26 @@ i32.trunc_f64_s else i32.const 1 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.sub end - local.tee $1 + local.tee $2 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul f64.sub - local.tee $4 - local.get $1 + local.tee $1 + local.get $2 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul - local.tee $7 + local.tee $5 f64.sub local.set $0 else - local.get $3 + local.get $4 i32.const 1043333120 i32.gt_u if (result f64) @@ -2653,30 +2653,30 @@ f64.add return end - local.set $4 + local.set $1 end local.get $0 local.get $0 f64.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul - local.set $5 + local.set $6 f64.const 1 local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 0.16666666666666602 f64.mul - local.get $5 + local.get $6 f64.const -2.7777777777015593e-03 - local.get $2 + local.get $3 f64.const 6.613756321437934e-05 f64.mul f64.add - local.get $5 + local.get $6 f64.const -1.6533902205465252e-06 - local.get $2 + local.get $3 f64.const 4.1381367970572385e-08 f64.mul f64.add @@ -2691,16 +2691,16 @@ local.get $0 f64.sub f64.div - local.get $7 + local.get $5 f64.sub - local.get $4 + local.get $1 f64.add f64.add local.set $0 - local.get $1 + local.get $2 if local.get $0 - local.get $1 + local.get $2 call $~lib/math/NativeMath.scalbn local.set $0 end @@ -2789,58 +2789,58 @@ f64.promote_f32 ) (func $~lib/math/NativeMath.hypot (; 31 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) + (local $2 i64) (local $3 i64) (local $4 i64) (local $5 f64) - (local $6 f64) + (local $6 i32) (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f64) - (local $11 i64) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 f64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $4 + local.tee $3 local.get $1 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 + local.tee $4 i64.lt_u if - local.get $4 local.get $3 - local.set $4 + local.get $4 local.set $3 + local.set $4 end - local.get $3 + local.get $4 f64.reinterpret_i64 local.set $1 - local.get $3 + local.get $4 i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $6 i32.const 2047 i32.eq if local.get $1 return end - local.get $4 + local.get $3 f64.reinterpret_i64 local.set $0 i32.const 1 - local.get $3 - i64.eqz local.get $4 + i64.eqz + local.get $3 i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $10 i32.const 2047 i32.eq select @@ -2848,8 +2848,8 @@ local.get $0 return end - local.get $9 - local.get $8 + local.get $10 + local.get $6 i32.sub i32.const 64 i32.gt_s @@ -2860,13 +2860,13 @@ return end f64.const 1 - local.set $5 - local.get $9 + local.set $9 + local.get $10 i32.const 1533 i32.gt_s if (result f64) f64.const 5260135901548373507240989e186 - local.set $5 + local.set $9 local.get $1 f64.const 1.90109156629516e-211 f64.mul @@ -2875,12 +2875,12 @@ f64.const 1.90109156629516e-211 f64.mul else - local.get $8 + local.get $6 i32.const 573 i32.lt_s if (result f64) f64.const 1.90109156629516e-211 - local.set $5 + local.set $9 local.get $1 f64.const 5260135901548373507240989e186 f64.mul @@ -2898,28 +2898,28 @@ local.get $1 f64.const 134217729 f64.mul - local.tee $2 + local.tee $11 f64.sub - local.get $2 + local.get $11 f64.add - local.tee $6 + local.tee $8 f64.sub - local.set $10 + local.set $5 local.get $0 local.get $0 local.get $0 f64.const 134217729 f64.mul - local.tee $2 + local.tee $11 f64.sub - local.get $2 + local.get $11 f64.add local.tee $7 f64.sub - local.set $2 - local.get $5 - local.get $6 - local.get $6 + local.set $11 + local.get $9 + local.get $8 + local.get $8 f64.mul local.get $1 local.get $1 @@ -2927,11 +2927,11 @@ local.tee $1 f64.sub f64.const 2 - local.get $6 + local.get $8 f64.mul - local.get $10 + local.get $5 f64.add - local.get $10 + local.get $5 f64.mul f64.add local.get $7 @@ -2945,9 +2945,9 @@ f64.const 2 local.get $7 f64.mul - local.get $2 + local.get $11 f64.add - local.get $2 + local.get $11 f64.mul f64.add f64.add @@ -2993,11 +2993,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) @@ -3042,7 +3042,7 @@ return end i32.const -54 - local.set $8 + local.set $4 local.get $0 f64.const 18014398509481984 f64.mul @@ -3098,11 +3098,11 @@ local.get $0 f64.add f64.div - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $3 - local.get $8 + local.get $4 local.get $1 i32.const 20 i32.shr_u @@ -3120,28 +3120,28 @@ f64.mul local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $6 + local.tee $7 f64.const 0.4342944818781689 f64.mul local.tee $11 f64.add - local.set $7 + local.set $8 local.get $9 f64.const 3.694239077158931e-13 f64.mul local.get $0 - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub - local.get $4 local.get $5 + local.get $6 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -3176,7 +3176,7 @@ f64.mul f64.add local.tee $0 - local.get $6 + local.get $7 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -3186,12 +3186,12 @@ f64.mul f64.add local.get $10 - local.get $7 + local.get $8 f64.sub local.get $11 f64.add f64.add - local.get $7 + local.get $8 f64.add ) (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) @@ -3206,11 +3206,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) local.get $0 @@ -3254,7 +3254,7 @@ return end i32.const -54 - local.set $8 + local.set $4 local.get $0 f64.const 18014398509481984 f64.mul @@ -3310,11 +3310,11 @@ local.get $0 f64.add f64.div - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $3 - local.get $8 + local.get $4 local.get $1 i32.const 20 i32.shr_u @@ -3329,25 +3329,25 @@ f64.mul local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $6 + local.tee $7 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $7 + local.set $8 local.get $0 - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub - local.get $4 local.get $5 + local.get $6 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -3382,7 +3382,7 @@ f64.mul f64.add local.tee $0 - local.get $6 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -3391,12 +3391,12 @@ f64.mul f64.add local.get $9 - local.get $7 + local.get $8 f64.sub local.get $10 f64.add f64.add - local.get $7 + local.get $8 f64.add ) (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) @@ -3414,16 +3414,16 @@ f64.min ) (func $~lib/math/NativeMath.pow (; 42 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 f64) + (local $11 i32) (local $12 f64) (local $13 f64) (local $14 f64) @@ -3496,17 +3496,17 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 + local.tee $9 local.get $15 i32.wrap_i64 local.tee $6 @@ -3519,22 +3519,22 @@ i32.const 1 local.get $6 i32.const 0 - local.get $8 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $8 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 local.get $19 i32.const 0 - local.get $5 + local.get $4 i32.const 2146435072 i32.eq select - local.get $5 + local.get $4 i32.const 2146435072 i32.gt_s select @@ -3550,19 +3550,19 @@ i32.const 0 i32.lt_s if - local.get $8 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $8 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $8 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 @@ -3570,27 +3570,27 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $2 + local.tee $5 select local.get $10 i32.sub - local.set $9 + local.set $11 i32.const 2 local.get $6 - local.get $8 - local.get $2 - select - local.tee $2 local.get $9 + local.get $5 + select + local.tee $5 + local.get $11 i32.shr_u local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 - local.get $2 + local.get $5 local.get $10 - local.get $9 + local.get $11 i32.shl i32.eq select @@ -3598,26 +3598,26 @@ i32.const 0 end end - local.set $2 + local.set $5 end local.get $6 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if local.get $19 - local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if - local.get $7 + local.get $8 i32.const 0 i32.lt_s if @@ -3630,7 +3630,7 @@ f64.const 0 local.get $1 f64.neg - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -3643,11 +3643,11 @@ end unreachable end - local.get $8 + local.get $9 i32.const 1072693248 i32.eq if - local.get $7 + local.get $8 i32.const 0 i32.ge_s if @@ -3659,7 +3659,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -3668,7 +3668,7 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if @@ -3684,69 +3684,69 @@ end local.get $0 f64.abs - local.set $3 + local.set $2 local.get $19 i32.eqz if i32.const 1 - local.get $5 + local.get $4 i32.const 1072693248 i32.eq - local.get $5 + local.get $4 i32.const 2146435072 i32.eq i32.const 1 - local.get $5 + local.get $4 select select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 - local.get $7 + local.get $2 + local.get $8 i32.const 0 i32.lt_s select - local.set $3 + local.set $2 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $2 local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 local.get $2 + local.get $5 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $11 + local.set $7 local.get $17 i32.const 0 i32.lt_s if - local.get $2 + local.get $5 i32.eqz if local.get $0 @@ -3759,92 +3759,92 @@ end f64.const -1 f64.const 1 - local.get $2 + local.get $5 i32.const 1 i32.eq select - local.set $11 + local.set $7 end - local.get $8 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $8 + local.get $9 i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $3 + local.tee $2 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -3873,48 +3873,48 @@ local.set $12 local.get $0 local.get $12 - local.get $3 + local.get $2 f64.sub f64.sub else - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -3924,19 +3924,19 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $3 + local.set $5 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl @@ -3945,14 +3945,14 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select - local.tee $4 - f64.sub local.tee $3 + f64.sub + local.tee $2 f64.const 1 local.get $13 - local.get $4 + local.get $3 f64.add f64.div local.tee $0 @@ -4000,16 +4000,16 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $2 local.get $16 - local.get $5 + local.get $4 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -4023,13 +4023,13 @@ local.get $16 local.get $13 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $4 + local.tee $3 local.get $16 local.get $18 f64.add @@ -4043,8 +4043,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 local.get $13 f64.mul local.get $0 @@ -4063,15 +4063,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $4 + local.get $3 f64.mul local.get $0 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -4079,16 +4079,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $4 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -4099,17 +4099,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $4 + local.get $3 local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -4121,32 +4121,32 @@ local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $4 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $11 i32.const 1083179008 i32.ge_s if - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -4154,33 +4154,33 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $4 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $9 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $9 + local.get $11 i32.const 2147483647 i32.and local.tee $10 @@ -4188,7 +4188,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $10 @@ -4196,9 +4196,9 @@ i32.gt_s if i32.const 1048575 - local.get $9 + local.get $11 i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -4210,7 +4210,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $2 + local.tee $5 i32.shr_s i32.const -1 i32.xor @@ -4228,24 +4228,24 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.tee $6 i32.sub local.get $6 - local.get $9 + local.get $11 i32.const 0 i32.lt_s select local.set $6 - local.get $4 + local.get $3 local.get $0 f64.sub - local.set $4 + local.set $3 end local.get $1 - local.get $4 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -4254,10 +4254,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -4268,14 +4268,14 @@ f64.add local.tee $1 f64.add - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $11 + local.get $7 f64.const 1 - local.get $4 - local.get $4 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -4303,17 +4303,17 @@ f64.sub f64.div local.get $1 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $4 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $4 + local.get $3 f64.sub f64.sub local.tee $0 @@ -4325,7 +4325,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -4339,7 +4339,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -4349,14 +4349,14 @@ f64.mul return end - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -4389,31 +4389,31 @@ local.get $0 ) (func $~lib/math/NativeMath.sin (; 46 ;) (param $0 f64) (result f64) - (local $1 f64) + (local $1 i64) (local $2 f64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 f64) - (local $7 i64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $5 i32.const 31 i32.shr_u - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $5 i32.const 1045430272 i32.lt_u if @@ -4424,41 +4424,41 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $1 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $2 + local.set $3 local.get $0 - local.get $1 + local.get $2 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $1 local.get $2 + local.get $3 f64.mul f64.add f64.mul f64.add return end - local.get $4 + local.get $5 i32.const 2146435072 i32.ge_u if @@ -4468,36 +4468,36 @@ return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $7 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $4 + local.get $5 i32.const 20 i32.shr_u - local.tee $5 + local.tee $6 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $3 + local.tee $4 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $3 + local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 - f64.sub local.tee $2 + f64.sub + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4510,27 +4510,27 @@ i32.const 16 i32.gt_u if - local.get $3 + local.get $4 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $5 + local.set $2 + local.get $6 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $2 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -4543,55 +4543,55 @@ i32.const 49 i32.gt_u if - local.get $3 + local.get $4 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $2 + local.set $3 end end - local.get $2 + local.get $3 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $2 + local.get $3 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end i32.const 0 - local.get $7 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $5 i32.sub - local.get $4 local.get $5 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $3 - local.get $5 + local.set $4 + local.get $6 i32.const 1 i32.and if (result f64) @@ -4600,38 +4600,38 @@ local.get $0 local.get $0 f64.mul - local.tee $1 - f64.mul local.tee $2 + f64.mul + local.tee $3 f64.sub - local.tee $6 + local.tee $7 f64.const 1 - local.get $6 + local.get $7 f64.sub - local.get $2 + local.get $3 f64.sub - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $1 + local.get $2 f64.const -0.001388888888887411 - local.get $1 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $1 - local.get $1 - f64.mul - local.tee $2 local.get $2 + local.get $2 + f64.mul + local.tee $3 + local.get $3 f64.mul f64.const -2.7557314351390663e-07 - local.get $1 + local.get $2 f64.const 2.087572321298175e-09 - local.get $1 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -4641,7 +4641,7 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -4651,41 +4651,41 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.const -1.984126982985795e-04 - local.get $2 + local.get $3 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $3 + local.get $3 + local.get $3 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $3 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 + local.set $7 local.get $0 - local.get $2 - f64.const 0.5 local.get $3 + f64.const 0.5 + local.get $4 f64.mul - local.get $2 + local.get $3 local.get $0 f64.mul local.tee $0 - local.get $6 + local.get $7 f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -4694,7 +4694,7 @@ f64.sub end local.set $0 - local.get $5 + local.get $6 i32.const 2 i32.and if @@ -4973,30 +4973,30 @@ f64.add ) (func $~lib/math/NativeMath.tan (; 52 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 f64) - (local $6 i64) + (local $1 i64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1072243195 i32.le_s if - local.get $2 + local.get $3 i32.const 1044381696 i32.lt_s if @@ -5009,7 +5009,7 @@ call $~lib/math/tan_kern return end - local.get $2 + local.get $3 i32.const 2146435072 i32.ge_s if @@ -5019,36 +5019,36 @@ return end block $~lib/math/rempio2|inlined.2 (result i32) - local.get $6 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1094263291 i32.lt_u if - local.get $2 + local.get $3 i32.const 20 i32.shr_u - local.tee $4 + local.tee $5 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $3 + local.tee $4 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $3 + local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $5 + local.tee $6 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -5061,27 +5061,27 @@ i32.const 16 i32.gt_u if - local.get $3 + local.get $4 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $4 + local.set $2 + local.get $5 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $5 + local.tee $6 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -5094,54 +5094,54 @@ i32.const 49 i32.gt_u if - local.get $3 + local.get $4 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $5 + local.set $6 end end - local.get $5 + local.get $6 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $5 + local.get $6 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.2 end i32.const 0 - local.get $6 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $4 + local.get $3 + local.get $5 select end - local.set $4 + local.set $5 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $4 + local.get $5 i32.const 1 i32.and i32.const 1 @@ -5489,7 +5489,7 @@ else f32.const 0 end - local.set $6 + local.set $5 local.get $2 i32.const 8388607 i32.and @@ -5508,8 +5508,8 @@ local.tee $4 local.get $4 f32.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 f32.mul local.set $0 local.get $4 @@ -5519,7 +5519,7 @@ local.get $1 f32.mul local.tee $4 - local.get $5 + local.get $6 f32.const 0.6666666269302368 local.get $0 f32.const 0.2849878668785095 @@ -5541,7 +5541,7 @@ local.tee $0 f32.const 9.05800061445916e-06 f32.mul - local.get $6 + local.get $5 f32.add f32.add local.get $4 @@ -5824,17 +5824,17 @@ call $~lib/math/NativeMathf.asin ) (func $../../lib/libm/assembly/libmf/asinh (; 66 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) local.get $0 - local.tee $2 + local.tee $1 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 f32.reinterpret_i32 local.set $0 - local.get $1 + local.get $2 i32.const 1166016512 i32.ge_u if @@ -5844,7 +5844,7 @@ f32.add local.set $0 else - local.get $1 + local.get $2 i32.const 1073741824 i32.ge_u if @@ -5865,7 +5865,7 @@ call $~lib/math/NativeMathf.log local.set $0 else - local.get $1 + local.get $2 i32.const 964689920 i32.ge_u if @@ -5888,21 +5888,21 @@ end end local.get $0 - local.get $2 + local.get $1 f32.copysign ) (func $~lib/math/NativeMathf.atan (; 67 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) (local $3 f32) (local $4 f32) local.get $0 - local.set $4 + local.set $1 local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1283457024 i32.ge_u if @@ -5914,15 +5914,15 @@ return end f32.const 1.570796251296997 - local.get $4 + local.get $1 f32.copysign return end - local.get $1 + local.get $2 i32.const 1054867456 i32.lt_u if - local.get $1 + local.get $2 i32.const 964689920 i32.lt_u if @@ -5930,21 +5930,21 @@ return end i32.const -1 - local.set $1 + local.set $2 else local.get $0 f32.abs local.set $0 - local.get $1 + local.get $2 i32.const 1066926080 i32.lt_u if (result f32) - local.get $1 + local.get $2 i32.const 1060110336 i32.lt_u if (result f32) i32.const 0 - local.set $1 + local.set $2 f32.const 2 local.get $0 f32.mul @@ -5956,7 +5956,7 @@ f32.div else i32.const 1 - local.set $1 + local.set $2 local.get $0 f32.const 1 f32.sub @@ -5966,12 +5966,12 @@ f32.div end else - local.get $1 + local.get $2 i32.const 1075576832 i32.lt_u if (result f32) i32.const 2 - local.set $1 + local.set $2 local.get $0 f32.const 1.5 f32.sub @@ -5983,7 +5983,7 @@ f32.div else i32.const 3 - local.set $1 + local.set $2 f32.const -1 local.get $0 f32.div @@ -5994,38 +5994,38 @@ local.get $0 local.get $0 f32.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f32.mul - local.set $3 + local.set $4 local.get $0 - local.get $2 - f32.const 0.333333283662796 local.get $3 + f32.const 0.333333283662796 + local.get $4 f32.const 0.14253635704517365 - local.get $3 + local.get $4 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $3 + local.get $4 f32.const -0.19999158382415771 - local.get $3 + local.get $4 f32.const -0.106480173766613 f32.mul f32.add f32.mul f32.add f32.mul - local.set $2 - local.get $1 + local.set $3 + local.get $2 i32.const 0 i32.lt_s if local.get $0 - local.get $2 + local.get $3 f32.sub return end @@ -6034,15 +6034,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $1 + local.get $2 if - local.get $1 + local.get $2 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f32.const 0.46364760398864746 - local.get $2 + local.get $3 f32.const 5.01215824399992e-09 f32.sub local.get $0 @@ -6052,7 +6052,7 @@ br $break|0 end f32.const 0.7853981256484985 - local.get $2 + local.get $3 f32.const 3.774894707930798e-08 f32.sub local.get $0 @@ -6062,7 +6062,7 @@ br $break|0 end f32.const 0.9827936887741089 - local.get $2 + local.get $3 f32.const 3.447321716976148e-08 f32.sub local.get $0 @@ -6072,7 +6072,7 @@ br $break|0 end f32.const 1.570796251296997 - local.get $2 + local.get $3 f32.const 7.549789415861596e-08 f32.sub local.get $0 @@ -6084,7 +6084,7 @@ unreachable end local.get $0 - local.get $4 + local.get $1 f32.copysign ) (func $../../lib/libm/assembly/libmf/atan (; 68 ;) (param $0 f32) (result f32) @@ -6161,7 +6161,7 @@ end local.get $0 i32.reinterpret_f32 - local.set $3 + local.set $2 local.get $1 i32.reinterpret_f32 local.tee $4 @@ -6177,37 +6177,37 @@ i32.shr_u i32.const 2 i32.and - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.or - local.set $2 + local.set $3 local.get $4 i32.const 2147483647 i32.and local.set $4 - local.get $3 + local.get $2 i32.const 2147483647 i32.and - local.tee $3 + local.tee $2 i32.eqz if block $break|0 block $case3|0 block $case2|0 - local.get $2 + local.get $3 i32.eqz - local.get $2 + local.get $3 i32.const 1 i32.eq i32.or i32.eqz if - local.get $2 + local.get $3 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $3 i32.const 3 i32.eq br_if $case3|0 @@ -6231,13 +6231,13 @@ i32.const 2139095040 i32.eq if - local.get $3 + local.get $2 i32.const 2139095040 i32.eq if f32.const 2.356194496154785 f32.const 0.7853981852531433 - local.get $2 + local.get $3 i32.const 2 i32.and select @@ -6245,13 +6245,13 @@ else f32.const 3.1415927410125732 f32.const 0 - local.get $2 + local.get $3 i32.const 2 i32.and select local.set $0 end - local.get $2 + local.get $3 i32.const 1 i32.and if @@ -6263,23 +6263,23 @@ return end i32.const 1 - local.get $3 + local.get $2 i32.const 2139095040 i32.eq local.get $4 i32.const 218103808 i32.add - local.get $3 + local.get $2 i32.lt_u select br_if $folding-inner0 - local.get $3 + local.get $2 i32.const 218103808 i32.add local.get $4 i32.lt_u i32.const 0 - local.get $2 + local.get $3 i32.const 2 i32.and select @@ -6297,10 +6297,10 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $2 - local.tee $3 + local.get $3 + local.tee $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -6330,7 +6330,7 @@ end f32.const -1.5707963705062866 f32.const 1.5707963705062866 - local.get $2 + local.get $3 i32.const 1 i32.and select @@ -6464,10 +6464,10 @@ end ) (func $~lib/math/NativeMathf.cos (; 76 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) (local $5 i64) (local $6 i64) (local $7 i64) @@ -6477,18 +6477,18 @@ (local $11 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $10 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $4 + local.get $2 i32.const 964689920 i32.lt_u if @@ -6497,27 +6497,27 @@ end local.get $0 f64.promote_f32 - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6526,7 +6526,7 @@ f32.demote_f64 return end - local.get $4 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -6536,7 +6536,7 @@ return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $4 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -6547,25 +6547,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $4 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -6578,7 +6578,7 @@ local.get $9 i64.load offset=8 local.set $7 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -6610,7 +6610,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -6649,41 +6649,41 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $10 select end - local.set $3 - global.get $~lib/math/rempio2f_y local.set $1 - local.get $3 + global.get $~lib/math/rempio2f_y + local.set $3 + local.get $1 i32.const 1 i32.and if (result f32) - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $1 + local.tee $4 + local.get $3 f64.mul - local.tee $1 + local.tee $3 f64.const -0.16666666641626524 - local.get $2 + local.get $4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $2 + local.get $4 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -6691,27 +6691,27 @@ f64.add f32.demote_f64 else - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6720,7 +6720,7 @@ f32.demote_f64 end local.set $0 - local.get $3 + local.get $1 i32.const 1 i32.add i32.const 2 @@ -7274,8 +7274,8 @@ (func $~lib/math/NativeMathf.hypot (; 86 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 f32) - (local $5 i32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -7285,21 +7285,21 @@ i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.lt_u if local.get $3 - local.get $2 + local.get $4 local.set $3 - local.set $2 + local.set $4 end local.get $3 f32.reinterpret_i32 local.set $0 - local.get $2 + local.get $4 f32.reinterpret_i32 local.set $1 - local.get $2 + local.get $4 i32.const 2139095040 i32.eq if @@ -7308,12 +7308,12 @@ end i32.const 1 local.get $3 - local.get $2 + local.get $4 i32.sub i32.const 209715200 i32.ge_u i32.const 1 - local.get $2 + local.get $4 i32.eqz local.get $3 i32.const 2139095040 @@ -7327,13 +7327,13 @@ return end f32.const 1 - local.set $4 + local.set $5 local.get $3 i32.const 1568669696 i32.ge_u if (result f32) f32.const 1237940039285380274899124e3 - local.set $4 + local.set $5 local.get $1 f32.const 8.077935669463161e-28 f32.mul @@ -7342,12 +7342,12 @@ f32.const 8.077935669463161e-28 f32.mul else - local.get $2 + local.get $4 i32.const 562036736 i32.lt_u if (result f32) f32.const 8.077935669463161e-28 - local.set $4 + local.set $5 local.get $1 f32.const 1237940039285380274899124e3 f32.mul @@ -7360,7 +7360,7 @@ end end local.set $0 - local.get $4 + local.get $5 local.get $0 f64.promote_f32 local.get $0 @@ -7413,9 +7413,9 @@ (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 f32) + (local $3 i32) (local $4 f32) - (local $5 i32) + (local $5 f32) (local $6 f32) local.get $0 i32.reinterpret_f32 @@ -7454,7 +7454,7 @@ return end i32.const -25 - local.set $5 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -7493,11 +7493,11 @@ local.get $0 f32.add f32.div - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f32.mul local.set $2 - local.get $5 + local.get $3 local.get $1 i32.const 23 i32.shr_u @@ -7521,11 +7521,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $4 + local.tee $5 f32.sub local.get $0 f32.sub - local.get $3 + local.get $4 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -7549,7 +7549,7 @@ f32.mul f32.add local.tee $0 - local.get $4 + local.get $5 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -7558,7 +7558,7 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $4 + local.get $5 f32.const 0.434326171875 f32.mul f32.add @@ -7578,9 +7578,9 @@ (func $~lib/math/NativeMathf.log2 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 f32) + (local $3 i32) (local $4 f32) - (local $5 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -7618,7 +7618,7 @@ return end i32.const -25 - local.set $5 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -7657,8 +7657,8 @@ local.get $0 f32.add f32.div - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f32.mul local.set $2 local.get $0 @@ -7674,11 +7674,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $4 + local.tee $5 f32.sub local.get $0 f32.sub - local.get $3 + local.get $4 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -7702,7 +7702,7 @@ f32.mul f32.add local.tee $0 - local.get $4 + local.get $5 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -7710,11 +7710,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $4 + local.get $5 f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $3 local.get $1 i32.const 23 i32.shr_u @@ -7741,11 +7741,11 @@ (func $~lib/math/NativeMathf.pow (; 97 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) - (local $8 i64) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) local.get $1 f32.abs f32.const 2 @@ -7801,7 +7801,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 1 i32.shl i32.const 1 @@ -7810,19 +7810,19 @@ i32.ge_u i32.const 0 i32.ne - local.tee $5 + local.tee $2 local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $8 i32.const 8388608 i32.sub i32.const 2130706432 i32.ge_u i32.or if - local.get $5 + local.get $2 if - local.get $2 + local.get $3 i32.const 1 i32.shl i32.eqz @@ -7831,7 +7831,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1065353216 i32.eq if @@ -7840,12 +7840,12 @@ br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const -16777216 @@ -7858,7 +7858,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 2130706432 @@ -7868,11 +7868,11 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u i32.eqz - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 2130706432 @@ -7889,7 +7889,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 1 @@ -7901,44 +7901,44 @@ local.get $0 f32.mul local.set $0 - local.get $3 + local.get $8 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) i32.const 0 - local.get $2 + local.get $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $3 + local.tee $8 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 2 - local.get $3 + local.get $8 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 0 - local.get $2 + local.get $3 i32.const 1 i32.const 150 - local.get $3 + local.get $8 i32.sub i32.shl - local.tee $3 + local.tee $8 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 1 - local.get $2 local.get $3 + local.get $8 i32.and br_if $~lib/util/math/checkintf|inlined.0 drop @@ -7954,7 +7954,7 @@ f32.neg local.set $0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u if @@ -7965,37 +7965,37 @@ end br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 31 i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) i32.const 0 - local.get $2 - local.tee $5 + local.get $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 - local.get $2 + local.get $3 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 0 - local.get $5 + local.get $2 i32.const 1 i32.const 150 - local.get $2 + local.get $3 i32.sub i32.shl - local.tee $2 + local.tee $3 i32.const 1 i32.sub i32.and @@ -8003,13 +8003,13 @@ drop i32.const 1 local.get $2 - local.get $5 + local.get $3 i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 end - local.tee $2 + local.tee $3 i32.eqz if local.get $0 @@ -8023,17 +8023,17 @@ end i32.const 65536 i32.const 0 - local.get $2 + local.get $3 i32.const 1 i32.eq select - local.set $7 - local.get $3 + local.set $6 + local.get $8 i32.const 2147483647 i32.and - local.set $3 + local.set $8 end - local.get $3 + local.get $8 i32.const 8388608 i32.lt_u if @@ -8045,21 +8045,21 @@ i32.and i32.const 192937984 i32.sub - local.set $3 + local.set $8 end end - local.get $3 - local.get $3 + local.get $8 + local.get $8 i32.const 1060306944 i32.sub - local.tee $2 + local.tee $3 i32.const -8388608 i32.and - local.tee $5 + local.tee $2 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $2 + local.get $3 i32.const 19 i32.shr_u i32.const 15 @@ -8068,48 +8068,48 @@ i32.shl i32.const 288 i32.add - local.tee $2 + local.tee $3 f64.load f64.mul f64.const 1 f64.sub - local.tee $4 - local.get $4 + local.tee $7 + local.get $7 f64.mul - local.set $6 + local.set $5 local.get $1 f64.promote_f32 f64.const 0.288457581109214 - local.get $4 + local.get $7 f64.mul f64.const -0.36092606229713164 f64.add - local.get $6 - local.get $6 + local.get $5 + local.get $5 f64.mul f64.mul f64.const 1.4426950408774342 - local.get $4 + local.get $7 f64.mul - local.get $2 + local.get $3 f64.load offset=8 - local.get $5 + local.get $2 i32.const 23 i32.shr_s f64.convert_i32_s f64.add f64.add f64.const 0.480898481472577 - local.get $4 + local.get $7 f64.mul f64.const -0.7213474675006291 f64.add - local.get $6 + local.get $5 f64.mul f64.add f64.add f64.mul - local.tee $4 + local.tee $7 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -8118,26 +8118,26 @@ i64.const 32959 i64.ge_u if - local.get $4 + local.get $7 f64.const 127.99999995700433 f64.gt if f32.const -1584563250285286751870879e5 f32.const 1584563250285286751870879e5 - local.get $7 + local.get $6 select f32.const 1584563250285286751870879e5 f32.mul local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $4 + local.get $7 f64.const -150 f64.le if f32.const -2.524354896707238e-29 f32.const 2.524354896707238e-29 - local.get $7 + local.get $6 select f32.const 2.524354896707238e-29 f32.mul @@ -8146,31 +8146,31 @@ end end f64.const 0.6931471806916203 - local.get $4 - local.get $4 + local.get $7 + local.get $7 f64.const 211106232532992 f64.add - local.tee $6 + local.tee $5 f64.const 211106232532992 f64.sub f64.sub - local.tee $4 + local.tee $7 f64.mul f64.const 1 f64.add f64.const 0.05550361559341535 - local.get $4 + local.get $7 f64.mul f64.const 0.2402284522445722 f64.add - local.get $4 - local.get $4 + local.get $7 + local.get $7 f64.mul f64.mul f64.add - local.get $6 + local.get $5 i64.reinterpret_f64 - local.tee $8 + local.tee $4 i32.wrap_i64 i32.const 31 i32.and @@ -8179,8 +8179,8 @@ i32.const 560 i32.add i64.load - local.get $8 - local.get $7 + local.get $4 + local.get $6 i64.extend_i32_u i64.add i64.const 47 @@ -8220,10 +8220,10 @@ local.get $0 ) (func $~lib/math/NativeMathf.sin (; 101 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) (local $5 i64) (local $6 f64) (local $7 i64) @@ -8234,18 +8234,18 @@ (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $11 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $4 + local.get $2 i32.const 964689920 i32.lt_u if @@ -8254,15 +8254,15 @@ end local.get $0 f64.promote_f32 - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul local.tee $6 - local.get $2 + local.get $4 f64.mul - local.set $1 - local.get $2 - local.get $1 + local.set $3 + local.get $4 + local.get $3 f64.const -0.16666666641626524 local.get $6 f64.const 0.008333329385889463 @@ -8270,7 +8270,7 @@ f64.add f64.mul f64.add - local.get $1 + local.get $3 local.get $6 local.get $6 f64.mul @@ -8285,7 +8285,7 @@ f32.demote_f64 return end - local.get $4 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -8295,7 +8295,7 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $4 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -8306,25 +8306,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $4 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -8337,7 +8337,7 @@ local.get $10 i64.load offset=8 local.set $8 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -8369,7 +8369,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -8408,40 +8408,40 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $11 select end - local.set $3 - global.get $~lib/math/rempio2f_y local.set $1 - local.get $3 + global.get $~lib/math/rempio2f_y + local.set $3 + local.get $1 i32.const 1 i32.and if (result f32) - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8449,28 +8449,28 @@ f64.add f32.demote_f64 else - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $1 + local.tee $4 + local.get $3 f64.mul - local.tee $1 + local.tee $3 f64.const -0.16666666641626524 - local.get $2 + local.get $4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $2 + local.get $4 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -8479,7 +8479,7 @@ f32.demote_f64 end local.set $0 - local.get $3 + local.get $1 i32.const 2 i32.and if @@ -8574,11 +8574,11 @@ f32.sqrt ) (func $~lib/math/NativeMathf.tan (; 106 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) (local $4 f64) - (local $5 i32) + (local $5 f64) (local $6 i64) (local $7 i64) (local $8 i64) @@ -8588,18 +8588,18 @@ (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $11 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $5 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $5 + local.get $2 i32.const 964689920 i32.lt_u if @@ -8608,36 +8608,36 @@ end local.get $0 f64.promote_f32 - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $2 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $1 - local.get $4 - local.get $1 + local.set $3 + local.get $5 + local.get $3 f64.const 0.3333313950307914 - local.get $2 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $1 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $2 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.002974357433599673 - local.get $2 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -8648,7 +8648,7 @@ f32.demote_f64 return end - local.get $5 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -8658,7 +8658,7 @@ return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $5 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -8669,25 +8669,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $5 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -8700,7 +8700,7 @@ local.get $10 i64.load offset=8 local.set $8 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -8732,7 +8732,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $5 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -8771,43 +8771,43 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $2 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $1 - local.get $4 - local.get $1 + local.set $3 + local.get $5 + local.get $3 f64.const 0.3333313950307914 - local.get $2 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $1 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $2 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.002974357433599673 - local.get $2 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -8815,16 +8815,16 @@ f64.add f64.mul f64.add - local.set $1 + local.set $3 i32.const 1 i32.and if f64.const -1 - local.get $1 + local.get $3 f64.div - local.set $1 + local.set $3 end - local.get $1 + local.get $3 f32.demote_f64 ) (func $../../lib/libm/assembly/libmf/tan (; 107 ;) (param $0 f32) (result f32) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 9afb123903..769ba21f99 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -607,16 +607,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -628,18 +628,18 @@ unreachable end i32.const 560 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2128 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 560 @@ -654,7 +654,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -671,10 +671,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -687,7 +687,7 @@ i32.const 560 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -1467,12 +1467,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -1481,7 +1481,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -1491,8 +1491,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -1505,15 +1505,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load8_s i32.store8 - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load8_s @@ -1527,12 +1527,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -1546,13 +1546,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -1563,7 +1563,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -1588,7 +1588,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 24 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -1780,7 +1780,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1802,32 +1802,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1835,10 +1835,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1852,7 +1852,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1860,18 +1860,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1886,22 +1886,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1909,18 +1909,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1929,16 +1929,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -2293,16 +2293,16 @@ i32.load offset=16 local.tee $4 call $~lib/array/Array#constructor - local.set $1 + local.set $2 i32.const 0 local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if local.get $3 - local.get $2 + local.get $1 i32.const 12 i32.mul i32.add @@ -2312,7 +2312,7 @@ i32.and i32.eqz if - local.get $1 + local.get $2 local.get $0 local.get $5 i32.load offset=4 @@ -2322,17 +2322,17 @@ i32.add local.set $0 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $2 local.get $0 call $~lib/array/Array#set:length - local.get $1 + local.get $2 ) (func $~lib/map/Map#clear (; 37 ;) (param $0 i32) (local $1 i32) @@ -2427,12 +2427,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -2441,7 +2441,7 @@ i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -2451,8 +2451,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -2465,15 +2465,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load8_s i32.store8 - local.get $4 + local.get $5 local.get $2 i32.load8_s offset=1 i32.store8 offset=1 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load8_s @@ -2487,12 +2487,12 @@ i32.load i32.store offset=4 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 8 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 8 @@ -2506,13 +2506,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -2523,7 +2523,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -2548,7 +2548,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 41 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -2767,12 +2767,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -2781,7 +2781,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -2791,8 +2791,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -2805,15 +2805,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load i32.store - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load @@ -2827,12 +2827,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -2846,13 +2846,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -2863,7 +2863,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -2888,7 +2888,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 45 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3266,59 +3266,59 @@ local.set $0 local.get $1 i32.load offset=16 - local.set $6 + local.set $7 i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $6 + local.get $7 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $5 i32.const 0 i32.store offset=12 - local.get $3 - local.get $6 + local.get $5 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 12 i32.mul i32.add - local.tee $5 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $7 local.get $5 + local.get $4 + local.get $6 i32.load8_s call $~lib/array/Array#__set - local.get $7 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $7 + local.get $5 + local.get $4 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $4 i32.const 24 i32.const 6 call $~lib/rt/tlsf/__alloc @@ -3344,17 +3344,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -3366,17 +3366,17 @@ unreachable end local.get $0 - local.get $3 + local.get $5 i32.load offset=4 i32.add i32.load8_s - local.set $5 - local.get $7 + local.set $6 + local.get $4 local.get $0 call $~lib/array/Array#__get - local.set $6 + local.set $7 local.get $1 - local.get $5 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -3388,7 +3388,7 @@ unreachable end local.get $1 - local.get $6 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -3402,16 +3402,16 @@ unreachable end local.get $2 - local.get $5 - local.get $5 + local.get $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 @@ -3433,7 +3433,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3610,13 +3610,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $4 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -3643,12 +3643,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -3657,7 +3657,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -3667,8 +3667,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -3681,15 +3681,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load8_u i32.store8 - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load8_u @@ -3703,12 +3703,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -3722,13 +3722,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -3739,7 +3739,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -3764,7 +3764,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 50 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -3891,12 +3891,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -3905,7 +3905,7 @@ i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -3915,8 +3915,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -3929,15 +3929,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load8_u i32.store8 - local.get $4 + local.get $5 local.get $2 i32.load8_u offset=1 i32.store8 offset=1 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load8_u @@ -3951,12 +3951,12 @@ i32.load i32.store offset=4 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 8 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 8 @@ -3970,13 +3970,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -3987,7 +3987,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -4012,7 +4012,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 53 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -4415,59 +4415,59 @@ local.set $0 local.get $1 i32.load offset=16 - local.set $6 + local.set $7 i32.const 16 i32.const 9 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $6 + local.get $7 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $5 i32.const 0 i32.store offset=12 - local.get $3 - local.get $6 + local.get $5 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 12 i32.mul i32.add - local.tee $5 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $7 local.get $5 + local.get $4 + local.get $6 i32.load8_u call $~lib/array/Array#__set - local.get $7 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $7 + local.get $5 + local.get $4 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $4 i32.const 24 i32.const 10 call $~lib/rt/tlsf/__alloc @@ -4493,17 +4493,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -4515,17 +4515,17 @@ unreachable end local.get $0 - local.get $3 + local.get $5 i32.load offset=4 i32.add i32.load8_u - local.set $5 - local.get $7 + local.set $6 + local.get $4 local.get $0 call $~lib/array/Array#__get - local.set $6 + local.set $7 local.get $1 - local.get $5 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -4537,7 +4537,7 @@ unreachable end local.get $1 - local.get $6 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -4551,16 +4551,16 @@ unreachable end local.get $2 - local.get $5 - local.get $5 + local.get $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 @@ -4582,7 +4582,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4751,13 +4751,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $4 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -4844,12 +4844,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -4858,7 +4858,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -4868,8 +4868,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -4882,15 +4882,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load16_s i32.store16 - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load16_s @@ -4904,12 +4904,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -4923,13 +4923,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -4940,7 +4940,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -4965,7 +4965,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 60 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5146,12 +5146,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -5160,7 +5160,7 @@ i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -5170,8 +5170,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -5184,15 +5184,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load16_s i32.store16 - local.get $4 + local.get $5 local.get $2 i32.load16_s offset=2 i32.store16 offset=2 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load16_s @@ -5206,12 +5206,12 @@ i32.load i32.store offset=4 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 8 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 8 @@ -5225,13 +5225,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -5242,7 +5242,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -5267,7 +5267,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 65 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -5688,59 +5688,59 @@ local.set $0 local.get $1 i32.load offset=16 - local.set $6 + local.set $7 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $6 + local.get $7 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $5 i32.const 0 i32.store offset=12 - local.get $3 - local.get $6 + local.get $5 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 12 i32.mul i32.add - local.tee $5 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $7 local.get $5 + local.get $4 + local.get $6 i32.load16_s call $~lib/array/Array#__set - local.get $7 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $7 + local.get $5 + local.get $4 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $4 i32.const 24 i32.const 13 call $~lib/rt/tlsf/__alloc @@ -5766,17 +5766,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -5787,20 +5787,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.load offset=4 local.get $0 i32.const 1 i32.shl i32.add i32.load16_s - local.set $5 - local.get $7 + local.set $6 + local.get $4 local.get $0 call $~lib/array/Array#__get - local.set $6 + local.set $7 local.get $1 - local.get $5 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -5812,7 +5812,7 @@ unreachable end local.get $1 - local.get $6 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -5826,16 +5826,16 @@ unreachable end local.get $2 - local.get $5 - local.get $5 + local.get $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 @@ -5857,7 +5857,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -6034,13 +6034,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $4 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -6067,12 +6067,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -6081,7 +6081,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -6091,8 +6091,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -6105,15 +6105,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load16_u i32.store16 - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load16_u @@ -6127,12 +6127,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -6146,13 +6146,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -6163,7 +6163,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -6188,7 +6188,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 70 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6315,12 +6315,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -6329,7 +6329,7 @@ i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -6339,8 +6339,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -6353,15 +6353,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i32.load16_u i32.store16 - local.get $4 + local.get $5 local.get $2 i32.load16_u offset=2 i32.store16 offset=2 - local.get $4 + local.get $5 local.get $6 local.get $2 i32.load16_u @@ -6375,12 +6375,12 @@ i32.load i32.store offset=4 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 8 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 8 @@ -6394,13 +6394,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -6411,7 +6411,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -6436,7 +6436,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 73 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -6839,59 +6839,59 @@ local.set $0 local.get $1 i32.load offset=16 - local.set $6 + local.set $7 i32.const 16 i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $6 + local.get $7 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $3 + local.tee $5 i32.const 0 i32.store offset=12 - local.get $3 - local.get $6 + local.get $5 + local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.lt_s if local.get $0 - local.get $4 + local.get $3 i32.const 12 i32.mul i32.add - local.tee $5 + local.tee $6 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.get $7 local.get $5 + local.get $4 + local.get $6 i32.load16_u call $~lib/array/Array#__set - local.get $7 + local.get $4 i32.const 1 i32.add - local.set $7 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $7 + local.get $5 + local.get $4 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values - local.set $7 + local.set $4 i32.const 24 i32.const 16 call $~lib/rt/tlsf/__alloc @@ -6917,17 +6917,17 @@ local.get $2 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 + local.set $3 i32.const 0 local.set $0 loop $for-loop|4 local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.lt_s if local.get $0 - local.get $3 + local.get $5 i32.load offset=12 i32.ge_u if @@ -6938,20 +6938,20 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.load offset=4 local.get $0 i32.const 1 i32.shl i32.add i32.load16_u - local.set $5 - local.get $7 + local.set $6 + local.get $4 local.get $0 call $~lib/array/Array#__get - local.set $6 + local.set $7 local.get $1 - local.get $5 + local.get $6 call $~lib/map/Map#has i32.eqz if @@ -6963,7 +6963,7 @@ unreachable end local.get $1 - local.get $6 + local.get $7 i32.const 20 i32.sub call $~lib/map/Map#has @@ -6977,16 +6977,16 @@ unreachable end local.get $2 - local.get $5 - local.get $5 + local.get $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 - local.get $6 + local.get $3 + local.get $7 i32.const 20 i32.sub - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 @@ -7008,7 +7008,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7177,13 +7177,13 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $4 call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $3 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -7449,12 +7449,12 @@ local.set $4 local.get $1 i32.load offset=16 - local.tee $2 + local.tee $3 call $~lib/array/Array#constructor local.set $5 loop $for-loop|01 local.get $0 - local.get $2 + local.get $3 i32.lt_s if local.get $4 @@ -7469,14 +7469,14 @@ i32.eqz if local.get $5 - local.get $3 + local.get $2 local.get $6 i32.load call $~lib/array/Array#__set - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 end local.get $0 i32.const 1 @@ -7486,13 +7486,13 @@ end end local.get $5 - local.get $3 + local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $3 + local.set $2 call $~lib/map/Map#constructor local.set $4 i32.const 0 @@ -7506,13 +7506,13 @@ local.get $5 local.get $0 call $~lib/array/Array#__get - local.set $2 + local.set $3 local.get $6 local.get $0 call $~lib/array/Array#__get local.set $7 local.get $1 - local.get $2 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7537,17 +7537,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $2 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $0 @@ -7557,7 +7557,7 @@ br $for-loop|2 end end - local.get $3 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -7734,7 +7734,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release @@ -8422,12 +8422,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -8436,7 +8436,7 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -8446,8 +8446,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -8460,15 +8460,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i64.load i64.store - local.get $4 + local.get $5 local.get $2 i32.load offset=8 i32.store offset=8 - local.get $4 + local.get $5 local.get $6 local.get $2 i64.load @@ -8482,12 +8482,12 @@ i32.load i32.store offset=12 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 16 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 16 @@ -8501,13 +8501,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -8518,7 +8518,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -8543,7 +8543,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 86 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) @@ -8718,16 +8718,16 @@ i32.load offset=16 local.tee $4 call $~lib/array/Array#constructor - local.set $1 + local.set $2 i32.const 0 local.set $0 loop $for-loop|0 - local.get $2 + local.get $1 local.get $4 i32.lt_s if local.get $3 - local.get $2 + local.get $1 i32.const 4 i32.shl i32.add @@ -8737,7 +8737,7 @@ i32.and i32.eqz if - local.get $1 + local.get $2 local.get $0 local.get $5 i32.load offset=8 @@ -8747,17 +8747,17 @@ i32.add local.set $0 end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $2 local.get $0 call $~lib/array/Array#set:length - local.get $1 + local.get $2 ) (func $~lib/map/Map#clear (; 91 ;) (param $0 i32) (local $1 i32) @@ -8824,12 +8824,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -8838,7 +8838,7 @@ i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -8848,8 +8848,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -8862,15 +8862,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 i64.load i64.store - local.get $4 + local.get $5 local.get $2 i64.load offset=8 i64.store offset=8 - local.get $4 + local.get $5 local.get $6 local.get $2 i64.load @@ -8884,12 +8884,12 @@ i32.load i32.store offset=16 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 24 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 24 @@ -8903,13 +8903,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -8920,7 +8920,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -8945,7 +8945,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 94 ;) (param $0 i32) (param $1 i64) (param $2 i64) (result i32) @@ -10248,12 +10248,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -10262,7 +10262,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -10272,8 +10272,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -10286,15 +10286,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 f32.load f32.store - local.get $4 + local.get $5 local.get $2 i32.load offset=4 i32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 f32.load @@ -10309,12 +10309,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -10328,13 +10328,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -10345,7 +10345,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -10370,7 +10370,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 101 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) @@ -10594,12 +10594,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -10608,7 +10608,7 @@ i32.const 12 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -10618,8 +10618,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -10632,15 +10632,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 f32.load f32.store - local.get $4 + local.get $5 local.get $2 f32.load offset=4 f32.store offset=4 - local.get $4 + local.get $5 local.get $6 local.get $2 f32.load @@ -10655,12 +10655,12 @@ i32.load i32.store offset=8 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 12 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 12 @@ -10674,13 +10674,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -10691,7 +10691,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -10716,7 +10716,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 105 ;) (param $0 i32) (param $1 f32) (param $2 f32) (result i32) @@ -11422,12 +11422,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -11436,7 +11436,7 @@ i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -11446,8 +11446,8 @@ i32.shl i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -11460,15 +11460,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 f64.load f64.store - local.get $4 + local.get $5 local.get $2 i32.load offset=8 i32.store offset=8 - local.get $4 + local.get $5 local.get $6 local.get $2 f64.load @@ -11483,12 +11483,12 @@ i32.load i32.store offset=12 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 16 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 16 @@ -11502,13 +11502,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -11519,7 +11519,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -11544,7 +11544,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 111 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) @@ -11768,12 +11768,12 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $4 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor local.set $6 - local.get $5 + local.get $4 i32.const 3 i32.shl i32.const 3 @@ -11782,7 +11782,7 @@ i32.const 24 i32.mul call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 local.tee $3 @@ -11792,8 +11792,8 @@ i32.mul i32.add local.set $8 - local.get $5 - local.set $4 + local.get $4 + local.set $5 loop $while-continue|0 local.get $3 local.get $8 @@ -11806,15 +11806,15 @@ i32.and i32.eqz if - local.get $4 + local.get $5 local.get $2 f64.load f64.store - local.get $4 + local.get $5 local.get $2 f64.load offset=8 f64.store offset=8 - local.get $4 + local.get $5 local.get $6 local.get $2 f64.load @@ -11829,12 +11829,12 @@ i32.load i32.store offset=16 local.get $2 - local.get $4 + local.get $5 i32.store - local.get $4 + local.get $5 i32.const 24 i32.add - local.set $4 + local.set $5 end local.get $3 i32.const 24 @@ -11848,13 +11848,13 @@ local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $5 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__release end local.get $2 @@ -11865,7 +11865,7 @@ i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $4 local.tee $2 local.get $1 i32.load offset=8 @@ -11890,7 +11890,7 @@ i32.store offset=16 local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) (func $~lib/map/Map#set (; 115 ;) (param $0 i32) (param $1 f64) (param $2 f64) (result i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index ee28c52fd6..40064d7f59 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -848,8 +848,8 @@ (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 i64) - (local $6 f64) + (local $5 f64) + (local $6 i64) (local $7 f64) i32.const 1 local.set $3 @@ -922,7 +922,7 @@ local.get $0 f64.add i64.reinterpret_f64 - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -938,7 +938,7 @@ i32.lt_s if (result f64) f64.const 1 - local.get $5 + local.get $6 f64.reinterpret_i64 local.tee $1 local.get $0 @@ -958,8 +958,8 @@ else f64.const 0 end - local.set $7 - local.get $5 + local.set $5 + local.get $6 i64.const 4294967295 i64.and local.get $2 @@ -984,8 +984,8 @@ local.tee $4 local.get $4 f64.mul - local.tee $6 - local.get $6 + local.tee $7 + local.get $7 f64.mul local.set $0 local.get $4 @@ -995,7 +995,7 @@ local.get $1 f64.mul local.tee $4 - local.get $6 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -1029,7 +1029,7 @@ local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $7 + local.get $5 f64.add f64.add local.get $4 @@ -1383,7 +1383,7 @@ else f32.const 0 end - local.set $6 + local.set $5 local.get $2 i32.const 8388607 i32.and @@ -1402,8 +1402,8 @@ local.tee $4 local.get $4 f32.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 f32.mul local.set $0 local.get $4 @@ -1413,7 +1413,7 @@ local.get $1 f32.mul local.tee $4 - local.get $5 + local.get $6 f32.const 0.6666666269302368 local.get $0 f32.const 0.2849878668785095 @@ -1435,7 +1435,7 @@ local.tee $0 f32.const 9.05800061445916e-06 f32.mul - local.get $6 + local.get $5 f32.add f32.add local.get $4 @@ -1878,22 +1878,22 @@ call $std/math/check ) (func $std/math/test_asinh (; 58 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i64) - (local $4 f64) + (local $3 f64) + (local $4 i64) local.get $0 - local.tee $4 - i64.reinterpret_f64 local.tee $3 + i64.reinterpret_f64 + local.tee $4 i64.const 9223372036854775807 i64.and f64.reinterpret_i64 local.set $0 - local.get $3 + local.get $4 i64.const 52 i64.shr_u i64.const 2047 i64.and - local.tee $3 + local.tee $4 i64.const 1049 i64.ge_u if @@ -1903,7 +1903,7 @@ f64.add local.set $0 else - local.get $3 + local.get $4 i64.const 1024 i64.ge_u if @@ -1924,7 +1924,7 @@ call $~lib/math/NativeMath.log local.set $0 else - local.get $3 + local.get $4 i64.const 997 i64.ge_u if @@ -1947,13 +1947,13 @@ end end local.get $0 - local.get $4 + local.get $3 f64.copysign local.get $1 local.get $2 call $std/math/check if (result i32) - local.get $4 + local.get $3 call $~lib/bindings/Math/asinh local.get $1 local.get $2 @@ -1963,17 +1963,17 @@ end ) (func $std/math/test_asinhf (; 59 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) - (local $3 i32) - (local $4 f32) + (local $3 f32) + (local $4 i32) local.get $0 - local.tee $4 + local.tee $3 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 f32.reinterpret_i32 local.set $0 - local.get $3 + local.get $4 i32.const 1166016512 i32.ge_u if @@ -1983,7 +1983,7 @@ f32.add local.set $0 else - local.get $3 + local.get $4 i32.const 1073741824 i32.ge_u if @@ -2004,7 +2004,7 @@ call $~lib/math/NativeMathf.log local.set $0 else - local.get $3 + local.get $4 i32.const 964689920 i32.ge_u if @@ -2027,7 +2027,7 @@ end end local.get $0 - local.get $4 + local.get $3 f32.copysign local.get $1 local.get $2 @@ -2035,11 +2035,11 @@ ) (func $~lib/math/NativeMath.atan (; 60 ;) (param $0 f64) (result f64) (local $1 f64) - (local $2 i32) - (local $3 f64) + (local $2 f64) + (local $3 i32) (local $4 f64) local.get $0 - local.set $3 + local.set $1 local.get $0 i64.reinterpret_f64 i64.const 32 @@ -2047,7 +2047,7 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1141899264 i32.ge_u if @@ -2059,15 +2059,15 @@ return end f64.const 1.5707963267948966 - local.get $3 + local.get $1 f64.copysign return end - local.get $2 + local.get $3 i32.const 1071382528 i32.lt_u if - local.get $2 + local.get $3 i32.const 1044381696 i32.lt_u if @@ -2075,21 +2075,21 @@ return end i32.const -1 - local.set $2 + local.set $3 else local.get $0 f64.abs local.set $0 - local.get $2 + local.get $3 i32.const 1072889856 i32.lt_u if (result f64) - local.get $2 + local.get $3 i32.const 1072037888 i32.lt_u if (result f64) i32.const 0 - local.set $2 + local.set $3 f64.const 2 local.get $0 f64.mul @@ -2101,7 +2101,7 @@ f64.div else i32.const 1 - local.set $2 + local.set $3 local.get $0 f64.const 1 f64.sub @@ -2111,12 +2111,12 @@ f64.div end else - local.get $2 + local.get $3 i32.const 1073971200 i32.lt_u if (result f64) i32.const 2 - local.set $2 + local.set $3 local.get $0 f64.const 1.5 f64.sub @@ -2128,7 +2128,7 @@ f64.div else i32.const 3 - local.set $2 + local.set $3 f64.const -1 local.get $0 f64.div @@ -2142,19 +2142,19 @@ local.tee $4 local.get $4 f64.mul - local.set $1 + local.set $2 local.get $0 local.get $4 f64.const 0.3333333333333293 - local.get $1 + local.get $2 f64.const 0.14285714272503466 - local.get $1 + local.get $2 f64.const 0.09090887133436507 - local.get $1 + local.get $2 f64.const 0.06661073137387531 - local.get $1 + local.get $2 f64.const 0.049768779946159324 - local.get $1 + local.get $2 f64.const 0.016285820115365782 f64.mul f64.add @@ -2167,15 +2167,15 @@ f64.mul f64.add f64.mul - local.get $1 + local.get $2 f64.const -0.19999999999876483 - local.get $1 + local.get $2 f64.const -0.11111110405462356 - local.get $1 + local.get $2 f64.const -0.0769187620504483 - local.get $1 + local.get $2 f64.const -0.058335701337905735 - local.get $1 + local.get $2 f64.const -0.036531572744216916 f64.mul f64.add @@ -2188,13 +2188,13 @@ f64.mul f64.add f64.mul - local.set $1 - local.get $2 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if local.get $0 - local.get $1 + local.get $2 f64.sub return end @@ -2203,15 +2203,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $2 + local.get $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f64.const 0.4636476090008061 - local.get $1 + local.get $2 f64.const 2.2698777452961687e-17 f64.sub local.get $0 @@ -2221,7 +2221,7 @@ br $break|0 end f64.const 0.7853981633974483 - local.get $1 + local.get $2 f64.const 3.061616997868383e-17 f64.sub local.get $0 @@ -2231,7 +2231,7 @@ br $break|0 end f64.const 0.982793723247329 - local.get $1 + local.get $2 f64.const 1.3903311031230998e-17 f64.sub local.get $0 @@ -2241,7 +2241,7 @@ br $break|0 end f64.const 1.5707963267948966 - local.get $1 + local.get $2 f64.const 6.123233995736766e-17 f64.sub local.get $0 @@ -2253,7 +2253,7 @@ unreachable end local.get $0 - local.get $3 + local.get $1 f64.copysign ) (func $std/math/test_atan (; 61 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -2273,17 +2273,17 @@ end ) (func $~lib/math/NativeMathf.atan (; 62 ;) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) (local $3 f32) (local $4 f32) local.get $0 - local.set $4 + local.set $1 local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1283457024 i32.ge_u if @@ -2295,15 +2295,15 @@ return end f32.const 1.570796251296997 - local.get $4 + local.get $1 f32.copysign return end - local.get $1 + local.get $2 i32.const 1054867456 i32.lt_u if - local.get $1 + local.get $2 i32.const 964689920 i32.lt_u if @@ -2311,21 +2311,21 @@ return end i32.const -1 - local.set $1 + local.set $2 else local.get $0 f32.abs local.set $0 - local.get $1 + local.get $2 i32.const 1066926080 i32.lt_u if (result f32) - local.get $1 + local.get $2 i32.const 1060110336 i32.lt_u if (result f32) i32.const 0 - local.set $1 + local.set $2 f32.const 2 local.get $0 f32.mul @@ -2337,7 +2337,7 @@ f32.div else i32.const 1 - local.set $1 + local.set $2 local.get $0 f32.const 1 f32.sub @@ -2347,12 +2347,12 @@ f32.div end else - local.get $1 + local.get $2 i32.const 1075576832 i32.lt_u if (result f32) i32.const 2 - local.set $1 + local.set $2 local.get $0 f32.const 1.5 f32.sub @@ -2364,7 +2364,7 @@ f32.div else i32.const 3 - local.set $1 + local.set $2 f32.const -1 local.get $0 f32.div @@ -2375,38 +2375,38 @@ local.get $0 local.get $0 f32.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f32.mul - local.set $3 + local.set $4 local.get $0 - local.get $2 - f32.const 0.333333283662796 local.get $3 + f32.const 0.333333283662796 + local.get $4 f32.const 0.14253635704517365 - local.get $3 + local.get $4 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $3 + local.get $4 f32.const -0.19999158382415771 - local.get $3 + local.get $4 f32.const -0.106480173766613 f32.mul f32.add f32.mul f32.add f32.mul - local.set $2 - local.get $1 + local.set $3 + local.get $2 i32.const 0 i32.lt_s if local.get $0 - local.get $2 + local.get $3 f32.sub return end @@ -2415,15 +2415,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $1 + local.get $2 if - local.get $1 + local.get $2 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f32.const 0.46364760398864746 - local.get $2 + local.get $3 f32.const 5.01215824399992e-09 f32.sub local.get $0 @@ -2433,7 +2433,7 @@ br $break|0 end f32.const 0.7853981256484985 - local.get $2 + local.get $3 f32.const 3.774894707930798e-08 f32.sub local.get $0 @@ -2443,7 +2443,7 @@ br $break|0 end f32.const 0.9827936887741089 - local.get $2 + local.get $3 f32.const 3.447321716976148e-08 f32.sub local.get $0 @@ -2453,7 +2453,7 @@ br $break|0 end f32.const 1.570796251296997 - local.get $2 + local.get $3 f32.const 7.549789415861596e-08 f32.sub local.get $0 @@ -2465,7 +2465,7 @@ unreachable end local.get $0 - local.get $4 + local.get $1 f32.copysign ) (func $std/math/test_atanf (; 63 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) @@ -2623,21 +2623,21 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 + local.set $6 local.get $5 i32.wrap_i64 - local.set $6 + local.set $2 local.get $1 i64.reinterpret_f64 local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $7 local.get $5 i32.wrap_i64 - local.tee $7 - local.get $2 + local.tee $4 + local.get $7 i32.const 1072693248 i32.sub i32.or @@ -2647,25 +2647,25 @@ call $~lib/math/NativeMath.atan return end - local.get $2 + local.get $7 i32.const 30 i32.shr_u i32.const 2 i32.and - local.get $4 + local.get $6 i32.const 31 i32.shr_u i32.or local.set $3 - local.get $2 + local.get $7 i32.const 2147483647 i32.and - local.set $2 - local.get $4 + local.set $7 + local.get $6 i32.const 2147483647 i32.and - local.tee $4 - local.get $6 + local.tee $6 + local.get $2 i32.or i32.eqz if @@ -2695,16 +2695,16 @@ end end block $folding-inner0 - local.get $2 + local.get $4 local.get $7 i32.or i32.eqz br_if $folding-inner0 - local.get $2 + local.get $7 i32.const 2146435072 i32.eq if - local.get $4 + local.get $6 i32.const 2146435072 i32.eq if @@ -2734,20 +2734,20 @@ return end i32.const 1 - local.get $4 + local.get $6 i32.const 2146435072 i32.eq - local.get $2 + local.get $7 i32.const 67108864 i32.add - local.get $4 + local.get $6 i32.lt_u select br_if $folding-inner0 - local.get $4 + local.get $6 i32.const 67108864 i32.add - local.get $2 + local.get $7 i32.lt_u i32.const 0 local.get $3 @@ -2769,9 +2769,9 @@ block $case2|1 block $case1|1 local.get $3 - local.tee $6 + local.tee $2 if - local.get $6 + local.get $2 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -2844,7 +2844,7 @@ end local.get $0 i32.reinterpret_f32 - local.set $3 + local.set $2 local.get $1 i32.reinterpret_f32 local.tee $4 @@ -2860,37 +2860,37 @@ i32.shr_u i32.const 2 i32.and - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.or - local.set $2 + local.set $3 local.get $4 i32.const 2147483647 i32.and local.set $4 - local.get $3 + local.get $2 i32.const 2147483647 i32.and - local.tee $3 + local.tee $2 i32.eqz if block $break|0 block $case3|0 block $case2|0 - local.get $2 + local.get $3 i32.eqz - local.get $2 + local.get $3 i32.const 1 i32.eq i32.or i32.eqz if - local.get $2 + local.get $3 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $3 i32.const 3 i32.eq br_if $case3|0 @@ -2914,13 +2914,13 @@ i32.const 2139095040 i32.eq if - local.get $3 + local.get $2 i32.const 2139095040 i32.eq if f32.const 2.356194496154785 f32.const 0.7853981852531433 - local.get $2 + local.get $3 i32.const 2 i32.and select @@ -2928,13 +2928,13 @@ else f32.const 3.1415927410125732 f32.const 0 - local.get $2 + local.get $3 i32.const 2 i32.and select local.set $0 end - local.get $2 + local.get $3 i32.const 1 i32.and if @@ -2946,23 +2946,23 @@ return end i32.const 1 - local.get $3 + local.get $2 i32.const 2139095040 i32.eq local.get $4 i32.const 218103808 i32.add - local.get $3 + local.get $2 i32.lt_u select br_if $folding-inner0 - local.get $3 + local.get $2 i32.const 218103808 i32.add local.get $4 i32.lt_u i32.const 0 - local.get $2 + local.get $3 i32.const 2 i32.and select @@ -2980,10 +2980,10 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $2 - local.tee $3 + local.get $3 + local.tee $2 if - local.get $3 + local.get $2 i32.const 1 i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 @@ -3013,7 +3013,7 @@ end f32.const -1.5707963705062866 f32.const 1.5707963705062866 - local.get $2 + local.get $3 i32.const 1 i32.and select @@ -3579,31 +3579,31 @@ i32.wrap_i64 ) (func $~lib/math/NativeMath.cos (; 77 ;) (param $0 f64) (result f64) - (local $1 f64) + (local $1 i64) (local $2 f64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 f64) - (local $7 i64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $5 i32.const 31 i32.shr_u - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $5 i32.const 1044816030 i32.lt_u if @@ -3615,38 +3615,38 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $3 + local.tee $4 f64.const 1 - local.get $3 - f64.sub - local.get $1 + local.get $4 f64.sub local.get $2 - local.get $2 + f64.sub + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $2 + local.get $3 f64.const -0.001388888888887411 - local.get $2 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.mul - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $3 f64.const 2.087572321298175e-09 - local.get $2 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3663,7 +3663,7 @@ f64.add return end - local.get $4 + local.get $5 i32.const 2146435072 i32.ge_u if @@ -3673,36 +3673,36 @@ return end block $~lib/math/rempio2|inlined.0 (result i32) - local.get $7 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $4 + local.get $5 i32.const 20 i32.shr_u - local.tee $5 + local.tee $6 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $2 + local.tee $3 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $2 + local.get $3 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $3 + local.tee $4 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3715,27 +3715,27 @@ i32.const 16 i32.gt_u if - local.get $2 + local.get $3 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $5 + local.set $2 + local.get $6 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $3 + local.tee $4 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -3748,55 +3748,55 @@ i32.const 49 i32.gt_u if - local.get $2 + local.get $3 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $3 + local.set $4 end end - local.get $3 + local.get $4 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $3 + local.get $4 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $2 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2|inlined.0 end i32.const 0 - local.get $7 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $5 i32.sub - local.get $4 local.get $5 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $2 - local.get $5 + local.set $3 + local.get $6 i32.const 1 i32.and if (result f64) @@ -3804,41 +3804,41 @@ local.get $0 local.get $0 f64.mul - local.tee $3 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $3 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $3 - local.get $3 - local.get $3 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $3 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 + local.set $7 local.get $0 - local.get $3 + local.get $4 f64.const 0.5 - local.get $2 - f64.mul local.get $3 + f64.mul + local.get $4 local.get $0 f64.mul local.tee $0 - local.get $6 + local.get $7 f64.mul f64.sub f64.mul - local.get $2 + local.get $3 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -3851,38 +3851,38 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.mul - local.tee $3 + local.tee $4 f64.sub - local.tee $6 + local.tee $7 f64.const 1 - local.get $6 + local.get $7 f64.sub - local.get $3 + local.get $4 f64.sub - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $1 + local.get $2 f64.const -0.001388888888887411 - local.get $1 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul f64.const -2.7557314351390663e-07 - local.get $1 + local.get $2 f64.const 2.087572321298175e-09 - local.get $1 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -3892,14 +3892,14 @@ f64.add f64.mul local.get $0 - local.get $2 + local.get $3 f64.mul f64.sub f64.add f64.add end local.set $0 - local.get $5 + local.get $6 i32.const 1 i32.add i32.const 2 @@ -3928,10 +3928,10 @@ end ) (func $~lib/math/NativeMathf.cos (; 79 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) (local $5 i64) (local $6 i64) (local $7 i64) @@ -3941,18 +3941,18 @@ (local $11 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $10 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $4 + local.get $2 i32.const 964689920 i32.lt_u if @@ -3961,27 +3961,27 @@ end local.get $0 f64.promote_f32 - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -3990,7 +3990,7 @@ f32.demote_f64 return end - local.get $4 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -4000,7 +4000,7 @@ return end block $~lib/math/rempio2f|inlined.0 (result i32) - local.get $4 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -4011,25 +4011,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $4 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -4042,7 +4042,7 @@ local.get $9 i64.load offset=8 local.set $7 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -4074,7 +4074,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -4113,41 +4113,41 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $10 select end - local.set $3 - global.get $~lib/math/rempio2f_y local.set $1 - local.get $3 + global.get $~lib/math/rempio2f_y + local.set $3 + local.get $1 i32.const 1 i32.and if (result f32) - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $1 + local.tee $4 + local.get $3 f64.mul - local.tee $1 + local.tee $3 f64.const -0.16666666641626524 - local.get $2 + local.get $4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $2 + local.get $4 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -4155,27 +4155,27 @@ f64.add f32.demote_f64 else - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -4184,7 +4184,7 @@ f32.demote_f64 end local.set $0 - local.get $3 + local.get $1 i32.const 1 i32.add i32.const 2 @@ -4475,26 +4475,26 @@ f64.mul ) (func $~lib/math/NativeMath.exp (; 82 ;) (param $0 f64) (result f64) - (local $1 i32) - (local $2 f64) - (local $3 i32) - (local $4 f64) + (local $1 f64) + (local $2 i32) + (local $3 f64) + (local $4 i32) (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $6 f64) + (local $7 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $1 + local.tee $2 i32.const 31 i32.shr_u - local.set $6 - local.get $1 + local.set $7 + local.get $2 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1082532651 i32.ge_u if @@ -4523,13 +4523,13 @@ end end i32.const 0 - local.set $1 - local.get $3 + local.set $2 + local.get $4 i32.const 1071001154 i32.gt_u if local.get $0 - local.get $3 + local.get $4 i32.const 1072734898 i32.ge_u if (result i32) @@ -4543,26 +4543,26 @@ i32.trunc_f64_s else i32.const 1 - local.get $6 + local.get $7 i32.const 1 i32.shl i32.sub end - local.tee $1 + local.tee $2 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul f64.sub - local.tee $4 - local.get $1 + local.tee $1 + local.get $2 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul - local.tee $7 + local.tee $5 f64.sub local.set $0 else - local.get $3 + local.get $4 i32.const 1043333120 i32.gt_u if (result f64) @@ -4573,30 +4573,30 @@ f64.add return end - local.set $4 + local.set $1 end local.get $0 local.get $0 f64.mul - local.tee $2 - local.get $2 + local.tee $3 + local.get $3 f64.mul - local.set $5 + local.set $6 f64.const 1 local.get $0 local.get $0 - local.get $2 + local.get $3 f64.const 0.16666666666666602 f64.mul - local.get $5 + local.get $6 f64.const -2.7777777777015593e-03 - local.get $2 + local.get $3 f64.const 6.613756321437934e-05 f64.mul f64.add - local.get $5 + local.get $6 f64.const -1.6533902205465252e-06 - local.get $2 + local.get $3 f64.const 4.1381367970572385e-08 f64.mul f64.add @@ -4611,16 +4611,16 @@ local.get $0 f64.sub f64.div - local.get $7 + local.get $5 f64.sub - local.get $4 + local.get $1 f64.add f64.add local.set $0 - local.get $1 + local.get $2 if local.get $0 - local.get $1 + local.get $2 call $~lib/math/NativeMath.scalbn local.set $0 end @@ -5540,58 +5540,58 @@ call $std/math/check ) (func $~lib/math/NativeMath.hypot (; 97 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 f64) + (local $2 i64) (local $3 i64) (local $4 i64) (local $5 f64) - (local $6 f64) + (local $6 i32) (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 f64) - (local $11 i64) + (local $8 f64) + (local $9 f64) + (local $10 i32) + (local $11 f64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $4 + local.tee $3 local.get $1 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 + local.tee $4 i64.lt_u if - local.get $4 local.get $3 - local.set $4 + local.get $4 local.set $3 + local.set $4 end - local.get $3 + local.get $4 f64.reinterpret_i64 local.set $1 - local.get $3 + local.get $4 i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $6 i32.const 2047 i32.eq if local.get $1 return end - local.get $4 + local.get $3 f64.reinterpret_i64 local.set $0 i32.const 1 - local.get $3 - i64.eqz local.get $4 + i64.eqz + local.get $3 i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $10 i32.const 2047 i32.eq select @@ -5599,8 +5599,8 @@ local.get $0 return end - local.get $9 - local.get $8 + local.get $10 + local.get $6 i32.sub i32.const 64 i32.gt_s @@ -5611,13 +5611,13 @@ return end f64.const 1 - local.set $5 - local.get $9 + local.set $9 + local.get $10 i32.const 1533 i32.gt_s if (result f64) f64.const 5260135901548373507240989e186 - local.set $5 + local.set $9 local.get $1 f64.const 1.90109156629516e-211 f64.mul @@ -5626,12 +5626,12 @@ f64.const 1.90109156629516e-211 f64.mul else - local.get $8 + local.get $6 i32.const 573 i32.lt_s if (result f64) f64.const 1.90109156629516e-211 - local.set $5 + local.set $9 local.get $1 f64.const 5260135901548373507240989e186 f64.mul @@ -5649,28 +5649,28 @@ local.get $1 f64.const 134217729 f64.mul - local.tee $2 + local.tee $11 f64.sub - local.get $2 + local.get $11 f64.add - local.tee $6 + local.tee $8 f64.sub - local.set $10 + local.set $5 local.get $0 local.get $0 local.get $0 f64.const 134217729 f64.mul - local.tee $2 + local.tee $11 f64.sub - local.get $2 + local.get $11 f64.add local.tee $7 f64.sub - local.set $2 - local.get $5 - local.get $6 - local.get $6 + local.set $11 + local.get $9 + local.get $8 + local.get $8 f64.mul local.get $1 local.get $1 @@ -5678,11 +5678,11 @@ local.tee $1 f64.sub f64.const 2 - local.get $6 + local.get $8 f64.mul - local.get $10 + local.get $5 f64.add - local.get $10 + local.get $5 f64.mul f64.add local.get $7 @@ -5696,9 +5696,9 @@ f64.const 2 local.get $7 f64.mul - local.get $2 + local.get $11 f64.add - local.get $2 + local.get $11 f64.mul f64.add f64.add @@ -5720,8 +5720,8 @@ (func $~lib/math/NativeMathf.hypot (; 99 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 f32) - (local $5 i32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -5731,21 +5731,21 @@ i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.lt_u if local.get $3 - local.get $2 + local.get $4 local.set $3 - local.set $2 + local.set $4 end local.get $3 f32.reinterpret_i32 local.set $0 - local.get $2 + local.get $4 f32.reinterpret_i32 local.set $1 - local.get $2 + local.get $4 i32.const 2139095040 i32.eq if @@ -5754,12 +5754,12 @@ end i32.const 1 local.get $3 - local.get $2 + local.get $4 i32.sub i32.const 209715200 i32.ge_u i32.const 1 - local.get $2 + local.get $4 i32.eqz local.get $3 i32.const 2139095040 @@ -5773,13 +5773,13 @@ return end f32.const 1 - local.set $4 + local.set $5 local.get $3 i32.const 1568669696 i32.ge_u if (result f32) f32.const 1237940039285380274899124e3 - local.set $4 + local.set $5 local.get $1 f32.const 8.077935669463161e-28 f32.mul @@ -5788,12 +5788,12 @@ f32.const 8.077935669463161e-28 f32.mul else - local.get $2 + local.get $4 i32.const 562036736 i32.lt_u if (result f32) f32.const 8.077935669463161e-28 - local.set $4 + local.set $5 local.get $1 f32.const 1237940039285380274899124e3 f32.mul @@ -5806,7 +5806,7 @@ end end local.set $0 - local.get $4 + local.get $5 local.get $0 f64.promote_f32 local.get $0 @@ -5857,11 +5857,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) @@ -5906,7 +5906,7 @@ return end i32.const -54 - local.set $8 + local.set $4 local.get $0 f64.const 18014398509481984 f64.mul @@ -5962,11 +5962,11 @@ local.get $0 f64.add f64.div - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $3 - local.get $8 + local.get $4 local.get $1 i32.const 20 i32.shr_u @@ -5984,28 +5984,28 @@ f64.mul local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $6 + local.tee $7 f64.const 0.4342944818781689 f64.mul local.tee $11 f64.add - local.set $7 + local.set $8 local.get $9 f64.const 3.694239077158931e-13 f64.mul local.get $0 - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub - local.get $4 local.get $5 + local.get $6 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -6040,7 +6040,7 @@ f64.mul f64.add local.tee $0 - local.get $6 + local.get $7 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -6050,12 +6050,12 @@ f64.mul f64.add local.get $10 - local.get $7 + local.get $8 f64.sub local.get $11 f64.add f64.add - local.get $7 + local.get $8 f64.add ) (func $std/math/test_log10 (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6077,9 +6077,9 @@ (func $~lib/math/NativeMathf.log10 (; 105 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 f32) + (local $3 i32) (local $4 f32) - (local $5 i32) + (local $5 f32) (local $6 f32) local.get $0 i32.reinterpret_f32 @@ -6118,7 +6118,7 @@ return end i32.const -25 - local.set $5 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -6157,11 +6157,11 @@ local.get $0 f32.add f32.div - local.tee $3 - local.get $3 - f32.mul + local.tee $4 + local.get $4 + f32.mul local.set $2 - local.get $5 + local.get $3 local.get $1 i32.const 23 i32.shr_u @@ -6185,11 +6185,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $4 + local.tee $5 f32.sub local.get $0 f32.sub - local.get $3 + local.get $4 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -6213,7 +6213,7 @@ f32.mul f32.add local.tee $0 - local.get $4 + local.get $5 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -6222,7 +6222,7 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $4 + local.get $5 f32.const 0.434326171875 f32.mul f32.add @@ -6265,11 +6265,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 f64) (local $10 f64) local.get $0 @@ -6313,7 +6313,7 @@ return end i32.const -54 - local.set $8 + local.set $4 local.get $0 f64.const 18014398509481984 f64.mul @@ -6369,11 +6369,11 @@ local.get $0 f64.add f64.div - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $3 - local.get $8 + local.get $4 local.get $1 i32.const 20 i32.shr_u @@ -6388,25 +6388,25 @@ f64.mul local.get $0 f64.mul - local.tee $5 + local.tee $6 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $6 + local.tee $7 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $7 + local.set $8 local.get $0 - local.get $6 + local.get $7 f64.sub - local.get $5 + local.get $6 f64.sub - local.get $4 local.get $5 + local.get $6 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -6441,7 +6441,7 @@ f64.mul f64.add local.tee $0 - local.get $6 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -6450,12 +6450,12 @@ f64.mul f64.add local.get $9 - local.get $7 + local.get $8 f64.sub local.get $10 f64.add f64.add - local.get $7 + local.get $8 f64.add ) (func $std/math/test_log2 (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6477,9 +6477,9 @@ (func $~lib/math/NativeMathf.log2 (; 111 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 f32) + (local $3 i32) (local $4 f32) - (local $5 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -6517,7 +6517,7 @@ return end i32.const -25 - local.set $5 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -6556,8 +6556,8 @@ local.get $0 f32.add f32.div - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f32.mul local.set $2 local.get $0 @@ -6573,11 +6573,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $4 + local.tee $5 f32.sub local.get $0 f32.sub - local.get $3 + local.get $4 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -6601,7 +6601,7 @@ f32.mul f32.add local.tee $0 - local.get $4 + local.get $5 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -6609,11 +6609,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $4 + local.get $5 f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $3 local.get $1 i32.const 23 i32.shr_u @@ -7104,16 +7104,16 @@ call $std/math/check ) (func $~lib/math/NativeMath.pow (; 121 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 f64) + (local $11 i32) (local $12 f64) (local $13 f64) (local $14 f64) @@ -7186,17 +7186,17 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 + local.tee $9 local.get $15 i32.wrap_i64 local.tee $6 @@ -7209,22 +7209,22 @@ i32.const 1 local.get $6 i32.const 0 - local.get $8 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $8 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 local.get $19 i32.const 0 - local.get $5 + local.get $4 i32.const 2146435072 i32.eq select - local.get $5 + local.get $4 i32.const 2146435072 i32.gt_s select @@ -7240,19 +7240,19 @@ i32.const 0 i32.lt_s if - local.get $8 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $8 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $8 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 @@ -7260,27 +7260,27 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $2 + local.tee $5 select local.get $10 i32.sub - local.set $9 + local.set $11 i32.const 2 local.get $6 - local.get $8 - local.get $2 - select - local.tee $2 local.get $9 + local.get $5 + select + local.tee $5 + local.get $11 i32.shr_u local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 - local.get $2 + local.get $5 local.get $10 - local.get $9 + local.get $11 i32.shl i32.eq select @@ -7288,26 +7288,26 @@ i32.const 0 end end - local.set $2 + local.set $5 end local.get $6 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if local.get $19 - local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if - local.get $7 + local.get $8 i32.const 0 i32.lt_s if @@ -7320,7 +7320,7 @@ f64.const 0 local.get $1 f64.neg - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -7333,11 +7333,11 @@ end unreachable end - local.get $8 + local.get $9 i32.const 1072693248 i32.eq if - local.get $7 + local.get $8 i32.const 0 i32.ge_s if @@ -7349,7 +7349,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -7358,7 +7358,7 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if @@ -7374,69 +7374,69 @@ end local.get $0 f64.abs - local.set $3 + local.set $2 local.get $19 i32.eqz if i32.const 1 - local.get $5 + local.get $4 i32.const 1072693248 i32.eq - local.get $5 + local.get $4 i32.const 2146435072 i32.eq i32.const 1 - local.get $5 + local.get $4 select select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 - local.get $7 + local.get $2 + local.get $8 i32.const 0 i32.lt_s select - local.set $3 + local.set $2 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $2 local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 local.get $2 + local.get $5 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $11 + local.set $7 local.get $17 i32.const 0 i32.lt_s if - local.get $2 + local.get $5 i32.eqz if local.get $0 @@ -7449,92 +7449,92 @@ end f64.const -1 f64.const 1 - local.get $2 + local.get $5 i32.const 1 i32.eq select - local.set $11 + local.set $7 end - local.get $8 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $8 + local.get $9 i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $3 + local.tee $2 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -7563,48 +7563,48 @@ local.set $12 local.get $0 local.get $12 - local.get $3 + local.get $2 f64.sub f64.sub else - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -7614,19 +7614,19 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $3 + local.set $5 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl @@ -7635,14 +7635,14 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select - local.tee $4 - f64.sub local.tee $3 + f64.sub + local.tee $2 f64.const 1 local.get $13 - local.get $4 + local.get $3 f64.add f64.div local.tee $0 @@ -7690,16 +7690,16 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $2 local.get $16 - local.get $5 + local.get $4 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -7713,13 +7713,13 @@ local.get $16 local.get $13 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $4 + local.tee $3 local.get $16 local.get $18 f64.add @@ -7733,8 +7733,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 local.get $13 f64.mul local.get $0 @@ -7753,15 +7753,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $4 + local.get $3 f64.mul local.get $0 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -7769,16 +7769,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $4 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -7789,17 +7789,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $4 + local.get $3 local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -7811,32 +7811,32 @@ local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $4 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $11 i32.const 1083179008 i32.ge_s if - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -7844,33 +7844,33 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $4 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $9 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $9 + local.get $11 i32.const 2147483647 i32.and local.tee $10 @@ -7878,7 +7878,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $10 @@ -7886,9 +7886,9 @@ i32.gt_s if i32.const 1048575 - local.get $9 + local.get $11 i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -7900,7 +7900,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $2 + local.tee $5 i32.shr_s i32.const -1 i32.xor @@ -7918,24 +7918,24 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.tee $6 i32.sub local.get $6 - local.get $9 + local.get $11 i32.const 0 i32.lt_s select local.set $6 - local.get $4 + local.get $3 local.get $0 f64.sub - local.set $4 + local.set $3 end local.get $1 - local.get $4 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -7944,10 +7944,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -7958,14 +7958,14 @@ f64.add local.tee $1 f64.add - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $11 + local.get $7 f64.const 1 - local.get $4 - local.get $4 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -7993,17 +7993,17 @@ f64.sub f64.div local.get $1 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $4 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $4 + local.get $3 f64.sub f64.sub local.tee $0 @@ -8015,7 +8015,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -8029,7 +8029,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -8039,14 +8039,14 @@ f64.mul return end - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -8073,11 +8073,11 @@ (func $~lib/math/NativeMathf.pow (; 123 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 f64) - (local $5 i32) - (local $6 f64) - (local $7 i32) - (local $8 i64) + (local $4 i64) + (local $5 f64) + (local $6 i32) + (local $7 f64) + (local $8 i32) local.get $1 f32.abs f32.const 2 @@ -8133,7 +8133,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 1 i32.shl i32.const 1 @@ -8142,19 +8142,19 @@ i32.ge_u i32.const 0 i32.ne - local.tee $5 + local.tee $2 local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $8 i32.const 8388608 i32.sub i32.const 2130706432 i32.ge_u i32.or if - local.get $5 + local.get $2 if - local.get $2 + local.get $3 i32.const 1 i32.shl i32.eqz @@ -8163,7 +8163,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1065353216 i32.eq if @@ -8172,12 +8172,12 @@ br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $2 + local.get $3 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const -16777216 @@ -8190,7 +8190,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 2130706432 @@ -8200,11 +8200,11 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u i32.eqz - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 2130706432 @@ -8221,7 +8221,7 @@ local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 1 i32.shl i32.const 1 @@ -8233,44 +8233,44 @@ local.get $0 f32.mul local.set $0 - local.get $3 + local.get $8 i32.const 31 i32.shr_u if (result i32) block $~lib/util/math/checkintf|inlined.0 (result i32) i32.const 0 - local.get $2 + local.get $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $3 + local.tee $8 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 2 - local.get $3 + local.get $8 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 0 - local.get $2 + local.get $3 i32.const 1 i32.const 150 - local.get $3 + local.get $8 i32.sub i32.shl - local.tee $3 + local.tee $8 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.0 drop i32.const 1 - local.get $2 local.get $3 + local.get $8 i32.and br_if $~lib/util/math/checkintf|inlined.0 drop @@ -8286,7 +8286,7 @@ f32.neg local.set $0 end - local.get $2 + local.get $3 i32.const 31 i32.shr_u if @@ -8297,37 +8297,37 @@ end br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $8 i32.const 31 i32.shr_u if block $~lib/util/math/checkintf|inlined.1 (result i32) i32.const 0 - local.get $2 - local.tee $5 + local.get $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $2 + local.tee $3 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 - local.get $2 + local.get $3 i32.const 150 i32.gt_u br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 0 - local.get $5 + local.get $2 i32.const 1 i32.const 150 - local.get $2 + local.get $3 i32.sub i32.shl - local.tee $2 + local.tee $3 i32.const 1 i32.sub i32.and @@ -8335,13 +8335,13 @@ drop i32.const 1 local.get $2 - local.get $5 + local.get $3 i32.and br_if $~lib/util/math/checkintf|inlined.1 drop i32.const 2 end - local.tee $2 + local.tee $3 i32.eqz if local.get $0 @@ -8355,17 +8355,17 @@ end i32.const 65536 i32.const 0 - local.get $2 + local.get $3 i32.const 1 i32.eq select - local.set $7 - local.get $3 + local.set $6 + local.get $8 i32.const 2147483647 i32.and - local.set $3 + local.set $8 end - local.get $3 + local.get $8 i32.const 8388608 i32.lt_u if @@ -8377,21 +8377,21 @@ i32.and i32.const 192937984 i32.sub - local.set $3 + local.set $8 end end - local.get $3 - local.get $3 + local.get $8 + local.get $8 i32.const 1060306944 i32.sub - local.tee $2 + local.tee $3 i32.const -8388608 i32.and - local.tee $5 + local.tee $2 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $2 + local.get $3 i32.const 19 i32.shr_u i32.const 15 @@ -8400,48 +8400,48 @@ i32.shl i32.const 2672 i32.add - local.tee $2 + local.tee $3 f64.load f64.mul f64.const 1 f64.sub - local.tee $4 - local.get $4 + local.tee $7 + local.get $7 f64.mul - local.set $6 + local.set $5 local.get $1 f64.promote_f32 f64.const 0.288457581109214 - local.get $4 + local.get $7 f64.mul f64.const -0.36092606229713164 f64.add - local.get $6 - local.get $6 + local.get $5 + local.get $5 f64.mul f64.mul f64.const 1.4426950408774342 - local.get $4 + local.get $7 f64.mul - local.get $2 + local.get $3 f64.load offset=8 - local.get $5 + local.get $2 i32.const 23 i32.shr_s f64.convert_i32_s f64.add f64.add f64.const 0.480898481472577 - local.get $4 + local.get $7 f64.mul f64.const -0.7213474675006291 f64.add - local.get $6 + local.get $5 f64.mul f64.add f64.add f64.mul - local.tee $4 + local.tee $7 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -8450,26 +8450,26 @@ i64.const 32959 i64.ge_u if - local.get $4 + local.get $7 f64.const 127.99999995700433 f64.gt if f32.const -1584563250285286751870879e5 f32.const 1584563250285286751870879e5 - local.get $7 + local.get $6 select f32.const 1584563250285286751870879e5 f32.mul local.set $0 br $~lib/util/math/powf_lut|inlined.0 end - local.get $4 + local.get $7 f64.const -150 f64.le if f32.const -2.524354896707238e-29 f32.const 2.524354896707238e-29 - local.get $7 + local.get $6 select f32.const 2.524354896707238e-29 f32.mul @@ -8478,31 +8478,31 @@ end end f64.const 0.6931471806916203 - local.get $4 - local.get $4 + local.get $7 + local.get $7 f64.const 211106232532992 f64.add - local.tee $6 + local.tee $5 f64.const 211106232532992 f64.sub f64.sub - local.tee $4 + local.tee $7 f64.mul f64.const 1 f64.add f64.const 0.05550361559341535 - local.get $4 + local.get $7 f64.mul f64.const 0.2402284522445722 f64.add - local.get $4 - local.get $4 + local.get $7 + local.get $7 f64.mul f64.mul f64.add - local.get $6 + local.get $5 i64.reinterpret_f64 - local.tee $8 + local.tee $4 i32.wrap_i64 i32.const 31 i32.and @@ -8511,8 +8511,8 @@ i32.const 2400 i32.add i64.load - local.get $8 - local.get $7 + local.get $4 + local.get $6 i64.extend_i32_u i64.add i64.const 47 @@ -8693,8 +8693,8 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i64) - (local $6 i32) + (local $5 i32) + (local $6 i64) (local $7 f64) (local $8 i32) local.get $1 @@ -8704,7 +8704,7 @@ i64.shr_u i64.const 2047 i64.and - local.set $5 + local.set $6 i32.const 1 local.get $1 local.get $1 @@ -8771,18 +8771,18 @@ i64.or end local.set $2 - local.get $5 + local.get $6 i64.eqz if (result i64) local.get $4 i64.const 0 - local.get $5 + local.get $6 local.get $4 i64.const 12 i64.shl i64.clz i64.sub - local.tee $5 + local.tee $6 i64.sub i64.const 1 i64.add @@ -8797,10 +8797,10 @@ local.set $4 block $do-break|0 local.get $3 - local.get $5 + local.get $6 i64.lt_s if - local.get $5 + local.get $6 local.get $3 i64.const 1 i64.add @@ -8811,7 +8811,7 @@ end loop $while-continue|1 local.get $3 - local.get $5 + local.get $6 i64.gt_s if local.get $2 @@ -8822,19 +8822,19 @@ local.get $4 i64.sub local.set $2 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $2 i64.const 1 i64.shl local.set $2 - local.get $6 + local.get $5 i32.const 1 i32.shl - local.set $6 + local.set $5 local.get $3 i64.const 1 i64.sub @@ -8850,10 +8850,10 @@ local.get $4 i64.sub local.set $2 - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 end local.get $2 i64.eqz @@ -8906,7 +8906,7 @@ local.get $0 i32.const 1 i32.const 1 - local.get $6 + local.get $5 i32.const 1 i32.and i32.const 0 @@ -8919,14 +8919,14 @@ f64.gt select i32.const 0 - local.get $5 + local.get $6 local.get $3 i64.const 1 i64.add i64.eq select local.get $3 - local.get $5 + local.get $6 i64.eq select select @@ -8950,9 +8950,9 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f32) (local $6 i32) - (local $7 f32) + (local $7 i32) (local $8 i32) local.get $0 i32.reinterpret_f32 @@ -8961,26 +8961,26 @@ i32.shr_u i32.const 255 i32.and - local.set $2 + local.set $8 local.get $1 i32.reinterpret_f32 - local.tee $5 + local.tee $7 i32.const 23 i32.shr_u i32.const 255 i32.and local.set $6 local.get $3 - local.set $4 + local.set $2 i32.const 1 local.get $1 local.get $1 f32.ne - local.get $2 + local.get $8 i32.const 255 i32.eq i32.const 1 - local.get $5 + local.get $7 i32.const 1 i32.shl select @@ -8994,7 +8994,7 @@ f32.div return end - local.get $4 + local.get $2 i32.const 1 i32.shl i32.eqz @@ -9002,42 +9002,42 @@ local.get $0 return end - local.get $4 + local.get $2 i32.const 31 i32.shr_u - local.get $2 + local.get $8 if (result i32) - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $4 + local.get $2 i32.const 1 + local.get $8 local.get $2 - local.get $4 i32.const 9 i32.shl i32.clz i32.sub - local.tee $2 + local.tee $8 i32.sub i32.shl end local.set $3 local.get $6 if (result i32) - local.get $5 + local.get $7 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $7 i32.const 1 local.get $6 - local.get $5 + local.get $7 i32.const 9 i32.shl i32.clz @@ -9046,16 +9046,16 @@ i32.sub i32.shl end - local.set $5 + local.set $7 i32.const 0 - local.set $4 + local.set $2 block $do-break|0 - local.get $2 + local.get $8 local.get $6 i32.lt_s if local.get $6 - local.get $2 + local.get $8 i32.const 1 i32.add i32.eq @@ -9064,20 +9064,20 @@ return end loop $while-continue|1 - local.get $2 + local.get $8 local.get $6 i32.gt_s if local.get $3 - local.get $5 + local.get $7 i32.ge_u if (result i32) - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 local.get $3 - local.get $5 + local.get $7 i32.sub else local.get $3 @@ -9085,27 +9085,27 @@ i32.const 1 i32.shl local.set $3 - local.get $4 + local.get $2 i32.const 1 i32.shl - local.set $4 - local.get $2 + local.set $2 + local.get $8 i32.const 1 i32.sub - local.set $2 + local.set $8 br $while-continue|1 end end local.get $3 - local.get $5 + local.get $7 i32.ge_u if - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 local.get $3 - local.get $5 + local.get $7 i32.sub local.set $3 end @@ -9113,18 +9113,18 @@ i32.eqz if i32.const -30 - local.set $2 + local.set $8 else - local.get $2 + local.get $8 local.get $3 i32.const 8 i32.shl i32.clz - local.tee $5 + local.tee $7 i32.sub - local.set $2 + local.set $8 local.get $3 - local.get $5 + local.get $7 i32.shl local.set $3 end @@ -9132,16 +9132,16 @@ local.get $3 i32.const 8388608 i32.sub - local.get $2 + local.get $8 i32.const 23 i32.shl i32.or local.get $3 i32.const 1 - local.get $2 + local.get $8 i32.sub i32.shr_u - local.get $2 + local.get $8 i32.const 0 i32.gt_s select @@ -9149,7 +9149,7 @@ local.tee $0 local.get $0 f32.add - local.set $7 + local.set $5 local.get $0 local.get $1 f32.abs @@ -9158,27 +9158,27 @@ local.get $0 i32.const 1 i32.const 1 - local.get $4 + local.get $2 i32.const 1 i32.and i32.const 0 - local.get $7 + local.get $5 local.get $1 f32.eq select - local.get $7 + local.get $5 local.get $1 f32.gt select i32.const 0 local.get $6 - local.get $2 + local.get $8 i32.const 1 i32.add i32.eq select - local.get $2 local.get $6 + local.get $8 i32.eq select select @@ -9199,31 +9199,31 @@ call $std/math/check ) (func $~lib/math/NativeMath.sin (; 136 ;) (param $0 f64) (result f64) - (local $1 f64) + (local $1 i64) (local $2 f64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 i32) - (local $6 f64) - (local $7 i64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $7 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $4 + local.tee $5 i32.const 31 i32.shr_u - local.set $5 - local.get $4 + local.set $6 + local.get $5 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1072243195 i32.le_u if - local.get $4 + local.get $5 i32.const 1045430272 i32.lt_u if @@ -9234,41 +9234,41 @@ local.get $0 local.get $0 f64.mul - local.tee $1 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $1 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $1 - local.get $1 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $1 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $2 + local.set $3 local.get $0 - local.get $1 + local.get $2 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $1 local.get $2 + local.get $3 f64.mul f64.add f64.mul f64.add return end - local.get $4 + local.get $5 i32.const 2146435072 i32.ge_u if @@ -9278,36 +9278,36 @@ return end block $~lib/math/rempio2|inlined.1 (result i32) - local.get $7 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $4 + local.tee $5 i32.const 1094263291 i32.lt_u if - local.get $4 + local.get $5 i32.const 20 i32.shr_u - local.tee $5 + local.tee $6 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $3 + local.tee $4 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $3 + local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 - f64.sub local.tee $2 + f64.sub + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9320,27 +9320,27 @@ i32.const 16 i32.gt_u if - local.get $3 + local.get $4 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $5 + local.set $2 + local.get $6 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $2 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -9353,55 +9353,55 @@ i32.const 49 i32.gt_u if - local.get $3 + local.get $4 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $2 + local.set $3 end end - local.get $2 + local.get $3 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $2 + local.get $3 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.1 end i32.const 0 - local.get $7 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $4 + local.tee $5 i32.sub - local.get $4 local.get $5 + local.get $6 select end - local.set $5 + local.set $6 global.get $~lib/math/rempio2_y0 local.set $0 global.get $~lib/math/rempio2_y1 - local.set $3 - local.get $5 + local.set $4 + local.get $6 i32.const 1 i32.and if (result f64) @@ -9410,38 +9410,38 @@ local.get $0 local.get $0 f64.mul - local.tee $1 - f64.mul local.tee $2 + f64.mul + local.tee $3 f64.sub - local.tee $6 + local.tee $7 f64.const 1 - local.get $6 + local.get $7 f64.sub - local.get $2 + local.get $3 f64.sub - local.get $1 - local.get $1 + local.get $2 + local.get $2 f64.const 0.0416666666666666 - local.get $1 + local.get $2 f64.const -0.001388888888887411 - local.get $1 + local.get $2 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $1 - local.get $1 - f64.mul - local.tee $2 local.get $2 + local.get $2 + f64.mul + local.tee $3 + local.get $3 f64.mul f64.const -2.7557314351390663e-07 - local.get $1 + local.get $2 f64.const 2.087572321298175e-09 - local.get $1 + local.get $2 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -9451,7 +9451,7 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $4 f64.mul f64.sub f64.add @@ -9461,41 +9461,41 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $3 f64.const -1.984126982985795e-04 - local.get $2 + local.get $3 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $3 + local.get $3 + local.get $3 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $3 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $6 + local.set $7 local.get $0 - local.get $2 - f64.const 0.5 local.get $3 + f64.const 0.5 + local.get $4 f64.mul - local.get $2 + local.get $3 local.get $0 f64.mul local.tee $0 - local.get $6 + local.get $7 f64.mul f64.sub f64.mul - local.get $3 + local.get $4 f64.sub local.get $0 f64.const -0.16666666666666632 @@ -9504,7 +9504,7 @@ f64.sub end local.set $0 - local.get $5 + local.get $6 i32.const 2 i32.and if @@ -9531,10 +9531,10 @@ end ) (func $~lib/math/NativeMathf.sin (; 138 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + (local $4 f64) (local $5 i64) (local $6 f64) (local $7 i64) @@ -9545,18 +9545,18 @@ (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $11 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $4 + local.get $2 i32.const 964689920 i32.lt_u if @@ -9565,15 +9565,15 @@ end local.get $0 f64.promote_f32 - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul local.tee $6 - local.get $2 + local.get $4 f64.mul - local.set $1 - local.get $2 - local.get $1 + local.set $3 + local.get $4 + local.get $3 f64.const -0.16666666641626524 local.get $6 f64.const 0.008333329385889463 @@ -9581,7 +9581,7 @@ f64.add f64.mul f64.add - local.get $1 + local.get $3 local.get $6 local.get $6 f64.mul @@ -9596,7 +9596,7 @@ f32.demote_f64 return end - local.get $4 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -9606,7 +9606,7 @@ return end block $~lib/math/rempio2f|inlined.1 (result i32) - local.get $4 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -9617,25 +9617,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $4 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -9648,7 +9648,7 @@ local.get $10 i64.load offset=8 local.set $8 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -9680,7 +9680,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -9719,40 +9719,40 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $11 select end - local.set $3 - global.get $~lib/math/rempio2f_y local.set $1 - local.get $3 + global.get $~lib/math/rempio2f_y + local.set $3 + local.get $1 i32.const 1 i32.and if (result f32) - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $2 + local.tee $4 + local.get $4 f64.mul - local.set $1 + local.set $3 f64.const 1 - local.get $2 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $1 - local.get $2 + local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $2 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -9760,28 +9760,28 @@ f64.add f32.demote_f64 else - local.get $1 - local.get $1 - local.get $1 + local.get $3 + local.get $3 + local.get $3 f64.mul - local.tee $2 - local.get $1 + local.tee $4 + local.get $3 f64.mul - local.tee $1 + local.tee $3 f64.const -0.16666666641626524 - local.get $2 + local.get $4 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $2 + local.get $4 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9790,7 +9790,7 @@ f32.demote_f64 end local.set $0 - local.get $3 + local.get $1 i32.const 2 i32.and if @@ -10182,30 +10182,30 @@ f64.add ) (func $~lib/math/NativeMath.tan (; 147 ;) (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 f64) - (local $6 i64) + (local $1 i64) + (local $2 f64) + (local $3 i32) + (local $4 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $1 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $3 i32.const 31 i32.shr_u - local.set $4 - local.get $2 + local.set $5 + local.get $3 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1072243195 i32.le_s if - local.get $2 + local.get $3 i32.const 1044381696 i32.lt_s if @@ -10218,7 +10218,7 @@ call $~lib/math/tan_kern return end - local.get $2 + local.get $3 i32.const 2146435072 i32.ge_s if @@ -10228,36 +10228,36 @@ return end block $~lib/math/rempio2|inlined.2 (result i32) - local.get $6 + local.get $1 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $2 + local.tee $3 i32.const 1094263291 i32.lt_u if - local.get $2 + local.get $3 i32.const 20 i32.shr_u - local.tee $4 + local.tee $5 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $3 + local.tee $4 f64.const 1.5707963267341256 f64.mul f64.sub local.tee $0 - local.get $3 + local.get $4 f64.const 6.077100506506192e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub - local.tee $5 + local.tee $6 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10270,27 +10270,27 @@ i32.const 16 i32.gt_u if - local.get $3 + local.get $4 f64.const 2.0222662487959506e-21 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 6.077100506303966e-11 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 - local.get $4 + local.set $2 + local.get $5 local.get $0 - local.get $1 + local.get $2 f64.sub - local.tee $5 + local.tee $6 i64.reinterpret_f64 i64.const 32 i64.shr_u @@ -10303,54 +10303,54 @@ i32.const 49 i32.gt_u if - local.get $3 + local.get $4 f64.const 8.4784276603689e-32 f64.mul local.get $0 local.get $0 - local.get $3 + local.get $4 f64.const 2.0222662487111665e-21 f64.mul - local.tee $1 + local.tee $2 f64.sub local.tee $0 f64.sub - local.get $1 + local.get $2 f64.sub f64.sub - local.set $1 + local.set $2 local.get $0 - local.get $1 + local.get $2 f64.sub - local.set $5 + local.set $6 end end - local.get $5 + local.get $6 global.set $~lib/math/rempio2_y0 local.get $0 - local.get $5 + local.get $6 f64.sub - local.get $1 + local.get $2 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $4 i32.trunc_f64_s br $~lib/math/rempio2|inlined.2 end i32.const 0 - local.get $6 + local.get $1 call $~lib/math/pio2_large_quot - local.tee $2 + local.tee $3 i32.sub - local.get $2 - local.get $4 + local.get $3 + local.get $5 select end - local.set $4 + local.set $5 global.get $~lib/math/rempio2_y0 global.get $~lib/math/rempio2_y1 i32.const 1 - local.get $4 + local.get $5 i32.const 1 i32.and i32.const 1 @@ -10375,11 +10375,11 @@ end ) (func $~lib/math/NativeMathf.tan (; 149 ;) (param $0 f32) (result f32) - (local $1 f64) - (local $2 f64) - (local $3 i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) (local $4 f64) - (local $5 i32) + (local $5 f64) (local $6 i64) (local $7 i64) (local $8 i64) @@ -10389,18 +10389,18 @@ (local $12 i64) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $1 i32.const 31 i32.shr_u local.set $11 - local.get $3 + local.get $1 i32.const 2147483647 i32.and - local.tee $5 + local.tee $2 i32.const 1061752794 i32.le_u if - local.get $5 + local.get $2 i32.const 964689920 i32.lt_u if @@ -10409,36 +10409,36 @@ end local.get $0 f64.promote_f32 - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $2 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $1 - local.get $4 - local.get $1 + local.set $3 + local.get $5 + local.get $3 f64.const 0.3333313950307914 - local.get $2 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $1 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $2 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.002974357433599673 - local.get $2 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -10449,7 +10449,7 @@ f32.demote_f64 return end - local.get $5 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -10459,7 +10459,7 @@ return end block $~lib/math/rempio2f|inlined.2 (result i32) - local.get $5 + local.get $2 i32.const 1305022427 i32.lt_u if @@ -10470,25 +10470,25 @@ f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $1 + local.tee $3 f64.const 1.5707963109016418 f64.mul f64.sub - local.get $1 + local.get $3 f64.const 1.5893254773528196e-08 f64.mul f64.sub global.set $~lib/math/rempio2f_y - local.get $1 + local.get $3 i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $5 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $3 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 @@ -10501,7 +10501,7 @@ local.get $10 i64.load offset=8 local.set $8 - local.get $3 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -10533,7 +10533,7 @@ local.get $0 f64.promote_f32 f64.copysign - local.get $5 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 @@ -10572,43 +10572,43 @@ i64.shr_u i64.add i32.wrap_i64 - local.tee $3 + local.tee $1 i32.sub - local.get $3 + local.get $1 local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $2 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $1 - local.get $4 - local.get $1 + local.set $3 + local.get $5 + local.get $3 f64.const 0.3333313950307914 - local.get $2 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $1 - local.get $2 - local.get $2 + local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $1 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $2 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $1 + local.get $3 f64.const 0.002974357433599673 - local.get $2 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -10616,16 +10616,16 @@ f64.add f64.mul f64.add - local.set $1 + local.set $3 i32.const 1 i32.and if f64.const -1 - local.get $1 + local.get $3 f64.div - local.set $1 + local.set $3 end - local.get $1 + local.get $3 f32.demote_f64 ) (func $std/math/test_tanf (; 150 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) @@ -10830,32 +10830,32 @@ ) (func $~lib/math/NativeMath.sincos (; 156 ;) (param $0 f64) (local $1 f64) - (local $2 f64) + (local $2 i64) (local $3 f64) (local $4 f64) (local $5 f64) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 i64) + (local $8 i32) (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $8 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $6 + local.tee $7 i32.const 31 i32.shr_u - local.set $7 - local.get $6 + local.set $8 + local.get $7 i32.const 2147483647 i32.and - local.tee $6 + local.tee $7 i32.const 1072243195 i32.le_u if - local.get $6 + local.get $7 i32.const 1044816030 i32.lt_u if @@ -10869,34 +10869,34 @@ local.get $0 local.get $0 f64.mul - local.tee $4 + local.tee $5 f64.const -1.984126982985795e-04 - local.get $4 + local.get $5 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $5 + local.get $5 + local.get $5 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $5 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $1 + local.set $3 local.get $0 - local.get $4 + local.get $5 local.get $0 f64.mul f64.const -0.16666666666666632 - local.get $4 - local.get $1 + local.get $5 + local.get $3 f64.mul f64.add f64.mul @@ -10907,38 +10907,38 @@ local.get $0 local.get $0 f64.mul - local.tee $1 - f64.mul local.tee $3 + f64.mul + local.tee $1 f64.sub - local.tee $5 + local.tee $6 f64.const 1 - local.get $5 - f64.sub - local.get $3 + local.get $6 f64.sub local.get $1 - local.get $1 + f64.sub + local.get $3 + local.get $3 f64.const 0.0416666666666666 - local.get $1 + local.get $3 f64.const -0.001388888888887411 - local.get $1 + local.get $3 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.mul - local.tee $5 - local.get $5 + local.tee $6 + local.get $6 f64.mul f64.const -2.7557314351390663e-07 - local.get $1 + local.get $3 f64.const 2.087572321298175e-09 - local.get $1 + local.get $3 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -10956,7 +10956,7 @@ global.set $~lib/math/NativeMath.sincos_cos return end - local.get $6 + local.get $7 i32.const 2139095040 i32.ge_u if @@ -10970,34 +10970,34 @@ return end block $~lib/math/rempio2|inlined.3 (result i32) - local.get $8 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $6 + local.tee $7 i32.const 1094263291 i32.lt_u if - local.get $6 + local.get $7 i32.const 20 i32.shr_u - local.tee $7 + local.tee $8 local.get $0 local.get $0 f64.const 0.6366197723675814 f64.mul f64.nearest - local.tee $3 + local.tee $1 f64.const 1.5707963267341256 f64.mul f64.sub - local.tee $1 - local.get $3 + local.tee $3 + local.get $1 f64.const 6.077100506506192e-11 f64.mul - local.tee $5 + local.tee $6 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11012,25 +11012,25 @@ i32.const 16 i32.gt_u if - local.get $3 + local.get $1 f64.const 2.0222662487959506e-21 f64.mul - local.get $1 - local.get $1 local.get $3 + local.get $3 + local.get $1 f64.const 6.077100506303966e-11 f64.mul local.tee $0 f64.sub - local.tee $1 + local.tee $3 f64.sub local.get $0 f64.sub f64.sub - local.set $5 - local.get $7 - local.get $1 - local.get $5 + local.set $6 + local.get $8 + local.get $3 + local.get $6 f64.sub local.tee $0 i64.reinterpret_f64 @@ -11045,138 +11045,138 @@ i32.const 49 i32.gt_u if - local.get $3 + local.get $1 f64.const 8.4784276603689e-32 f64.mul - local.get $1 - local.get $1 local.get $3 + local.get $3 + local.get $1 f64.const 2.0222662487111665e-21 f64.mul local.tee $0 f64.sub - local.tee $1 + local.tee $3 f64.sub local.get $0 f64.sub f64.sub - local.set $5 - local.get $1 - local.get $5 + local.set $6 + local.get $3 + local.get $6 f64.sub local.set $0 end end local.get $0 global.set $~lib/math/rempio2_y0 - local.get $1 + local.get $3 local.get $0 f64.sub - local.get $5 + local.get $6 f64.sub global.set $~lib/math/rempio2_y1 - local.get $3 + local.get $1 i32.trunc_f64_s br $~lib/math/rempio2|inlined.3 end i32.const 0 - local.get $8 + local.get $2 call $~lib/math/pio2_large_quot - local.tee $6 + local.tee $7 i32.sub - local.get $6 local.get $7 + local.get $8 select end - local.set $7 + local.set $8 f64.const 0.00833333333332249 global.get $~lib/math/rempio2_y0 local.tee $0 - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $2 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $2 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add f64.mul f64.add - local.set $5 + local.set $6 + local.get $5 local.get $4 - local.get $2 f64.const 0.5 global.get $~lib/math/rempio2_y1 local.tee $9 - local.tee $1 + local.tee $3 f64.mul - local.get $2 local.get $4 - f64.mul - local.tee $3 local.get $5 f64.mul - f64.sub + local.tee $1 + local.get $6 f64.mul - local.get $1 f64.sub + f64.mul local.get $3 + f64.sub + local.get $1 f64.const -0.16666666666666632 f64.mul f64.sub f64.sub - local.tee $5 - local.set $3 + local.tee $6 + local.set $1 f64.const 1 f64.const 0.5 local.get $0 local.get $0 f64.mul - local.tee $2 - f64.mul local.tee $4 + f64.mul + local.tee $5 f64.sub - local.tee $1 + local.tee $3 f64.const 1 - local.get $1 + local.get $3 f64.sub - local.get $4 + local.get $5 f64.sub - local.get $2 - local.get $2 + local.get $4 + local.get $4 f64.const 0.0416666666666666 - local.get $2 + local.get $4 f64.const -0.001388888888887411 - local.get $2 + local.get $4 f64.const 2.480158728947673e-05 f64.mul f64.add f64.mul f64.add f64.mul - local.get $2 - local.get $2 + local.get $4 + local.get $4 f64.mul - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f64.mul f64.const -2.7557314351390663e-07 - local.get $2 + local.get $4 f64.const 2.087572321298175e-09 - local.get $2 + local.get $4 f64.const -1.1359647557788195e-11 f64.mul f64.add @@ -11192,31 +11192,31 @@ f64.add f64.add local.tee $0 - local.set $1 - local.get $7 + local.set $3 + local.get $8 i32.const 1 i32.and if - local.get $5 + local.get $6 f64.neg - local.set $1 - local.get $0 local.set $3 + local.get $0 + local.set $1 end - local.get $7 + local.get $8 i32.const 2 i32.and if (result f64) - local.get $1 - f64.neg - local.set $1 local.get $3 f64.neg + local.set $3 + local.get $1 + f64.neg else - local.get $3 + local.get $1 end global.set $~lib/math/NativeMath.sincos_sin - local.get $1 + local.get $3 global.set $~lib/math/NativeMath.sincos_cos ) (func $std/math/test_sincos (; 157 ;) (param $0 i64) (param $1 i64) (param $2 i64) (param $3 i64) (param $4 i64) @@ -11424,6 +11424,8 @@ (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 f64) + (local $8 f32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 diff --git a/tests/compiler/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat index 63f2ddd7ad..cffd4b0201 100644 --- a/tests/compiler/std/object-literal.optimized.wat +++ b/tests/compiler/std/object-literal.optimized.wat @@ -108,7 +108,7 @@ (local $3 i32) (local $4 i32) i32.const 32 - local.set $2 + local.set $3 local.get $0 i32.const 7 i32.and @@ -122,7 +122,7 @@ loop $do-continue|0 local.get $0 i64.load - local.get $2 + local.get $3 i64.load i64.eq if @@ -130,10 +130,10 @@ i32.const 8 i32.add local.set $0 - local.get $2 + local.get $3 i32.const 8 i32.add - local.set $2 + local.set $3 local.get $1 i32.const 4 i32.sub @@ -146,21 +146,21 @@ end loop $while-continue|1 local.get $1 - local.tee $3 + local.tee $2 i32.const 1 i32.sub local.set $1 - local.get $3 + local.get $2 if local.get $0 i32.load16_u - local.tee $3 - local.get $2 + local.tee $2 + local.get $3 i32.load16_u local.tee $4 i32.ne if - local.get $3 + local.get $2 local.get $4 i32.sub return @@ -169,10 +169,10 @@ i32.const 2 i32.add local.set $0 - local.get $2 + local.get $3 i32.const 2 i32.add - local.set $2 + local.set $3 br $while-continue|1 end end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 48120d3e86..81062baf99 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -234,16 +234,16 @@ f64.mul ) (func $~lib/math/NativeMath.pow (; 4 ;) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 f64) + (local $11 i32) (local $12 f64) (local $13 f64) (local $14 f64) @@ -316,17 +316,17 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $7 + local.tee $8 i32.const 2147483647 i32.and - local.tee $8 + local.tee $9 local.get $15 i32.wrap_i64 local.tee $6 @@ -339,22 +339,22 @@ i32.const 1 local.get $6 i32.const 0 - local.get $8 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $8 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 local.get $19 i32.const 0 - local.get $5 + local.get $4 i32.const 2146435072 i32.eq select - local.get $5 + local.get $4 i32.const 2146435072 i32.gt_s select @@ -370,19 +370,19 @@ i32.const 0 i32.lt_s if - local.get $8 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $8 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $8 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 @@ -390,27 +390,27 @@ local.tee $10 i32.const 20 i32.gt_s - local.tee $2 + local.tee $5 select local.get $10 i32.sub - local.set $9 + local.set $11 i32.const 2 local.get $6 - local.get $8 - local.get $2 - select - local.tee $2 local.get $9 + local.get $5 + select + local.tee $5 + local.get $11 i32.shr_u local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 - local.get $2 + local.get $5 local.get $10 - local.get $9 + local.get $11 i32.shl i32.eq select @@ -418,26 +418,26 @@ i32.const 0 end end - local.set $2 + local.set $5 end local.get $6 i32.eqz if - local.get $8 + local.get $9 i32.const 2146435072 i32.eq if local.get $19 - local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if - local.get $7 + local.get $8 i32.const 0 i32.lt_s if @@ -450,7 +450,7 @@ f64.const 0 local.get $1 f64.neg - local.get $7 + local.get $8 i32.const 0 i32.ge_s select @@ -463,11 +463,11 @@ end unreachable end - local.get $8 + local.get $9 i32.const 1072693248 i32.eq if - local.get $7 + local.get $8 i32.const 0 i32.ge_s if @@ -479,7 +479,7 @@ f64.div return end - local.get $7 + local.get $8 i32.const 1073741824 i32.eq if @@ -488,7 +488,7 @@ f64.mul return end - local.get $7 + local.get $8 i32.const 1071644672 i32.eq if @@ -504,69 +504,69 @@ end local.get $0 f64.abs - local.set $3 + local.set $2 local.get $19 i32.eqz if i32.const 1 - local.get $5 + local.get $4 i32.const 1072693248 i32.eq - local.get $5 + local.get $4 i32.const 2146435072 i32.eq i32.const 1 - local.get $5 + local.get $4 select select if f64.const 1 - local.get $3 + local.get $2 f64.div - local.get $3 - local.get $7 + local.get $2 + local.get $8 i32.const 0 i32.lt_s select - local.set $3 + local.set $2 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $2 local.get $5 + local.get $4 i32.const 1072693248 i32.sub i32.or if (result f64) - local.get $3 + local.get $2 f64.neg - local.get $3 local.get $2 + local.get $5 i32.const 1 i32.eq select else - local.get $3 - local.get $3 + local.get $2 + local.get $2 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $3 + local.get $2 end return end end f64.const 1 - local.set $11 + local.set $7 local.get $17 i32.const 0 i32.lt_s if - local.get $2 + local.get $5 i32.eqz if local.get $0 @@ -579,92 +579,92 @@ end f64.const -1 f64.const 1 - local.get $2 + local.get $5 i32.const 1 i32.eq select - local.set $11 + local.set $7 end - local.get $8 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $8 + local.get $9 i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if f64.const inf f64.const 0 - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.lt_s select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $7 + local.get $8 i32.const 0 i32.gt_s select return end f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.const 1 f64.sub local.tee $0 f64.mul - local.tee $3 + local.tee $2 local.get $0 f64.const 1.9259629911266175e-08 f64.mul @@ -693,48 +693,48 @@ local.set $12 local.get $0 local.get $12 - local.get $3 + local.get $2 f64.sub f64.sub else - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $3 + local.get $2 f64.const 9007199254740992 f64.mul - local.tee $3 + local.tee $2 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -744,19 +744,19 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $3 + local.set $5 + local.get $2 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl @@ -765,14 +765,14 @@ local.tee $13 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select - local.tee $4 - f64.sub local.tee $3 + f64.sub + local.tee $2 f64.const 1 local.get $13 - local.get $4 + local.get $3 f64.add f64.div local.tee $0 @@ -820,16 +820,16 @@ f64.add f64.mul local.get $0 - local.get $3 + local.get $2 local.get $16 - local.get $5 + local.get $4 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -843,13 +843,13 @@ local.get $16 local.get $13 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.mul f64.sub f64.mul - local.tee $4 + local.tee $3 local.get $16 local.get $18 f64.add @@ -863,8 +863,8 @@ f64.reinterpret_i64 local.tee $13 f64.mul - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 local.get $13 f64.mul local.get $0 @@ -883,15 +883,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.mul local.tee $13 f64.const -7.028461650952758e-09 - local.get $4 + local.get $3 f64.mul local.get $0 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.9617966939259756 @@ -899,16 +899,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $4 + local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $3 + local.tee $2 f64.add local.get $6 f64.convert_i32_s @@ -919,17 +919,17 @@ i64.and f64.reinterpret_i64 local.set $12 - local.get $4 + local.get $3 local.get $12 local.get $0 f64.sub - local.get $3 + local.get $2 f64.sub local.get $13 f64.sub f64.sub end - local.set $3 + local.set $2 local.get $1 local.get $1 i64.reinterpret_f64 @@ -941,32 +941,32 @@ local.get $12 f64.mul local.get $1 - local.get $3 + local.get $2 f64.mul f64.add local.tee $1 local.get $0 local.get $12 f64.mul - local.tee $4 + local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 local.tee $15 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $11 i32.const 1083179008 i32.ge_s if - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -974,33 +974,33 @@ f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $4 + local.get $3 f64.sub f64.gt i32.or br_if $folding-inner0 else - local.get $9 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 - local.get $2 - local.get $9 + local.get $5 + local.get $11 i32.const -1064252416 i32.sub i32.or local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.le i32.or select br_if $folding-inner1 end - local.get $9 + local.get $11 i32.const 2147483647 i32.and local.tee $10 @@ -1008,7 +1008,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $10 @@ -1016,9 +1016,9 @@ i32.gt_s if i32.const 1048575 - local.get $9 + local.get $11 i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -1030,7 +1030,7 @@ i32.shr_s i32.const 1023 i32.sub - local.tee $2 + local.tee $5 i32.shr_s i32.const -1 i32.xor @@ -1048,24 +1048,24 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.tee $6 i32.sub local.get $6 - local.get $9 + local.get $11 i32.const 0 i32.lt_s select local.set $6 - local.get $4 + local.get $3 local.get $0 f64.sub - local.set $4 + local.set $3 end local.get $1 - local.get $4 + local.get $3 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -1074,10 +1074,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $3 + local.tee $2 local.get $1 local.get $0 - local.get $4 + local.get $3 f64.sub f64.sub f64.const 0.6931471805599453 @@ -1088,14 +1088,14 @@ f64.add local.tee $1 f64.add - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul local.set $0 - local.get $11 + local.get $7 f64.const 1 - local.get $4 - local.get $4 + local.get $3 + local.get $3 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -1123,17 +1123,17 @@ f64.sub f64.div local.get $1 - local.get $4 local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 - local.get $4 + local.get $3 local.get $0 f64.mul f64.add f64.sub - local.get $4 + local.get $3 f64.sub f64.sub local.tee $0 @@ -1145,7 +1145,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -1159,7 +1159,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -1169,14 +1169,14 @@ f64.mul return end - local.get $11 + local.get $7 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $11 + local.get $7 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index ec50ee4edb..26b1125ec4 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -19,7 +19,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 i32.const 8 - local.set $2 + local.set $4 local.get $0 local.get $1 i32.eq @@ -41,32 +41,32 @@ i32.const 7 i32.and if - local.get $2 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $2 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $4 local.get $0 - local.tee $3 + local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 + local.get $2 local.get $3 - local.get $4 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $2 + local.get $4 i32.const 8 i32.ge_u if @@ -74,10 +74,10 @@ local.get $1 i64.load i64.store - local.get $2 + local.get $4 i32.const 8 i32.sub - local.set $2 + local.set $4 local.get $0 i32.const 8 i32.add @@ -91,26 +91,26 @@ end end loop $while-continue|2 - local.get $2 + local.get $4 if local.get $0 - local.tee $3 + local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 + local.get $2 local.get $3 - local.get $4 i32.load8_u i32.store8 - local.get $2 + local.get $4 i32.const 1 i32.sub - local.set $2 + local.set $4 br $while-continue|2 end end @@ -125,22 +125,22 @@ if loop $while-continue|3 local.get $0 - local.get $2 + local.get $4 i32.add i32.const 7 i32.and if - local.get $2 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 local.get $0 - local.get $2 + local.get $4 i32.const 1 i32.sub - local.tee $2 + local.tee $4 i32.add local.get $1 - local.get $2 + local.get $4 i32.add i32.load8_u i32.store8 @@ -148,18 +148,18 @@ end end loop $while-continue|4 - local.get $2 + local.get $4 i32.const 8 i32.ge_u if local.get $0 - local.get $2 + local.get $4 i32.const 8 i32.sub - local.tee $2 + local.tee $4 i32.add local.get $1 - local.get $2 + local.get $4 i32.add i64.load i64.store @@ -168,16 +168,16 @@ end end loop $while-continue|5 - local.get $2 + local.get $4 if local.get $0 - local.get $2 + local.get $4 i32.const 1 i32.sub - local.tee $2 + local.tee $4 i32.add local.get $1 - local.get $2 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index ac4d89d340..6b8c2d7989 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -604,16 +604,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -625,18 +625,18 @@ unreachable end i32.const 448 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2016 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 448 @@ -651,7 +651,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -668,10 +668,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -684,7 +684,7 @@ i32.const 448 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -1492,50 +1492,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_s i32.store8 - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i32.load8_s call $~lib/util/hash/hash8 @@ -1548,69 +1548,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 25 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1771,7 +1771,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1793,32 +1793,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1826,10 +1826,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1843,7 +1843,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1851,18 +1851,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1877,22 +1877,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1900,18 +1900,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1920,16 +1920,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -2284,9 +2284,9 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2294,8 +2294,8 @@ i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -2305,12 +2305,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2321,14 +2321,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -2341,9 +2341,9 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2351,8 +2351,8 @@ i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2363,12 +2363,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2379,14 +2379,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -2398,10 +2398,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -2411,38 +2411,38 @@ local.get $4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load8_s call $~lib/array/Array#__set end @@ -2454,18 +2454,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|4 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -2477,22 +2477,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -2504,9 +2504,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|6 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2514,8 +2514,8 @@ i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2526,11 +2526,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -2540,14 +2540,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|6 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -2560,9 +2560,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|8 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -2570,8 +2570,8 @@ i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -2581,12 +2581,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2597,11 +2597,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -2611,14 +2611,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|8 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -2630,9 +2630,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -2642,11 +2642,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 35 ;) (result i32) @@ -2699,50 +2699,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load8_u i32.store8 - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i32.load8_u call $~lib/util/hash/hash8 @@ -2755,69 +2755,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 38 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2994,16 +2994,16 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3013,12 +3013,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3029,14 +3029,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -3049,16 +3049,16 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3069,12 +3069,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3085,14 +3085,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -3104,10 +3104,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -3117,38 +3117,38 @@ local.get $4 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load8_u call $~lib/array/Array#__set end @@ -3160,18 +3160,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|4 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3183,22 +3183,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -3210,16 +3210,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|6 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3230,11 +3230,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3244,14 +3244,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|6 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -3264,16 +3264,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|8 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3283,12 +3283,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3299,11 +3299,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3313,14 +3313,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|8 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -3332,9 +3332,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -3344,11 +3344,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 42 ;) (result i32) @@ -3461,50 +3461,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_s i32.store16 - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i32.load16_s call $~lib/util/hash/hash16 @@ -3517,69 +3517,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 47 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -3800,9 +3800,9 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -3810,8 +3810,8 @@ i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3821,12 +3821,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3837,14 +3837,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -3857,9 +3857,9 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -3867,8 +3867,8 @@ i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3879,12 +3879,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3895,14 +3895,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -3914,10 +3914,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -3927,38 +3927,38 @@ local.get $4 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load16_s call $~lib/array/Array#__set end @@ -3970,18 +3970,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|4 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3993,22 +3993,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -4020,9 +4020,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|6 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -4030,8 +4030,8 @@ i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4042,11 +4042,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4056,14 +4056,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|6 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -4076,9 +4076,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|8 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -4086,8 +4086,8 @@ i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4097,12 +4097,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4113,11 +4113,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4127,14 +4127,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|8 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -4146,9 +4146,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -4158,11 +4158,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 52 ;) (result i32) @@ -4215,50 +4215,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load16_u i32.store16 - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i32.load16_u call $~lib/util/hash/hash16 @@ -4271,69 +4271,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 55 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -4512,16 +4512,16 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4531,12 +4531,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4547,14 +4547,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -4567,16 +4567,16 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4587,12 +4587,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4603,14 +4603,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -4622,10 +4622,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -4635,38 +4635,38 @@ local.get $4 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load16_u call $~lib/array/Array#__set end @@ -4678,18 +4678,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|4 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4701,22 +4701,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -4728,16 +4728,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|6 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4748,11 +4748,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4762,14 +4762,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|6 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -4782,16 +4782,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|8 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4801,12 +4801,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4817,11 +4817,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4831,14 +4831,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|8 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -4850,9 +4850,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -4862,11 +4862,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 59 ;) (result i32) @@ -4989,50 +4989,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i32.load i32.store - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i32.load call $~lib/util/hash/hash32 @@ -5045,69 +5045,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 64 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5320,14 +5320,14 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5337,12 +5337,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5353,14 +5353,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -5373,14 +5373,14 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5391,12 +5391,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5407,14 +5407,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -5426,10 +5426,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -5439,38 +5439,38 @@ local.get $4 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|00 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load call $~lib/array/Array#__set end @@ -5482,18 +5482,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|2 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5505,22 +5505,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|2 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -5532,14 +5532,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5550,11 +5550,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5564,14 +5564,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -5584,14 +5584,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|4 - local.get $0 + local.get $1 i32.const 50 i32.lt_s if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5601,12 +5601,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5617,11 +5617,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5631,14 +5631,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -5650,9 +5650,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -5662,11 +5662,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 69 ;) (result i32) @@ -5707,14 +5707,14 @@ (local $6 i32) (local $7 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $7 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5724,12 +5724,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5740,14 +5740,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -5760,14 +5760,14 @@ unreachable end i32.const 50 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5778,12 +5778,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5794,14 +5794,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 100 i32.ne @@ -5813,10 +5813,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 i32.load offset=8 - local.set $6 - local.get $1 + local.set $3 + local.get $7 i32.load offset=16 local.set $4 i32.const 16 @@ -5826,38 +5826,38 @@ local.get $4 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $6 i32.const 0 i32.store offset=12 - local.get $2 + local.get $6 local.get $4 i32.store offset=12 i32.const 0 - local.set $0 + local.set $1 loop $for-loop|00 local.get $5 local.get $4 i32.lt_s if - local.get $6 + local.get $3 local.get $5 i32.const 3 i32.shl i32.add - local.tee $7 + local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $0 - local.tee $3 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 + local.get $6 + local.get $0 local.get $2 - local.get $3 - local.get $7 i32.load call $~lib/array/Array#__set end @@ -5869,18 +5869,18 @@ end end call $~lib/set/Set#constructor - local.set $3 - i32.const 0 local.set $0 + i32.const 0 + local.set $1 loop $for-loop|2 - local.get $0 - local.get $2 + local.get $1 + local.get $6 i32.load offset=12 i32.lt_s if + local.get $7 + local.get $6 local.get $1 - local.get $2 - local.get $0 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5892,22 +5892,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 local.get $0 + local.get $6 + local.get $1 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|2 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $7 i32.load offset=20 i32.ne if @@ -5919,14 +5919,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5937,11 +5937,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5951,14 +5951,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -5971,14 +5971,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|4 - local.get $0 + local.get $1 i32.const 50 i32.lt_u if + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5988,12 +5988,12 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has i32.eqz if @@ -6004,11 +6004,11 @@ call $~lib/builtins/abort unreachable end + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#delete + local.get $7 local.get $1 - local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -6018,14 +6018,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|4 end end - local.get $1 + local.get $7 i32.load offset=20 i32.const 50 i32.ne @@ -6037,9 +6037,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $7 call $~lib/set/Set#clear - local.get $1 + local.get $7 i32.load offset=20 if i32.const 0 @@ -6049,11 +6049,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $7 call $~lib/rt/pure/__release ) (func $~lib/set/Set#clear (; 71 ;) (param $0 i32) @@ -6244,50 +6244,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 i64.load i64.store - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 i64.load call $~lib/util/hash/hash64 @@ -6300,69 +6300,69 @@ i32.load i32.store offset=8 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 16 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 16 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 77 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) @@ -6567,9 +6567,9 @@ end ) (func $std/set/testNumeric (; 81 ;) - (local $0 i64) + (local $0 i32) (local $1 i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6578,14 +6578,14 @@ (local $8 i32) (local $9 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $3 loop $for-loop|0 - local.get $0 + local.get $2 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -6595,12 +6595,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6611,14 +6611,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -6631,14 +6631,14 @@ unreachable end i64.const 50 - local.set $0 + local.set $2 loop $for-loop|1 - local.get $0 + local.get $2 i64.const 100 i64.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6649,12 +6649,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6665,14 +6665,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|1 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -6684,70 +6684,70 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=8 - local.set $7 - local.get $1 + local.set $8 + local.get $3 i32.load offset=16 - local.set $5 + local.set $7 i32.const 16 i32.const 16 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $5 + local.get $7 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $2 - local.get $5 + local.get $4 + local.get $7 i32.store offset=12 loop $for-loop|00 - local.get $6 local.get $5 + local.get $7 i32.lt_s if - local.get $7 - local.get $6 + local.get $8 + local.get $5 i32.const 4 i32.shl i32.add - local.tee $8 + local.tee $9 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.tee $9 + local.get $0 + local.tee $1 i32.const 1 i32.add - local.set $3 - local.get $2 + local.set $0 + local.get $4 + local.get $1 local.get $9 - local.get $8 i64.load call $~lib/array/Array#__set end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|00 end end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|2 + local.get $6 local.get $4 - local.get $2 i32.load offset=12 i32.lt_s if - local.get $1 - local.get $2 + local.get $3 local.get $4 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -6759,22 +6759,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 + local.get $0 local.get $4 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|2 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $3 i32.load offset=20 i32.ne if @@ -6786,14 +6786,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $2 loop $for-loop|3 - local.get $0 + local.get $2 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6804,11 +6804,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -6818,14 +6818,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|3 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -6838,14 +6838,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $2 loop $for-loop|4 - local.get $0 + local.get $2 i64.const 50 i64.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -6855,12 +6855,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6871,11 +6871,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -6885,14 +6885,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -6904,9 +6904,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/set/Set#clear - local.get $1 + local.get $3 i32.load offset=20 if i32.const 0 @@ -6916,11 +6916,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 82 ;) (result i32) @@ -6952,9 +6952,9 @@ local.get $0 ) (func $std/set/testNumeric (; 83 ;) - (local $0 i64) + (local $0 i32) (local $1 i32) - (local $2 i32) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6963,14 +6963,14 @@ (local $8 i32) (local $9 i32) call $~lib/set/Set#constructor - local.set $1 + local.set $3 loop $for-loop|0 - local.get $0 + local.get $2 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -6980,12 +6980,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -6996,14 +6996,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7016,14 +7016,14 @@ unreachable end i64.const 50 - local.set $0 + local.set $2 loop $for-loop|1 - local.get $0 + local.get $2 i64.const 100 i64.lt_u if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -7034,12 +7034,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -7050,14 +7050,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|1 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7069,70 +7069,70 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=8 - local.set $7 - local.get $1 + local.set $8 + local.get $3 i32.load offset=16 - local.set $5 + local.set $7 i32.const 16 i32.const 18 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $5 + local.get $7 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $2 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $2 - local.get $5 + local.get $4 + local.get $7 i32.store offset=12 loop $for-loop|00 - local.get $6 local.get $5 + local.get $7 i32.lt_s if - local.get $7 - local.get $6 + local.get $8 + local.get $5 i32.const 4 i32.shl i32.add - local.tee $8 + local.tee $9 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 - local.tee $9 + local.get $0 + local.tee $1 i32.const 1 i32.add - local.set $3 - local.get $2 + local.set $0 + local.get $4 + local.get $1 local.get $9 - local.get $8 i64.load call $~lib/array/Array#__set end - local.get $6 + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $for-loop|00 end end call $~lib/set/Set#constructor - local.set $3 + local.set $0 loop $for-loop|2 + local.get $6 local.get $4 - local.get $2 i32.load offset=12 i32.lt_s if - local.get $1 - local.get $2 + local.get $3 local.get $4 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -7144,22 +7144,22 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $2 + local.get $0 local.get $4 + local.get $6 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $4 + local.get $6 i32.const 1 i32.add - local.set $4 + local.set $6 br $for-loop|2 end end - local.get $3 + local.get $0 i32.load offset=20 - local.get $1 + local.get $3 i32.load offset=20 i32.ne if @@ -7171,14 +7171,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $2 loop $for-loop|3 - local.get $0 + local.get $2 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -7189,11 +7189,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -7203,14 +7203,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|3 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -7223,14 +7223,14 @@ unreachable end i64.const 0 - local.set $0 + local.set $2 loop $for-loop|4 - local.get $0 + local.get $2 i64.const 50 i64.lt_u if - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -7240,12 +7240,12 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has i32.eqz if @@ -7256,11 +7256,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#delete - local.get $1 - local.get $0 + local.get $3 + local.get $2 call $~lib/set/Set#has if i32.const 0 @@ -7270,14 +7270,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 1 i64.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $3 i32.load offset=20 i32.const 50 i32.ne @@ -7289,9 +7289,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/set/Set#clear - local.get $1 + local.get $3 i32.load offset=20 if i32.const 0 @@ -7301,11 +7301,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $4 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 84 ;) (result i32) @@ -7398,50 +7398,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 3 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 3 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=4 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f32.load f32.store - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 f32.load i32.reinterpret_f32 @@ -7455,69 +7455,69 @@ i32.load i32.store offset=4 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 8 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 8 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 88 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) @@ -7624,10 +7624,10 @@ local.get $3 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 local.get $3 i32.store offset=12 i32.const 0 @@ -7649,19 +7649,19 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $1 i32.const 1 i32.add local.set $0 local.get $5 f32.load local.set $7 - local.get $2 local.get $1 + local.get $2 i32.load offset=12 i32.ge_u if - local.get $2 + local.get $1 i32.const 0 i32.lt_s if @@ -7672,20 +7672,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 + local.get $1 i32.const 1 i32.add local.tee $5 i32.const 2 call $~lib/array/ensureSize - local.get $1 + local.get $2 local.get $5 i32.store offset=12 end - local.get $1 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add @@ -7699,7 +7699,7 @@ br $for-loop|0 end end - local.get $1 + local.get $2 ) (func $~lib/array/Array#__get (; 90 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 @@ -8175,50 +8175,50 @@ local.get $1 i32.const 1 i32.add - local.tee $5 + local.tee $3 i32.const 2 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 - local.get $5 + local.set $5 + local.get $3 i32.const 3 i32.shl i32.const 3 i32.div_s - local.tee $7 + local.tee $8 i32.const 4 i32.shl call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $6 local.get $0 i32.load offset=16 i32.const 4 i32.shl i32.add - local.set $8 - local.get $5 - local.set $3 + local.set $7 + local.get $3 + local.set $4 loop $while-continue|0 - local.get $4 - local.get $8 + local.get $6 + local.get $7 i32.ne if - local.get $4 + local.get $6 local.tee $2 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $3 + local.get $4 local.get $2 f64.load f64.store - local.get $3 - local.get $6 + local.get $4 + local.get $5 local.get $2 f64.load i64.reinterpret_f64 @@ -8232,69 +8232,69 @@ i32.load i32.store offset=8 local.get $2 - local.get $3 + local.get $4 i32.store - local.get $3 + local.get $4 i32.const 16 i32.add - local.set $3 + local.set $4 end - local.get $4 + local.get $6 i32.const 16 i32.add - local.set $4 + local.set $6 br $while-continue|0 end end - local.get $6 - local.tee $3 + local.get $5 + local.tee $4 local.get $0 local.tee $2 i32.load - local.tee $4 + local.tee $6 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $4 + local.get $6 call $~lib/rt/pure/__release end local.get $2 - local.get $3 + local.get $4 i32.store local.get $2 local.get $1 i32.store offset=4 local.get $2 local.set $1 - local.get $5 + local.get $3 local.tee $2 local.get $1 i32.load offset=8 - local.tee $3 + local.tee $4 i32.ne if local.get $2 call $~lib/rt/pure/__retain local.set $2 - local.get $3 + local.get $4 call $~lib/rt/pure/__release end local.get $1 local.get $2 i32.store offset=8 local.get $1 - local.get $7 + local.get $8 i32.store offset=12 local.get $1 local.get $1 i32.load offset=20 i32.store offset=16 - local.get $6 - call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release ) (func $~lib/set/Set#add (; 97 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) @@ -8401,10 +8401,10 @@ local.get $3 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $2 i32.const 0 i32.store offset=12 - local.get $1 + local.get $2 local.get $3 i32.store offset=12 i32.const 0 @@ -8426,19 +8426,19 @@ i32.eqz if local.get $0 - local.tee $2 + local.tee $1 i32.const 1 i32.add local.set $0 local.get $5 f64.load local.set $7 - local.get $2 local.get $1 + local.get $2 i32.load offset=12 i32.ge_u if - local.get $2 + local.get $1 i32.const 0 i32.lt_s if @@ -8449,20 +8449,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $2 + local.get $1 i32.const 1 i32.add local.tee $5 i32.const 3 call $~lib/array/ensureSize - local.get $1 + local.get $2 local.get $5 i32.store offset=12 end - local.get $1 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $1 i32.const 3 i32.shl i32.add @@ -8476,7 +8476,7 @@ br $for-loop|0 end end - local.get $1 + local.get $2 ) (func $~lib/array/Array#__get (; 99 ;) (param $0 i32) (param $1 i32) (result f64) local.get $1 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 43c9724224..6a53c030f9 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -97,7 +97,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -119,32 +119,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -152,10 +152,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -169,7 +169,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -177,18 +177,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -203,22 +203,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -226,18 +226,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -246,16 +246,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -293,7 +293,7 @@ i32.sub local.tee $4 i32.load - local.set $2 + local.set $3 local.get $4 i32.load offset=4 i32.const 1 @@ -308,7 +308,7 @@ end global.get $~lib/rt/stub/offset local.get $0 - local.get $2 + local.get $3 i32.add i32.eq local.set $5 @@ -317,9 +317,9 @@ i32.add i32.const -16 i32.and - local.set $3 + local.set $2 local.get $1 - local.get $2 + local.get $3 i32.gt_u if local.get $5 @@ -331,23 +331,23 @@ unreachable end local.get $0 - local.get $3 + local.get $2 i32.add call $~lib/rt/stub/maybeGrowMemory local.get $4 - local.get $3 + local.get $2 i32.store else local.get $4 i32.load offset=8 local.set $6 - local.get $3 local.get $2 + local.get $3 i32.const 1 i32.shl - local.tee $2 - local.get $3 + local.tee $3 local.get $2 + local.get $3 i32.gt_u select local.tee $5 @@ -359,42 +359,42 @@ global.get $~lib/rt/stub/offset i32.const 16 i32.add - local.tee $3 + local.tee $2 local.get $5 i32.const 15 i32.add i32.const -16 i32.and - local.tee $2 + local.tee $3 i32.const 16 - local.get $2 + local.get $3 i32.const 16 i32.gt_u select local.tee $7 i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $3 + local.get $2 i32.const 16 i32.sub - local.tee $2 + local.tee $3 local.get $7 i32.store - local.get $2 + local.get $3 i32.const 1 i32.store offset=4 - local.get $2 + local.get $3 local.get $6 i32.store offset=8 - local.get $2 + local.get $3 local.get $5 i32.store offset=12 - local.get $3 + local.get $2 local.get $0 local.get $4 i32.load offset=12 call $~lib/memory/memory.copy - local.get $3 + local.get $2 local.tee $0 i32.const 16 i32.sub @@ -404,11 +404,11 @@ local.get $5 if local.get $0 - local.get $3 + local.get $2 i32.add global.set $~lib/rt/stub/offset local.get $4 - local.get $3 + local.get $2 i32.store end end diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 3dc80fe1b3..69936d2256 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -640,16 +640,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -661,18 +661,18 @@ unreachable end i32.const 464 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 2032 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 464 @@ -687,7 +687,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -704,10 +704,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -720,7 +720,7 @@ i32.const 464 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1101,7 +1101,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1123,32 +1123,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1156,10 +1156,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1173,7 +1173,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1181,18 +1181,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1207,22 +1207,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1230,18 +1230,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1250,16 +1250,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 8e2b19ddb1..2ef44b1f95 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -919,16 +919,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -940,18 +940,18 @@ unreachable end i32.const 17376 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 18944 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 17376 @@ -966,7 +966,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -983,10 +983,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -999,7 +999,7 @@ i32.const 17376 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) local.get $0 @@ -1535,7 +1535,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1557,32 +1557,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1590,10 +1590,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1607,7 +1607,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1615,18 +1615,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1641,22 +1641,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1664,18 +1664,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1684,16 +1684,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1880,46 +1880,46 @@ (local $10 i32) local.get $0 call $~lib/string/String#get:length - local.tee $7 + local.tee $6 i32.eqz if local.get $0 call $~lib/rt/pure/__retain return end - local.get $7 + local.get $6 i32.const 3 i32.mul i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $5 + local.set $7 i32.const 208 call $~lib/string/String#get:length - local.set $9 + local.set $3 loop $for-loop|0 + local.get $9 local.get $6 - local.get $7 i32.lt_u if local.get $0 - local.get $6 + local.get $9 i32.const 1 i32.shl i32.add i32.load16_u - local.tee $1 + local.tee $2 i32.const 7 i32.shr_u if block $for-continue|0 + local.get $9 local.get $6 - local.get $7 i32.const 1 i32.sub i32.lt_u i32.const 0 - local.get $1 + local.get $2 i32.const 55295 i32.sub i32.const 1025 @@ -1927,26 +1927,26 @@ select if local.get $0 - local.get $6 + local.get $9 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $8 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 - local.get $4 + local.set $9 + local.get $8 i32.const 1023 i32.and - local.get $1 - local.tee $3 + local.get $2 + local.tee $1 i32.const 1023 i32.and i32.const 10 @@ -1954,96 +1954,96 @@ i32.or i32.const 65536 i32.add - local.tee $1 + local.tee $2 i32.const 131072 i32.ge_u if - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.get $3 - local.get $4 + local.get $1 + local.get $8 i32.const 16 i32.shl i32.or i32.store - local.get $2 + local.get $10 i32.const 1 i32.add - local.set $2 + local.set $10 br $for-continue|0 end end end - local.get $1 + local.get $2 i32.const 9424 i32.sub i32.const 25 i32.le_u if - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.const 26 i32.sub i32.store16 else i32.const -1 - local.set $3 - local.get $1 + local.set $1 + local.get $2 i32.const 223 i32.sub i32.const 64056 i32.le_u if block $~lib/util/casemap/bsearch|inlined.0 (result i32) - local.get $9 - local.set $3 + local.get $3 + local.set $1 i32.const 0 - local.set $8 + local.set $5 loop $while-continue|1 - local.get $8 - local.get $3 + local.get $5 + local.get $1 i32.le_s if - local.get $3 - local.get $8 + local.get $1 + local.get $5 i32.add i32.const 3 i32.shr_u i32.const 2 i32.shl - local.tee $4 + local.tee $8 i32.const 1 i32.shl i32.const 208 i32.add i32.load16_u - local.get $1 + local.get $2 i32.sub - local.tee $10 + local.tee $4 if - local.get $10 + local.get $4 i32.const 31 i32.shr_u if - local.get $4 + local.get $8 i32.const 4 i32.add - local.set $8 + local.set $5 else - local.get $4 + local.get $8 i32.const 4 i32.sub - local.set $3 + local.set $1 end else - local.get $4 + local.get $8 br $~lib/util/casemap/bsearch|inlined.0 end br $while-continue|1 @@ -2051,72 +2051,72 @@ end i32.const -1 end - local.set $3 + local.set $1 end - local.get $3 + local.get $1 i32.const -1 i32.xor if - local.get $3 + local.get $1 i32.const 1 i32.shl i32.const 208 i32.add - local.tee $3 + local.tee $1 i32.load16_u offset=6 - local.set $1 - local.get $5 - local.get $2 + local.set $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.tee $4 - local.get $3 + local.tee $8 + local.get $1 i32.load offset=2 i32.store - local.get $4 - local.get $1 + local.get $8 + local.get $2 i32.store16 offset=4 + local.get $10 local.get $2 - local.get $1 i32.const 0 i32.ne i32.const 1 i32.add i32.add - local.set $2 + local.set $10 else - local.get $1 + local.get $2 i32.const 1 call $~lib/util/casemap/casemap i32.const 2097151 i32.and - local.tee $1 + local.tee $2 i32.const 65536 i32.lt_s if - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.store16 else - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.const 65536 i32.sub - local.tee $1 + local.tee $2 i32.const 10 i32.shr_u i32.const 55296 i32.or - local.get $1 + local.get $2 i32.const 1023 i32.and i32.const 56320 @@ -2125,22 +2125,22 @@ i32.shl i32.or i32.store - local.get $2 + local.get $10 i32.const 1 i32.add - local.set $2 + local.set $10 end end end end else - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl i32.add - local.get $1 - local.get $1 + local.get $2 + local.get $2 i32.const 97 i32.sub i32.const 26 @@ -2154,19 +2154,19 @@ i32.and i32.store16 end - local.get $6 + local.get $9 i32.const 1 i32.add - local.set $6 - local.get $2 + local.set $9 + local.get $10 i32.const 1 i32.add - local.set $2 + local.set $10 br $for-loop|0 end end - local.get $5 - local.get $2 + local.get $7 + local.get $10 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc @@ -2343,30 +2343,30 @@ i32.const 2 i32.shl call $~lib/rt/tlsf/__alloc - local.set $6 + local.set $9 loop $for-loop|0 - local.get $5 + local.get $6 local.get $7 i32.lt_u if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u - local.tee $1 + local.tee $2 i32.const 7 i32.shr_u if block $for-continue|0 - local.get $5 + local.get $6 local.get $7 i32.const 1 i32.sub i32.lt_u i32.const 0 - local.get $1 + local.get $2 i32.const 55295 i32.sub i32.const 1025 @@ -2374,26 +2374,26 @@ select if local.get $0 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $8 + local.tee $4 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 - local.get $8 + local.set $6 + local.get $4 i32.const 1023 i32.and - local.get $1 - local.tee $2 + local.get $2 + local.tee $1 i32.const 1023 i32.and i32.const 10 @@ -2401,51 +2401,51 @@ i32.or i32.const 65536 i32.add - local.tee $1 + local.tee $2 i32.const 131072 i32.ge_u if - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add - local.get $2 - local.get $8 + local.get $1 + local.get $4 i32.const 16 i32.shl i32.or i32.store - local.get $3 + local.get $8 i32.const 1 i32.add - local.set $3 + local.set $8 br $for-continue|0 end end end - local.get $1 + local.get $2 i32.const 304 i32.eq if - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add i32.const 50790505 i32.store - local.get $3 + local.get $8 i32.const 1 i32.add - local.set $3 + local.set $8 else - local.get $1 + local.get $2 i32.const 931 i32.eq if - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add @@ -2455,49 +2455,49 @@ if (result i32) block $~lib/util/string/isFinalSigma|inlined.0 (result i32) local.get $0 - local.set $8 + local.set $4 i32.const 0 local.set $10 - local.get $5 + local.get $6 i32.const 0 - local.get $5 - local.tee $1 + local.get $6 + local.tee $2 i32.const 30 i32.sub - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.gt_s select local.set $11 loop $while-continue|1 - local.get $1 + local.get $2 local.get $11 i32.gt_s if block $~lib/util/string/codePointBefore|inlined.0 (result i32) - local.get $1 - local.set $2 + local.get $2 + local.set $1 i32.const -1 - local.get $1 + local.get $2 i32.const 0 i32.le_s br_if $~lib/util/string/codePointBefore|inlined.0 drop local.get $0 - local.get $2 + local.get $1 i32.const 1 i32.sub i32.const 1 i32.shl i32.add i32.load16_u - local.tee $4 + local.tee $3 i32.const 64512 i32.and i32.const 56320 i32.eq - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 0 @@ -2505,23 +2505,23 @@ i32.and if local.get $0 - local.get $2 + local.get $1 i32.const 2 i32.sub i32.const 1 i32.shl i32.add i32.load16_u - local.tee $2 + local.tee $1 i32.const 64512 i32.and i32.const 55296 i32.eq if - local.get $4 + local.get $3 i32.const 1023 i32.and - local.get $2 + local.get $1 i32.const 1023 i32.and i32.const 10 @@ -2533,22 +2533,22 @@ end end i32.const 65533 - local.get $4 - local.get $4 + local.get $3 + local.get $3 i32.const 63488 i32.and i32.const 55296 i32.eq select end - local.tee $2 - local.set $4 - local.get $2 + local.tee $1 + local.set $3 + local.get $1 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $4 + local.get $3 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2556,12 +2556,12 @@ i32.eqz if i32.const 0 - local.get $2 + local.get $1 i32.const 127370 i32.lt_u if (result i32) i32.const 8752 - local.get $2 + local.get $1 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2572,14 +2572,14 @@ i32.const 1 local.set $10 end - local.get $1 local.get $2 + local.get $1 i32.const 65536 i32.ge_s i32.const 1 i32.add i32.sub - local.set $1 + local.set $2 br $while-continue|1 end end @@ -2590,81 +2590,81 @@ drop i32.const 1 i32.add - local.tee $1 + local.tee $2 i32.const 30 i32.add - local.tee $2 + local.tee $1 local.get $7 - local.get $2 + local.get $1 local.get $7 i32.lt_s select - local.set $9 + local.set $5 loop $while-continue|2 - local.get $1 - local.get $9 + local.get $2 + local.get $5 i32.lt_s if local.get $0 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.tee $2 + local.tee $1 i32.const 64512 i32.and i32.const 55296 i32.eq local.get $7 - local.get $1 + local.get $2 i32.const 1 i32.add i32.ne i32.and if local.get $0 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $4 + local.tee $3 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $2 + local.get $1 i32.const 10 i32.shl - local.get $4 + local.get $3 i32.add i32.const -56613888 i32.add - local.set $2 + local.set $1 end end - local.get $2 - local.tee $4 + local.get $1 + local.tee $3 i32.const 918000 i32.lt_u if (result i32) i32.const 5760 - local.get $4 + local.get $3 call $~lib/util/string/stagedBinaryLookup else i32.const 0 end i32.eqz if - local.get $4 - local.tee $1 + local.get $3 + local.tee $2 i32.const 127370 i32.lt_u if (result i32) i32.const 8752 - local.get $1 + local.get $2 call $~lib/util/string/stagedBinaryLookup else i32.const 0 @@ -2672,14 +2672,14 @@ i32.eqz br $~lib/util/string/isFinalSigma|inlined.0 end - local.get $1 - local.get $4 + local.get $2 + local.get $3 i32.const 65536 i32.ge_u i32.const 1 i32.add i32.add - local.set $1 + local.set $2 br $while-continue|2 end end @@ -2695,53 +2695,53 @@ end i32.store16 else - local.get $1 + local.get $2 i32.const 9398 i32.sub i32.const 25 i32.le_u if - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.const 26 i32.add i32.store16 else - local.get $1 + local.get $2 i32.const 0 call $~lib/util/casemap/casemap i32.const 2097151 i32.and - local.tee $1 + local.tee $2 i32.const 65536 i32.lt_s if - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.store16 else - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add - local.get $1 + local.get $2 i32.const 65536 i32.sub - local.tee $1 + local.tee $2 i32.const 10 i32.shr_u i32.const 55296 i32.or - local.get $1 + local.get $2 i32.const 1023 i32.and i32.const 56320 @@ -2750,23 +2750,23 @@ i32.shl i32.or i32.store - local.get $3 + local.get $8 i32.const 1 i32.add - local.set $3 + local.set $8 end end end end end else - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl i32.add - local.get $1 - local.get $1 + local.get $2 + local.get $2 i32.const 65 i32.sub i32.const 26 @@ -2778,19 +2778,19 @@ i32.or i32.store16 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 - local.get $3 + local.set $6 + local.get $8 i32.const 1 i32.add - local.set $3 + local.set $8 br $for-loop|0 end end - local.get $6 - local.get $3 + local.get $9 + local.get $8 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc @@ -2906,10 +2906,10 @@ i32.add ) (func $start:std/string-casemapping (; 33 ;) - (local $0 i32) + (local $0 i64) (local $1 i64) (local $2 i64) - (local $3 i64) + (local $3 i32) (local $4 i64) (local $5 i32) (local $6 i32) @@ -4146,11 +4146,11 @@ unreachable end loop $for-loop|0 - local.get $0 + local.get $3 i32.const 1114111 i32.le_s if - local.get $0 + local.get $3 call $~lib/string/String.fromCodePoint local.tee $8 call $~lib/string/String#toLowerCase @@ -4167,12 +4167,12 @@ i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s - local.tee $1 + local.tee $0 i64.const 0 i64.ge_u if local.get $4 - local.get $1 + local.get $0 i64.const 16 i64.shl i64.add @@ -4182,12 +4182,12 @@ i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s - local.tee $1 + local.tee $0 i64.const 0 i64.ge_u if local.get $4 - local.get $1 + local.get $0 i64.const 32 i64.shl i64.add @@ -4197,78 +4197,78 @@ i32.const 0 call $~lib/string/String#codePointAt i64.extend_i32_s - local.set $1 + local.set $0 local.get $6 i32.const 1 call $~lib/string/String#codePointAt i64.extend_i32_s - local.tee $2 + local.tee $1 i64.const 0 i64.ge_u if + local.get $0 local.get $1 - local.get $2 i64.const 16 i64.shl i64.add - local.set $1 + local.set $0 end local.get $6 i32.const 2 call $~lib/string/String#codePointAt i64.extend_i32_s - local.tee $2 + local.tee $1 i64.const 0 i64.ge_u if + local.get $0 local.get $1 - local.get $2 i64.const 32 i64.shl i64.add - local.set $1 + local.set $0 end - local.get $0 + local.get $3 i32.const 0 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s - local.set $2 - local.get $0 + local.set $1 + local.get $3 i32.const 1 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s - local.tee $3 + local.tee $2 i64.const 0 i64.ge_u if + local.get $1 local.get $2 - local.get $3 i64.const 16 i64.shl i64.add - local.set $2 + local.set $1 end - local.get $0 + local.get $3 i32.const 2 call $std/string-casemapping/toLowerCaseFromIndex i64.extend_i32_s - local.tee $3 + local.tee $2 i64.const 0 i64.ge_u if + local.get $1 local.get $2 - local.get $3 i64.const 32 i64.shl i64.add - local.set $2 + local.set $1 end - local.get $0 + local.get $3 i32.const 0 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s - local.set $3 - local.get $0 + local.set $2 + local.get $3 i32.const 1 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s @@ -4276,14 +4276,14 @@ i64.const 0 i64.ge_u if - local.get $3 + local.get $2 local.get $7 i64.const 16 i64.shl i64.add - local.set $3 + local.set $2 end - local.get $0 + local.get $3 i32.const 2 call $std/string-casemapping/toUpperCaseFromIndex i64.extend_i32_s @@ -4291,46 +4291,46 @@ i64.const 0 i64.ge_u if - local.get $3 + local.get $2 local.get $7 i64.const 32 i64.shl i64.add - local.set $3 + local.set $2 end - local.get $2 + local.get $1 local.get $4 i64.ne if i32.const 17232 i32.const 3 - local.get $0 + local.get $3 f64.convert_i32_s local.get $4 f64.convert_i64_u - local.get $2 + local.get $1 f64.convert_i64_u f64.const 0 f64.const 0 call $~lib/builtins/trace end - local.get $1 - local.get $3 + local.get $0 + local.get $2 i64.ne if i32.const 17312 i32.const 3 - local.get $0 + local.get $3 f64.convert_i32_s - local.get $1 + local.get $0 f64.convert_i64_u - local.get $3 + local.get $2 f64.convert_i64_u f64.const 0 f64.const 0 call $~lib/builtins/trace end - local.get $2 + local.get $1 local.get $4 i64.ne if @@ -4341,8 +4341,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $3 + local.get $0 + local.get $2 i64.ne if i32.const 0 @@ -4358,10 +4358,10 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index 0be526712a..aea8288809 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -660,16 +660,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -681,18 +681,18 @@ unreachable end i32.const 21056 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 22624 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 21056 @@ -707,7 +707,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -724,10 +724,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -740,7 +740,7 @@ i32.const 21056 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) local.get $0 @@ -1125,7 +1125,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1147,32 +1147,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1180,10 +1180,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1197,7 +1197,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1205,18 +1205,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1231,22 +1231,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1254,18 +1254,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1274,16 +1274,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1858,20 +1858,20 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $3 + local.tee $2 local.get $0 i32.const 16 i32.sub i32.load offset=12 i32.add - local.set $4 + local.set $5 local.get $0 local.get $1 call $~lib/string/String.UTF8.byteLength local.tee $0 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $5 + local.tee $3 local.get $0 i32.add local.get $1 @@ -1879,37 +1879,37 @@ i32.ne i32.sub local.set $6 - local.get $5 + local.get $3 local.set $0 loop $while-continue|0 local.get $0 local.get $6 i32.lt_u if - local.get $3 + local.get $2 i32.load16_u - local.tee $2 + local.tee $4 i32.const 128 i32.lt_u if (result i32) local.get $0 - local.get $2 + local.get $4 i32.store8 local.get $0 i32.const 1 i32.add else - local.get $2 + local.get $4 i32.const 2048 i32.lt_u if (result i32) local.get $0 - local.get $2 + local.get $4 i32.const 6 i32.shr_u i32.const 192 i32.or - local.get $2 + local.get $4 i32.const 63 i32.and i32.const 128 @@ -1922,20 +1922,20 @@ i32.const 2 i32.add else - local.get $3 + local.get $2 i32.const 2 i32.add - local.get $4 + local.get $5 i32.lt_u i32.const 0 - local.get $2 + local.get $4 i32.const 64512 i32.and i32.const 55296 i32.eq select if - local.get $3 + local.get $2 i32.load16_u offset=2 local.tee $7 i32.const 64512 @@ -1944,7 +1944,7 @@ i32.eq if local.get $0 - local.get $2 + local.get $4 i32.const 1023 i32.and i32.const 10 @@ -1955,14 +1955,14 @@ i32.const 1023 i32.and i32.or - local.tee $2 + local.tee $4 i32.const 63 i32.and i32.const 128 i32.or i32.const 24 i32.shl - local.get $2 + local.get $4 i32.const 6 i32.shr_u i32.const 63 @@ -1972,7 +1972,7 @@ i32.const 16 i32.shl i32.or - local.get $2 + local.get $4 i32.const 12 i32.shr_u i32.const 63 @@ -1982,7 +1982,7 @@ i32.const 8 i32.shl i32.or - local.get $2 + local.get $4 i32.const 18 i32.shr_u i32.const 240 @@ -1993,20 +1993,20 @@ i32.const 4 i32.add local.set $0 - local.get $3 + local.get $2 i32.const 4 i32.add - local.set $3 + local.set $2 br $while-continue|0 end end local.get $0 - local.get $2 + local.get $4 i32.const 12 i32.shr_u i32.const 224 i32.or - local.get $2 + local.get $4 i32.const 6 i32.shr_u i32.const 63 @@ -2018,7 +2018,7 @@ i32.or i32.store16 local.get $0 - local.get $2 + local.get $4 i32.const 63 i32.and i32.const 128 @@ -2030,15 +2030,15 @@ end end local.set $0 - local.get $3 + local.get $2 i32.const 2 i32.add - local.set $3 + local.set $2 br $while-continue|0 end end - local.get $3 - local.get $4 + local.get $2 + local.get $5 i32.gt_u if i32.const 0 @@ -2054,7 +2054,7 @@ i32.const 0 i32.store8 end - local.get $5 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/string-encoding/testUTF8Encode (; 28 ;) @@ -2841,17 +2841,17 @@ i32.const 32 i32.const 1 call $~lib/string/String.UTF8.encode - local.set $2 + local.set $0 i32.const 32 i32.const 0 call $~lib/string/String.UTF8.byteLength - local.set $1 - local.get $2 - local.tee $0 + local.set $9 + local.get $0 + local.tee $1 i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $3 + local.tee $8 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -2863,11 +2863,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 + local.get $9 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $4 + local.tee $7 i32.const 32 call $~lib/string/String.__eq i32.eqz @@ -2879,11 +2879,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $5 + local.tee $6 i32.const 304 call $~lib/string/String.__eq i32.eqz @@ -2895,13 +2895,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.add i32.const 2 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $6 + local.tee $5 i32.const 368 call $~lib/string/String.__eq i32.eqz @@ -2913,13 +2913,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.add i32.const 4 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $7 + local.tee $4 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -2931,13 +2931,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 10 i32.add i32.const 0 i32.const 0 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $8 + local.tee $3 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -2949,13 +2949,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 4 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $9 + local.tee $2 i32.const 544 call $~lib/string/String.__eq i32.eqz @@ -2967,13 +2967,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 6 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $1 + local.tee $9 i32.const 400 call $~lib/string/String.__eq i32.eqz @@ -2985,13 +2985,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 10 i32.add i32.const 100 i32.const 1 call $~lib/string/String.UTF8.decodeUnsafe - local.tee $0 + local.tee $1 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -3003,17 +3003,19 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $8 call $~lib/rt/pure/__release - local.get $4 + local.get $7 + call $~lib/rt/pure/__release + local.get $6 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $4 call $~lib/rt/pure/__release - local.get $7 + local.get $3 call $~lib/rt/pure/__release - local.get $8 + local.get $2 call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release @@ -3021,8 +3023,6 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release ) (func $std/string-encoding/testLarge (; 36 ;) (param $0 i32) (local $1 i32) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 6c1633fb37..699642a86f 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1144,16 +1144,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -1165,18 +1165,18 @@ unreachable end i32.const 17008 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 18576 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 17008 @@ -1191,7 +1191,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -1208,10 +1208,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -1224,7 +1224,7 @@ i32.const 17008 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 @@ -1766,7 +1766,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1788,32 +1788,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1821,10 +1821,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1838,7 +1838,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1846,18 +1846,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1872,22 +1872,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1895,18 +1895,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1915,16 +1915,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -2487,7 +2487,7 @@ (local $5 f64) local.get $0 call $~lib/string/String#get:length - local.tee $2 + local.tee $1 i32.eqz if f64.const nan:0x8000000000000 @@ -2495,11 +2495,11 @@ end local.get $0 i32.load16_u - local.set $1 + local.set $2 f64.const 1 - local.set $3 + local.set $5 loop $while-continue|0 - local.get $1 + local.get $2 call $~lib/util/string/isSpace if local.get $0 @@ -2507,44 +2507,44 @@ i32.add local.tee $0 i32.load16_u - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $while-continue|0 end end - local.get $1 + local.get $2 i32.const 45 i32.eq if - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.eqz if f64.const nan:0x8000000000000 return end f64.const -1 - local.set $3 + local.set $5 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u - local.set $1 + local.set $2 else - local.get $1 + local.get $2 i32.const 43 i32.eq if - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.eqz if f64.const nan:0x8000000000000 @@ -2555,14 +2555,14 @@ i32.add local.tee $0 i32.load16_u - local.set $1 + local.set $2 end end - local.get $2 + local.get $1 i32.const 2 i32.gt_s i32.const 0 - local.get $1 + local.get $2 i32.const 48 i32.eq select @@ -2577,15 +2577,15 @@ i32.load16_u i32.const 32 i32.or - local.tee $1 + local.tee $2 i32.const 98 i32.ne if - local.get $1 + local.get $2 i32.const 111 i32.eq br_if $case1|1 - local.get $1 + local.get $2 i32.const 120 i32.eq br_if $case2|1 @@ -2595,10 +2595,10 @@ i32.const 4 i32.add local.set $0 - local.get $2 + local.get $1 i32.const 2 i32.sub - local.set $2 + local.set $1 i32.const 2 br $break|1 end @@ -2606,10 +2606,10 @@ i32.const 4 i32.add local.set $0 - local.get $2 + local.get $1 i32.const 2 i32.sub - local.set $2 + local.set $1 i32.const 8 br $break|1 end @@ -2617,10 +2617,10 @@ i32.const 4 i32.add local.set $0 - local.get $2 + local.get $1 i32.const 2 i32.sub - local.set $2 + local.set $1 i32.const 16 br $break|1 end @@ -2632,58 +2632,58 @@ local.set $4 loop $while-continue|2 block $while-break|2 - local.get $2 - local.tee $1 + local.get $1 + local.tee $2 i32.const 1 i32.sub - local.set $2 - local.get $1 + local.set $1 + local.get $2 if local.get $0 i32.load16_u - local.tee $1 + local.tee $2 i32.const 48 i32.sub i32.const 10 i32.lt_u if (result i32) - local.get $1 + local.get $2 i32.const 48 i32.sub else - local.get $1 + local.get $2 i32.const 65 i32.sub i32.const 25 i32.le_u if (result i32) - local.get $1 + local.get $2 i32.const 55 i32.sub else - local.get $1 + local.get $2 i32.const 97 i32.sub i32.const 25 i32.gt_u br_if $while-break|2 - local.get $1 + local.get $2 i32.const 87 i32.sub end end - local.tee $1 + local.tee $2 local.get $4 i32.ge_u br_if $while-break|2 - local.get $5 + local.get $3 local.get $4 f64.convert_i32_s f64.mul - local.get $1 + local.get $2 f64.convert_i32_u f64.add - local.set $5 + local.set $3 local.get $0 i32.const 2 i32.add @@ -2692,8 +2692,8 @@ end end end - local.get $3 local.get $5 + local.get $3 f64.mul ) (func $~lib/util/string/strtol (; 37 ;) (result i32) @@ -2704,10 +2704,10 @@ (local $4 i32) (local $5 i32) i32.const 1904 - local.set $1 + local.set $5 i32.const 1904 call $~lib/string/String#get:length - local.tee $2 + local.tee $0 i32.eqz if i32.const 0 @@ -2715,74 +2715,74 @@ end i32.const 1904 i32.load16_u - local.set $0 + local.set $1 i32.const 1 - local.set $3 + local.set $4 loop $while-continue|0 - local.get $0 + local.get $1 call $~lib/util/string/isSpace if - local.get $1 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 - local.get $2 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $0 br $while-continue|0 end end - local.get $0 + local.get $1 i32.const 45 i32.eq if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.eqz if i32.const 0 return end i32.const -1 - local.set $3 - local.get $1 + local.set $4 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 + local.set $1 else - local.get $0 + local.get $1 i32.const 43 i32.eq if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.eqz if i32.const 0 return end - local.get $1 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 + local.set $1 end end - local.get $2 + local.get $0 i32.const 2 i32.gt_s i32.const 0 - local.get $0 + local.get $1 i32.const 48 i32.eq select @@ -2791,56 +2791,56 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $1 + local.get $5 i32.const 2 i32.add i32.load16_u i32.const 32 i32.or - local.tee $0 + local.tee $1 i32.const 98 i32.ne if - local.get $0 + local.get $1 i32.const 111 i32.eq br_if $case1|1 - local.get $0 + local.get $1 i32.const 120 i32.eq br_if $case2|1 br $case3|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 2 br $break|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 8 br $break|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 16 br $break|1 end @@ -2849,83 +2849,83 @@ else i32.const 10 end - local.set $4 + local.set $3 loop $while-continue|2 block $while-break|2 - local.get $2 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $2 - local.get $0 + local.set $0 + local.get $1 if - local.get $1 + local.get $5 i32.load16_u - local.tee $0 + local.tee $1 i32.const 48 i32.sub i32.const 10 i32.lt_u if (result i32) - local.get $0 + local.get $1 i32.const 48 i32.sub else - local.get $0 + local.get $1 i32.const 65 i32.sub i32.const 25 i32.le_u if (result i32) - local.get $0 + local.get $1 i32.const 55 i32.sub else - local.get $0 + local.get $1 i32.const 97 i32.sub i32.const 25 i32.gt_u br_if $while-break|2 - local.get $0 + local.get $1 i32.const 87 i32.sub end end - local.tee $0 - local.get $4 + local.tee $1 + local.get $3 i32.ge_u br_if $while-break|2 - local.get $0 - local.get $4 - local.get $5 + local.get $1 + local.get $2 + local.get $3 i32.mul i32.add - local.set $5 - local.get $1 + local.set $2 + local.get $5 i32.const 2 i32.add - local.set $1 + local.set $5 br $while-continue|2 end end end - local.get $3 - local.get $5 + local.get $2 + local.get $4 i32.mul ) (func $~lib/util/string/strtol (; 38 ;) (result i64) (local $0 i32) (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 i32) - (local $5 i64) + (local $2 i64) + (local $3 i32) + (local $4 i64) + (local $5 i32) i32.const 1952 - local.set $1 + local.set $5 i32.const 1952 call $~lib/string/String#get:length - local.tee $2 + local.tee $0 i32.eqz if i64.const 0 @@ -2933,74 +2933,74 @@ end i32.const 1952 i32.load16_u - local.set $0 + local.set $1 i64.const 1 - local.set $3 + local.set $4 loop $while-continue|0 - local.get $0 + local.get $1 call $~lib/util/string/isSpace if - local.get $1 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 - local.get $2 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $2 + local.set $0 br $while-continue|0 end end - local.get $0 + local.get $1 i32.const 45 i32.eq if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.eqz if i64.const 0 return end i64.const -1 - local.set $3 - local.get $1 + local.set $4 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 + local.set $1 else - local.get $0 + local.get $1 i32.const 43 i32.eq if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.eqz if i64.const 0 return end - local.get $1 + local.get $5 i32.const 2 i32.add - local.tee $1 + local.tee $5 i32.load16_u - local.set $0 + local.set $1 end end - local.get $2 + local.get $0 i32.const 2 i32.gt_s i32.const 0 - local.get $0 + local.get $1 i32.const 48 i32.eq select @@ -3009,56 +3009,56 @@ block $case3|1 block $case2|1 block $case1|1 - local.get $1 + local.get $5 i32.const 2 i32.add i32.load16_u i32.const 32 i32.or - local.tee $0 + local.tee $1 i32.const 98 i32.ne if - local.get $0 + local.get $1 i32.const 111 i32.eq br_if $case1|1 - local.get $0 + local.get $1 i32.const 120 i32.eq br_if $case2|1 br $case3|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 2 br $break|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 8 br $break|1 end - local.get $1 + local.get $5 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $5 + local.get $0 i32.const 2 i32.sub - local.set $2 + local.set $0 i32.const 16 br $break|1 end @@ -3067,71 +3067,71 @@ else i32.const 10 end - local.set $4 + local.set $3 loop $while-continue|2 block $while-break|2 - local.get $2 - local.tee $0 + local.get $0 + local.tee $1 i32.const 1 i32.sub - local.set $2 - local.get $0 + local.set $0 + local.get $1 if - local.get $1 + local.get $5 i32.load16_u - local.tee $0 + local.tee $1 i32.const 48 i32.sub i32.const 10 i32.lt_u if (result i32) - local.get $0 + local.get $1 i32.const 48 i32.sub else - local.get $0 + local.get $1 i32.const 65 i32.sub i32.const 25 i32.le_u if (result i32) - local.get $0 + local.get $1 i32.const 55 i32.sub else - local.get $0 + local.get $1 i32.const 97 i32.sub i32.const 25 i32.gt_u br_if $while-break|2 - local.get $0 + local.get $1 i32.const 87 i32.sub end end - local.tee $0 - local.get $4 + local.tee $1 + local.get $3 i32.ge_u br_if $while-break|2 - local.get $0 + local.get $1 i64.extend_i32_u - local.get $5 - local.get $4 + local.get $2 + local.get $3 i64.extend_i32_s i64.mul i64.add - local.set $5 - local.get $1 + local.set $2 + local.get $5 i32.const 2 i32.add - local.set $1 + local.set $5 br $while-continue|2 end end end - local.get $3 - local.get $5 + local.get $2 + local.get $4 i64.mul ) (func $~lib/math/ipow32 (; 39 ;) (param $0 i32) (result i32) @@ -3247,33 +3247,33 @@ ) (func $~lib/util/string/strtod (; 41 ;) (param $0 i32) (result f64) (local $1 i32) - (local $2 i64) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 i64) (local $6 i32) (local $7 i64) (local $8 i64) (local $9 f64) - (local $10 i64) - (local $11 f64) - (local $12 i32) + (local $10 i32) + (local $11 i64) + (local $12 f64) (local $13 i64) block $folding-inner0 local.get $0 call $~lib/string/String#get:length - local.tee $1 + local.tee $4 i32.eqz br_if $folding-inner0 local.get $0 i32.load16_u - local.set $5 + local.set $6 f64.const 1 - local.set $11 + local.set $12 loop $while-continue|0 - local.get $1 + local.get $4 if (result i32) - local.get $5 + local.get $6 call $~lib/util/string/isSpace else i32.const 0 @@ -3284,43 +3284,43 @@ i32.add local.tee $0 i32.load16_u - local.set $5 - local.get $1 + local.set $6 + local.get $4 i32.const 1 i32.sub - local.set $1 + local.set $4 br $while-continue|0 end end - local.get $1 + local.get $4 i32.eqz br_if $folding-inner0 - local.get $5 + local.get $6 i32.const 45 i32.eq if (result i32) - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $folding-inner0 f64.const -1 - local.set $11 + local.set $12 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u else - local.get $5 + local.get $6 i32.const 43 i32.eq if (result i32) - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $folding-inner0 local.get $0 @@ -3329,14 +3329,14 @@ local.tee $0 i32.load16_u else - local.get $5 + local.get $6 end end - local.tee $5 + local.tee $6 i32.const 73 i32.eq i32.const 0 - local.get $1 + local.get $4 i32.const 8 i32.ge_s select @@ -3355,27 +3355,27 @@ end if f64.const inf - local.get $11 + local.get $12 f64.copysign return end br $folding-inner0 end - local.get $5 + local.get $6 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $5 + local.get $6 i32.const 46 i32.ne select br_if $folding-inner0 local.get $0 - local.set $3 + local.set $1 loop $while-continue|1 - local.get $5 + local.get $6 i32.const 48 i32.eq if @@ -3384,61 +3384,61 @@ i32.add local.tee $0 i32.load16_u - local.set $5 - local.get $1 + local.set $6 + local.get $4 i32.const 1 i32.sub - local.set $1 + local.set $4 br $while-continue|1 end end - local.get $1 + local.get $4 i32.const 0 i32.le_s if f64.const 0 return end - local.get $5 + local.get $6 i32.const 46 i32.eq if - local.get $3 + local.get $1 local.get $0 i32.sub i32.eqz - local.set $3 + local.set $1 local.get $0 i32.const 2 i32.add local.set $0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 if (result i32) i32.const 0 else - local.get $3 + local.get $1 end br_if $folding-inner0 i32.const 1 - local.set $12 + local.set $10 loop $for-loop|2 local.get $0 i32.load16_u - local.tee $5 + local.tee $6 i32.const 48 i32.eq if - local.get $1 + local.get $4 i32.const 1 i32.sub - local.set $1 - local.get $6 + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $3 local.get $0 i32.const 2 i32.add @@ -3446,82 +3446,82 @@ br $for-loop|2 end end - local.get $1 + local.get $4 i32.const 0 i32.le_s if f64.const 0 return end - local.get $6 + local.get $3 if i32.const 0 - local.set $3 + local.set $1 end - local.get $5 + local.get $6 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $3 + local.get $1 select br_if $folding-inner0 end - local.get $5 + local.get $6 i32.const 48 i32.sub - local.set $3 + local.set $1 loop $for-loop|3 i32.const 1 - local.get $12 + local.get $10 i32.eqz i32.const 0 - local.get $5 + local.get $6 i32.const 46 i32.eq select - local.get $3 + local.get $1 i32.const 10 i32.lt_u select if block $for-break3 - local.get $3 + local.get $1 i32.const 10 i32.lt_u if - local.get $3 + local.get $1 i64.extend_i32_u - local.get $2 + local.get $5 i64.const 10 i64.mul i64.add - local.get $2 - local.get $3 + local.get $5 + local.get $1 i32.eqz i32.eqz i64.extend_i32_u i64.or - local.get $4 + local.get $2 i32.const 19 i32.lt_s select - local.set $2 - local.get $4 + local.set $5 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 else - local.get $4 - local.set $6 + local.get $2 + local.set $3 i32.const 1 - local.set $12 + local.set $10 end - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $for-break3 local.get $0 @@ -3529,35 +3529,35 @@ i32.add local.tee $0 i32.load16_u - local.tee $5 + local.tee $6 i32.const 48 i32.sub - local.set $3 + local.set $1 br $for-loop|3 end end end block $~lib/util/string/scientific|inlined.0 i32.const 1 - local.get $6 - local.get $4 - local.get $12 + local.get $3 + local.get $2 + local.get $10 select i32.const 19 - local.get $4 + local.get $2 i32.const 19 - local.get $4 + local.get $2 i32.lt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) i32.const 1 - local.set $6 + local.set $3 i32.const 0 - local.set $4 + local.set $2 i32.const 0 local.get $0 - local.tee $3 + local.tee $1 i32.load16_u i32.const 32 i32.or @@ -3565,29 +3565,29 @@ i32.ne br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $1 i32.const 2 i32.add - local.tee $3 + local.tee $1 i32.load16_u local.tee $0 i32.const 45 i32.eq if (result i32) i32.const 0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop i32.const -1 - local.set $6 - local.get $3 + local.set $3 + local.get $1 i32.const 2 i32.add - local.tee $3 + local.tee $1 i32.load16_u else local.get $0 @@ -3595,17 +3595,17 @@ i32.eq if (result i32) i32.const 0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $1 i32.const 2 i32.add - local.tee $3 + local.tee $1 i32.load16_u else local.get $0 @@ -3618,17 +3618,17 @@ i32.eq if i32.const 0 - local.get $1 + local.get $4 i32.const 1 i32.sub - local.tee $1 + local.tee $4 i32.eqz br_if $~lib/util/string/parseExp|inlined.0 drop - local.get $3 + local.get $1 i32.const 2 i32.add - local.tee $3 + local.tee $1 i32.load16_u local.set $0 br $while-continue|4 @@ -3643,31 +3643,31 @@ i32.const 10 i32.lt_u i32.const 0 - local.get $1 + local.get $4 select if - local.get $6 + local.get $3 i32.const 3200 i32.mul - local.get $4 + local.get $2 i32.const 3200 i32.ge_s br_if $~lib/util/string/parseExp|inlined.0 drop local.get $0 - local.get $4 + local.get $2 i32.const 10 i32.mul i32.add - local.set $4 - local.get $1 + local.set $2 + local.get $4 i32.const 1 i32.sub - local.set $1 - local.get $3 + local.set $4 + local.get $1 i32.const 2 i32.add - local.tee $3 + local.tee $1 i32.load16_u i32.const 48 i32.sub @@ -3675,15 +3675,15 @@ br $for-loop|5 end end - local.get $4 - local.get $6 + local.get $2 + local.get $3 i32.mul end i32.add local.tee $0 i32.const -342 i32.lt_s - local.get $2 + local.get $5 i64.eqz select br_if $~lib/util/string/scientific|inlined.0 @@ -3695,7 +3695,7 @@ local.set $9 br $~lib/util/string/scientific|inlined.0 end - local.get $2 + local.get $5 f64.convert_i64_u local.set $9 local.get $0 @@ -3722,16 +3722,16 @@ i32.const 22 local.set $0 end - local.get $2 + local.get $5 i64.const 9007199254740991 i64.le_u if (result i32) local.get $0 i32.const 31 i32.shr_s - local.tee $4 + local.tee $2 local.get $0 - local.get $4 + local.get $2 i32.add i32.xor i32.const 22 @@ -3770,31 +3770,31 @@ i32.const 0 i32.lt_s if (result f64) - local.get $2 - local.get $2 + local.get $5 + local.get $5 i64.clz local.tee $7 i64.shl - local.set $2 + local.set $5 local.get $0 - local.tee $6 + local.tee $3 i64.extend_i32_s local.get $7 i64.sub local.set $7 loop $for-loop|6 - local.get $6 + local.get $3 i32.const -14 i32.le_s if f64.const 0.00004294967296 - local.get $2 + local.get $5 i64.const 6103515625 i64.rem_u - local.get $2 + local.get $5 i64.const 6103515625 i64.div_u - local.tee $10 + local.tee $11 i64.clz local.tee $8 i64.const 18 @@ -3804,35 +3804,35 @@ f64.mul f64.nearest i64.trunc_f64_u - local.get $10 + local.get $11 local.get $8 i64.shl i64.add - local.set $2 + local.set $5 local.get $7 local.get $8 i64.sub local.set $7 - local.get $6 + local.get $3 i32.const 14 i32.add - local.set $6 + local.set $3 br $for-loop|6 end end - local.get $2 + local.get $5 i32.const 0 - local.get $6 + local.get $3 i32.sub call $~lib/math/ipow32 i64.extend_i32_s - local.tee $10 + local.tee $11 i64.div_u local.tee $13 i64.clz local.set $8 - local.get $2 - local.get $10 + local.get $5 + local.get $11 i64.rem_u f64.convert_i64_u i64.reinterpret_f64 @@ -3841,7 +3841,7 @@ i64.shl i64.add f64.reinterpret_i64 - local.get $10 + local.get $11 f64.convert_i64_u f64.div i64.trunc_f64_u @@ -3856,35 +3856,35 @@ i32.wrap_i64 call $~lib/math/NativeMath.scalbn else - local.get $2 - local.get $2 + local.get $5 + local.get $5 i64.ctz local.tee $7 i64.shr_u - local.set $2 + local.set $5 local.get $7 local.get $0 - local.tee $4 + local.tee $2 i64.extend_i32_s i64.add global.set $~lib/util/string/__fixmulShift loop $for-loop|7 - local.get $4 + local.get $2 i32.const 13 i32.ge_s if i64.const 32 - local.get $2 + local.get $5 i64.const 32 i64.shr_u i64.const 1220703125 i64.mul - local.get $2 + local.get $5 i64.const 4294967295 i64.and i64.const 1220703125 i64.mul - local.tee $2 + local.tee $5 i64.const 32 i64.shr_u i64.add @@ -3900,7 +3900,7 @@ global.get $~lib/util/string/__fixmulShift i64.add global.set $~lib/util/string/__fixmulShift - local.get $2 + local.get $5 local.get $0 i64.extend_i32_u i64.shl @@ -3912,26 +3912,26 @@ local.get $0 i64.extend_i32_u i64.shl - local.get $2 + local.get $5 i64.const 4294967295 i64.and local.get $8 i64.shr_u i64.or i64.add - local.set $2 - local.get $4 + local.set $5 + local.get $2 i32.const 13 i32.sub - local.set $4 + local.set $2 br $for-loop|7 end end - local.get $4 + local.get $2 call $~lib/math/ipow32 local.tee $0 i64.extend_i32_u - local.get $2 + local.get $5 i64.const 4294967295 i64.and i64.mul @@ -3939,7 +3939,7 @@ i64.const 32 local.get $0 i64.extend_i32_u - local.get $2 + local.get $5 i64.const 32 i64.shr_u i64.mul @@ -3947,7 +3947,7 @@ i64.const 32 i64.shr_u i64.add - local.tee $2 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -3967,7 +3967,7 @@ i64.shr_u i64.const 1 i64.and - local.get $2 + local.get $5 local.get $0 i64.extend_i32_u i64.shl @@ -3987,7 +3987,7 @@ local.set $9 end local.get $9 - local.get $11 + local.get $12 f64.copysign return end @@ -4483,26 +4483,26 @@ (local $9 i32) (local $10 i32) local.get $2 - local.set $8 + local.set $5 local.get $0 call $~lib/string/String#get:length - local.tee $4 + local.tee $3 local.get $1 - local.tee $6 + local.tee $4 call $~lib/string/String#get:length local.tee $9 i32.le_u if - local.get $4 + local.get $3 local.get $9 i32.lt_u if (result i32) local.get $0 call $~lib/rt/pure/__retain else - local.get $8 + local.get $5 local.get $0 - local.get $6 + local.get $4 local.get $0 call $~lib/string/String.__eq select @@ -4510,7 +4510,7 @@ end return end - local.get $8 + local.get $5 call $~lib/string/String#get:length local.set $2 local.get $9 @@ -4523,9 +4523,9 @@ call $~lib/rt/pure/__retain return end - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.const 1 i32.add i32.mul @@ -4534,8 +4534,8 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $8 + local.tee $6 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -4543,25 +4543,25 @@ local.get $2 local.set $1 i32.const 0 - local.set $6 + local.set $4 loop $for-loop|0 - local.get $6 local.get $4 + local.get $3 i32.lt_u if - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.shl i32.add local.get $0 - local.get $6 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.add @@ -4569,7 +4569,7 @@ i32.const 1 i32.shl i32.add - local.get $8 + local.get $5 local.get $2 i32.const 1 i32.shl @@ -4578,14 +4578,14 @@ local.get $2 i32.add local.set $1 - local.get $6 + local.get $4 i32.const 1 i32.add - local.set $6 + local.set $4 br $for-loop|0 end end - local.get $3 + local.get $6 call $~lib/rt/pure/__retain return end @@ -4593,39 +4593,39 @@ local.get $9 i32.eq if - local.get $4 + local.get $3 i32.const 1 i32.shl - local.tee $4 + local.tee $3 i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $1 local.get $0 - local.get $4 + local.get $3 call $~lib/memory/memory.copy loop $while-continue|1 local.get $0 - local.get $6 - local.get $5 + local.get $4 + local.get $7 call $~lib/string/String#indexOf - local.tee $4 + local.tee $3 i32.const -1 i32.xor if local.get $1 - local.get $4 + local.get $3 i32.const 1 i32.shl i32.add - local.get $8 + local.get $5 local.get $2 i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 local.get $9 i32.add - local.set $5 + local.set $7 br $while-continue|1 end end @@ -4633,32 +4633,32 @@ call $~lib/rt/pure/__retain return end - local.get $4 + local.get $3 local.set $1 loop $while-continue|2 local.get $0 - local.get $6 - local.get $5 + local.get $4 + local.get $7 call $~lib/string/String#indexOf local.tee $10 i32.const -1 i32.xor if - local.get $3 + local.get $6 i32.eqz if - local.get $4 + local.get $3 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $6 end - local.get $7 + local.get $8 local.get $1 i32.gt_u if - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.shl @@ -4666,56 +4666,56 @@ i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc - local.set $3 + local.set $6 end - local.get $3 - local.get $7 + local.get $6 + local.get $8 i32.const 1 i32.shl i32.add local.get $0 - local.get $5 + local.get $7 i32.const 1 i32.shl i32.add local.get $10 - local.get $5 + local.get $7 i32.sub - local.tee $5 + local.tee $7 i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $3 - local.get $5 + local.get $6 local.get $7 + local.get $8 i32.add - local.tee $5 + local.tee $7 i32.const 1 i32.shl i32.add - local.get $8 + local.get $5 local.get $2 i32.const 1 i32.shl call $~lib/memory/memory.copy local.get $2 - local.get $5 + local.get $7 i32.add - local.set $7 + local.set $8 local.get $9 local.get $10 i32.add - local.set $5 + local.set $7 br $while-continue|2 end end - local.get $7 + local.get $8 if - local.get $7 + local.get $8 local.get $1 i32.gt_u if - local.get $3 + local.get $6 local.get $1 i32.const 1 i32.shl @@ -4723,20 +4723,20 @@ i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc - local.set $3 + local.set $6 end - local.get $4 - local.get $5 + local.get $3 + local.get $7 i32.sub local.tee $2 if - local.get $3 - local.get $7 + local.get $6 + local.get $8 i32.const 1 i32.shl i32.add local.get $0 - local.get $5 + local.get $7 i32.const 1 i32.shl i32.add @@ -4747,18 +4747,18 @@ end local.get $1 local.get $2 - local.get $7 + local.get $8 i32.add local.tee $0 i32.gt_u if (result i32) - local.get $3 + local.get $6 local.get $0 i32.const 1 i32.shl call $~lib/rt/tlsf/__realloc else - local.get $3 + local.get $6 end call $~lib/rt/pure/__retain return @@ -5328,7 +5328,7 @@ local.set $2 local.get $1 call $~lib/string/String#get:length - local.tee $8 + local.tee $9 if local.get $5 i32.eqz @@ -5406,11 +5406,11 @@ local.get $1 local.get $4 call $~lib/string/String#indexOf - local.tee $7 + local.tee $8 i32.const -1 i32.xor if - local.get $7 + local.get $8 local.get $4 i32.sub local.tee $6 @@ -5423,7 +5423,7 @@ local.tee $6 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $9 + local.tee $10 local.get $0 local.get $4 i32.const 1 @@ -5432,7 +5432,7 @@ local.get $6 call $~lib/memory/memory.copy local.get $3 - local.get $9 + local.get $10 call $~lib/array/Array<~lib/string/String>#push else local.get $3 @@ -5440,17 +5440,17 @@ call $~lib/array/Array<~lib/string/String>#push end local.get $2 - local.get $10 + local.get $7 i32.const 1 i32.add - local.tee $10 + local.tee $7 i32.eq if local.get $3 return end - local.get $7 local.get $8 + local.get $9 i32.add local.set $4 br $while-continue|1 @@ -5869,31 +5869,31 @@ (func $~lib/util/number/genDigits (; 68 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) local.get $3 local.get $1 i64.sub - local.set $8 + local.set $9 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $9 + local.tee $10 i64.extend_i32_s i64.shl - local.tee $10 + local.tee $11 i64.const 1 i64.sub local.tee $12 i64.and - local.set $11 + local.set $8 local.get $3 - local.get $9 + local.get $10 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -6049,10 +6049,10 @@ i32.const 1 i32.sub local.set $4 - local.get $11 + local.get $8 local.get $7 i64.extend_i32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl i64.add @@ -6070,7 +6070,7 @@ i32.const 15280 i32.add i64.load32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl local.set $3 @@ -6086,19 +6086,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $8 + local.get $9 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.lt_u select i32.const 0 @@ -6109,7 +6109,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $8 + local.get $9 i64.lt_u select select @@ -6134,7 +6134,7 @@ br $while-continue|0 end end - local.get $9 + local.get $10 i64.extend_i32_s local.set $13 loop $while-continue|4 (result i32) @@ -6142,7 +6142,7 @@ i64.const 10 i64.mul local.set $5 - local.get $11 + local.get $8 i64.const 10 i64.mul local.tee $3 @@ -6179,7 +6179,7 @@ local.get $3 local.get $12 i64.and - local.tee $11 + local.tee $8 local.get $5 i64.ge_u br_if $while-continue|4 @@ -6187,9 +6187,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $11 - local.set $1 local.get $8 + local.set $1 + local.get $9 i32.const 0 local.get $4 i32.sub @@ -6216,13 +6216,13 @@ local.get $1 i64.sub local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.lt_u @@ -6231,7 +6231,7 @@ local.get $5 local.get $1 i64.sub - local.get $10 + local.get $11 i64.ge_u i32.const 0 local.get $1 @@ -6245,7 +6245,7 @@ i32.sub local.set $4 local.get $1 - local.get $10 + local.get $11 i64.add local.set $1 br $while-continue|6 @@ -6854,7 +6854,7 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -7061,7 +7061,7 @@ (local $207 i32) (local $208 i32) (local $209 i32) - (local $210 i32) + (local $210 f64) (local $211 i32) global.get $std/string/str i32.const 32 @@ -7185,7 +7185,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode|trampoline - local.tee $6 + local.tee $207 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7201,7 +7201,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode|trampoline - local.tee $7 + local.tee $206 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7217,7 +7217,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode|trampoline - local.tee $8 + local.tee $205 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7232,7 +7232,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $9 + local.tee $204 i32.const 496 call $~lib/string/String.__eq i32.eqz @@ -7246,7 +7246,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $10 + local.tee $203 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7260,7 +7260,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $11 + local.tee $202 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7274,7 +7274,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $12 + local.tee $201 i32.const 576 call $~lib/string/String.__eq i32.eqz @@ -7287,47 +7287,47 @@ unreachable end global.get $std/string/str - local.set $5 + local.set $208 i32.const 608 - local.tee $2 + local.tee $0 i32.eqz if i32.const 608 call $~lib/rt/pure/__release i32.const 640 - local.set $2 + local.set $0 end block $__inlined_func$~lib/string/String#startsWith i32.const 0 - local.get $5 + local.get $208 call $~lib/string/String#get:length - local.tee $0 + local.tee $211 i32.const 0 - local.get $0 + local.get $211 i32.lt_s select - local.tee $4 - local.get $2 + local.tee $209 + local.get $0 call $~lib/string/String#get:length local.tee $1 i32.add - local.get $0 + local.get $211 i32.gt_s if - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 0 local.set $1 br $__inlined_func$~lib/string/String#startsWith end - local.get $5 - local.get $4 - local.get $2 + local.get $208 + local.get $209 + local.get $0 local.get $1 call $~lib/util/string/compareImpl i32.eqz local.set $1 - local.get $2 + local.get $0 call $~lib/rt/pure/__release end local.get $1 @@ -7344,7 +7344,7 @@ i32.const 0 i32.const 536870904 global.get $std/string/str - local.tee $4 + local.tee $209 call $~lib/string/String#get:length local.tee $1 i32.const 536870904 @@ -7353,17 +7353,17 @@ select i32.const 672 call $~lib/string/String#get:length - local.tee $2 + local.tee $0 i32.sub local.tee $1 i32.const 0 i32.lt_s br_if $__inlined_func$~lib/string/String#endsWith drop - local.get $4 + local.get $209 local.get $1 i32.const 672 - local.get $2 + local.get $0 call $~lib/util/string/compareImpl i32.eqz end @@ -7394,7 +7394,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padStart - local.tee $13 + local.tee $200 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7410,7 +7410,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padStart - local.tee $14 + local.tee $199 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7426,7 +7426,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padStart - local.tee $15 + local.tee $198 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7442,7 +7442,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padStart - local.tee $16 + local.tee $197 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7458,7 +7458,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padStart - local.tee $17 + local.tee $196 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7474,7 +7474,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padStart - local.tee $18 + local.tee $195 i32.const 832 call $~lib/string/String.__eq i32.eqz @@ -7490,7 +7490,7 @@ i32.const 6 i32.const 864 call $~lib/string/String#padStart - local.tee $19 + local.tee $194 i32.const 896 call $~lib/string/String.__eq i32.eqz @@ -7506,7 +7506,7 @@ i32.const 8 i32.const 864 call $~lib/string/String#padStart - local.tee $20 + local.tee $193 i32.const 928 call $~lib/string/String.__eq i32.eqz @@ -7522,7 +7522,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padEnd - local.tee $21 + local.tee $192 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7538,7 +7538,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padEnd - local.tee $22 + local.tee $191 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7554,7 +7554,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padEnd - local.tee $23 + local.tee $190 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7570,7 +7570,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padEnd - local.tee $24 + local.tee $189 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7586,7 +7586,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padEnd - local.tee $25 + local.tee $188 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7602,7 +7602,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padEnd - local.tee $26 + local.tee $187 i32.const 960 call $~lib/string/String.__eq i32.eqz @@ -7618,7 +7618,7 @@ i32.const 6 i32.const 800 call $~lib/string/String#padEnd - local.tee $27 + local.tee $186 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -7634,7 +7634,7 @@ i32.const 8 i32.const 800 call $~lib/string/String#padEnd - local.tee $28 + local.tee $185 i32.const 1024 call $~lib/string/String.__eq i32.eqz @@ -8057,7 +8057,7 @@ end i32.const 272 call $~lib/string/String#trimStart - local.tee $29 + local.tee $184 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8071,7 +8071,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $30 + local.tee $183 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8085,7 +8085,7 @@ end i32.const 1312 call $~lib/string/String#trimStart - local.tee $31 + local.tee $182 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8099,7 +8099,7 @@ end i32.const 272 call $~lib/string/String#trimEnd - local.tee $32 + local.tee $181 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8113,7 +8113,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $33 + local.tee $180 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8127,7 +8127,7 @@ end i32.const 1312 call $~lib/string/String#trimEnd - local.tee $34 + local.tee $179 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -8141,7 +8141,7 @@ end i32.const 272 call $~lib/string/String#trim - local.tee $35 + local.tee $178 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8155,7 +8155,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $36 + local.tee $177 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8169,7 +8169,7 @@ end i32.const 1312 call $~lib/string/String#trim - local.tee $37 + local.tee $176 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -8613,8 +8613,8 @@ end i32.const 272 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9262,8 +9262,8 @@ end i32.const 4576 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9275,8 +9275,8 @@ end i32.const 4608 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9288,8 +9288,8 @@ end i32.const 4640 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9301,8 +9301,8 @@ end i32.const 4672 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9314,8 +9314,8 @@ end i32.const 4704 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9327,8 +9327,8 @@ end i32.const 4736 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9340,8 +9340,8 @@ end i32.const 4768 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9353,8 +9353,8 @@ end i32.const 4800 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9366,8 +9366,8 @@ end i32.const 4832 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9379,8 +9379,8 @@ end i32.const 4864 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9392,8 +9392,8 @@ end i32.const 4896 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9405,8 +9405,8 @@ end i32.const 4928 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9418,8 +9418,8 @@ end i32.const 4960 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9431,8 +9431,8 @@ end i32.const 4992 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9444,8 +9444,8 @@ end i32.const 5024 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9457,8 +9457,8 @@ end i32.const 5056 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9770,8 +9770,8 @@ end i32.const 6192 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9783,8 +9783,8 @@ end i32.const 6224 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9796,8 +9796,8 @@ end i32.const 6256 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -9846,16 +9846,16 @@ i32.const 6864 i32.const 7024 call $~lib/string/String.__concat - local.tee $38 + local.tee $175 i32.const 7184 call $~lib/string/String.__concat - local.tee $39 + local.tee $174 i32.const 7344 call $~lib/string/String.__concat - local.tee $40 + local.tee $173 i32.const 7504 call $~lib/string/String.__concat - local.tee $41 + local.tee $172 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10157,8 +10157,8 @@ end i32.const 10352 call $~lib/util/string/strtod - local.tee $3 - local.get $3 + local.tee $210 + local.get $210 f64.eq if i32.const 0 @@ -10183,8 +10183,8 @@ i32.const 320 i32.const 10416 call $~lib/string/String.__concat - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10206,7 +10206,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 call $~lib/rt/pure/__release i32.const 272 i32.const 272 @@ -10538,13 +10538,13 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $0 + local.tee $211 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $4 + local.tee $209 i32.const 56322 call $~lib/string/String.fromCodePoint - local.tee $2 + local.tee $0 call $~lib/string/String.__concat local.tee $1 call $~lib/string/String.__gt @@ -10557,11 +10557,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $211 call $~lib/rt/pure/__release - local.get $4 + local.get $209 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -10580,7 +10580,7 @@ i32.const 272 i32.const 100 call $~lib/string/String#repeat - local.tee $42 + local.tee $171 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10595,7 +10595,7 @@ i32.const 320 i32.const 0 call $~lib/string/String#repeat - local.tee $43 + local.tee $170 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10610,7 +10610,7 @@ i32.const 320 i32.const 1 call $~lib/string/String#repeat - local.tee $44 + local.tee $169 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -10625,7 +10625,7 @@ i32.const 320 i32.const 2 call $~lib/string/String#repeat - local.tee $45 + local.tee $168 i32.const 10864 call $~lib/string/String.__eq i32.eqz @@ -10640,7 +10640,7 @@ i32.const 320 i32.const 3 call $~lib/string/String#repeat - local.tee $46 + local.tee $167 i32.const 10944 call $~lib/string/String.__eq i32.eqz @@ -10655,7 +10655,7 @@ i32.const 10448 i32.const 4 call $~lib/string/String#repeat - local.tee $47 + local.tee $166 i32.const 10976 call $~lib/string/String.__eq i32.eqz @@ -10670,7 +10670,7 @@ i32.const 320 i32.const 5 call $~lib/string/String#repeat - local.tee $48 + local.tee $165 i32.const 11008 call $~lib/string/String.__eq i32.eqz @@ -10685,7 +10685,7 @@ i32.const 320 i32.const 6 call $~lib/string/String#repeat - local.tee $49 + local.tee $164 i32.const 11040 call $~lib/string/String.__eq i32.eqz @@ -10700,7 +10700,7 @@ i32.const 320 i32.const 7 call $~lib/string/String#repeat - local.tee $50 + local.tee $163 i32.const 11072 call $~lib/string/String.__eq i32.eqz @@ -10716,7 +10716,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $51 + local.tee $162 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10732,7 +10732,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $52 + local.tee $161 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10748,7 +10748,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replace - local.tee $53 + local.tee $160 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10764,7 +10764,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $54 + local.tee $159 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10780,7 +10780,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $55 + local.tee $158 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10796,7 +10796,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replace - local.tee $56 + local.tee $157 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10812,7 +10812,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replace - local.tee $57 + local.tee $156 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10828,7 +10828,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replace - local.tee $58 + local.tee $155 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10844,7 +10844,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $59 + local.tee $154 i32.const 11136 call $~lib/string/String.__eq i32.eqz @@ -10860,7 +10860,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $60 + local.tee $153 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10876,7 +10876,7 @@ i32.const 11232 i32.const 4576 call $~lib/string/String#replace - local.tee $61 + local.tee $152 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10892,7 +10892,7 @@ i32.const 11264 i32.const 11296 call $~lib/string/String#replace - local.tee $62 + local.tee $151 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -10908,7 +10908,7 @@ i32.const 11264 i32.const 272 call $~lib/string/String#replace - local.tee $63 + local.tee $150 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10924,7 +10924,7 @@ i32.const 272 i32.const 800 call $~lib/string/String#replaceAll - local.tee $64 + local.tee $149 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10940,7 +10940,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $65 + local.tee $148 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10956,7 +10956,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $66 + local.tee $147 i32.const 11296 call $~lib/string/String.__eq i32.eqz @@ -10972,7 +10972,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $67 + local.tee $146 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -10988,7 +10988,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replaceAll - local.tee $68 + local.tee $145 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -11004,7 +11004,7 @@ i32.const 320 i32.const 11408 call $~lib/string/String#replaceAll - local.tee $69 + local.tee $144 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -11020,7 +11020,7 @@ i32.const 10448 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $70 + local.tee $143 i32.const 11520 call $~lib/string/String.__eq i32.eqz @@ -11036,7 +11036,7 @@ i32.const 11584 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $71 + local.tee $142 i32.const 11616 call $~lib/string/String.__eq i32.eqz @@ -11052,7 +11052,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $72 + local.tee $141 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11068,7 +11068,7 @@ i32.const 11648 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $73 + local.tee $140 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11084,7 +11084,7 @@ i32.const 11680 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $74 + local.tee $139 i32.const 11712 call $~lib/string/String.__eq i32.eqz @@ -11100,7 +11100,7 @@ i32.const 10448 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $75 + local.tee $138 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11116,7 +11116,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $76 + local.tee $137 i32.const 11744 call $~lib/string/String.__eq i32.eqz @@ -11132,7 +11132,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $77 + local.tee $136 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11148,7 +11148,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $78 + local.tee $135 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11164,7 +11164,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replaceAll - local.tee $79 + local.tee $134 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11180,7 +11180,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $80 + local.tee $133 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11196,7 +11196,7 @@ i32.const 800 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $81 + local.tee $132 i32.const 4608 call $~lib/string/String.__eq i32.eqz @@ -11212,7 +11212,7 @@ i32.const 1216 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $82 + local.tee $131 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11228,7 +11228,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $83 + local.tee $130 i32.const 11776 call $~lib/string/String.__eq i32.eqz @@ -11244,7 +11244,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $84 + local.tee $129 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11264,7 +11264,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $85 + local.tee $128 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11280,7 +11280,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $86 + local.tee $127 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11296,7 +11296,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $87 + local.tee $126 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11312,7 +11312,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $88 + local.tee $125 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11328,7 +11328,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#slice - local.tee $89 + local.tee $124 i32.const 11952 call $~lib/string/String.__eq i32.eqz @@ -11344,7 +11344,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $90 + local.tee $123 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11360,7 +11360,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $91 + local.tee $122 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -11376,7 +11376,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $92 + local.tee $121 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11392,7 +11392,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $93 + local.tee $120 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11408,7 +11408,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $94 + local.tee $119 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11424,7 +11424,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $95 + local.tee $118 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -11440,7 +11440,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $96 + local.tee $117 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11456,7 +11456,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $97 + local.tee $116 i32.const 12064 call $~lib/string/String.__eq i32.eqz @@ -11472,7 +11472,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $98 + local.tee $115 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11488,7 +11488,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $99 + local.tee $114 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11504,7 +11504,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $100 + local.tee $113 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -11520,7 +11520,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $101 + local.tee $112 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11536,7 +11536,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $102 + local.tee $111 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11552,7 +11552,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $103 + local.tee $110 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11568,7 +11568,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $104 + local.tee $109 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11584,7 +11584,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $105 + local.tee $108 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11600,7 +11600,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $106 + local.tee $107 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11616,7 +11616,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $107 + local.tee $106 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -11632,7 +11632,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $108 + local.tee $105 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11648,7 +11648,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $109 + local.tee $104 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11664,7 +11664,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $110 + local.tee $103 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11680,7 +11680,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $111 + local.tee $102 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11696,25 +11696,25 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#split - local.tee $4 + local.tee $209 i32.load offset=12 i32.const 1 i32.eq if - local.get $4 + local.get $209 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 272 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -11728,10 +11728,10 @@ i32.const 272 i32.const 2147483647 call $~lib/string/String#split - local.set $2 - local.get $4 + local.set $0 + local.get $209 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.load offset=12 if i32.const 0 @@ -11745,27 +11745,27 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 272 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -11779,27 +11779,27 @@ i32.const 4768 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 12384 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -11813,57 +11813,57 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -11877,57 +11877,57 @@ i32.const 12448 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -11941,72 +11941,72 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 4 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 272 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12020,72 +12020,72 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 4 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 272 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12099,72 +12099,72 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 4 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 272 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12179,7 +12179,7 @@ i32.const 2147483647 call $~lib/string/String#split local.set $1 - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -12189,47 +12189,47 @@ local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12243,10 +12243,10 @@ i32.const 272 i32.const 0 call $~lib/string/String#split - local.set $2 + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.load offset=12 if i32.const 0 @@ -12260,27 +12260,27 @@ i32.const 272 i32.const 1 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12294,27 +12294,27 @@ i32.const 1056 i32.const 1 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 1 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12328,57 +12328,57 @@ i32.const 272 i32.const 4 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12392,57 +12392,57 @@ i32.const 272 i32.const -1 call $~lib/string/String#split - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 3 i32.eq if - local.get $2 + local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 320 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 10416 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if - local.get $2 + local.get $0 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get local.tee $1 i32.const 11264 call $~lib/string/String.__eq - local.set $0 + local.set $211 local.get $1 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12457,7 +12457,7 @@ i32.const -1 call $~lib/string/String#split local.set $1 - local.get $2 + local.get $0 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -12467,47 +12467,47 @@ local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 if local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $2 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $0 - local.get $2 + local.set $211 + local.get $0 call $~lib/rt/pure/__release else i32.const 0 - local.set $0 + local.set $211 end - local.get $0 + local.get $211 i32.eqz if i32.const 0 @@ -12521,7 +12521,7 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/util/number/itoa32 - local.tee $112 + local.tee $101 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12535,7 +12535,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $113 + local.tee $100 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -12549,7 +12549,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $114 + local.tee $99 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -12563,7 +12563,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $115 + local.tee $98 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12577,7 +12577,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $116 + local.tee $97 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12591,7 +12591,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $117 + local.tee $96 i32.const 12640 call $~lib/string/String.__eq i32.eqz @@ -12605,7 +12605,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $118 + local.tee $95 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12619,7 +12619,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $119 + local.tee $94 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12633,7 +12633,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $120 + local.tee $93 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12647,7 +12647,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $121 + local.tee $92 i32.const 12768 call $~lib/string/String.__eq i32.eqz @@ -12661,7 +12661,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $122 + local.tee $91 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12675,7 +12675,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $123 + local.tee $90 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -12689,7 +12689,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $124 + local.tee $89 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -12703,7 +12703,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $125 + local.tee $88 i32.const 12912 call $~lib/string/String.__eq i32.eqz @@ -12717,7 +12717,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $126 + local.tee $87 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12731,7 +12731,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $127 + local.tee $86 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -12745,7 +12745,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $128 + local.tee $85 i32.const 13056 call $~lib/string/String.__eq i32.eqz @@ -12759,7 +12759,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $129 + local.tee $84 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12773,7 +12773,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $130 + local.tee $83 i32.const 13088 call $~lib/string/String.__eq i32.eqz @@ -12787,7 +12787,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $131 + local.tee $82 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12801,7 +12801,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $132 + local.tee $81 i32.const 13120 call $~lib/string/String.__eq i32.eqz @@ -12815,7 +12815,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $133 + local.tee $80 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12829,7 +12829,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $134 + local.tee $79 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12843,7 +12843,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $135 + local.tee $78 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12857,7 +12857,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $136 + local.tee $77 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12871,7 +12871,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $137 + local.tee $76 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12885,7 +12885,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $138 + local.tee $75 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12899,7 +12899,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $139 + local.tee $74 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12913,7 +12913,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $140 + local.tee $73 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12927,7 +12927,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $141 + local.tee $72 i32.const 13216 call $~lib/string/String.__eq i32.eqz @@ -12941,7 +12941,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $142 + local.tee $71 i32.const 13248 call $~lib/string/String.__eq i32.eqz @@ -12955,7 +12955,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $143 + local.tee $70 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12969,7 +12969,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $144 + local.tee $69 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -12983,7 +12983,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $145 + local.tee $68 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -12997,7 +12997,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $146 + local.tee $67 i32.const 13392 call $~lib/string/String.__eq i32.eqz @@ -13011,7 +13011,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $147 + local.tee $66 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -13025,7 +13025,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $148 + local.tee $65 i32.const 13488 call $~lib/string/String.__eq i32.eqz @@ -13039,7 +13039,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $149 + local.tee $64 i32.const 13536 call $~lib/string/String.__eq i32.eqz @@ -13053,7 +13053,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $150 + local.tee $63 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -13067,7 +13067,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $151 + local.tee $62 i32.const 13632 call $~lib/string/String.__eq i32.eqz @@ -13081,7 +13081,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $152 + local.tee $61 i32.const 13696 call $~lib/string/String.__eq i32.eqz @@ -13095,7 +13095,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $153 + local.tee $60 i32.const 13760 call $~lib/string/String.__eq i32.eqz @@ -13109,7 +13109,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $154 + local.tee $59 i32.const 13824 call $~lib/string/String.__eq i32.eqz @@ -13123,7 +13123,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $155 + local.tee $58 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13137,7 +13137,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $156 + local.tee $57 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -13151,7 +13151,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $157 + local.tee $56 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13165,7 +13165,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $158 + local.tee $55 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13179,7 +13179,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $159 + local.tee $54 i32.const 13920 call $~lib/string/String.__eq i32.eqz @@ -13193,7 +13193,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $160 + local.tee $53 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13207,7 +13207,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $161 + local.tee $52 i32.const 13968 call $~lib/string/String.__eq i32.eqz @@ -13221,7 +13221,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $162 + local.tee $51 i32.const 14016 call $~lib/string/String.__eq i32.eqz @@ -13235,7 +13235,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $163 + local.tee $50 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -13249,7 +13249,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $164 + local.tee $49 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -13263,7 +13263,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $165 + local.tee $48 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -13277,7 +13277,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $166 + local.tee $47 i32.const 14240 call $~lib/string/String.__eq i32.eqz @@ -13291,7 +13291,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $167 + local.tee $46 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13305,7 +13305,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $168 + local.tee $45 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13319,7 +13319,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $169 + local.tee $44 i32.const 4832 call $~lib/string/String.__eq i32.eqz @@ -13333,7 +13333,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $170 + local.tee $43 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13347,7 +13347,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $171 + local.tee $42 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13361,7 +13361,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $172 + local.tee $41 i32.const 5344 call $~lib/string/String.__eq i32.eqz @@ -13375,7 +13375,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $173 + local.tee $40 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -13389,7 +13389,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $174 + local.tee $39 i32.const 5408 call $~lib/string/String.__eq i32.eqz @@ -13403,7 +13403,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $175 + local.tee $38 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -13417,7 +13417,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $176 + local.tee $37 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -13431,7 +13431,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $177 + local.tee $36 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -13445,7 +13445,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $178 + local.tee $35 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -13459,7 +13459,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $179 + local.tee $34 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -13473,7 +13473,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $180 + local.tee $33 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -13487,7 +13487,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $181 + local.tee $32 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -13501,7 +13501,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $182 + local.tee $31 i32.const 5472 call $~lib/string/String.__eq i32.eqz @@ -13515,7 +13515,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $183 + local.tee $30 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13529,7 +13529,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $184 + local.tee $29 i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -13543,7 +13543,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $185 + local.tee $28 i32.const 15872 call $~lib/string/String.__eq i32.eqz @@ -13557,7 +13557,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $186 + local.tee $27 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -13571,7 +13571,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $187 + local.tee $26 i32.const 15936 call $~lib/string/String.__eq i32.eqz @@ -13585,7 +13585,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $188 + local.tee $25 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -13599,7 +13599,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $189 + local.tee $24 i32.const 16016 call $~lib/string/String.__eq i32.eqz @@ -13613,7 +13613,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $190 + local.tee $23 i32.const 16064 call $~lib/string/String.__eq i32.eqz @@ -13627,7 +13627,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $191 + local.tee $22 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -13641,7 +13641,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $192 + local.tee $21 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -13655,7 +13655,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $193 + local.tee $20 i32.const 2704 call $~lib/string/String.__eq i32.eqz @@ -13669,7 +13669,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $194 + local.tee $19 i32.const 16192 call $~lib/string/String.__eq i32.eqz @@ -13683,7 +13683,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $195 + local.tee $18 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13697,7 +13697,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $196 + local.tee $17 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13711,7 +13711,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $197 + local.tee $16 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -13725,7 +13725,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $198 + local.tee $15 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -13739,7 +13739,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $199 + local.tee $14 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -13753,7 +13753,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $200 + local.tee $13 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -13767,7 +13767,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $201 + local.tee $12 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13781,7 +13781,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $202 + local.tee $11 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -13795,7 +13795,7 @@ end f64.const 1.2312145673456234e-08 call $~lib/util/number/dtoa - local.tee $203 + local.tee $10 i32.const 16400 call $~lib/string/String.__eq i32.eqz @@ -13809,7 +13809,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $204 + local.tee $9 i32.const 16464 call $~lib/string/String.__eq i32.eqz @@ -13823,7 +13823,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $205 + local.tee $8 i32.const 16528 call $~lib/string/String.__eq i32.eqz @@ -13837,7 +13837,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $206 + local.tee $7 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13851,7 +13851,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $207 + local.tee $6 i32.const 16592 call $~lib/string/String.__eq i32.eqz @@ -13865,7 +13865,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $208 + local.tee $5 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13879,7 +13879,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $209 + local.tee $4 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -13893,7 +13893,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $210 + local.tee $3 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13907,7 +13907,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $211 + local.tee $2 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -13921,7 +13921,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $5 + local.tee $208 i32.const 16832 call $~lib/string/String.__eq i32.eqz @@ -13935,7 +13935,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - local.tee $0 + local.tee $211 i32.const 16880 call $~lib/string/String.__eq i32.eqz @@ -13949,7 +13949,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - local.tee $4 + local.tee $209 i32.const 16912 call $~lib/string/String.__eq i32.eqz @@ -13963,7 +13963,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - local.tee $2 + local.tee $0 i32.const 16944 call $~lib/string/String.__eq i32.eqz @@ -13991,426 +13991,426 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $6 + local.get $207 call $~lib/rt/pure/__release - local.get $7 + local.get $206 call $~lib/rt/pure/__release - local.get $8 + local.get $205 call $~lib/rt/pure/__release - local.get $9 + local.get $204 call $~lib/rt/pure/__release - local.get $10 + local.get $203 call $~lib/rt/pure/__release - local.get $11 + local.get $202 call $~lib/rt/pure/__release - local.get $12 + local.get $201 call $~lib/rt/pure/__release - local.get $13 + local.get $200 call $~lib/rt/pure/__release - local.get $14 + local.get $199 call $~lib/rt/pure/__release - local.get $15 + local.get $198 call $~lib/rt/pure/__release - local.get $16 + local.get $197 call $~lib/rt/pure/__release - local.get $17 + local.get $196 call $~lib/rt/pure/__release - local.get $18 + local.get $195 call $~lib/rt/pure/__release - local.get $19 + local.get $194 call $~lib/rt/pure/__release - local.get $20 + local.get $193 call $~lib/rt/pure/__release - local.get $21 + local.get $192 call $~lib/rt/pure/__release - local.get $22 + local.get $191 call $~lib/rt/pure/__release - local.get $23 + local.get $190 call $~lib/rt/pure/__release - local.get $24 + local.get $189 call $~lib/rt/pure/__release - local.get $25 + local.get $188 call $~lib/rt/pure/__release - local.get $26 + local.get $187 call $~lib/rt/pure/__release - local.get $27 + local.get $186 call $~lib/rt/pure/__release - local.get $28 + local.get $185 call $~lib/rt/pure/__release - local.get $29 + local.get $184 call $~lib/rt/pure/__release - local.get $30 + local.get $183 call $~lib/rt/pure/__release - local.get $31 + local.get $182 call $~lib/rt/pure/__release - local.get $32 + local.get $181 call $~lib/rt/pure/__release - local.get $33 + local.get $180 call $~lib/rt/pure/__release - local.get $34 + local.get $179 call $~lib/rt/pure/__release - local.get $35 + local.get $178 call $~lib/rt/pure/__release - local.get $36 + local.get $177 call $~lib/rt/pure/__release - local.get $37 + local.get $176 call $~lib/rt/pure/__release - local.get $38 + local.get $175 call $~lib/rt/pure/__release - local.get $39 + local.get $174 call $~lib/rt/pure/__release - local.get $40 + local.get $173 call $~lib/rt/pure/__release - local.get $41 + local.get $172 call $~lib/rt/pure/__release - local.get $45 + local.get $168 call $~lib/rt/pure/__release - local.get $46 + local.get $167 call $~lib/rt/pure/__release - local.get $44 + local.get $169 call $~lib/rt/pure/__release - local.get $43 + local.get $170 call $~lib/rt/pure/__release - local.get $42 + local.get $171 call $~lib/rt/pure/__release - local.get $47 + local.get $166 call $~lib/rt/pure/__release - local.get $48 + local.get $165 call $~lib/rt/pure/__release - local.get $49 + local.get $164 call $~lib/rt/pure/__release - local.get $50 + local.get $163 call $~lib/rt/pure/__release - local.get $51 + local.get $162 call $~lib/rt/pure/__release - local.get $52 + local.get $161 call $~lib/rt/pure/__release - local.get $53 + local.get $160 call $~lib/rt/pure/__release - local.get $54 + local.get $159 call $~lib/rt/pure/__release - local.get $55 + local.get $158 call $~lib/rt/pure/__release - local.get $56 + local.get $157 call $~lib/rt/pure/__release - local.get $57 + local.get $156 call $~lib/rt/pure/__release - local.get $58 + local.get $155 call $~lib/rt/pure/__release - local.get $59 + local.get $154 call $~lib/rt/pure/__release - local.get $60 + local.get $153 call $~lib/rt/pure/__release - local.get $61 + local.get $152 call $~lib/rt/pure/__release - local.get $62 + local.get $151 call $~lib/rt/pure/__release - local.get $63 + local.get $150 call $~lib/rt/pure/__release - local.get $64 + local.get $149 call $~lib/rt/pure/__release - local.get $65 + local.get $148 call $~lib/rt/pure/__release - local.get $66 + local.get $147 call $~lib/rt/pure/__release - local.get $67 + local.get $146 call $~lib/rt/pure/__release - local.get $68 + local.get $145 call $~lib/rt/pure/__release - local.get $69 + local.get $144 call $~lib/rt/pure/__release - local.get $70 + local.get $143 call $~lib/rt/pure/__release - local.get $71 + local.get $142 call $~lib/rt/pure/__release - local.get $72 + local.get $141 call $~lib/rt/pure/__release - local.get $73 + local.get $140 call $~lib/rt/pure/__release - local.get $74 + local.get $139 call $~lib/rt/pure/__release - local.get $75 + local.get $138 call $~lib/rt/pure/__release - local.get $76 + local.get $137 call $~lib/rt/pure/__release - local.get $77 + local.get $136 call $~lib/rt/pure/__release - local.get $78 + local.get $135 call $~lib/rt/pure/__release - local.get $79 + local.get $134 call $~lib/rt/pure/__release - local.get $80 + local.get $133 call $~lib/rt/pure/__release - local.get $81 + local.get $132 call $~lib/rt/pure/__release - local.get $82 + local.get $131 call $~lib/rt/pure/__release - local.get $83 + local.get $130 call $~lib/rt/pure/__release - local.get $84 + local.get $129 call $~lib/rt/pure/__release - local.get $85 + local.get $128 call $~lib/rt/pure/__release - local.get $86 + local.get $127 call $~lib/rt/pure/__release - local.get $87 + local.get $126 call $~lib/rt/pure/__release - local.get $88 + local.get $125 call $~lib/rt/pure/__release - local.get $89 + local.get $124 call $~lib/rt/pure/__release - local.get $90 + local.get $123 call $~lib/rt/pure/__release - local.get $91 + local.get $122 call $~lib/rt/pure/__release - local.get $92 + local.get $121 call $~lib/rt/pure/__release - local.get $93 + local.get $120 call $~lib/rt/pure/__release - local.get $94 + local.get $119 call $~lib/rt/pure/__release - local.get $95 + local.get $118 call $~lib/rt/pure/__release - local.get $96 + local.get $117 call $~lib/rt/pure/__release - local.get $97 + local.get $116 call $~lib/rt/pure/__release - local.get $98 + local.get $115 call $~lib/rt/pure/__release - local.get $99 + local.get $114 call $~lib/rt/pure/__release - local.get $100 + local.get $113 call $~lib/rt/pure/__release - local.get $101 + local.get $112 call $~lib/rt/pure/__release - local.get $102 + local.get $111 call $~lib/rt/pure/__release - local.get $103 + local.get $110 call $~lib/rt/pure/__release - local.get $104 + local.get $109 call $~lib/rt/pure/__release - local.get $105 + local.get $108 + call $~lib/rt/pure/__release + local.get $107 call $~lib/rt/pure/__release local.get $106 call $~lib/rt/pure/__release - local.get $107 + local.get $105 call $~lib/rt/pure/__release - local.get $108 + local.get $104 call $~lib/rt/pure/__release - local.get $109 + local.get $103 call $~lib/rt/pure/__release - local.get $110 + local.get $102 call $~lib/rt/pure/__release - local.get $111 + local.get $101 call $~lib/rt/pure/__release - local.get $112 + local.get $99 call $~lib/rt/pure/__release - local.get $114 + local.get $100 call $~lib/rt/pure/__release - local.get $113 + local.get $98 call $~lib/rt/pure/__release - local.get $115 + local.get $97 call $~lib/rt/pure/__release - local.get $116 + local.get $96 call $~lib/rt/pure/__release - local.get $117 + local.get $95 call $~lib/rt/pure/__release - local.get $118 + local.get $94 call $~lib/rt/pure/__release - local.get $119 + local.get $93 call $~lib/rt/pure/__release - local.get $120 + local.get $92 call $~lib/rt/pure/__release - local.get $121 + local.get $91 call $~lib/rt/pure/__release - local.get $122 + local.get $90 call $~lib/rt/pure/__release - local.get $123 + local.get $89 call $~lib/rt/pure/__release - local.get $124 + local.get $88 call $~lib/rt/pure/__release - local.get $125 + local.get $87 call $~lib/rt/pure/__release - local.get $126 + local.get $86 call $~lib/rt/pure/__release - local.get $127 + local.get $85 call $~lib/rt/pure/__release - local.get $128 + local.get $84 call $~lib/rt/pure/__release - local.get $129 + local.get $83 call $~lib/rt/pure/__release - local.get $130 + local.get $82 call $~lib/rt/pure/__release - local.get $131 + local.get $81 call $~lib/rt/pure/__release - local.get $132 + local.get $80 call $~lib/rt/pure/__release - local.get $133 + local.get $79 call $~lib/rt/pure/__release - local.get $134 + local.get $78 call $~lib/rt/pure/__release - local.get $135 + local.get $77 call $~lib/rt/pure/__release - local.get $136 + local.get $76 call $~lib/rt/pure/__release - local.get $137 + local.get $75 call $~lib/rt/pure/__release - local.get $138 + local.get $74 call $~lib/rt/pure/__release - local.get $139 + local.get $73 call $~lib/rt/pure/__release - local.get $140 + local.get $72 call $~lib/rt/pure/__release - local.get $141 + local.get $71 call $~lib/rt/pure/__release - local.get $142 + local.get $70 call $~lib/rt/pure/__release - local.get $143 + local.get $69 call $~lib/rt/pure/__release - local.get $144 + local.get $68 call $~lib/rt/pure/__release - local.get $145 + local.get $67 call $~lib/rt/pure/__release - local.get $146 + local.get $66 call $~lib/rt/pure/__release - local.get $147 + local.get $65 call $~lib/rt/pure/__release - local.get $148 + local.get $64 call $~lib/rt/pure/__release - local.get $149 + local.get $63 call $~lib/rt/pure/__release - local.get $150 + local.get $62 call $~lib/rt/pure/__release - local.get $151 + local.get $61 call $~lib/rt/pure/__release - local.get $152 + local.get $60 call $~lib/rt/pure/__release - local.get $153 + local.get $59 call $~lib/rt/pure/__release - local.get $154 + local.get $58 call $~lib/rt/pure/__release - local.get $155 + local.get $57 call $~lib/rt/pure/__release - local.get $156 + local.get $56 call $~lib/rt/pure/__release - local.get $157 + local.get $55 call $~lib/rt/pure/__release - local.get $158 + local.get $54 call $~lib/rt/pure/__release - local.get $159 + local.get $53 call $~lib/rt/pure/__release - local.get $160 + local.get $52 call $~lib/rt/pure/__release - local.get $161 + local.get $51 call $~lib/rt/pure/__release - local.get $162 + local.get $50 call $~lib/rt/pure/__release - local.get $163 + local.get $49 call $~lib/rt/pure/__release - local.get $164 + local.get $48 call $~lib/rt/pure/__release - local.get $165 + local.get $47 call $~lib/rt/pure/__release - local.get $166 + local.get $46 call $~lib/rt/pure/__release - local.get $167 + local.get $45 call $~lib/rt/pure/__release - local.get $168 + local.get $44 call $~lib/rt/pure/__release - local.get $169 + local.get $43 call $~lib/rt/pure/__release - local.get $170 + local.get $42 call $~lib/rt/pure/__release - local.get $171 + local.get $41 call $~lib/rt/pure/__release - local.get $172 + local.get $40 call $~lib/rt/pure/__release - local.get $173 + local.get $39 call $~lib/rt/pure/__release - local.get $174 + local.get $38 call $~lib/rt/pure/__release - local.get $175 + local.get $37 call $~lib/rt/pure/__release - local.get $176 + local.get $36 call $~lib/rt/pure/__release - local.get $177 + local.get $35 call $~lib/rt/pure/__release - local.get $178 + local.get $34 call $~lib/rt/pure/__release - local.get $179 + local.get $33 call $~lib/rt/pure/__release - local.get $180 + local.get $32 call $~lib/rt/pure/__release - local.get $181 + local.get $31 call $~lib/rt/pure/__release - local.get $182 + local.get $30 call $~lib/rt/pure/__release - local.get $183 + local.get $29 call $~lib/rt/pure/__release - local.get $184 + local.get $28 call $~lib/rt/pure/__release - local.get $185 + local.get $27 call $~lib/rt/pure/__release - local.get $186 + local.get $26 call $~lib/rt/pure/__release - local.get $187 + local.get $25 call $~lib/rt/pure/__release - local.get $188 + local.get $24 call $~lib/rt/pure/__release - local.get $189 + local.get $23 call $~lib/rt/pure/__release - local.get $190 + local.get $22 call $~lib/rt/pure/__release - local.get $191 + local.get $21 call $~lib/rt/pure/__release - local.get $192 + local.get $20 call $~lib/rt/pure/__release - local.get $193 + local.get $19 call $~lib/rt/pure/__release - local.get $194 + local.get $18 call $~lib/rt/pure/__release - local.get $195 + local.get $17 call $~lib/rt/pure/__release - local.get $196 + local.get $16 call $~lib/rt/pure/__release - local.get $197 + local.get $15 call $~lib/rt/pure/__release - local.get $198 + local.get $14 call $~lib/rt/pure/__release - local.get $199 + local.get $13 call $~lib/rt/pure/__release - local.get $200 + local.get $12 call $~lib/rt/pure/__release - local.get $201 + local.get $11 call $~lib/rt/pure/__release - local.get $202 + local.get $10 call $~lib/rt/pure/__release - local.get $203 + local.get $9 call $~lib/rt/pure/__release - local.get $204 + local.get $8 call $~lib/rt/pure/__release - local.get $205 + local.get $7 call $~lib/rt/pure/__release - local.get $206 + local.get $6 call $~lib/rt/pure/__release - local.get $207 + local.get $5 call $~lib/rt/pure/__release - local.get $208 + local.get $4 call $~lib/rt/pure/__release - local.get $209 + local.get $3 call $~lib/rt/pure/__release - local.get $210 + local.get $2 + call $~lib/rt/pure/__release + local.get $208 call $~lib/rt/pure/__release local.get $211 call $~lib/rt/pure/__release - local.get $5 + local.get $209 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 6055d65efe..1d10307b22 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -426,13 +426,13 @@ (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $1 + local.set $2 local.get $0 - local.tee $2 + local.tee $1 if i32.const 0 local.set $0 - local.get $2 + local.get $1 call $~lib/string/String#get:length i32.const 1 i32.shl @@ -442,15 +442,15 @@ local.get $3 i32.lt_u if - local.get $1 - local.get $0 local.get $2 + local.get $0 + local.get $1 i32.add i32.load8_u i32.xor i32.const 16777619 i32.mul - local.set $1 + local.set $2 local.get $0 i32.const 1 i32.add @@ -459,7 +459,7 @@ end end end - local.get $1 + local.get $2 ) (func $~lib/util/string/compareImpl (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -1230,7 +1230,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -1252,32 +1252,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -1285,10 +1285,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -1302,7 +1302,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -1310,18 +1310,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -1336,22 +1336,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -1359,18 +1359,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -1379,16 +1379,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 2b3da4fbe1..d979f4bd0c 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -770,16 +770,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -791,18 +791,18 @@ unreachable end i32.const 7392 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 8960 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 7392 @@ -817,7 +817,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -834,10 +834,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -850,7 +850,7 @@ i32.const 7392 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) local.get $0 @@ -2397,73 +2397,73 @@ (local $5 f64) (local $6 i32) loop $for-loop|0 - local.get $3 + local.get $6 local.get $1 i32.lt_s if local.get $0 - local.get $3 + local.get $6 i32.const 3 i32.shl i32.add f64.load - local.set $4 - local.get $3 + local.set $5 + local.get $6 i32.const 1 i32.sub - local.set $2 + local.set $3 loop $while-continue|1 - local.get $2 + local.get $3 i32.const 0 i32.ge_s if block $while-break|1 local.get $0 - local.get $2 + local.get $3 i32.const 3 i32.shl i32.add f64.load - local.set $5 + local.set $4 i32.const 2 global.set $~argumentsLength - local.get $4 local.get $5 + local.get $4 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.ge_s br_if $while-break|1 - local.get $2 - local.tee $6 + local.get $3 + local.tee $2 i32.const 1 i32.sub - local.set $2 + local.set $3 local.get $0 - local.get $6 + local.get $2 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $5 + local.get $4 f64.store br $while-continue|1 end end end local.get $0 - local.get $2 + local.get $3 i32.const 1 i32.add i32.const 3 i32.shl i32.add - local.get $4 + local.get $5 f64.store - local.get $3 + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|0 end end @@ -2979,7 +2979,7 @@ (local $4 i32) block $~lib/util/memory/memmove|inlined.0 local.get $2 - local.set $3 + local.set $4 local.get $0 local.get $1 i32.eq @@ -3001,32 +3001,32 @@ i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $0 local.tee $2 i32.const 1 i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 br $while-continue|0 end end loop $while-continue|1 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if @@ -3034,10 +3034,10 @@ local.get $1 i64.load i64.store - local.get $3 + local.get $4 i32.const 8 i32.sub - local.set $3 + local.set $4 local.get $0 i32.const 8 i32.add @@ -3051,7 +3051,7 @@ end end loop $while-continue|2 - local.get $3 + local.get $4 if local.get $0 local.tee $2 @@ -3059,18 +3059,18 @@ i32.add local.set $0 local.get $1 - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $1 local.get $2 - local.get $4 + local.get $3 i32.load8_u i32.store8 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.set $3 + local.set $4 br $while-continue|2 end end @@ -3085,22 +3085,22 @@ if loop $while-continue|3 local.get $0 - local.get $3 + local.get $4 i32.add i32.const 7 i32.and if - local.get $3 + local.get $4 i32.eqz br_if $~lib/util/memory/memmove|inlined.0 - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -3108,18 +3108,18 @@ end end loop $while-continue|4 - local.get $3 + local.get $4 i32.const 8 i32.ge_u if - local.get $3 + local.get $4 i32.const 8 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i64.load i64.store @@ -3128,16 +3128,16 @@ end end loop $while-continue|5 - local.get $3 + local.get $4 if - local.get $3 + local.get $4 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $0 i32.add local.get $1 - local.get $3 + local.get $4 i32.add i32.load8_u i32.store8 @@ -3271,14 +3271,14 @@ (local $4 i32) local.get $0 i32.load offset=8 - local.set $3 - local.get $0 local.set $4 + local.get $0 + local.set $3 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc local.tee $0 - local.get $4 + local.get $3 i32.load call $~lib/rt/pure/__retain i32.store @@ -3288,7 +3288,7 @@ i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add local.tee $1 i32.const 0 @@ -3298,14 +3298,14 @@ select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end local.tee $1 - local.get $4 + local.get $3 i32.load offset=4 i32.add i32.store offset=4 @@ -3315,7 +3315,7 @@ i32.lt_s if (result i32) local.get $2 - local.get $3 + local.get $4 i32.add local.tee $2 i32.const 0 @@ -3325,9 +3325,9 @@ select else local.get $2 - local.get $3 + local.get $4 local.get $2 - local.get $3 + local.get $4 i32.lt_s select end @@ -3348,13 +3348,13 @@ (local $5 i32) (local $6 i32) local.get $1 - local.set $5 + local.set $4 local.get $0 call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 i32.load offset=4 local.set $6 - local.get $4 + local.get $5 i32.load offset=8 i32.const 2 i32.shr_u @@ -3413,7 +3413,7 @@ i32.const 2 i32.shl i32.add - local.get $5 + local.get $4 i32.store local.get $0 i32.const 1 @@ -3422,7 +3422,7 @@ br $for-loop|0 end end - local.get $4 + local.get $5 ) (func $~lib/array/Array#__unchecked_get (; 56 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -4413,17 +4413,17 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $6 + local.tee $1 i32.load offset=8 - local.set $3 + local.set $4 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $3 + local.set $3 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $7 @@ -4431,25 +4431,25 @@ local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $7 i32.add i32.load8_s - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 local.get $6 + local.get $0 + local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 if local.get $2 - local.get $4 - i32.add local.get $5 + i32.add + local.get $6 i32.store8 local.get $2 i32.const 1 @@ -4463,20 +4463,20 @@ br $for-loop|0 end end - local.get $1 - local.get $4 + local.get $3 + local.get $5 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 + local.get $3 local.get $0 i32.store offset=4 - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 93 ;) @@ -4588,17 +4588,17 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $6 + local.tee $1 i32.load offset=8 - local.set $3 + local.set $4 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $3 + local.set $3 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $7 @@ -4606,25 +4606,25 @@ local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $7 i32.add i32.load8_u - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 local.get $6 + local.get $0 + local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $2 - local.get $4 - i32.add local.get $5 + i32.add + local.get $6 i32.store8 local.get $2 i32.const 1 @@ -4638,20 +4638,20 @@ br $for-loop|0 end end - local.get $1 - local.get $4 + local.get $3 + local.get $5 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 + local.get $3 local.get $0 i32.store offset=4 - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 96 ;) @@ -4756,17 +4756,17 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $6 + local.tee $1 i32.load offset=8 - local.set $3 + local.set $4 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $1 - local.get $3 + local.set $3 + local.get $4 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $7 @@ -4774,25 +4774,25 @@ local.set $0 loop $for-loop|0 local.get $0 - local.get $3 + local.get $4 i32.lt_s if local.get $0 local.get $7 i32.add i32.load8_u - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 local.get $6 + local.get $0 + local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $2 - local.get $4 - i32.add local.get $5 + i32.add + local.get $6 i32.store8 local.get $2 i32.const 1 @@ -4806,20 +4806,20 @@ br $for-loop|0 end end - local.get $1 - local.get $4 + local.get $3 + local.get $5 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $1 + local.get $3 local.get $2 i32.store offset=8 - local.get $1 + local.get $3 local.get $0 i32.store offset=4 - local.get $1 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 98 ;) @@ -4933,81 +4933,81 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $6 + local.tee $1 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $1 + local.set $3 + local.get $2 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $7 i32.const 0 local.set $0 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $4 + local.get $2 i32.lt_s if local.get $7 - local.get $3 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_s - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $3 local.get $6 + local.get $4 + local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 if - local.get $4 + local.get $5 local.get $0 i32.const 1 i32.shl i32.add - local.get $5 + local.get $6 i32.store16 local.get $0 i32.const 1 i32.add local.set $0 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $3 + local.get $5 local.get $0 i32.const 1 i32.shl - local.tee $1 + local.tee $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $3 local.get $2 - local.get $1 i32.store offset=8 - local.get $2 + local.get $3 local.get $0 i32.store offset=4 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 101 ;) @@ -5121,81 +5121,81 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $6 + local.tee $1 i32.load offset=8 i32.const 1 i32.shr_u - local.set $1 + local.set $2 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $1 + local.set $3 + local.get $2 i32.const 1 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $7 i32.const 0 local.set $0 loop $for-loop|0 - local.get $3 - local.get $1 + local.get $4 + local.get $2 i32.lt_s if local.get $7 - local.get $3 + local.get $4 i32.const 1 i32.shl i32.add i32.load16_u - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $3 local.get $6 + local.get $4 + local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 if - local.get $4 + local.get $5 local.get $0 i32.const 1 i32.shl i32.add - local.get $5 + local.get $6 i32.store16 local.get $0 i32.const 1 i32.add local.set $0 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $3 + local.get $5 local.get $0 i32.const 1 i32.shl - local.tee $1 + local.tee $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store + local.get $3 local.get $2 - local.get $1 i32.store offset=8 - local.get $2 + local.get $3 local.get $0 i32.store offset=4 - local.get $2 + local.get $3 call $~lib/rt/pure/__retain ) (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 104 ;) @@ -8972,37 +8972,37 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -9012,19 +9012,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 1 i32.shl @@ -9253,37 +9253,37 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 1 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -9293,19 +9293,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 1 i32.shl @@ -9672,37 +9672,37 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -9712,19 +9712,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 2 i32.shl @@ -9941,37 +9941,37 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -9981,19 +9981,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 3 i32.shl @@ -10155,37 +10155,37 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -10195,19 +10195,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 3 i32.shl @@ -10427,37 +10427,37 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 + local.set $3 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.tee $4 + local.tee $2 local.get $0 i32.load call $~lib/rt/pure/__retain i32.store - local.get $4 + local.get $2 local.get $0 i32.load offset=4 i32.const 4 - local.get $2 + local.get $3 i32.const 4 - local.get $2 + local.get $3 i32.lt_s select - local.tee $3 + local.tee $4 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $2 local.tee $0 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $2 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -10467,19 +10467,19 @@ select else local.get $1 - local.get $2 + local.get $3 local.get $1 - local.get $2 + local.get $3 i32.lt_s select end local.tee $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.gt_s select - local.get $3 + local.get $4 i32.sub i32.const 2 i32.shl @@ -18065,31 +18065,31 @@ (func $~lib/util/number/genDigits (; 274 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) - (local $9 i32) - (local $10 i64) + (local $9 i64) + (local $10 i32) (local $11 i64) (local $12 i64) (local $13 i64) local.get $3 local.get $1 i64.sub - local.set $8 + local.set $9 local.get $3 i64.const 1 i32.const 0 local.get $4 i32.sub - local.tee $9 + local.tee $10 i64.extend_i32_s i64.shl - local.tee $10 + local.tee $11 i64.const 1 i64.sub local.tee $12 i64.and - local.set $11 + local.set $8 local.get $3 - local.get $9 + local.get $10 i64.extend_i32_s i64.shr_u i32.wrap_i64 @@ -18245,10 +18245,10 @@ i32.const 1 i32.sub local.set $4 - local.get $11 + local.get $8 local.get $7 i64.extend_i32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl i64.add @@ -18266,7 +18266,7 @@ i32.const 3104 i32.add i64.load32_u - local.get $9 + local.get $10 i64.extend_i32_s i64.shl local.set $3 @@ -18282,19 +18282,19 @@ local.set $4 loop $while-continue|3 i32.const 1 - local.get $8 + local.get $9 local.get $1 i64.sub local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.sub i64.gt_u local.get $1 local.get $3 i64.add - local.get $8 + local.get $9 i64.lt_u select i32.const 0 @@ -18305,7 +18305,7 @@ i64.ge_u i32.const 0 local.get $1 - local.get $8 + local.get $9 i64.lt_u select select @@ -18330,7 +18330,7 @@ br $while-continue|0 end end - local.get $9 + local.get $10 i64.extend_i32_s local.set $13 loop $while-continue|4 (result i32) @@ -18338,7 +18338,7 @@ i64.const 10 i64.mul local.set $5 - local.get $11 + local.get $8 i64.const 10 i64.mul local.tee $3 @@ -18375,7 +18375,7 @@ local.get $3 local.get $12 i64.and - local.tee $11 + local.tee $8 local.get $5 i64.ge_u br_if $while-continue|4 @@ -18383,9 +18383,9 @@ global.get $~lib/util/number/_K i32.add global.set $~lib/util/number/_K - local.get $11 - local.set $1 local.get $8 + local.set $1 + local.get $9 i32.const 0 local.get $4 i32.sub @@ -18412,13 +18412,13 @@ local.get $1 i64.sub local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.sub i64.gt_u local.get $1 - local.get $10 + local.get $11 i64.add local.get $3 i64.lt_u @@ -18427,7 +18427,7 @@ local.get $5 local.get $1 i64.sub - local.get $10 + local.get $11 i64.ge_u i32.const 0 local.get $1 @@ -18441,7 +18441,7 @@ i32.sub local.set $4 local.get $1 - local.get $10 + local.get $11 i64.add local.set $1 br $while-continue|6 @@ -19545,48 +19545,48 @@ local.tee $5 call $~lib/typedarray/Int8Array#constructor local.tee $6 - local.set $1 + local.set $3 loop $for-loop|0 - local.get $0 + local.get $2 local.get $5 i32.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 i32.const 3296 - local.get $0 + local.get $2 call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $3 i32.load - local.get $1 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $2 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $0 + local.get $2 i32.const 16 i32.sub i32.load offset=12 - local.tee $2 + local.tee $1 i32.gt_u if i32.const 368 @@ -19596,33 +19596,33 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.set $3 + local.get $1 + local.set $0 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 + local.tee $1 + local.get $2 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $1 + local.get $0 i32.store offset=8 + local.get $1 local.get $2 - local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $0 loop $for-loop|1 local.get $4 local.get $5 i32.lt_s if - local.get $1 + local.get $3 local.get $4 call $~lib/typedarray/Int8Array#__get - local.get $3 + local.get $0 local.get $4 call $~lib/typedarray/Int8Array#__get i32.ne @@ -19643,9 +19643,9 @@ end local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 287 ;) @@ -19745,46 +19745,46 @@ local.tee $5 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $6 - local.set $1 + local.set $3 loop $for-loop|0 - local.get $0 + local.get $2 local.get $5 i32.lt_s if - local.get $1 - local.get $0 + local.get $3 + local.get $2 i32.const 3296 - local.get $0 + local.get $2 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end - local.get $1 + local.get $3 i32.load - local.get $1 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $2 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $0 + local.get $2 i32.const 16 i32.sub i32.load offset=12 - local.tee $2 + local.tee $1 i32.gt_u if i32.const 368 @@ -19794,33 +19794,33 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.set $3 + local.get $1 + local.set $0 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 + local.tee $1 + local.get $2 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $1 + local.get $0 i32.store offset=8 + local.get $1 local.get $2 - local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $3 + local.set $0 loop $for-loop|1 local.get $4 local.get $5 i32.lt_s if - local.get $1 + local.get $3 local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get - local.get $3 + local.get $0 local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne @@ -19841,9 +19841,9 @@ end local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 289 ;) @@ -21161,9 +21161,9 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int8Array#constructor - 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 14 @@ -21177,11 +21177,11 @@ i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 3 i32.add @@ -21193,15 +21193,15 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if - local.get $1 + local.get $0 local.get $5 i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -21218,14 +21218,14 @@ i32.const 0 end i32.store8 - 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 $0 + local.get $1 i32.const 10 i32.const 0 i32.const 14 @@ -21234,10 +21234,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 14 @@ -21250,11 +21250,11 @@ i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 2 i32.add @@ -21266,17 +21266,17 @@ i32.load local.set $12 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if - local.get $1 + local.get $0 local.get $7 i32.add local.get $11 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -21293,42 +21293,42 @@ i32.const 0 end i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 14 i32.const 3744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 + local.get $1 local.get $4 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 14 i32.const 3776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -21336,7 +21336,7 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release @@ -21482,9 +21482,9 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8Array#constructor - 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 21 @@ -21498,11 +21498,11 @@ i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 3 i32.add @@ -21514,15 +21514,15 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if - local.get $1 + local.get $0 local.get $5 i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -21539,14 +21539,14 @@ i32.const 0 end i32.store8 - 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 $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 @@ -21555,10 +21555,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 @@ -21571,11 +21571,11 @@ i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 2 i32.add @@ -21587,17 +21587,17 @@ i32.load local.set $12 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if - local.get $1 + local.get $0 local.get $7 i32.add local.get $11 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -21614,42 +21614,42 @@ i32.const 0 end i32.store8 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 i32.const 3952 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 + local.get $1 local.get $4 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 i32.const 3984 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -21657,7 +21657,7 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release @@ -22661,9 +22661,9 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int16Array#constructor - 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 22 @@ -22677,13 +22677,13 @@ i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 6 i32.add @@ -22695,17 +22695,17 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -22722,14 +22722,14 @@ i32.const 0 end i32.store16 - 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 $0 + local.get $1 i32.const 10 i32.const 1 i32.const 22 @@ -22738,10 +22738,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 22 @@ -22754,13 +22754,13 @@ i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 4 i32.add @@ -22772,19 +22772,19 @@ i32.load local.set $12 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if local.get $7 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add local.get $11 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -22801,42 +22801,42 @@ i32.const 0 end i32.store16 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 22 i32.const 4432 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 + local.get $1 local.get $4 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 22 i32.const 4480 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -22844,7 +22844,7 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release @@ -22993,9 +22993,9 @@ call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint16Array#constructor - 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 23 @@ -23009,13 +23009,13 @@ i32.load i32.const 3 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 6 i32.add @@ -23027,17 +23027,17 @@ i32.load local.set $7 loop $for-loop|0 - local.get $1 + local.get $0 local.get $7 i32.lt_s if local.get $5 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add local.get $6 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -23054,14 +23054,14 @@ i32.const 0 end i32.store16 - 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 $0 + local.get $1 i32.const 10 i32.const 1 i32.const 23 @@ -23070,10 +23070,10 @@ call $~lib/rt/pure/__retain local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 + local.get $1 local.get $3 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 23 @@ -23086,13 +23086,13 @@ i32.load i32.const 2 i32.add - local.get $0 + local.get $1 i32.load offset=8 i32.const 1 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.const 4 i32.add @@ -23104,19 +23104,19 @@ i32.load local.set $12 i32.const 0 - local.set $1 + local.set $0 loop $for-loop|00 - local.get $1 + local.get $0 local.get $12 i32.lt_s if local.get $7 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add local.get $11 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -23133,42 +23133,42 @@ i32.const 0 end i32.store16 - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 23 i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $1 - call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + local.get $1 local.get $2 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 + local.get $1 local.get $4 call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 23 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release @@ -23176,7 +23176,7 @@ call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release @@ -26094,20 +26094,20 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f64) - (local $10 f32) - (local $11 i64) + (local $9 i32) + (local $10 i32) + (local $11 i32) (local $12 i32) (local $13 i32) (local $14 i32) - (local $15 f64) - (local $16 i32) + (local $15 i32) + (local $16 f64) (local $17 i32) (local $18 i32) (local $19 i32) - (local $20 i32) - (local $21 i32) - (local $22 i32) + (local $20 i64) + (local $21 f32) + (local $22 f64) (local $23 i32) (local $24 i32) (local $25 i32) @@ -26121,19 +26121,19 @@ call $std/typedarray/testInstantiate i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -26147,7 +26147,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -26157,7 +26157,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.load offset=8 i32.const 12 i32.ne @@ -26169,7 +26169,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 1 @@ -26182,7 +26182,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 2 @@ -26195,7 +26195,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -26208,14 +26208,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#subarray - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u @@ -26229,7 +26229,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne @@ -26241,7 +26241,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 4 i32.ne @@ -26253,7 +26253,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 2 @@ -26266,50 +26266,50 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 8 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 7 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 3 f64.const 6 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 4 f64.const 5 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 5 f64.const 4 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 6 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 7 f64.const 8 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u @@ -26323,7 +26323,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 16 i32.ne @@ -26335,7 +26335,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 32 i32.ne @@ -26350,68 +26350,68 @@ i32.const 0 global.set $~argumentsLength block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $28 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $2 + local.tee $29 i32.const 1 i32.le_s br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $3 + local.get $28 i32.load offset=4 - local.set $0 - local.get $2 + local.set $1 + local.get $29 i32.const 2 i32.eq if - local.get $0 + local.get $1 f64.load offset=8 - local.set $9 - local.get $0 + local.set $22 + local.get $1 f64.load - local.set $15 + local.set $16 i32.const 2 global.set $~argumentsLength - local.get $9 - local.get $15 + local.get $22 + local.get $16 call $~lib/util/sort/COMPARATOR~anonymous|0 i32.const 0 i32.lt_s if - local.get $0 - local.get $15 + local.get $1 + local.get $16 f64.store offset=8 - local.get $0 - local.get $9 + local.get $1 + local.get $22 f64.store end br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $2 + local.get $29 i32.const 256 i32.lt_s if - local.get $0 - local.get $2 + local.get $1 + local.get $29 call $~lib/util/sort/insertionSort else - local.get $0 - local.get $2 + local.get $1 + local.get $29 call $~lib/util/sort/weakHeapSort end end - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq if (result i32) - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 5 @@ -26420,7 +26420,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 6 @@ -26429,7 +26429,7 @@ i32.const 0 end if (result i32) - local.get $1 + local.get $0 i32.const 3 call $~lib/typedarray/Float64Array#__get f64.const 7 @@ -26446,23 +26446,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const -32 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 256 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get if @@ -26473,7 +26473,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2 @@ -26486,7 +26486,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 255 @@ -26499,44 +26499,44 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 496 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $29 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26547,20 +26547,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 576 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $28 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26571,20 +26571,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $27 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26595,20 +26595,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $26 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26619,20 +26619,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $25 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26643,17 +26643,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#subarray - local.tee $1 + local.tee $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int8Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -26665,7 +26665,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.ne @@ -26677,7 +26677,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -26689,14 +26689,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 0 i32.const 14 i32.const 704 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26707,14 +26707,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 0 i32.const 14 i32.const 736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $23 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26725,60 +26725,60 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $4 + local.get $27 call $~lib/rt/pure/__release - local.get $5 + local.get $26 call $~lib/rt/pure/__release - local.get $6 + local.get $25 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $8 + local.get $23 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $29 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26789,20 +26789,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 816 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $28 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26813,20 +26813,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 0 i32.const -3 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26837,20 +26837,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26861,20 +26861,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 0 i32.const 1 i32.const 0 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26885,17 +26885,17 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int32Array#subarray - local.tee $1 + local.tee $0 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u @@ -26909,7 +26909,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne @@ -26921,7 +26921,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 12 i32.ne @@ -26933,14 +26933,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 3 i32.const 2 i32.const 15 i32.const 1008 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26951,14 +26951,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 5 i32.const 2 i32.const 15 i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26969,55 +26969,55 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $4 + local.get $27 call $~lib/rt/pure/__release - local.get $5 + local.get $26 call $~lib/rt/pure/__release - local.get $6 + local.get $25 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $8 + local.get $23 call $~lib/rt/pure/__release i32.const 6 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 5 i32.const 6 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 6 call $~lib/typedarray/Int8Array#subarray - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 2 @@ -27030,7 +27030,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 5 i32.ne @@ -27042,7 +27042,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.ne @@ -27054,7 +27054,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 5 i32.ne @@ -27066,11 +27066,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.const 5 call $~lib/typedarray/Int8Array#subarray - local.tee $2 + local.tee $29 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -27083,7 +27083,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.load offset=8 i32.const 4 i32.ne @@ -27095,7 +27095,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.ne @@ -27107,7 +27107,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.load offset=8 i32.const 4 i32.ne @@ -27119,11 +27119,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#subarray - local.tee $3 + local.tee $28 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -27136,7 +27136,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 i32.load offset=8 i32.const 3 i32.ne @@ -27148,7 +27148,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 3 i32.ne @@ -27160,7 +27160,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 i32.load offset=8 i32.const 3 i32.ne @@ -27172,54 +27172,54 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $29 + call $~lib/rt/pure/__release + local.get $28 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $2 - local.get $0 + local.set $29 + local.get $1 i32.const 0 i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $3 + local.tee $28 i32.const 5 i32.const 2 i32.const 15 i32.const 1088 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27230,26 +27230,26 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const 1 i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $5 + local.tee $26 i32.const 5 i32.const 2 i32.const 15 i32.const 1136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27260,25 +27260,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $7 + local.tee $24 i32.const 5 i32.const 2 i32.const 15 i32.const 1184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27289,25 +27289,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 2 i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $12 + local.tee $19 i32.const 5 i32.const 2 i32.const 15 i32.const 1232 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $18 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27318,25 +27318,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $14 + local.tee $17 i32.const 5 i32.const 2 i32.const 15 i32.const 1280 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $15 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27347,25 +27347,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $14 i32.const 5 i32.const 2 i32.const 15 i32.const 1328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $13 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27376,25 +27376,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 1 i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $12 i32.const 5 i32.const 2 i32.const 15 i32.const 1376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $11 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27405,25 +27405,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $10 i32.const 5 i32.const 2 i32.const 15 i32.const 1424 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $9 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27434,25 +27434,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const 0 i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $8 i32.const 5 i32.const 2 i32.const 15 i32.const 1472 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27463,25 +27463,25 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.tee $1 + local.tee $0 i32.const -4 i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 + local.tee $6 i32.const 5 i32.const 2 i32.const 15 i32.const 1520 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $5 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27492,26 +27492,26 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $0 - local.get $1 - call $~lib/rt/pure/__release + local.set $1 local.get $0 + call $~lib/rt/pure/__release + local.get $1 i32.const -4 i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $27 + local.tee $4 i32.const 5 i32.const 2 i32.const 15 i32.const 1568 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $3 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27522,26 +27522,26 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.set $1 - local.get $0 - call $~lib/rt/pure/__release + local.set $0 local.get $1 + call $~lib/rt/pure/__release + local.get $0 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $0 + local.tee $1 i32.const 5 i32.const 2 i32.const 15 i32.const 1616 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $2 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27552,85 +27552,85 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $4 + local.get $27 call $~lib/rt/pure/__release - local.get $5 + local.get $26 call $~lib/rt/pure/__release - local.get $6 + local.get $25 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $8 + local.get $23 call $~lib/rt/pure/__release - local.get $12 + local.get $19 call $~lib/rt/pure/__release - local.get $13 + local.get $18 call $~lib/rt/pure/__release - local.get $14 + local.get $17 call $~lib/rt/pure/__release - local.get $16 + local.get $15 call $~lib/rt/pure/__release - local.get $17 + local.get $14 call $~lib/rt/pure/__release - local.get $18 + local.get $13 call $~lib/rt/pure/__release - local.get $19 + local.get $12 call $~lib/rt/pure/__release - local.get $20 + local.get $11 call $~lib/rt/pure/__release - local.get $21 + local.get $10 call $~lib/rt/pure/__release - local.get $22 + local.get $9 call $~lib/rt/pure/__release - local.get $23 + local.get $8 call $~lib/rt/pure/__release - local.get $24 + local.get $7 call $~lib/rt/pure/__release - local.get $25 + local.get $6 call $~lib/rt/pure/__release - local.get $26 + local.get $5 call $~lib/rt/pure/__release - local.get $27 + local.get $4 call $~lib/rt/pure/__release - local.get $28 + local.get $3 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $29 + local.get $2 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int32Array#subarray - local.tee $2 + local.tee $29 i32.load offset=8 i32.const 2 i32.shr_u @@ -27644,7 +27644,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 4 i32.ne @@ -27656,7 +27656,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.load offset=8 i32.const 12 i32.ne @@ -27668,11 +27668,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#slice - local.tee $1 + local.tee $0 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 2 @@ -27685,7 +27685,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -27698,7 +27698,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u @@ -27712,7 +27712,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -27722,7 +27722,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 8 i32.ne @@ -27734,11 +27734,11 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#slice - local.tee $3 + local.tee $28 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 3 @@ -27751,7 +27751,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 i32.load offset=8 i32.const 2 i32.shr_u @@ -27765,7 +27765,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -27775,7 +27775,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $28 i32.load offset=8 i32.const 4 i32.ne @@ -27787,12 +27787,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $0 + local.get $1 + local.get $1 i32.const 0 i32.const 2147483647 call $~lib/typedarray/Int32Array#slice - local.tee $4 + local.tee $27 i32.eq if i32.const 0 @@ -27802,11 +27802,11 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $27 i32.load offset=8 i32.const 2 i32.shr_u - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u @@ -27819,9 +27819,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $27 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $0 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.ne if @@ -27832,9 +27832,9 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $27 i32.load offset=8 - local.get $0 + local.get $1 i32.load offset=8 i32.ne if @@ -27845,58 +27845,58 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $4 + local.get $27 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set i32.const 0 - local.set $1 - i32.const 0 local.set $0 - local.get $2 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 - local.set $4 + local.set $27 loop $for-loop|0 - local.get $1 - local.get $4 + local.get $0 + local.get $27 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $0 local.get $1 - local.get $3 + local.get $0 + local.get $28 i32.add i32.load8_s i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -27916,29 +27916,29 @@ block $folding-inner2 block $folding-inner1 block $folding-inner0 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 6 i32.ne br_if $folding-inner0 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 3 call $~lib/typedarray/Uint8Array#reduce i32.const 255 @@ -27946,23 +27946,23 @@ i32.const 6 i32.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 4 call $~lib/typedarray/Uint8Array#reduce i32.const 255 @@ -27970,386 +27970,386 @@ i32.const 6 i32.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $1 - i32.const 0 local.set $0 - local.get $2 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $27 loop $for-loop|00 - local.get $1 - local.get $4 + local.get $0 + local.get $27 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $0 - local.get $3 local.get $1 + local.get $28 + local.get $0 i32.const 1 i32.shl i32.add i32.load16_s i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner0 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $1 - i32.const 0 local.set $0 - local.get $2 + i32.const 0 + local.set $1 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 + local.set $27 loop $for-loop|01 - local.get $1 - local.get $4 + local.get $0 + local.get $27 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $0 - local.get $3 local.get $1 + local.get $28 + local.get $0 i32.const 1 i32.shl i32.add i32.load16_u i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|01 end end - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner0 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 7 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 8 call $~lib/typedarray/Int32Array#reduce i32.const 6 i32.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 9 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 10 call $~lib/typedarray/Int64Array#reduce i64.const 6 i64.ne br_if $folding-inner0 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|02 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $10 - local.get $2 - local.get $0 + local.get $21 + local.get $29 + local.get $1 i32.const 2 i32.shl i32.add f32.load f32.add - local.set $10 - local.get $0 + local.set $21 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|02 end end - local.get $10 + local.get $21 f32.const 6 f32.ne br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set i32.const 0 - local.set $0 + local.set $1 f64.const 0 - local.set $9 - local.get $1 + local.set $22 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|03 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 4 global.set $~argumentsLength - local.get $9 - local.get $2 - local.get $0 + local.get $22 + local.get $29 + local.get $1 i32.const 3 i32.shl i32.add f64.load f64.add - local.set $9 - local.get $0 + local.set $22 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|03 end end - local.get $9 + local.get $22 f64.const 6 f64.ne br_if $folding-inner0 - local.get $1 + local.get $0 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set i32.const 0 - local.set $1 - local.get $2 + local.set $0 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|04 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.add i32.load8_s i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|04 end end - local.get $1 + local.get $0 i32.const 255 i32.and i32.const 6 i32.ne br_if $folding-inner1 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 14 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 @@ -28357,23 +28357,23 @@ i32.const 6 i32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 15 call $~lib/typedarray/Uint8Array#reduceRight i32.const 255 @@ -28381,1379 +28381,1379 @@ i32.const 6 i32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $1 - local.get $2 + local.set $0 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|05 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $3 local.get $0 + local.get $28 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_s i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|05 end end - local.get $1 + local.get $0 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner1 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $29 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $2 + local.get $29 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $1 - local.get $2 + local.set $0 + local.get $29 i32.load offset=4 - local.set $3 - local.get $2 + local.set $28 + local.get $29 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $0 + local.set $1 loop $for-loop|06 - local.get $0 + local.get $1 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $1 - local.get $3 local.get $0 + local.get $28 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_u i32.add - local.set $1 - local.get $0 + local.set $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|06 end end - local.get $1 + local.get $0 i32.const 65535 i32.and i32.const 6 i32.ne br_if $folding-inner1 - local.get $2 + local.get $29 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 18 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 19 call $~lib/typedarray/Int32Array#reduceRight i32.const 6 i32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 20 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 21 call $~lib/typedarray/Int64Array#reduceRight i64.const 6 i64.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set f32.const 0 - local.set $10 - local.get $0 + local.set $21 + local.get $1 i32.load offset=4 - local.set $2 - local.get $0 + local.set $29 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|07 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $10 - local.get $2 - local.get $1 + local.get $21 + local.get $29 + local.get $0 i32.const 2 i32.shl i32.add f32.load f32.add - local.set $10 - local.get $1 + local.set $21 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|07 end end - local.get $10 + local.get $21 f32.const 6 f32.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set f64.const 0 - local.set $9 - local.get $0 + local.set $22 + local.get $1 i32.load offset=4 - local.set $2 - local.get $0 + local.set $29 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|08 - local.get $1 + local.get $0 i32.const 0 i32.ge_s if i32.const 4 global.set $~argumentsLength - local.get $9 - local.get $2 - local.get $1 + local.get $22 + local.get $29 + local.get $0 i32.const 3 i32.shl i32.add f64.load f64.add - local.set $9 - local.get $1 + local.set $22 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|08 end end - local.get $9 + local.get $22 f64.const 6 f64.ne br_if $folding-inner1 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $28 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + local.set $29 + local.get $28 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $27 loop $for-loop|09 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.add - local.get $0 - local.get $5 + local.get $1 + local.get $26 i32.add i32.load8_s - local.tee $6 - local.get $6 + local.tee $25 + local.get $25 i32.mul i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|09 end end - local.get $2 - local.get $4 + local.get $29 + local.get $27 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $29 + local.get $27 i32.store offset=4 - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $28 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 4 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + local.set $29 + local.get $28 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $27 loop $for-loop|010 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.add - local.get $0 - local.get $5 + local.get $1 + local.get $26 i32.add i32.load8_u - local.tee $6 - local.get $6 + local.tee $25 + local.get $25 i32.mul i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|010 end end - local.get $2 - local.get $4 + local.get $29 + local.get $27 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $29 + local.get $27 i32.store offset=4 - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $28 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $3 + local.set $29 + local.get $28 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $27 loop $for-loop|011 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.add - local.get $0 - local.get $5 + local.get $1 + local.get $26 i32.add i32.load8_u - local.tee $6 - local.get $6 + local.tee $25 + local.get $25 i32.mul i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|011 end end - local.get $2 - local.get $4 + local.get $29 + local.get $27 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 + local.get $29 + local.get $27 i32.store offset=4 - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 1 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|012 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 1 i32.shl - local.tee $7 + local.tee $24 i32.add i32.load16_s - local.tee $8 - local.get $8 + local.tee $23 + local.get $23 i32.mul - local.set $8 - local.get $3 - local.get $7 + local.set $23 + local.get $24 + local.get $28 i32.add - local.get $8 + local.get $23 i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|012 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int16Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int16Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 1 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|013 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 1 i32.shl - local.tee $7 + local.tee $24 i32.add i32.load16_u - local.tee $8 - local.get $8 + local.tee $23 + local.get $23 i32.mul - local.set $8 - local.get $3 - local.get $7 + local.set $23 + local.get $24 + local.get $28 i32.add - local.get $8 + local.get $23 i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|013 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint16Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint16Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 2 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|014 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 2 i32.shl - local.tee $7 + local.tee $24 i32.add i32.load - local.tee $8 - local.get $8 + local.tee $23 + local.get $23 i32.mul - local.set $8 - local.get $3 - local.get $7 + local.set $23 + local.get $24 + local.get $28 i32.add - local.get $8 + local.get $23 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|014 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int32Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int32Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int32Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 2 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|015 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 2 i32.shl - local.tee $7 + local.tee $24 i32.add i32.load - local.tee $8 - local.get $8 + local.tee $23 + local.get $23 i32.mul - local.set $8 - local.get $3 - local.get $7 + local.set $23 + local.get $24 + local.get $28 i32.add - local.get $8 + local.get $23 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|015 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint32Array#__get i32.const 1 i32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint32Array#__get i32.const 9 i32.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $1 + local.get $0 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $1 + local.get $0 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 3 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|016 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 3 i32.shl - local.tee $7 + local.tee $24 i32.add i64.load - local.tee $11 - local.get $11 + local.tee $20 + local.get $20 i64.mul - local.set $11 - local.get $3 - local.get $7 + local.set $20 + local.get $24 + local.get $28 i32.add - local.get $11 + local.get $20 i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|016 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Int64Array#__get i64.const 1 i64.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Int64Array#__get i64.const 4 i64.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Int64Array#__get i64.const 9 i64.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $1 + local.get $0 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $1 + local.get $0 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 3 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|017 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 3 i32.shl - local.tee $7 + local.tee $24 i32.add i64.load - local.tee $11 - local.get $11 + local.tee $20 + local.get $20 i64.mul - local.set $11 - local.get $3 - local.get $7 + local.set $20 + local.get $24 + local.get $28 i32.add - local.get $11 + local.get $20 i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|017 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Uint64Array#__get i64.const 1 i64.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Uint64Array#__get i64.const 4 i64.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Uint64Array#__get i64.const 9 i64.ne br_if $folding-inner4 - local.get $1 - 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 $1 + local.tee $0 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 2 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|018 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 2 i32.shl - local.tee $7 + local.tee $24 i32.add f32.load - local.tee $10 - local.get $10 + local.tee $21 + local.get $21 f32.mul - local.set $10 - local.get $3 - local.get $7 + local.set $21 + local.get $24 + local.get $28 i32.add - local.get $10 + local.get $21 f32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|018 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Float32Array#__get f32.const 1 f32.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float32Array#__get f32.const 4 f32.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float32Array#__get f32.const 9 f32.ne br_if $folding-inner4 - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 3 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 - local.get $1 + local.set $27 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.set $2 - local.get $4 + local.set $29 + local.get $27 i32.const 3 i32.shl - local.tee $6 + local.tee $25 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $3 + local.set $28 loop $for-loop|019 - local.get $0 - local.get $4 + local.get $1 + local.get $27 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 3 i32.shl - local.tee $7 + local.tee $24 i32.add f64.load - local.tee $9 - local.get $9 + local.tee $22 + local.get $22 f64.mul - local.set $9 - local.get $3 - local.get $7 + local.set $22 + local.get $24 + local.get $28 i32.add - local.get $9 + local.get $22 f64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|019 end end - local.get $2 - local.get $3 + local.get $29 + local.get $28 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $3 + local.get $29 + local.get $28 i32.store offset=4 - local.get $2 - local.get $6 + local.get $29 + local.get $25 i32.store offset=8 - local.get $2 + local.get $29 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 i32.const 0 call $~lib/typedarray/Float64Array#__get f64.const 1 f64.ne br_if $folding-inner2 - local.get $0 + local.get $1 i32.const 1 call $~lib/typedarray/Float64Array#__get f64.const 4 f64.ne br_if $folding-inner3 - local.get $0 + local.get $1 i32.const 2 call $~lib/typedarray/Float64Array#__get f64.const 9 f64.ne br_if $folding-inner4 - local.get $1 - 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> @@ -29767,869 +29767,869 @@ call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 46 call $~lib/typedarray/Int8Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 47 call $~lib/typedarray/Int8Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 48 call $~lib/typedarray/Uint8Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 49 call $~lib/typedarray/Uint8Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 50 call $~lib/typedarray/Uint8Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 51 call $~lib/typedarray/Uint8Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 52 call $~lib/typedarray/Int16Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 53 call $~lib/typedarray/Int16Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 54 call $~lib/typedarray/Uint16Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 55 call $~lib/typedarray/Uint16Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 56 call $~lib/typedarray/Int32Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 57 call $~lib/typedarray/Int32Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 58 call $~lib/typedarray/Int32Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 59 call $~lib/typedarray/Int32Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 4 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 6 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 60 call $~lib/typedarray/Int64Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 61 call $~lib/typedarray/Int64Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 4 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 6 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 62 call $~lib/typedarray/Int64Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 63 call $~lib/typedarray/Int64Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 4 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 6 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 64 call $~lib/typedarray/Float32Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 65 call $~lib/typedarray/Float32Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 4 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 6 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 66 call $~lib/typedarray/Float64Array#some i32.eqz br_if $folding-inner5 - local.get $0 + local.get $1 i32.const 67 call $~lib/typedarray/Float64Array#some br_if $folding-inner6 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 68 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 69 call $~lib/typedarray/Int8Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 70 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 71 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 72 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 73 call $~lib/typedarray/Uint8Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 74 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 75 call $~lib/typedarray/Int16Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 76 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 77 call $~lib/typedarray/Uint16Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 78 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 79 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 80 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 81 call $~lib/typedarray/Int32Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 82 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 83 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 84 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 85 call $~lib/typedarray/Int64Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 86 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 87 call $~lib/typedarray/Float32Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 88 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne br_if $folding-inner7 - local.get $0 + local.get $1 i32.const 89 call $~lib/typedarray/Float64Array#findIndex i32.const -1 i32.ne br_if $folding-inner8 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 90 call $~lib/typedarray/Int8Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 91 call $~lib/typedarray/Int8Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 92 call $~lib/typedarray/Uint8Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 93 call $~lib/typedarray/Uint8Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 94 call $~lib/typedarray/Uint8Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 95 call $~lib/typedarray/Uint8Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 96 call $~lib/typedarray/Int16Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 97 call $~lib/typedarray/Int16Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 98 call $~lib/typedarray/Uint16Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 99 call $~lib/typedarray/Uint16Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 100 call $~lib/typedarray/Int32Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 101 call $~lib/typedarray/Int32Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 4 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 6 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 102 call $~lib/typedarray/Int32Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 103 call $~lib/typedarray/Int32Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 4 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 6 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 104 call $~lib/typedarray/Int64Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 105 call $~lib/typedarray/Int64Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 4 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 6 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 106 call $~lib/typedarray/Int64Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 107 call $~lib/typedarray/Int64Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 4 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 6 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 108 call $~lib/typedarray/Float32Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 109 call $~lib/typedarray/Float32Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 4 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 6 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 110 call $~lib/typedarray/Float64Array#every i32.eqz br_if $folding-inner9 - local.get $0 + local.get $1 i32.const 111 call $~lib/typedarray/Float64Array#every br_if $folding-inner10 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 i32.const 1696 i32.const 0 @@ -30639,7 +30639,7 @@ i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 1696 i32.const 1 @@ -30649,7 +30649,7 @@ i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 1696 i32.const 2 @@ -30660,31 +30660,31 @@ i32.shr_s call $~lib/typedarray/Int8Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 - local.set $3 + local.set $28 loop $for-loop|020 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $0 - local.get $2 + local.get $1 + local.get $29 i32.add i32.load8_s - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|020 end end @@ -30692,15 +30692,15 @@ i32.const 3 i32.ne br_if $folding-inner11 - local.get $1 + 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 $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 @@ -30708,7 +30708,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 @@ -30716,7 +30716,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 @@ -30724,22 +30724,22 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 113 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 @@ -30747,7 +30747,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 @@ -30755,7 +30755,7 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 @@ -30763,22 +30763,22 @@ i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 114 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 i32.const 1696 i32.const 0 @@ -30788,7 +30788,7 @@ i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 1696 i32.const 1 @@ -30798,7 +30798,7 @@ i32.const 16 i32.shr_s call $~lib/typedarray/Int16Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 1696 i32.const 2 @@ -30809,35 +30809,35 @@ i32.shr_s call $~lib/typedarray/Int16Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|021 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 + local.get $29 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_s - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|021 end end @@ -30845,15 +30845,15 @@ i32.const 3 i32.ne br_if $folding-inner11 - local.get $1 + 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 $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 i32.const 1696 i32.const 0 @@ -30861,7 +30861,7 @@ i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 1696 i32.const 1 @@ -30869,7 +30869,7 @@ i32.const 65535 i32.and call $~lib/typedarray/Uint16Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 1696 i32.const 2 @@ -30878,35 +30878,35 @@ i32.and call $~lib/typedarray/Uint16Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|022 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 + local.get $29 + local.get $1 i32.const 1 i32.shl i32.add i32.load16_u - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|022 end end @@ -30914,167 +30914,167 @@ i32.const 3 i32.ne br_if $folding-inner11 - local.get $1 + 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 $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 call $~lib/array/Array#__get call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 117 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 call $~lib/array/Array#__get call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 118 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 119 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 global.set $std/typedarray/forEachSelf - local.get $0 + local.get $1 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 1696 i32.const 2 call $~lib/array/Array#__get i64.extend_i32_s call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 120 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne br_if $folding-inner11 - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get f32.convert_i32_s call $~lib/typedarray/Float32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 1696 i32.const 2 @@ -31082,35 +31082,35 @@ f32.convert_i32_s call $~lib/typedarray/Float32Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|023 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 + local.get $29 + local.get $1 i32.const 2 i32.shl i32.add f32.load - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|023 end end @@ -31118,29 +31118,29 @@ i32.const 3 i32.ne br_if $folding-inner11 - local.get $1 + 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 $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 i32.const 1696 i32.const 0 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 1696 i32.const 1 call $~lib/array/Array#__get f64.convert_i32_s call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 1696 i32.const 2 @@ -31148,35 +31148,35 @@ f64.convert_i32_s call $~lib/typedarray/Float64Array#__set i32.const 0 - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.load offset=4 - local.set $2 - local.get $1 + local.set $29 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $28 loop $for-loop|024 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 3 global.set $~argumentsLength - local.get $2 - local.get $0 + local.get $29 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.get $0 local.get $1 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|024 end end @@ -31184,7 +31184,7 @@ i32.const 3 i32.ne br_if $folding-inner11 - local.get $1 + local.get $0 call $~lib/rt/pure/__release call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> @@ -31210,11 +31210,11 @@ call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> i32.const 1 call $~lib/typedarray/Float64Array#constructor - local.tee $1 + local.tee $0 i32.const 0 f64.const nan:0x8000000000000 call $~lib/typedarray/Float64Array#__set - local.get $1 + local.get $0 f64.const nan:0x8000000000000 i32.const 0 call $~lib/typedarray/Float64Array#indexOf @@ -31229,54 +31229,54 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) i32.const 0 - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 + local.tee $28 if (result i32) i32.const 0 - local.get $3 + local.get $28 i32.ge_s else i32.const 1 end br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 drop - local.get $1 + local.get $0 i32.load offset=4 - local.set $5 + local.set $26 loop $while-continue|0 - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.lt_s if i32.const 1 - local.get $5 - local.get $0 + local.get $26 + local.get $1 i32.const 3 i32.shl i32.add f64.load - local.tee $9 + local.tee $22 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $9 - local.get $9 + local.get $22 + local.get $22 f64.ne end br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 drop - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $while-continue|0 end end @@ -31296,11 +31296,11 @@ end i32.const 1 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const nan:0x400000 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 f32.const nan:0x400000 i32.const 0 call $~lib/typedarray/Float32Array#indexOf @@ -31315,54 +31315,54 @@ unreachable end i32.const 0 - local.set $2 + local.set $29 block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) i32.const 0 - local.get $0 + local.get $1 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 + local.tee $27 if (result i32) i32.const 0 - local.get $4 + local.get $27 i32.ge_s else i32.const 1 end br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 drop - local.get $0 + local.get $1 i32.load offset=4 - local.set $6 + local.set $25 loop $while-continue|025 - local.get $2 - local.get $4 + local.get $29 + local.get $27 i32.lt_s if i32.const 1 - local.get $6 - local.get $2 + local.get $25 + local.get $29 i32.const 2 i32.shl i32.add f32.load - local.tee $10 + local.tee $21 f32.const nan:0x400000 f32.eq if (result i32) i32.const 1 else - local.get $10 - local.get $10 + local.get $21 + local.get $21 f32.ne end br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 drop - local.get $2 + local.get $29 i32.const 1 i32.add - local.set $2 + local.set $29 br $while-continue|025 end end @@ -31380,481 +31380,481 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int8Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Int8Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Int8Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint8Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Uint8Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 + local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Uint8Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int16Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Int16Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Int16Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint16Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Uint16Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Uint16Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Uint16Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Int32Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Int32Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Int32Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 1 i32.const 2 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 2 i32.const 3 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 3 i32.const 4 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 i32.const 4 i32.const 5 call $~lib/typedarray/Uint32Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Uint32Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Uint32Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 3 i64.const 4 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 i32.const 4 i64.const 5 call $~lib/typedarray/Int64Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Int64Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Int64Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Uint64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 i64.const 1 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 1 i64.const 2 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 2 i64.const 3 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 3 i64.const 4 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 i32.const 4 i64.const 5 call $~lib/typedarray/Uint64Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Uint64Array#join - local.tee $1 + local.tee $0 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner12 - local.get $0 + local.get $1 call $~lib/typedarray/Uint64Array#join - local.tee $2 + local.tee $29 i32.const 2000 call $~lib/string/String.__eq i32.eqz br_if $folding-inner13 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Float32Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f32.const 1 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 1 f32.const 2 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 2 f32.const 3 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 3 f32.const 4 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 i32.const 4 f32.const 5 call $~lib/typedarray/Float32Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Float32Array#join - local.tee $1 + local.tee $0 i32.const 3168 call $~lib/string/String.__eq i32.eqz br_if $folding-inner14 - local.get $0 + local.get $1 call $~lib/typedarray/Float32Array#join - local.tee $2 + local.tee $29 i32.const 3168 call $~lib/string/String.__eq i32.eqz br_if $folding-inner15 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Float64Array#constructor - local.tee $0 + local.tee $1 i32.const 0 f64.const 1 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 1 f64.const 2 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 2 f64.const 3 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 3 f64.const 4 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 i32.const 4 f64.const 5 call $~lib/typedarray/Float64Array#__set - local.get $0 + local.get $1 call $~lib/typedarray/Float64Array#join - local.tee $1 + local.tee $0 i32.const 3168 call $~lib/string/String.__eq i32.eqz br_if $folding-inner14 - local.get $0 + local.get $1 call $~lib/typedarray/Float64Array#join - local.tee $2 + local.tee $29 i32.const 3168 call $~lib/string/String.__eq i32.eqz br_if $folding-inner15 - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 + local.set $1 i32.const 2 global.set $~argumentsLength - local.get $0 + local.get $1 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline - local.tee $2 + local.tee $29 i32.load offset=8 if i32.const 0 @@ -31866,18 +31866,18 @@ end i32.const 2 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release i32.const 2 global.set $~argumentsLength - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $0 - local.get $2 + local.set $1 + local.get $29 call $~lib/rt/pure/__release - local.get $0 + local.get $1 i32.load offset=8 if i32.const 0 @@ -31887,10 +31887,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $1 + 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> @@ -31915,109 +31915,109 @@ call $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $0 + local.set $1 i32.const 3 call $~lib/typedarray/Float32Array#constructor - local.tee $5 + local.tee $26 i32.const 0 f32.const 400 call $~lib/typedarray/Float32Array#__set - local.get $5 + local.get $26 i32.const 1 f32.const nan:0x400000 call $~lib/typedarray/Float32Array#__set - local.get $5 + local.get $26 i32.const 2 f32.const inf call $~lib/typedarray/Float32Array#__set i32.const 4 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $29 i32.const 0 i64.const -10 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $29 i32.const 1 i64.const 100 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $29 i32.const 2 i64.const 10 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $29 i32.const 3 i64.const 300 call $~lib/typedarray/Int64Array#__set i32.const 2 call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $25 i32.const 0 i32.const 300 call $~lib/typedarray/Int32Array#__set - local.get $6 + local.get $25 i32.const 1 i32.const -1 call $~lib/typedarray/Int32Array#__set - local.get $0 - local.get $5 + local.get $1 + local.get $26 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> - local.get $0 - local.get $2 + local.get $1 + local.get $29 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - local.get $6 + local.get $1 + local.get $25 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 i32.const 7344 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> i32.const 4 call $~lib/typedarray/Uint32Array#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.const 1 call $~lib/typedarray/Uint32Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 300 call $~lib/typedarray/Uint32Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 100 call $~lib/typedarray/Uint32Array#__set - local.get $1 + local.get $0 i32.const 3 i32.const -1 call $~lib/typedarray/Uint32Array#__set i32.const 4 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $28 i32.const 0 i32.const -10 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $28 i32.const 1 i32.const 100 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $28 i32.const 2 i32.const 10 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $28 i32.const 3 i32.const 300 call $~lib/typedarray/Int16Array#__set - local.get $1 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.get $0 + local.get $1 i32.load offset=8 i32.gt_s if @@ -32028,75 +32028,75 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - local.set $8 local.get $1 i32.load offset=4 - local.set $12 - local.get $1 + local.set $23 + local.get $0 + i32.load offset=4 + local.set $19 + local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $13 + local.set $18 i32.const 0 - local.set $4 + local.set $27 loop $for-loop|026 - local.get $4 - local.get $13 + local.get $27 + local.get $18 i32.lt_s if - local.get $4 - local.get $8 + local.get $23 + local.get $27 i32.add i32.const 255 - local.get $12 - local.get $4 + local.get $19 + local.get $27 i32.const 2 i32.shl i32.add i32.load - local.tee $14 + local.tee $17 i32.const 255 - local.get $14 + local.get $17 i32.lt_u select i32.store8 - local.get $4 + local.get $27 i32.const 1 i32.add - local.set $4 + local.set $27 br $for-loop|026 end end - local.get $0 - local.get $3 + local.get $1 + local.get $28 i32.const 5 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 21 i32.const 7376 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $27 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $5 + local.get $26 call $~lib/rt/pure/__release - local.get $2 + local.get $29 call $~lib/rt/pure/__release - local.get $6 + local.get $25 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $28 call $~lib/rt/pure/__release - local.get $4 + local.get $27 call $~lib/rt/pure/__release return end diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 10f49d4c98..2b6d821c8b 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -673,16 +673,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $0 + local.tee $1 i32.eqz if i32.const 1 memory.size - local.tee $0 + local.tee $1 i32.gt_s if (result i32) i32.const 1 - local.get $0 + local.get $1 i32.sub memory.grow i32.const 0 @@ -694,18 +694,18 @@ unreachable end i32.const 208 - local.tee $0 + local.tee $1 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $1 + local.get $0 i32.const 23 i32.lt_u if - local.get $1 + local.get $0 i32.const 2 i32.shl i32.const 208 @@ -720,7 +720,7 @@ i32.lt_u if local.get $2 - local.get $1 + local.get $0 i32.const 4 i32.shl i32.add @@ -737,10 +737,10 @@ br $for-loop|1 end end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end @@ -753,7 +753,7 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $0 + local.get $1 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) @@ -762,10 +762,10 @@ i32.load offset=4 i32.const -2 i32.and - local.tee $1 + local.tee $2 if (result i32) local.get $0 - local.get $1 + local.get $2 i32.ctz i32.const 2 i32.shl @@ -776,17 +776,17 @@ i32.load i32.const -2 i32.and - local.tee $2 + local.tee $1 if (result i32) local.get $0 - local.get $2 + local.get $1 i32.ctz - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $2 + local.tee $1 i32.eqz if i32.const 0 @@ -797,9 +797,9 @@ unreachable end local.get $0 - local.get $2 - i32.ctz local.get $1 + i32.ctz + local.get $2 i32.const 4 i32.shl i32.add @@ -1058,22 +1058,22 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $0 + local.set $1 loop $while-continue|0 - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $while-continue|0 end end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1082,7 +1082,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 10 i32.ne if @@ -1111,14 +1111,14 @@ i32.const 0 global.set $while/ran i32.const 1 - local.set $0 + local.set $1 loop $while-continue|00 - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.sub - local.set $0 - local.get $1 + local.set $1 + local.get $0 if (result i32) local.get $2 i32.const 1 @@ -1129,7 +1129,7 @@ end br_if $while-continue|00 end - local.get $0 + local.get $1 i32.const -1 i32.ne if @@ -1156,17 +1156,17 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $0 + local.set $1 loop $while-continue|01 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $while-continue|01 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1180,17 +1180,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $0 + local.set $1 loop $while-continue|02 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $while-continue|02 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1216,18 +1216,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $0 + local.set $1 loop $while-continue|03 - local.get $0 + local.get $1 if - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|03 end end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1241,30 +1241,30 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $0 - i32.const 10 local.set $1 + i32.const 10 + local.set $0 loop $while-continue|04 - local.get $0 + local.get $1 if loop $while-continue|1 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $while-continue|1 end end - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $while-continue|04 end end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1273,7 +1273,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 32 @@ -1289,9 +1289,9 @@ i32.const 0 local.set $2 call $while/Ref#constructor - local.set $0 + local.set $1 loop $while-continue|05 - local.get $0 + local.get $1 if local.get $2 i32.const 1 @@ -1301,20 +1301,20 @@ i32.eq if i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end else call $while/Ref#constructor - local.set $1 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 - local.set $0 + local.get $0 + local.set $1 br $while-continue|05 end end @@ -1329,7 +1329,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1340,7 +1340,7 @@ end i32.const 1 global.set $while/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $while/ran i32.eqz @@ -1357,13 +1357,13 @@ i32.const 0 local.set $2 call $while/Ref#constructor - local.set $0 + local.set $1 loop $while-continue|06 block $while-break|0 call $while/Ref#constructor - local.tee $1 + local.tee $0 call $~lib/rt/pure/__release - local.get $1 + local.get $0 if local.get $2 i32.const 1 @@ -1372,13 +1372,13 @@ i32.const 10 i32.eq if - local.get $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end i32.const 0 - local.set $0 + local.set $1 br $while-break|0 end br $while-continue|06 @@ -1396,7 +1396,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1407,7 +1407,7 @@ end i32.const 1 global.set $while/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $while/ran i32.eqz From eded5abbd93d15765d3aae88701fb6c0ed8bcef8 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 05:47:11 +0200 Subject: [PATCH 40/51] rebuild examples --- examples/game-of-life/build/optimized.wasm | Bin 896 -> 896 bytes examples/game-of-life/build/optimized.wat | 18 ++-- examples/mandelbrot/build/optimized.wasm | Bin 543 -> 543 bytes examples/mandelbrot/build/optimized.wat | 108 ++++++++++----------- 4 files changed, 63 insertions(+), 63 deletions(-) diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index e4ac2a2a0f3937335b99798264c68476f6b99bc4..672a030e6555defb6a1580fe96c6d9a396da03e7 100644 GIT binary patch delta 66 zcmZo*Z(yHrf{#go(SyaokwKA}*+GGM;x!EwW@T0dCS~TFtSm>S5(O4BCI$s&N5(8g TW*$avZUrU~lWDUOV;mCzu67Hh delta 66 zcmZo*Z(yHrf{$5&(SyaokwKA(*+GG6;x!EwCS_IyW@YA_tSm>S5(O4BCI$s2N5(8g TCLTs^ZUtr#lXb>!3`Ip-mYm3TGp5M$sijlTkP0Y@X6ijWXV023fe#Q{MdpmnA$o`oJwZ=U z%B>Lrf(YupPw=Eq`mlc}kcDjPGf45e`gr$s0$JGTOEhSrH(gElI~%1&)pLUqW`OJ2LL+~x6?CAM zb(J~i#MMw~K#CXxM%GMI(m)0$svn1zZ98ZhfV N2}abGi|&UWe*s3aGsge` delta 296 zcmYL^F-`+95Jf$^w%5eFA!VX8f80=UhF~c|q{=+(S?+G%;tLZKemUp%FPS>2{gXY0d8q+(M-V4QRSA Mf)%x8-Tl)2A04GLfdBvi diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index ee17a75a04..6e96dbdc6a 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -9,14 +9,14 @@ (func $assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) - (local $6 i32) - (local $7 i32) + (local $6 f64) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 f64) + (local $12 i32) + (local $13 i32) (local $14 f64) local.get $0 f64.convert_i32_u @@ -29,27 +29,27 @@ local.get $1 i32.const 3 i32.mul - local.tee $6 + local.tee $13 local.get $2 i32.const 2 i32.shl local.tee $2 - local.get $6 + local.get $13 local.get $2 i32.lt_s select f64.convert_i32_s f64.div - local.tee $9 + local.tee $11 f64.mul local.set $10 local.get $1 f64.convert_i32_u f64.const 0.625 f64.mul - local.get $9 + local.get $11 f64.mul - local.set $12 + local.set $8 local.get $0 local.get $1 i32.mul @@ -60,7 +60,7 @@ local.get $3 f64.convert_i32_u f64.div - local.set $13 + local.set $7 i32.const 8 local.get $3 i32.const 8 @@ -69,122 +69,122 @@ select local.set $0 i32.const 0 - local.set $6 + local.set $13 loop $for-loop|0 - local.get $6 + local.get $13 local.get $1 i32.lt_u if - local.get $6 + local.get $13 f64.convert_i32_u - local.get $9 + local.get $11 f64.mul - local.get $12 + local.get $8 f64.sub - local.set $11 + local.set $9 f64.const 0 - local.tee $4 - local.set $5 + local.tee $5 + local.set $14 i32.const 0 - local.set $7 + local.set $12 loop $while-continue|1 - local.get $4 - local.get $4 - f64.mul - local.tee $14 local.get $5 local.get $5 f64.mul - local.tee $8 + local.tee $6 + local.get $14 + local.get $14 + f64.mul + local.tee $4 f64.add f64.const 4 f64.le if block $while-break|1 f64.const 2 - local.get $4 - f64.mul local.get $5 f64.mul + local.get $14 + f64.mul local.get $10 f64.add - local.set $5 - local.get $14 - local.get $8 + local.set $14 + local.get $6 + local.get $4 f64.sub - local.get $11 + local.get $9 f64.add - local.set $4 - local.get $7 + local.set $5 + local.get $12 local.get $3 i32.ge_u br_if $while-break|1 - local.get $7 + local.get $12 i32.const 1 i32.add - local.set $7 + local.set $12 br $while-continue|1 end end end loop $while-continue|2 - local.get $7 + local.get $12 local.get $0 i32.lt_u if - local.get $4 - local.get $4 - f64.mul local.get $5 local.get $5 f64.mul + local.get $14 + local.get $14 + f64.mul f64.sub - local.get $11 + local.get $9 f64.add f64.const 2 - local.get $4 - f64.mul local.get $5 f64.mul + local.get $14 + f64.mul local.get $10 f64.add + local.set $14 local.set $5 - local.set $4 - local.get $7 + local.get $12 i32.const 1 i32.add - local.set $7 + local.set $12 br $while-continue|2 end end local.get $2 - local.get $6 + local.get $13 i32.const 1 i32.shl i32.add - local.get $4 - local.get $4 - f64.mul local.get $5 local.get $5 f64.mul + local.get $14 + local.get $14 + f64.mul f64.add - local.tee $8 + local.tee $4 f64.const 1 f64.gt if (result i32) f64.const 2047 - local.get $7 + local.get $12 i32.const 1 i32.add f64.convert_i32_u f64.const 0.5 - local.get $8 + local.get $4 call $~lib/bindings/Math/log f64.mul call $~lib/bindings/Math/log2 f64.sub - local.get $13 + local.get $7 f64.mul f64.const 0 f64.max @@ -196,10 +196,10 @@ i32.const 2047 end i32.store16 - local.get $6 + local.get $13 i32.const 1 i32.add - local.set $6 + local.set $13 br $for-loop|0 end end From 954142f532b348d10712c341a68b2207884dabd1 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 16:30:43 +0200 Subject: [PATCH 41/51] use simplify-locals-notee-nostructure for early pass --- cli/asc.js | 2 +- .../resolve-elementaccess.optimized.wat | 13 +- .../retain-release-sanity.optimized.wat | 15 +- tests/compiler/std/array.optimized.wat | 88 ++- tests/compiler/std/arraybuffer.optimized.wat | 15 +- tests/compiler/std/libm.optimized.wat | 618 +++++++++--------- tests/compiler/std/map.optimized.wat | 15 +- tests/compiler/std/math.optimized.wat | 618 +++++++++--------- .../std/operator-overloading.optimized.wat | 199 +++--- tests/compiler/std/set.optimized.wat | 15 +- .../std/string-casemapping.optimized.wat | 4 +- tests/compiler/std/string.optimized.wat | 13 +- tests/compiler/std/typedarray.optimized.wat | 176 ++--- 13 files changed, 898 insertions(+), 893 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index f8f6e30544..c7bba0eb20 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -704,7 +704,7 @@ exports.main = function main(argv, options, callback) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { - add("simplify-locals-nostructure"); // differs + add("simplify-locals-notee-nostructure"); // differs add("vacuum"); // differs add("reorder-locals"); // differs add("flatten"); diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 329e21dbd5..c718e0290d 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1166,7 +1166,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $7 + local.tee $4 i64.extend_i32_u i64.const 52 i64.shl @@ -1180,24 +1180,23 @@ i64.const 1 i64.add local.tee $3 + local.get $3 i64.clz i32.wrap_i64 - local.set $4 - local.get $3 - local.get $4 + local.tee $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $7 + local.get $4 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $4 + local.get $7 i32.sub local.set $4 local.get $2 @@ -1383,11 +1382,11 @@ i64.shr_u local.tee $5 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index b20dbff518..bc08c8d77c 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1353,7 +1353,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1374,24 +1374,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 local.get $0 i32.load local.tee $4 + local.get $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 76841eb45c..8e0eac136f 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1566,7 +1566,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1588,24 +1588,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -2462,7 +2463,6 @@ (func $~lib/array/Array#copyWithin (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $3 local.get $0 i32.load offset=12 @@ -2471,10 +2471,10 @@ local.get $4 i32.lt_s select - local.set $5 + local.set $3 local.get $0 i32.load offset=4 - local.tee $3 + local.tee $5 local.get $1 i32.const 0 i32.lt_s @@ -2496,11 +2496,11 @@ i32.lt_s select end - local.tee $6 + local.tee $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $5 local.get $2 i32.const 0 i32.lt_s @@ -2508,9 +2508,9 @@ local.get $2 local.get $4 i32.add - local.tee $1 + local.tee $2 i32.const 0 - local.get $1 + local.get $2 i32.const 0 i32.gt_s select @@ -2522,40 +2522,40 @@ i32.lt_s select end - local.tee $1 + local.tee $2 i32.const 2 i32.shl i32.add - local.get $5 + local.get $3 i32.const 0 i32.lt_s if (result i32) + local.get $3 local.get $4 - local.get $5 i32.add - local.tee $2 + local.tee $3 i32.const 0 - local.get $2 + local.get $3 i32.const 0 i32.gt_s select else - local.get $5 + local.get $3 local.get $4 - local.get $5 + local.get $3 local.get $4 i32.lt_s select end - local.get $1 - i32.sub - local.tee $1 - local.get $4 - local.get $6 + local.get $2 i32.sub local.tee $2 + local.get $4 local.get $1 + i32.sub + local.tee $1 local.get $2 + local.get $1 i32.lt_s select i32.const 2 @@ -2667,16 +2667,15 @@ (local $5 i32) (local $6 i32) local.get $2 - local.tee $3 local.get $0 i32.load offset=12 - local.tee $4 + local.tee $3 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add local.tee $1 i32.const 0 @@ -2686,17 +2685,17 @@ select else local.get $1 - local.get $4 + local.get $3 local.get $1 - local.get $4 + local.get $3 i32.lt_s select end local.tee $1 i32.sub - local.tee $2 - local.get $3 + local.tee $4 local.get $2 + local.get $4 i32.lt_s select local.tee $2 @@ -2711,7 +2710,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 i32.load offset=4 local.get $0 i32.load offset=4 @@ -2725,7 +2724,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $4 + local.get $3 local.get $1 local.get $2 i32.add @@ -2738,7 +2737,7 @@ i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 local.get $1 i32.sub i32.const 2 @@ -2746,11 +2745,11 @@ call $~lib/memory/memory.copy end local.get $0 - local.get $4 + local.get $3 local.get $2 i32.sub i32.store offset=12 - local.get $3 + local.get $4 ) (func $~lib/array/Array#splice (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7215,7 +7214,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $7 + local.tee $4 i64.extend_i32_u i64.const 52 i64.shl @@ -7229,24 +7228,23 @@ i64.const 1 i64.add local.tee $3 + local.get $3 i64.clz i32.wrap_i64 - local.set $4 - local.get $3 - local.get $4 + local.tee $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $7 + local.get $4 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $4 + local.get $7 i32.sub local.set $4 local.get $2 @@ -7432,11 +7430,11 @@ i64.shr_u local.tee $5 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 0f710b1f89..56569e95b7 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1584,7 +1584,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1605,25 +1605,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 - local.get $1 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index e7362c0dd0..d13658f592 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1603,7 +1603,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $2 + local.tee $1 i64.const 6 i64.shr_s i32.wrap_i64 @@ -1613,45 +1613,45 @@ i32.add local.tee $7 i64.load - local.set $5 + local.set $6 local.get $7 i64.load offset=8 local.set $3 local.get $7 i64.load offset=16 local.set $4 - local.get $2 + local.get $1 i64.const 63 i64.and - local.tee $2 + local.tee $1 i64.const 0 i64.ne if - local.get $5 - local.get $2 + local.get $6 + local.get $1 i64.shl local.get $3 i64.const 64 - local.get $2 + local.get $1 i64.sub - local.tee $1 + local.tee $2 i64.shr_u i64.or - local.set $5 + local.set $6 local.get $3 - local.get $2 + local.get $1 i64.shl local.get $4 - local.get $1 + local.get $2 i64.shr_u i64.or local.set $3 local.get $4 - local.get $2 + local.get $1 i64.shl local.get $7 i64.load offset=24 - local.get $1 + local.get $2 i64.shr_u i64.or local.set $4 @@ -1661,71 +1661,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.tee $1 + local.tee $2 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul - local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $1 + local.tee $5 + local.get $2 i64.mul - local.tee $6 + local.tee $9 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $2 + local.get $5 + local.get $1 i64.const 32 i64.shr_u - local.tee $9 - local.get $1 + local.tee $5 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 + local.get $5 local.get $8 - local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $1 + 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 $5 + local.get $1 + local.get $6 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $2 + local.get $1 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $6 + local.get $9 i64.const 4294967295 i64.and - local.get $1 + local.get $2 i64.const 32 i64.shl i64.add i64.add - local.tee $2 + local.tee $1 local.get $3 i64.lt_u i64.extend_i32_u @@ -1733,49 +1733,49 @@ local.tee $8 i64.const 2 i64.shl - local.get $2 + local.get $1 i64.const 62 i64.shr_u i64.or - local.tee $5 + local.tee $6 i64.const 63 i64.shr_s local.tee $4 i64.const 1 i64.shr_s - local.get $5 + local.get $6 i64.xor - local.tee $1 + local.tee $2 i64.clz local.set $3 - local.get $1 + local.get $2 local.get $3 i64.shl local.get $4 - local.get $2 + local.get $1 i64.const 2 i64.shl i64.xor - local.tee $6 + local.tee $5 i64.const 64 local.get $3 i64.sub i64.shr_u i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.set $1 - 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 $1 + local.get $2 i64.const 3373259426 i64.mul - local.get $1 + local.get $2 i64.const 560513588 i64.mul local.tee $10 @@ -1786,7 +1786,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -1794,7 +1794,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -1802,39 +1802,39 @@ local.get $10 i64.const 4294967295 i64.and - local.get $1 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $1 + local.tee $2 f64.const 3.753184150245214e-04 - local.get $2 + local.get $1 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $6 + local.get $5 local.get $3 i64.shl f64.convert_i64_u 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 - local.tee $6 + local.tee $5 i64.const 11 i64.shr_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $2 - local.get $6 + local.get $1 + local.get $5 i64.const 53 i64.shl - local.get $1 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -1849,7 +1849,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -2095,21 +2095,21 @@ local.get $0 local.get $0 f64.mul - local.tee $4 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $4 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -2117,21 +2117,21 @@ f64.add local.set $7 local.get $0 - local.get $4 + local.get $2 f64.const 0.5 local.get $3 f64.mul - local.get $4 + local.get $2 local.get $0 f64.mul - local.tee $0 + local.tee $4 local.get $7 f64.mul f64.sub f64.mul local.get $3 f64.sub - local.get $0 + local.get $4 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3420,18 +3420,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 i32) + (local $14 i64) + (local $15 f64) + (local $16 i32) + (local $17 f64) + (local $18 i32) + (local $19 f64) local.get $1 f64.abs f64.const 2 @@ -3486,28 +3486,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 - local.set $19 - local.get $15 + local.set $18 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $9 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $10 + local.get $14 i32.wrap_i64 local.tee $6 i32.or @@ -3519,16 +3519,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $9 + local.get $10 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $10 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -3546,51 +3546,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $11 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $11 i32.sub - local.set $11 + local.set $12 i32.const 2 local.get $6 - local.get $9 + local.get $10 local.get $5 select local.tee $5 - local.get $11 + local.get $12 i32.shr_u - local.tee $10 + local.tee $11 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 local.get $11 + local.get $12 i32.shl i32.eq select @@ -3603,11 +3603,11 @@ local.get $6 i32.eqz if - local.get $9 + local.get $10 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -3617,7 +3617,7 @@ i32.const 1072693248 i32.ge_s if - local.get $8 + local.get $9 i32.const 0 i32.lt_s if @@ -3630,7 +3630,7 @@ f64.const 0 local.get $1 f64.neg - local.get $8 + local.get $9 i32.const 0 i32.ge_s select @@ -3643,11 +3643,11 @@ end unreachable end - local.get $9 + local.get $10 i32.const 1072693248 i32.eq if - local.get $8 + local.get $9 i32.const 0 i32.ge_s if @@ -3659,7 +3659,7 @@ f64.div return end - local.get $8 + local.get $9 i32.const 1073741824 i32.eq if @@ -3668,11 +3668,11 @@ f64.mul return end - local.get $8 + local.get $9 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -3685,7 +3685,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -3704,12 +3704,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -3742,7 +3742,7 @@ end f64.const 1 local.set $7 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if @@ -3765,11 +3765,11 @@ select local.set $7 end - local.get $9 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -3779,7 +3779,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -3791,7 +3791,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -3812,7 +3812,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -3832,7 +3832,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -3870,9 +3870,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $0 - local.get $12 + local.get $8 local.get $2 f64.sub f64.sub @@ -3932,6 +3932,7 @@ end end local.set $5 + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3942,7 +3943,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.const 1.5 f64.const 1 local.get $5 @@ -3951,42 +3952,40 @@ f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $8 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $18 + local.tee $17 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 - f64.mul - local.set $12 - f64.const 0.9617967009544373 - local.get $16 + local.tee $15 f64.const 3 - local.get $12 + local.get $15 + local.get $15 + f64.mul + local.tee $19 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -4001,7 +4000,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -4020,8 +4019,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $8 local.get $0 local.get $3 f64.sub @@ -4030,8 +4029,8 @@ f64.sub f64.mul local.tee $3 - local.get $16 - local.get $18 + local.get $15 + local.get $17 f64.add f64.mul f64.add @@ -4041,20 +4040,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $8 f64.mul local.get $0 - local.get $13 + local.get $8 f64.const 3 f64.sub - local.get $12 + local.get $19 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -4065,7 +4064,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $19 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -4098,14 +4097,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $3 - local.get $12 + local.get $8 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $19 f64.sub f64.sub end @@ -4118,7 +4117,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $8 f64.mul local.get $1 local.get $2 @@ -4126,27 +4125,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $8 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $12 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $12 i32.const 1083179008 i32.sub i32.or @@ -4160,14 +4159,14 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $12 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $11 + local.get $12 i32.const -1064252416 i32.sub i32.or @@ -4180,10 +4179,10 @@ select br_if $folding-inner1 end - local.get $11 + local.get $12 i32.const 2147483647 i32.and - local.tee $10 + local.tee $11 i32.const 20 i32.shr_s i32.const 1023 @@ -4191,19 +4190,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $10 + local.get $11 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $12 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $11 i32.const 2147483647 i32.and i32.const 20 @@ -4214,7 +4213,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $11 i32.and i64.extend_i32_s i64.const 32 @@ -4222,7 +4221,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $11 i32.const 1048575 i32.and i32.const 1048576 @@ -4234,7 +4233,7 @@ local.tee $6 i32.sub local.get $6 - local.get $11 + local.get $12 i32.const 0 i32.lt_s select @@ -6470,17 +6469,17 @@ (local $4 f64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $10 + local.set $7 local.get $1 i32.const 2147483647 i32.and @@ -6500,24 +6499,24 @@ local.tee $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6537,6 +6536,7 @@ end block $~lib/math/rempio2f|inlined.0 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -6560,25 +6560,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $8 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $9 + local.tee $2 i64.load - local.set $6 - local.get $9 + local.set $9 + local.get $2 i64.load offset=8 - local.set $7 - local.get $1 + local.set $6 + local.get $8 i32.const 63 i32.and i64.extend_i32_s @@ -6586,12 +6586,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $7 + local.get $6 local.get $5 i64.const 32 i64.sub i64.shl - local.get $9 + local.get $2 i64.load offset=16 i64.const 96 local.get $5 @@ -6599,52 +6599,52 @@ i64.shr_u i64.or else - local.get $7 + local.get $6 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $10 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $8 - local.get $6 + local.tee $11 + local.get $9 local.get $5 i64.shl - local.get $7 + local.get $6 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $8 + local.get $10 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 2 i64.shl - local.tee $8 + local.tee $6 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $6 + local.get $5 i64.const 62 i64.shr_u - local.get $8 + local.get $6 i64.const 63 i64.shr_u i64.add @@ -6652,7 +6652,7 @@ local.tee $1 i32.sub local.get $1 - local.get $10 + local.get $7 select end local.set $1 @@ -6694,24 +6694,24 @@ local.get $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8225,19 +8225,19 @@ (local $3 f64) (local $4 f64) (local $5 i64) - (local $6 f64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $11 + local.set $8 local.get $1 i32.const 2147483647 i32.and @@ -8257,26 +8257,26 @@ local.tee $4 local.get $4 f64.mul - local.tee $6 + local.tee $3 local.get $4 f64.mul - local.set $3 + local.set $7 local.get $4 - local.get $3 + local.get $7 f64.const -0.16666666641626524 - local.get $6 + local.get $3 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add + local.get $7 + local.get $3 local.get $3 - local.get $6 - local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $6 + local.get $3 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -8296,6 +8296,7 @@ end block $~lib/math/rempio2f|inlined.1 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -8319,25 +8320,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $9 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $10 + local.tee $2 i64.load - local.set $7 - local.get $10 + local.set $10 + local.get $2 i64.load offset=8 - local.set $8 - local.get $1 + local.set $6 + local.get $9 i32.const 63 i32.and i64.extend_i32_s @@ -8345,12 +8346,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $8 + local.get $6 local.get $5 i64.const 32 i64.sub i64.shl - local.get $10 + local.get $2 i64.load offset=16 i64.const 96 local.get $5 @@ -8358,52 +8359,52 @@ i64.shr_u i64.or else - local.get $8 + local.get $6 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $12 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $9 - local.get $7 + local.tee $12 + local.get $10 local.get $5 i64.shl - local.get $8 + local.get $6 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $9 + local.get $11 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $7 + local.tee $5 i64.const 2 i64.shl - local.tee $9 + local.tee $6 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $7 + local.get $5 i64.const 62 i64.shr_u - local.get $9 + local.get $6 i64.const 63 i64.shr_u i64.add @@ -8411,7 +8412,7 @@ local.tee $1 i32.sub local.get $1 - local.get $11 + local.get $8 select end local.set $1 @@ -8424,24 +8425,24 @@ local.get $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8578,20 +8579,20 @@ (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i64) + (local $5 i64) + (local $6 f64) (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $11 + local.set $8 local.get $1 i32.const 2147483647 i32.and @@ -8608,36 +8609,36 @@ end local.get $0 f64.promote_f32 - local.tee $5 - local.get $5 - f64.mul local.tee $4 - local.get $5 + local.get $4 f64.mul - local.set $3 - local.get $5 - local.get $3 - f64.const 0.3333313950307914 + local.tee $3 + local.get $4 + f64.mul + local.set $6 local.get $4 + local.get $6 + f64.const 0.3333313950307914 + local.get $3 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add + local.get $6 + local.get $3 local.get $3 - local.get $4 - local.get $4 f64.mul - local.tee $3 + local.tee $4 f64.mul f64.const 0.05338123784456704 - local.get $4 + local.get $3 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $4 + f64.const 0.002974357433599673 + local.get $3 f64.const 0.009465647849436732 f64.mul f64.add @@ -8659,6 +8660,7 @@ end block $~lib/math/rempio2f|inlined.2 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -8682,91 +8684,91 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $9 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $10 + local.tee $2 i64.load - local.set $7 - local.get $10 + local.set $10 + local.get $2 i64.load offset=8 - local.set $8 - local.get $1 + local.set $7 + local.get $9 i32.const 63 i32.and i64.extend_i32_s - local.tee $6 + local.tee $5 i64.const 32 i64.gt_u if (result i64) - local.get $8 - local.get $6 + local.get $7 + local.get $5 i64.const 32 i64.sub i64.shl - local.get $10 + local.get $2 i64.load offset=16 i64.const 96 - local.get $6 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $8 + local.get $7 i64.const 32 - local.get $6 + local.get $5 i64.sub i64.shr_u end - local.set $12 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $9 - local.get $7 - local.get $6 + local.tee $12 + local.get $10 + local.get $5 i64.shl - local.get $8 + local.get $7 i64.const 64 - local.get $6 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $9 + local.get $11 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $7 + local.tee $5 i64.const 2 i64.shl - local.tee $9 + local.tee $7 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $7 + local.get $5 i64.const 62 i64.shr_u - local.get $9 + local.get $7 i64.const 63 i64.shr_u i64.add @@ -8774,40 +8776,40 @@ local.tee $1 i32.sub local.get $1 - local.get $11 + local.get $8 select end global.get $~lib/math/rempio2f_y - local.tee $5 - local.get $5 - f64.mul local.tee $4 - local.get $5 + local.get $4 f64.mul - local.set $3 - local.get $5 - local.get $3 - f64.const 0.3333313950307914 + local.tee $3 + local.get $4 + f64.mul + local.set $6 local.get $4 + local.get $6 + f64.const 0.3333313950307914 + local.get $3 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add + local.get $6 + local.get $3 local.get $3 - local.get $4 - local.get $4 f64.mul - local.tee $3 + local.tee $4 f64.mul f64.const 0.05338123784456704 - local.get $4 + local.get $3 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $4 + f64.const 0.002974357433599673 + local.get $3 f64.const 0.009465647849436732 f64.mul f64.add diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 769ba21f99..abd839a4e0 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1730,7 +1730,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1751,24 +1751,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 40064d7f59..85d4bd838f 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3312,7 +3312,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $2 + local.tee $1 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3322,45 +3322,45 @@ i32.add local.tee $7 i64.load - local.set $5 + local.set $6 local.get $7 i64.load offset=8 local.set $3 local.get $7 i64.load offset=16 local.set $4 - local.get $2 + local.get $1 i64.const 63 i64.and - local.tee $2 + local.tee $1 i64.const 0 i64.ne if - local.get $5 - local.get $2 + local.get $6 + local.get $1 i64.shl local.get $3 i64.const 64 - local.get $2 + local.get $1 i64.sub - local.tee $1 + local.tee $2 i64.shr_u i64.or - local.set $5 + local.set $6 local.get $3 - local.get $2 + local.get $1 i64.shl local.get $4 - local.get $1 + local.get $2 i64.shr_u i64.or local.set $3 local.get $4 - local.get $2 + local.get $1 i64.shl local.get $7 i64.load offset=24 - local.get $1 + local.get $2 i64.shr_u i64.or local.set $4 @@ -3370,71 +3370,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.tee $1 + local.tee $2 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul - local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $1 + local.tee $5 + local.get $2 i64.mul - local.tee $6 + local.tee $9 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $2 + local.get $5 + local.get $1 i64.const 32 i64.shr_u - local.tee $9 - local.get $1 + local.tee $5 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 + local.get $5 local.get $8 - local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $1 + 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 $5 + local.get $1 + local.get $6 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $2 + local.get $1 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $6 + local.get $9 i64.const 4294967295 i64.and - local.get $1 + local.get $2 i64.const 32 i64.shl i64.add i64.add - local.tee $2 + local.tee $1 local.get $3 i64.lt_u i64.extend_i32_u @@ -3442,49 +3442,49 @@ local.tee $8 i64.const 2 i64.shl - local.get $2 + local.get $1 i64.const 62 i64.shr_u i64.or - local.tee $5 + local.tee $6 i64.const 63 i64.shr_s local.tee $4 i64.const 1 i64.shr_s - local.get $5 + local.get $6 i64.xor - local.tee $1 + local.tee $2 i64.clz local.set $3 - local.get $1 + local.get $2 local.get $3 i64.shl local.get $4 - local.get $2 + local.get $1 i64.const 2 i64.shl i64.xor - local.tee $6 + local.tee $5 i64.const 64 local.get $3 i64.sub i64.shr_u i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.set $1 - 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 $1 + local.get $2 i64.const 3373259426 i64.mul - local.get $1 + local.get $2 i64.const 560513588 i64.mul local.tee $10 @@ -3495,7 +3495,7 @@ i64.const 4294967295 i64.and i64.add - local.set $1 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -3503,7 +3503,7 @@ i64.const 32 i64.shr_u i64.add - local.get $1 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -3511,39 +3511,39 @@ local.get $10 i64.const 4294967295 i64.and - local.get $1 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $1 + local.tee $2 f64.const 3.753184150245214e-04 - local.get $2 + local.get $1 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $6 + local.get $5 local.get $3 i64.shl f64.convert_i64_u 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 - local.tee $6 + local.tee $5 i64.const 11 i64.shr_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $2 - local.get $6 + local.get $1 + local.get $5 i64.const 53 i64.shl - local.get $1 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -3558,7 +3558,7 @@ i64.shl i64.sub local.get $0 - local.get $5 + local.get $6 i64.xor i64.const -9223372036854775808 i64.and @@ -3804,21 +3804,21 @@ local.get $0 local.get $0 f64.mul - local.tee $4 + local.tee $2 f64.const -1.984126982985795e-04 - local.get $4 + local.get $2 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $4 - local.get $4 - local.get $4 + local.get $2 + local.get $2 + local.get $2 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $4 + local.get $2 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -3826,21 +3826,21 @@ f64.add local.set $7 local.get $0 - local.get $4 + local.get $2 f64.const 0.5 local.get $3 f64.mul - local.get $4 + local.get $2 local.get $0 f64.mul - local.tee $0 + local.tee $4 local.get $7 f64.mul f64.sub f64.mul local.get $3 f64.sub - local.get $0 + local.get $4 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3934,17 +3934,17 @@ (local $4 f64) (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i32) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $10 + local.set $7 local.get $1 i32.const 2147483647 i32.and @@ -3964,24 +3964,24 @@ local.tee $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -4001,6 +4001,7 @@ end block $~lib/math/rempio2f|inlined.0 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -4024,25 +4025,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $8 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $9 + local.tee $2 i64.load - local.set $6 - local.get $9 + local.set $9 + local.get $2 i64.load offset=8 - local.set $7 - local.get $1 + local.set $6 + local.get $8 i32.const 63 i32.and i64.extend_i32_s @@ -4050,12 +4051,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $7 + local.get $6 local.get $5 i64.const 32 i64.sub i64.shl - local.get $9 + local.get $2 i64.load offset=16 i64.const 96 local.get $5 @@ -4063,52 +4064,52 @@ i64.shr_u i64.or else - local.get $7 + local.get $6 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $10 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $8 - local.get $6 + local.tee $11 + local.get $9 local.get $5 i64.shl - local.get $7 + local.get $6 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $8 + local.get $10 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $6 + local.tee $5 i64.const 2 i64.shl - local.tee $8 + local.tee $6 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $6 + local.get $5 i64.const 62 i64.shr_u - local.get $8 + local.get $6 i64.const 63 i64.shr_u i64.add @@ -4116,7 +4117,7 @@ local.tee $1 i32.sub local.get $1 - local.get $10 + local.get $7 select end local.set $1 @@ -4158,24 +4159,24 @@ local.get $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -7110,18 +7111,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 i32) + (local $14 i64) + (local $15 f64) + (local $16 i32) + (local $17 f64) + (local $18 i32) + (local $19 f64) local.get $1 f64.abs f64.const 2 @@ -7176,28 +7177,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 - local.set $19 - local.get $15 + local.set $18 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $9 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $10 + local.get $14 i32.wrap_i64 local.tee $6 i32.or @@ -7209,16 +7210,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $9 + local.get $10 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $10 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -7236,51 +7237,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $11 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $11 i32.sub - local.set $11 + local.set $12 i32.const 2 local.get $6 - local.get $9 + local.get $10 local.get $5 select local.tee $5 - local.get $11 + local.get $12 i32.shr_u - local.tee $10 + local.tee $11 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 local.get $11 + local.get $12 i32.shl i32.eq select @@ -7293,11 +7294,11 @@ local.get $6 i32.eqz if - local.get $9 + local.get $10 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -7307,7 +7308,7 @@ i32.const 1072693248 i32.ge_s if - local.get $8 + local.get $9 i32.const 0 i32.lt_s if @@ -7320,7 +7321,7 @@ f64.const 0 local.get $1 f64.neg - local.get $8 + local.get $9 i32.const 0 i32.ge_s select @@ -7333,11 +7334,11 @@ end unreachable end - local.get $9 + local.get $10 i32.const 1072693248 i32.eq if - local.get $8 + local.get $9 i32.const 0 i32.ge_s if @@ -7349,7 +7350,7 @@ f64.div return end - local.get $8 + local.get $9 i32.const 1073741824 i32.eq if @@ -7358,11 +7359,11 @@ f64.mul return end - local.get $8 + local.get $9 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -7375,7 +7376,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -7394,12 +7395,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -7432,7 +7433,7 @@ end f64.const 1 local.set $7 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if @@ -7455,11 +7456,11 @@ select local.set $7 end - local.get $9 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -7469,7 +7470,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -7481,7 +7482,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -7502,7 +7503,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -7522,7 +7523,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -7560,9 +7561,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $0 - local.get $12 + local.get $8 local.get $2 f64.sub f64.sub @@ -7622,6 +7623,7 @@ end end local.set $5 + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7632,7 +7634,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.const 1.5 f64.const 1 local.get $5 @@ -7641,42 +7643,40 @@ f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $8 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $18 + local.tee $17 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 - f64.mul - local.set $12 - f64.const 0.9617967009544373 - local.get $16 + local.tee $15 f64.const 3 - local.get $12 + local.get $15 + local.get $15 + f64.mul + local.tee $19 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -7691,7 +7691,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -7710,8 +7710,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $8 local.get $0 local.get $3 f64.sub @@ -7720,8 +7720,8 @@ f64.sub f64.mul local.tee $3 - local.get $16 - local.get $18 + local.get $15 + local.get $17 f64.add f64.mul f64.add @@ -7731,20 +7731,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $8 f64.mul local.get $0 - local.get $13 + local.get $8 f64.const 3 f64.sub - local.get $12 + local.get $19 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -7755,7 +7755,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $19 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -7788,14 +7788,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $3 - local.get $12 + local.get $8 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $19 f64.sub f64.sub end @@ -7808,7 +7808,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $8 f64.mul local.get $1 local.get $2 @@ -7816,27 +7816,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $8 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $12 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $12 i32.const 1083179008 i32.sub i32.or @@ -7850,14 +7850,14 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $12 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $11 + local.get $12 i32.const -1064252416 i32.sub i32.or @@ -7870,10 +7870,10 @@ select br_if $folding-inner1 end - local.get $11 + local.get $12 i32.const 2147483647 i32.and - local.tee $10 + local.tee $11 i32.const 20 i32.shr_s i32.const 1023 @@ -7881,19 +7881,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $10 + local.get $11 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $12 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $11 i32.const 2147483647 i32.and i32.const 20 @@ -7904,7 +7904,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $11 i32.and i64.extend_i32_s i64.const 32 @@ -7912,7 +7912,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $11 i32.const 1048575 i32.and i32.const 1048576 @@ -7924,7 +7924,7 @@ local.tee $6 i32.sub local.get $6 - local.get $11 + local.get $12 i32.const 0 i32.lt_s select @@ -9536,19 +9536,19 @@ (local $3 f64) (local $4 f64) (local $5 i64) - (local $6 f64) - (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (local $6 i64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $11 + local.set $8 local.get $1 i32.const 2147483647 i32.and @@ -9568,26 +9568,26 @@ local.tee $4 local.get $4 f64.mul - local.tee $6 + local.tee $3 local.get $4 f64.mul - local.set $3 + local.set $7 local.get $4 - local.get $3 + local.get $7 f64.const -0.16666666641626524 - local.get $6 + local.get $3 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add + local.get $7 + local.get $3 local.get $3 - local.get $6 - local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $6 + local.get $3 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9607,6 +9607,7 @@ end block $~lib/math/rempio2f|inlined.1 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -9630,25 +9631,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $9 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $10 + local.tee $2 i64.load - local.set $7 - local.get $10 + local.set $10 + local.get $2 i64.load offset=8 - local.set $8 - local.get $1 + local.set $6 + local.get $9 i32.const 63 i32.and i64.extend_i32_s @@ -9656,12 +9657,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $8 + local.get $6 local.get $5 i64.const 32 i64.sub i64.shl - local.get $10 + local.get $2 i64.load offset=16 i64.const 96 local.get $5 @@ -9669,52 +9670,52 @@ i64.shr_u i64.or else - local.get $8 + local.get $6 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $12 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $9 - local.get $7 + local.tee $12 + local.get $10 local.get $5 i64.shl - local.get $8 + local.get $6 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $9 + local.get $11 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $7 + local.tee $5 i64.const 2 i64.shl - local.tee $9 + local.tee $6 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $7 + local.get $5 i64.const 62 i64.shr_u - local.get $9 + local.get $6 i64.const 63 i64.shr_u i64.add @@ -9722,7 +9723,7 @@ local.tee $1 i32.sub local.get $1 - local.get $11 + local.get $8 select end local.set $1 @@ -9735,24 +9736,24 @@ local.get $3 local.get $3 f64.mul - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f64.mul - local.set $3 + local.set $4 f64.const 1 - local.get $4 + local.get $3 f64.const -0.499999997251031 f64.mul f64.add - local.get $3 + local.get $4 f64.const 0.04166662332373906 f64.mul f64.add - local.get $3 local.get $4 + local.get $3 f64.mul f64.const -0.001388676377460993 - local.get $4 + local.get $3 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -10379,20 +10380,20 @@ (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i64) + (local $5 i64) + (local $6 f64) (local $7 i64) - (local $8 i64) - (local $9 i64) - (local $10 i32) - (local $11 i32) + (local $8 i32) + (local $9 i32) + (local $10 i64) + (local $11 i64) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $11 + local.set $8 local.get $1 i32.const 2147483647 i32.and @@ -10409,36 +10410,36 @@ end local.get $0 f64.promote_f32 - local.tee $5 - local.get $5 - f64.mul local.tee $4 - local.get $5 + local.get $4 f64.mul - local.set $3 - local.get $5 - local.get $3 - f64.const 0.3333313950307914 + local.tee $3 + local.get $4 + f64.mul + local.set $6 local.get $4 + local.get $6 + f64.const 0.3333313950307914 + local.get $3 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add + local.get $6 + local.get $3 local.get $3 - local.get $4 - local.get $4 f64.mul - local.tee $3 + local.tee $4 f64.mul f64.const 0.05338123784456704 - local.get $4 + local.get $3 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $4 + f64.const 0.002974357433599673 + local.get $3 f64.const 0.009465647849436732 f64.mul f64.add @@ -10460,6 +10461,7 @@ end block $~lib/math/rempio2f|inlined.2 (result i32) local.get $2 + local.tee $1 i32.const 1305022427 i32.lt_u if @@ -10483,91 +10485,91 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $2 + local.get $1 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $1 + local.tee $9 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $10 + local.tee $2 i64.load - local.set $7 - local.get $10 + local.set $10 + local.get $2 i64.load offset=8 - local.set $8 - local.get $1 + local.set $7 + local.get $9 i32.const 63 i32.and i64.extend_i32_s - local.tee $6 + local.tee $5 i64.const 32 i64.gt_u if (result i64) - local.get $8 - local.get $6 + local.get $7 + local.get $5 i64.const 32 i64.sub i64.shl - local.get $10 + local.get $2 i64.load offset=16 i64.const 96 - local.get $6 + local.get $5 i64.sub i64.shr_u i64.or else - local.get $8 + local.get $7 i64.const 32 - local.get $6 + local.get $5 i64.sub i64.shr_u end - local.set $12 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $2 + local.get $1 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $9 - local.get $7 - local.get $6 + local.tee $12 + local.get $10 + local.get $5 i64.shl - local.get $8 + local.get $7 i64.const 64 - local.get $6 + local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $9 + local.get $11 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $7 + local.tee $5 i64.const 2 i64.shl - local.tee $9 + local.tee $7 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $7 + local.get $5 i64.const 62 i64.shr_u - local.get $9 + local.get $7 i64.const 63 i64.shr_u i64.add @@ -10575,40 +10577,40 @@ local.tee $1 i32.sub local.get $1 - local.get $11 + local.get $8 select end global.get $~lib/math/rempio2f_y - local.tee $5 - local.get $5 - f64.mul local.tee $4 - local.get $5 + local.get $4 f64.mul - local.set $3 - local.get $5 - local.get $3 - f64.const 0.3333313950307914 + local.tee $3 + local.get $4 + f64.mul + local.set $6 local.get $4 + local.get $6 + f64.const 0.3333313950307914 + local.get $3 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add + local.get $6 + local.get $3 local.get $3 - local.get $4 - local.get $4 f64.mul - local.tee $3 + local.tee $4 f64.mul f64.const 0.05338123784456704 - local.get $4 + local.get $3 f64.const 0.024528318116654728 f64.mul f64.add - local.get $3 - f64.const 0.002974357433599673 local.get $4 + f64.const 0.002974357433599673 + local.get $3 f64.const 0.009465647849436732 f64.mul f64.add diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 81062baf99..97accf05f4 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -240,18 +240,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 i32) + (local $8 f64) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 f64) + (local $12 i32) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) - (local $17 i32) - (local $18 f64) - (local $19 i32) + (local $14 i64) + (local $15 f64) + (local $16 i32) + (local $17 f64) + (local $18 i32) + (local $19 f64) local.get $1 f64.abs f64.const 2 @@ -306,28 +306,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 - local.set $19 - local.get $15 + local.set $18 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $9 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $10 + local.get $14 i32.wrap_i64 local.tee $6 i32.or @@ -339,16 +339,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $9 + local.get $10 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $10 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $19 + local.get $18 i32.const 0 local.get $4 i32.const 2146435072 @@ -366,51 +366,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $10 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $10 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $10 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $11 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $11 i32.sub - local.set $11 + local.set $12 i32.const 2 local.get $6 - local.get $9 + local.get $10 local.get $5 select local.tee $5 - local.get $11 + local.get $12 i32.shr_u - local.tee $10 + local.tee $11 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 - local.get $10 local.get $11 + local.get $12 i32.shl i32.eq select @@ -423,11 +423,11 @@ local.get $6 i32.eqz if - local.get $9 + local.get $10 i32.const 2146435072 i32.eq if - local.get $19 + local.get $18 local.get $4 i32.const 1072693248 i32.sub @@ -437,7 +437,7 @@ i32.const 1072693248 i32.ge_s if - local.get $8 + local.get $9 i32.const 0 i32.lt_s if @@ -450,7 +450,7 @@ f64.const 0 local.get $1 f64.neg - local.get $8 + local.get $9 i32.const 0 i32.ge_s select @@ -463,11 +463,11 @@ end unreachable end - local.get $9 + local.get $10 i32.const 1072693248 i32.eq if - local.get $8 + local.get $9 i32.const 0 i32.ge_s if @@ -479,7 +479,7 @@ f64.div return end - local.get $8 + local.get $9 i32.const 1073741824 i32.eq if @@ -488,11 +488,11 @@ f64.mul return end - local.get $8 + local.get $9 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -505,7 +505,7 @@ local.get $0 f64.abs local.set $2 - local.get $19 + local.get $18 i32.eqz if i32.const 1 @@ -524,12 +524,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -562,7 +562,7 @@ end f64.const 1 local.set $7 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if @@ -585,11 +585,11 @@ select local.set $7 end - local.get $9 + local.get $10 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $10 i32.const 1139802112 i32.gt_s if @@ -599,7 +599,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -611,7 +611,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -632,7 +632,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.lt_s select @@ -652,7 +652,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -690,9 +690,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $0 - local.get $12 + local.get $8 local.get $2 f64.sub f64.sub @@ -752,6 +752,7 @@ end end local.set $5 + f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -762,7 +763,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.const 1.5 f64.const 1 local.get $5 @@ -771,42 +772,40 @@ f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $8 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $18 + local.tee $17 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 - f64.mul - local.set $12 - f64.const 0.9617967009544373 - local.get $16 + local.tee $15 f64.const 3 - local.get $12 + local.get $15 + local.get $15 + f64.mul + local.tee $19 f64.add - local.get $18 - local.get $18 + local.get $17 + local.get $17 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -821,7 +820,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -840,8 +839,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $8 local.get $0 local.get $3 f64.sub @@ -850,8 +849,8 @@ f64.sub f64.mul local.tee $3 - local.get $16 - local.get $18 + local.get $15 + local.get $17 f64.add f64.mul f64.add @@ -861,20 +860,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $8 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $8 f64.mul local.get $0 - local.get $13 + local.get $8 f64.const 3 f64.sub - local.get $12 + local.get $19 f64.sub f64.sub - local.get $18 + local.get $17 f64.mul f64.add local.tee $0 @@ -885,7 +884,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $19 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -918,14 +917,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $8 local.get $3 - local.get $12 + local.get $8 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $19 f64.sub f64.sub end @@ -938,7 +937,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $8 f64.mul local.get $1 local.get $2 @@ -946,27 +945,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $8 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $12 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $12 i32.const 1083179008 i32.sub i32.or @@ -980,14 +979,14 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $12 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $11 + local.get $12 i32.const -1064252416 i32.sub i32.or @@ -1000,10 +999,10 @@ select br_if $folding-inner1 end - local.get $11 + local.get $12 i32.const 2147483647 i32.and - local.tee $10 + local.tee $11 i32.const 20 i32.shr_s i32.const 1023 @@ -1011,19 +1010,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $10 + local.get $11 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $12 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $11 i32.const 2147483647 i32.and i32.const 20 @@ -1034,7 +1033,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $11 i32.and i64.extend_i32_s i64.const 32 @@ -1042,7 +1041,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $11 i32.const 1048575 i32.and i32.const 1048576 @@ -1054,7 +1053,7 @@ local.tee $6 i32.sub local.get $6 - local.get $11 + local.get $12 i32.const 0 i32.lt_s select diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 6b8c2d7989..45d813ad5d 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1721,7 +1721,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1742,24 +1742,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2ef44b1f95..779823594c 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1451,11 +1451,11 @@ local.get $2 if local.get $5 - local.get $4 local.get $2 i32.const 1 i32.shr_u local.tee $3 + local.get $4 i32.add i32.const 1 i32.shl @@ -2456,9 +2456,9 @@ block $~lib/util/string/isFinalSigma|inlined.0 (result i32) local.get $0 local.set $4 + local.get $6 i32.const 0 local.set $10 - local.get $6 i32.const 0 local.get $6 local.tee $2 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 699642a86f..2decce8dc6 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6535,7 +6535,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $7 + local.tee $4 i64.extend_i32_u i64.const 52 i64.shl @@ -6549,24 +6549,23 @@ i64.const 1 i64.add local.tee $3 + local.get $3 i64.clz i32.wrap_i64 - local.set $4 - local.get $3 - local.get $4 + local.tee $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $7 + local.get $4 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $4 + local.get $7 i32.sub local.set $4 local.get $2 @@ -6752,11 +6751,11 @@ i64.shr_u local.tee $5 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d979f4bd0c..0e1dc1a15a 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1538,7 +1538,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1560,24 +1560,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 + local.get $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 @@ -2204,27 +2205,17 @@ (local $3 i32) (local $4 i32) local.get $0 + local.tee $3 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.load offset=4 + local.set $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add local.tee $0 i32.const 0 @@ -2234,51 +2225,63 @@ select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end + local.set $1 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc local.tee $0 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $3 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $0 local.get $2 i32.const 0 i32.lt_s if (result i32) local.get $2 - local.get $3 + local.get $4 i32.add - local.tee $1 + local.tee $2 i32.const 0 - local.get $1 + local.get $2 i32.const 0 i32.gt_s select else local.get $2 - local.get $3 + local.get $4 local.get $2 - local.get $3 + local.get $4 i32.lt_s select end - local.tee $1 - local.get $0 + local.tee $2 + local.get $1 + local.get $2 local.get $1 - local.get $0 i32.gt_s select - local.get $0 + local.get $1 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $4 + local.get $0 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Float64Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 f64) @@ -2309,27 +2312,17 @@ (local $3 i32) (local $4 i32) local.get $0 + local.tee $3 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.tee $4 - local.get $0 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.load offset=4 + local.set $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add local.tee $0 i32.const 0 @@ -2339,51 +2332,63 @@ select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end + local.set $1 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc local.tee $0 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $3 + i32.load offset=4 + local.get $1 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $4 + local.get $0 local.get $2 i32.const 0 i32.lt_s if (result i32) local.get $2 - local.get $3 + local.get $4 i32.add - local.tee $1 + local.tee $2 i32.const 0 - local.get $1 + local.get $2 i32.const 0 i32.gt_s select else local.get $2 - local.get $3 + local.get $4 local.get $2 - local.get $3 + local.get $4 i32.lt_s select end - local.tee $1 - local.get $0 + local.tee $2 + local.get $1 + local.get $2 local.get $1 - local.get $0 i32.gt_s select - local.get $0 + local.get $1 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $4 + local.get $0 call $~lib/rt/pure/__retain ) (func $~setArgumentsLength (; 38 ;) (param $0 i32) @@ -2938,7 +2943,7 @@ i32.lt_s select end - local.tee $0 + local.tee $2 local.get $3 i32.const 0 i32.lt_s @@ -2946,9 +2951,9 @@ local.get $3 local.get $4 i32.add - local.tee $2 + local.tee $0 i32.const 0 - local.get $2 + local.get $0 i32.const 0 i32.gt_s select @@ -2960,15 +2965,15 @@ i32.lt_s select end - local.tee $2 + local.tee $0 i32.lt_s if - local.get $0 + local.get $2 local.get $6 i32.add local.get $1 - local.get $2 local.get $0 + local.get $2 i32.sub call $~lib/memory/memory.fill end @@ -3270,19 +3275,9 @@ (local $3 i32) (local $4 i32) local.get $0 + local.tee $3 i32.load offset=8 local.set $4 - local.get $0 - local.set $3 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $3 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $0 local.get $1 i32.const 0 i32.lt_s @@ -3290,9 +3285,9 @@ local.get $1 local.get $4 i32.add - local.tee $1 + local.tee $0 i32.const 0 - local.get $1 + local.get $0 i32.const 0 i32.gt_s select @@ -3304,7 +3299,17 @@ i32.lt_s select end - local.tee $1 + local.set $1 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $0 + local.get $1 local.get $3 i32.load offset=4 i32.add @@ -18731,7 +18736,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $7 + local.tee $4 i64.extend_i32_u i64.const 52 i64.shl @@ -18745,24 +18750,23 @@ i64.const 1 i64.add local.tee $3 + local.get $3 i64.clz i32.wrap_i64 - local.set $4 - local.get $3 - local.get $4 + local.tee $7 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $7 + local.get $4 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $4 + local.get $7 i32.sub local.set $4 local.get $2 @@ -18948,11 +18952,11 @@ i64.shr_u local.tee $5 i64.mul - local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 + local.get $6 i64.mul local.get $2 i64.const 4294967295 From 2dcf5d6a89eb61e2b01b53a89a802d9898ce3495 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 6 Mar 2020 16:45:53 +0200 Subject: [PATCH 42/51] revert last commit --- cli/asc.js | 2 +- .../resolve-elementaccess.optimized.wat | 13 +- .../retain-release-sanity.optimized.wat | 15 +- tests/compiler/std/array.optimized.wat | 88 +-- tests/compiler/std/arraybuffer.optimized.wat | 15 +- tests/compiler/std/libm.optimized.wat | 618 +++++++++--------- tests/compiler/std/map.optimized.wat | 15 +- tests/compiler/std/math.optimized.wat | 618 +++++++++--------- .../std/operator-overloading.optimized.wat | 199 +++--- tests/compiler/std/set.optimized.wat | 15 +- .../std/string-casemapping.optimized.wat | 4 +- tests/compiler/std/string.optimized.wat | 13 +- tests/compiler/std/typedarray.optimized.wat | 176 +++-- 13 files changed, 893 insertions(+), 898 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index c7bba0eb20..f8f6e30544 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -704,7 +704,7 @@ exports.main = function main(argv, options, callback) { add("ssa-nomerge"); } if (optimizeLevel >= 3) { - add("simplify-locals-notee-nostructure"); // differs + add("simplify-locals-nostructure"); // differs add("vacuum"); // differs add("reorder-locals"); // differs add("flatten"); diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index c718e0290d..329e21dbd5 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1166,7 +1166,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl @@ -1180,23 +1180,24 @@ i64.const 1 i64.add local.tee $3 - local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.set $4 + local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $4 + local.get $7 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $7 + local.get $4 i32.sub local.set $4 local.get $2 @@ -1382,11 +1383,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index bc08c8d77c..b20dbff518 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -1353,7 +1353,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1374,25 +1374,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 - local.get $1 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 8e0eac136f..76841eb45c 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1566,7 +1566,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1588,25 +1588,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -2463,6 +2462,7 @@ (func $~lib/array/Array#copyWithin (; 38 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) + (local $6 i32) local.get $3 local.get $0 i32.load offset=12 @@ -2471,10 +2471,10 @@ local.get $4 i32.lt_s select - local.set $3 + local.set $5 local.get $0 i32.load offset=4 - local.tee $5 + local.tee $3 local.get $1 i32.const 0 i32.lt_s @@ -2496,11 +2496,11 @@ i32.lt_s select end - local.tee $1 + local.tee $6 i32.const 2 i32.shl i32.add - local.get $5 + local.get $3 local.get $2 i32.const 0 i32.lt_s @@ -2508,9 +2508,9 @@ local.get $2 local.get $4 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select @@ -2522,40 +2522,40 @@ i32.lt_s select end - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add - local.get $3 + local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $3 local.get $4 + local.get $5 i32.add - local.tee $3 + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.const 0 i32.gt_s select else - local.get $3 + local.get $5 local.get $4 - local.get $3 + local.get $5 local.get $4 i32.lt_s select end - local.get $2 - i32.sub - local.tee $2 - local.get $4 local.get $1 i32.sub local.tee $1 - local.get $2 + local.get $4 + local.get $6 + i32.sub + local.tee $2 local.get $1 + local.get $2 i32.lt_s select i32.const 2 @@ -2667,15 +2667,16 @@ (local $5 i32) (local $6 i32) local.get $2 + local.tee $3 local.get $0 i32.load offset=12 - local.tee $3 + local.tee $4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $3 + local.get $4 i32.add local.tee $1 i32.const 0 @@ -2685,17 +2686,17 @@ select else local.get $1 - local.get $3 + local.get $4 local.get $1 - local.get $3 + local.get $4 i32.lt_s select end local.tee $1 i32.sub - local.tee $4 + local.tee $2 + local.get $3 local.get $2 - local.get $4 i32.lt_s select local.tee $2 @@ -2710,7 +2711,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $3 i32.load offset=4 local.get $0 i32.load offset=4 @@ -2724,7 +2725,7 @@ i32.const 2 i32.shl call $~lib/memory/memory.copy - local.get $3 + local.get $4 local.get $1 local.get $2 i32.add @@ -2737,7 +2738,7 @@ i32.const 2 i32.shl i32.add - local.get $3 + local.get $4 local.get $1 i32.sub i32.const 2 @@ -2745,11 +2746,11 @@ call $~lib/memory/memory.copy end local.get $0 - local.get $3 + local.get $4 local.get $2 i32.sub i32.store offset=12 - local.get $4 + local.get $3 ) (func $~lib/array/Array#splice (; 43 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7214,7 +7215,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl @@ -7228,23 +7229,24 @@ i64.const 1 i64.add local.tee $3 - local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.set $4 + local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $4 + local.get $7 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $7 + local.get $4 i32.sub local.set $4 local.get $2 @@ -7430,11 +7432,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 56569e95b7..0f710b1f89 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1584,7 +1584,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1605,24 +1605,25 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $2 - local.tee $1 + local.get $1 + local.set $2 local.get $0 i32.load local.tee $4 + local.get $1 i32.ne if - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $1 + local.set $2 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $1 + local.get $2 i32.store local.get $0 - local.get $2 + local.get $1 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index d13658f592..e7362c0dd0 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1603,7 +1603,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $1 + local.tee $2 i64.const 6 i64.shr_s i32.wrap_i64 @@ -1613,45 +1613,45 @@ i32.add local.tee $7 i64.load - local.set $6 + local.set $5 local.get $7 i64.load offset=8 local.set $3 local.get $7 i64.load offset=16 local.set $4 - local.get $1 + local.get $2 i64.const 63 i64.and - local.tee $1 + local.tee $2 i64.const 0 i64.ne if - local.get $6 - local.get $1 + local.get $5 + local.get $2 i64.shl local.get $3 i64.const 64 - local.get $1 + local.get $2 i64.sub - local.tee $2 + local.tee $1 i64.shr_u i64.or - local.set $6 + local.set $5 local.get $3 - local.get $1 + local.get $2 i64.shl local.get $4 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $3 local.get $4 - local.get $1 + local.get $2 i64.shl local.get $7 i64.load offset=24 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $4 @@ -1661,71 +1661,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.tee $2 + local.tee $1 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul + local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $5 - local.get $2 + local.tee $1 i64.mul - local.tee $9 + local.tee $6 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $5 - local.get $1 + local.get $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $9 + local.get $1 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $2 - local.get $5 + local.set $1 local.get $8 + local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi - local.get $1 - local.get $6 + local.get $2 + local.get $5 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $1 + local.get $2 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $9 + local.get $6 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add i64.add - local.tee $1 + local.tee $2 local.get $3 i64.lt_u i64.extend_i32_u @@ -1733,49 +1733,49 @@ local.tee $8 i64.const 2 i64.shl - local.get $1 + local.get $2 i64.const 62 i64.shr_u i64.or - local.tee $6 + local.tee $5 i64.const 63 i64.shr_s local.tee $4 i64.const 1 i64.shr_s - local.get $6 + local.get $5 i64.xor - local.tee $2 + local.tee $1 i64.clz local.set $3 - local.get $2 + local.get $1 local.get $3 i64.shl local.get $4 - local.get $1 + local.get $2 i64.const 2 i64.shl i64.xor - local.tee $5 + local.tee $6 i64.const 64 local.get $3 i64.sub i64.shr_u i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $1 + local.set $1 + local.get $2 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $2 + local.get $1 i64.const 3373259426 i64.mul - local.get $2 + local.get $1 i64.const 560513588 i64.mul local.tee $10 @@ -1786,7 +1786,7 @@ i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $9 i64.const 3373259426 i64.mul @@ -1794,7 +1794,7 @@ i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add @@ -1802,39 +1802,39 @@ local.get $10 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add - local.tee $2 + local.tee $1 f64.const 3.753184150245214e-04 - local.get $1 + local.get $2 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $5 + local.get $6 local.get $3 i64.shl f64.convert_i64_u f64.mul f64.add i64.trunc_f64_u - local.tee $1 + local.tee $2 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi - local.tee $5 + local.tee $6 i64.const 11 i64.shr_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $1 - local.get $5 + local.get $2 + local.get $6 i64.const 53 i64.shl - local.get $2 + local.get $1 i64.const 11 i64.shr_u i64.or @@ -1849,7 +1849,7 @@ i64.shl i64.sub local.get $0 - local.get $6 + local.get $5 i64.xor i64.const -9223372036854775808 i64.and @@ -2095,21 +2095,21 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $2 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -2117,21 +2117,21 @@ f64.add local.set $7 local.get $0 - local.get $2 + local.get $4 f64.const 0.5 local.get $3 f64.mul - local.get $2 + local.get $4 local.get $0 f64.mul - local.tee $4 + local.tee $0 local.get $7 f64.mul f64.sub f64.mul local.get $3 f64.sub - local.get $4 + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3420,18 +3420,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 f64) (local $13 f64) - (local $14 i64) - (local $15 f64) - (local $16 i32) - (local $17 f64) - (local $18 i32) - (local $19 f64) + (local $14 f64) + (local $15 i64) + (local $16 f64) + (local $17 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -3486,28 +3486,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 - local.set $18 - local.get $14 + local.set $19 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $8 i32.const 2147483647 i32.and - local.tee $10 - local.get $14 + local.tee $9 + local.get $15 i32.wrap_i64 local.tee $6 i32.or @@ -3519,16 +3519,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $10 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $10 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $18 + local.get $19 i32.const 0 local.get $4 i32.const 2146435072 @@ -3546,51 +3546,51 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $10 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $10 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $12 + local.set $11 i32.const 2 local.get $6 - local.get $10 + local.get $9 local.get $5 select local.tee $5 - local.get $12 + local.get $11 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $10 local.get $11 - local.get $12 i32.shl i32.eq select @@ -3603,11 +3603,11 @@ local.get $6 i32.eqz if - local.get $10 + local.get $9 i32.const 2146435072 i32.eq if - local.get $18 + local.get $19 local.get $4 i32.const 1072693248 i32.sub @@ -3617,7 +3617,7 @@ i32.const 1072693248 i32.ge_s if - local.get $9 + local.get $8 i32.const 0 i32.lt_s if @@ -3630,7 +3630,7 @@ f64.const 0 local.get $1 f64.neg - local.get $9 + local.get $8 i32.const 0 i32.ge_s select @@ -3643,11 +3643,11 @@ end unreachable end - local.get $10 + local.get $9 i32.const 1072693248 i32.eq if - local.get $9 + local.get $8 i32.const 0 i32.ge_s if @@ -3659,7 +3659,7 @@ f64.div return end - local.get $9 + local.get $8 i32.const 1073741824 i32.eq if @@ -3668,11 +3668,11 @@ f64.mul return end - local.get $9 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -3685,7 +3685,7 @@ local.get $0 f64.abs local.set $2 - local.get $18 + local.get $19 i32.eqz if i32.const 1 @@ -3704,12 +3704,12 @@ local.get $2 f64.div local.get $2 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if (result f64) @@ -3742,7 +3742,7 @@ end f64.const 1 local.set $7 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -3765,11 +3765,11 @@ select local.set $7 end - local.get $10 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $10 + local.get $9 i32.const 1139802112 i32.gt_s if @@ -3779,7 +3779,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -3791,7 +3791,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -3812,7 +3812,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -3832,7 +3832,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -3870,9 +3870,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $0 - local.get $8 + local.get $12 local.get $2 f64.sub f64.sub @@ -3932,7 +3932,6 @@ end end local.set $5 - f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3943,7 +3942,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 @@ -3952,40 +3951,42 @@ f64.sub local.tee $2 f64.const 1 - local.get $8 + local.get $13 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $17 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $15 - f64.const 3 - local.get $15 - local.get $15 + local.tee $16 + local.get $16 f64.mul - local.tee $19 + local.set $12 + f64.const 0.9617967009544373 + local.get $16 + f64.const 3 + local.get $12 f64.add - local.get $17 - local.get $17 + local.get $18 + local.get $18 f64.mul - local.tee $13 - local.get $13 + local.tee $14 + local.get $14 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $14 f64.const 0.4285714285785502 - local.get $13 + local.get $14 f64.const 0.33333332981837743 - local.get $13 + local.get $14 f64.const 0.272728123808534 - local.get $13 + local.get $14 f64.const 0.23066074577556175 - local.get $13 + local.get $14 f64.const 0.20697501780033842 f64.mul f64.add @@ -4000,7 +4001,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $16 local.get $4 i32.const 1 i32.shr_s @@ -4019,8 +4020,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $8 + local.get $16 + local.get $13 local.get $0 local.get $3 f64.sub @@ -4029,8 +4030,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $17 + local.get $16 + local.get $18 f64.add f64.mul f64.add @@ -4040,20 +4041,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.mul local.tee $2 local.get $3 - local.get $8 + local.get $13 f64.mul local.get $0 - local.get $8 + local.get $13 f64.const 3 f64.sub - local.get $19 + local.get $12 f64.sub f64.sub - local.get $17 + local.get $18 f64.mul f64.add local.tee $0 @@ -4064,7 +4065,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $19 + local.tee $13 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -4097,14 +4098,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $3 - local.get $8 + local.get $12 local.get $0 f64.sub local.get $2 f64.sub - local.get $19 + local.get $13 f64.sub f64.sub end @@ -4117,7 +4118,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $8 + local.get $12 f64.mul local.get $1 local.get $2 @@ -4125,27 +4126,27 @@ f64.add local.tee $1 local.get $0 - local.get $8 + local.get $12 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $12 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $12 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -4159,14 +4160,14 @@ i32.or br_if $folding-inner0 else - local.get $12 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $12 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -4179,10 +4180,10 @@ select br_if $folding-inner1 end - local.get $12 + local.get $11 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -4190,19 +4191,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $12 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -4213,7 +4214,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -4221,7 +4222,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -4233,7 +4234,7 @@ local.tee $6 i32.sub local.get $6 - local.get $12 + local.get $11 i32.const 0 i32.lt_s select @@ -6469,17 +6470,17 @@ (local $4 f64) (local $5 i64) (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) + (local $7 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $7 + local.set $10 local.get $1 i32.const 2147483647 i32.and @@ -6499,24 +6500,24 @@ local.tee $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -6536,7 +6537,6 @@ end block $~lib/math/rempio2f|inlined.0 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -6560,25 +6560,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $8 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $2 + local.tee $9 i64.load - local.set $9 - local.get $2 - i64.load offset=8 local.set $6 - local.get $8 + local.get $9 + i64.load offset=8 + local.set $7 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -6586,12 +6586,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $6 + local.get $7 local.get $5 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $9 i64.load offset=16 i64.const 96 local.get $5 @@ -6599,52 +6599,52 @@ i64.shr_u i64.or else - local.get $6 + local.get $7 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $10 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $11 - local.get $9 + local.tee $8 + local.get $6 local.get $5 i64.shl - local.get $6 + local.get $7 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $10 + local.get $8 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $6 i64.const 2 i64.shl - local.tee $6 + local.tee $8 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $6 i64.const 62 i64.shr_u - local.get $6 + local.get $8 i64.const 63 i64.shr_u i64.add @@ -6652,7 +6652,7 @@ local.tee $1 i32.sub local.get $1 - local.get $7 + local.get $10 select end local.set $1 @@ -6694,24 +6694,24 @@ local.get $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8225,19 +8225,19 @@ (local $3 f64) (local $4 f64) (local $5 i64) - (local $6 i64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $6 f64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $8 + local.set $11 local.get $1 i32.const 2147483647 i32.and @@ -8257,26 +8257,26 @@ local.tee $4 local.get $4 f64.mul - local.tee $3 + local.tee $6 local.get $4 f64.mul - local.set $7 + local.set $3 local.get $4 - local.get $7 - f64.const -0.16666666641626524 local.get $3 + f64.const -0.16666666641626524 + local.get $6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $3 local.get $3 + local.get $6 + local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $6 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -8296,7 +8296,6 @@ end block $~lib/math/rempio2f|inlined.1 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -8320,25 +8319,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $2 + local.tee $10 i64.load - local.set $10 - local.get $2 + local.set $7 + local.get $10 i64.load offset=8 - local.set $6 - local.get $9 + local.set $8 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -8346,12 +8345,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $6 + local.get $8 local.get $5 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $10 i64.load offset=16 i64.const 96 local.get $5 @@ -8359,52 +8358,52 @@ i64.shr_u i64.or else - local.get $6 + local.get $8 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 + local.tee $9 + local.get $7 local.get $5 i64.shl - local.get $6 + local.get $8 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $7 i64.const 2 i64.shl - local.tee $6 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $7 i64.const 62 i64.shr_u - local.get $6 + local.get $9 i64.const 63 i64.shr_u i64.add @@ -8412,7 +8411,7 @@ local.tee $1 i32.sub local.get $1 - local.get $8 + local.get $11 select end local.set $1 @@ -8425,24 +8424,24 @@ local.get $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -8579,20 +8578,20 @@ (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 i64) - (local $6 f64) + (local $5 f64) + (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $8 + local.set $11 local.get $1 i32.const 2147483647 i32.and @@ -8609,36 +8608,36 @@ end local.get $0 f64.promote_f32 - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $3 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $6 - local.get $4 - local.get $6 - f64.const 0.3333313950307914 + local.set $3 + local.get $5 local.get $3 + f64.const 0.3333313950307914 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $3 local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $3 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $4 - f64.const 0.002974357433599673 local.get $3 + f64.const 0.002974357433599673 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -8660,7 +8659,6 @@ end block $~lib/math/rempio2f|inlined.2 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -8684,91 +8682,91 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 240 i32.add - local.tee $2 + local.tee $10 i64.load - local.set $10 - local.get $2 - i64.load offset=8 local.set $7 - local.get $9 + local.get $10 + i64.load offset=8 + local.set $8 + local.get $1 i32.const 63 i32.and i64.extend_i32_s - local.tee $5 + local.tee $6 i64.const 32 i64.gt_u if (result i64) - local.get $7 - local.get $5 + local.get $8 + local.get $6 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $10 i64.load offset=16 i64.const 96 - local.get $5 + local.get $6 i64.sub i64.shr_u i64.or else - local.get $7 + local.get $8 i64.const 32 - local.get $5 + local.get $6 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $5 - i64.shl + local.tee $9 local.get $7 + local.get $6 + i64.shl + local.get $8 i64.const 64 - local.get $5 + local.get $6 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $7 i64.const 2 i64.shl - local.tee $7 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $7 i64.const 62 i64.shr_u - local.get $7 + local.get $9 i64.const 63 i64.shr_u i64.add @@ -8776,40 +8774,40 @@ local.tee $1 i32.sub local.get $1 - local.get $8 + local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $3 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $6 - local.get $4 - local.get $6 - f64.const 0.3333313950307914 + local.set $3 + local.get $5 local.get $3 + f64.const 0.3333313950307914 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $3 local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $3 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $4 - f64.const 0.002974357433599673 local.get $3 + f64.const 0.002974357433599673 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index abd839a4e0..769ba21f99 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1730,7 +1730,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1751,25 +1751,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 85d4bd838f..40064d7f59 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -3312,7 +3312,7 @@ i64.shr_s i64.const 1045 i64.sub - local.tee $1 + local.tee $2 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3322,45 +3322,45 @@ i32.add local.tee $7 i64.load - local.set $6 + local.set $5 local.get $7 i64.load offset=8 local.set $3 local.get $7 i64.load offset=16 local.set $4 - local.get $1 + local.get $2 i64.const 63 i64.and - local.tee $1 + local.tee $2 i64.const 0 i64.ne if - local.get $6 - local.get $1 + local.get $5 + local.get $2 i64.shl local.get $3 i64.const 64 - local.get $1 + local.get $2 i64.sub - local.tee $2 + local.tee $1 i64.shr_u i64.or - local.set $6 + local.set $5 local.get $3 - local.get $1 + local.get $2 i64.shl local.get $4 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $3 local.get $4 - local.get $1 + local.get $2 i64.shl local.get $7 i64.load offset=24 - local.get $2 + local.get $1 i64.shr_u i64.or local.set $4 @@ -3370,71 +3370,71 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.tee $2 + local.tee $1 local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul + local.get $1 local.get $3 i64.const 4294967295 i64.and - local.tee $5 - local.get $2 + local.tee $1 i64.mul - local.tee $9 + local.tee $6 i64.const 32 i64.shr_u i64.add local.set $3 - local.get $5 - local.get $1 + local.get $2 i64.const 32 i64.shr_u - local.tee $5 + local.tee $9 + local.get $1 i64.mul local.get $3 i64.const 4294967295 i64.and i64.add - local.set $2 - local.get $5 + local.set $1 local.get $8 + local.get $9 i64.mul local.get $3 i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi global.get $~lib/math/res128_hi - local.get $1 - local.get $6 + local.get $2 + local.get $5 i64.mul i64.add local.get $4 i64.const 32 i64.shr_u - local.get $1 + local.get $2 i64.const 32 i64.shr_s i64.mul local.tee $3 - local.get $9 + local.get $6 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add i64.add - local.tee $1 + local.tee $2 local.get $3 i64.lt_u i64.extend_i32_u @@ -3442,49 +3442,49 @@ local.tee $8 i64.const 2 i64.shl - local.get $1 + local.get $2 i64.const 62 i64.shr_u i64.or - local.tee $6 + local.tee $5 i64.const 63 i64.shr_s local.tee $4 i64.const 1 i64.shr_s - local.get $6 + local.get $5 i64.xor - local.tee $2 + local.tee $1 i64.clz local.set $3 - local.get $2 + local.get $1 local.get $3 i64.shl local.get $4 - local.get $1 + local.get $2 i64.const 2 i64.shl i64.xor - local.tee $5 + local.tee $6 i64.const 64 local.get $3 i64.sub i64.shr_u i64.or - local.tee $1 + local.tee $2 i64.const 4294967295 i64.and - local.set $2 - local.get $1 + local.set $1 + local.get $2 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $2 + local.get $1 i64.const 3373259426 i64.mul - local.get $2 + local.get $1 i64.const 560513588 i64.mul local.tee $10 @@ -3495,7 +3495,7 @@ i64.const 4294967295 i64.and i64.add - local.set $2 + local.set $1 local.get $9 i64.const 3373259426 i64.mul @@ -3503,7 +3503,7 @@ i64.const 32 i64.shr_u i64.add - local.get $2 + local.get $1 i64.const 32 i64.shr_u i64.add @@ -3511,39 +3511,39 @@ local.get $10 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i64.const 32 i64.shl i64.add - local.tee $2 + local.tee $1 f64.const 3.753184150245214e-04 - local.get $1 + local.get $2 f64.convert_i64_u f64.mul f64.const 3.834951969714103e-04 - local.get $5 + local.get $6 local.get $3 i64.shl f64.convert_i64_u f64.mul f64.add i64.trunc_f64_u - local.tee $1 + local.tee $2 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi - local.tee $5 + local.tee $6 i64.const 11 i64.shr_u i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 f64.const 5.421010862427522e-20 - local.get $1 - local.get $5 + local.get $2 + local.get $6 i64.const 53 i64.shl - local.get $2 + local.get $1 i64.const 11 i64.shr_u i64.or @@ -3558,7 +3558,7 @@ i64.shl i64.sub local.get $0 - local.get $6 + local.get $5 i64.xor i64.const -9223372036854775808 i64.and @@ -3804,21 +3804,21 @@ local.get $0 local.get $0 f64.mul - local.tee $2 + local.tee $4 f64.const -1.984126982985795e-04 - local.get $2 + local.get $4 f64.const 2.7557313707070068e-06 f64.mul f64.add f64.mul f64.add - local.get $2 - local.get $2 - local.get $2 + local.get $4 + local.get $4 + local.get $4 f64.mul f64.mul f64.const -2.5050760253406863e-08 - local.get $2 + local.get $4 f64.const 1.58969099521155e-10 f64.mul f64.add @@ -3826,21 +3826,21 @@ f64.add local.set $7 local.get $0 - local.get $2 + local.get $4 f64.const 0.5 local.get $3 f64.mul - local.get $2 + local.get $4 local.get $0 f64.mul - local.tee $4 + local.tee $0 local.get $7 f64.mul f64.sub f64.mul local.get $3 f64.sub - local.get $4 + local.get $0 f64.const -0.16666666666666632 f64.mul f64.sub @@ -3934,17 +3934,17 @@ (local $4 f64) (local $5 i64) (local $6 i64) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i64) + (local $7 i64) + (local $8 i64) + (local $9 i32) + (local $10 i32) (local $11 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $7 + local.set $10 local.get $1 i32.const 2147483647 i32.and @@ -3964,24 +3964,24 @@ local.tee $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -4001,7 +4001,6 @@ end block $~lib/math/rempio2f|inlined.0 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -4025,25 +4024,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $8 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $2 + local.tee $9 i64.load - local.set $9 - local.get $2 - i64.load offset=8 local.set $6 - local.get $8 + local.get $9 + i64.load offset=8 + local.set $7 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -4051,12 +4050,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $6 + local.get $7 local.get $5 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $9 i64.load offset=16 i64.const 96 local.get $5 @@ -4064,52 +4063,52 @@ i64.shr_u i64.or else - local.get $6 + local.get $7 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $10 + local.set $11 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $11 - local.get $9 + local.tee $8 + local.get $6 local.get $5 i64.shl - local.get $6 + local.get $7 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $10 + local.get $8 local.get $11 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $6 i64.const 2 i64.shl - local.tee $6 + local.tee $8 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $6 i64.const 62 i64.shr_u - local.get $6 + local.get $8 i64.const 63 i64.shr_u i64.add @@ -4117,7 +4116,7 @@ local.tee $1 i32.sub local.get $1 - local.get $7 + local.get $10 select end local.set $1 @@ -4159,24 +4158,24 @@ local.get $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -7111,18 +7110,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 f64) (local $13 f64) - (local $14 i64) - (local $15 f64) - (local $16 i32) - (local $17 f64) - (local $18 i32) - (local $19 f64) + (local $14 f64) + (local $15 i64) + (local $16 f64) + (local $17 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -7177,28 +7176,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 - local.set $18 - local.get $14 + local.set $19 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $8 i32.const 2147483647 i32.and - local.tee $10 - local.get $14 + local.tee $9 + local.get $15 i32.wrap_i64 local.tee $6 i32.or @@ -7210,16 +7209,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $10 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $10 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $18 + local.get $19 i32.const 0 local.get $4 i32.const 2146435072 @@ -7237,51 +7236,51 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $10 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $10 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $12 + local.set $11 i32.const 2 local.get $6 - local.get $10 + local.get $9 local.get $5 select local.tee $5 - local.get $12 + local.get $11 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $10 local.get $11 - local.get $12 i32.shl i32.eq select @@ -7294,11 +7293,11 @@ local.get $6 i32.eqz if - local.get $10 + local.get $9 i32.const 2146435072 i32.eq if - local.get $18 + local.get $19 local.get $4 i32.const 1072693248 i32.sub @@ -7308,7 +7307,7 @@ i32.const 1072693248 i32.ge_s if - local.get $9 + local.get $8 i32.const 0 i32.lt_s if @@ -7321,7 +7320,7 @@ f64.const 0 local.get $1 f64.neg - local.get $9 + local.get $8 i32.const 0 i32.ge_s select @@ -7334,11 +7333,11 @@ end unreachable end - local.get $10 + local.get $9 i32.const 1072693248 i32.eq if - local.get $9 + local.get $8 i32.const 0 i32.ge_s if @@ -7350,7 +7349,7 @@ f64.div return end - local.get $9 + local.get $8 i32.const 1073741824 i32.eq if @@ -7359,11 +7358,11 @@ f64.mul return end - local.get $9 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -7376,7 +7375,7 @@ local.get $0 f64.abs local.set $2 - local.get $18 + local.get $19 i32.eqz if i32.const 1 @@ -7395,12 +7394,12 @@ local.get $2 f64.div local.get $2 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if (result f64) @@ -7433,7 +7432,7 @@ end f64.const 1 local.set $7 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -7456,11 +7455,11 @@ select local.set $7 end - local.get $10 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $10 + local.get $9 i32.const 1139802112 i32.gt_s if @@ -7470,7 +7469,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -7482,7 +7481,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -7503,7 +7502,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -7523,7 +7522,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -7561,9 +7560,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $0 - local.get $8 + local.get $12 local.get $2 f64.sub f64.sub @@ -7623,7 +7622,6 @@ end end local.set $5 - f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7634,7 +7632,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 @@ -7643,40 +7641,42 @@ f64.sub local.tee $2 f64.const 1 - local.get $8 + local.get $13 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $17 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $15 - f64.const 3 - local.get $15 - local.get $15 + local.tee $16 + local.get $16 f64.mul - local.tee $19 + local.set $12 + f64.const 0.9617967009544373 + local.get $16 + f64.const 3 + local.get $12 f64.add - local.get $17 - local.get $17 + local.get $18 + local.get $18 f64.mul - local.tee $13 - local.get $13 + local.tee $14 + local.get $14 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $14 f64.const 0.4285714285785502 - local.get $13 + local.get $14 f64.const 0.33333332981837743 - local.get $13 + local.get $14 f64.const 0.272728123808534 - local.get $13 + local.get $14 f64.const 0.23066074577556175 - local.get $13 + local.get $14 f64.const 0.20697501780033842 f64.mul f64.add @@ -7691,7 +7691,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $16 local.get $4 i32.const 1 i32.shr_s @@ -7710,8 +7710,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $8 + local.get $16 + local.get $13 local.get $0 local.get $3 f64.sub @@ -7720,8 +7720,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $17 + local.get $16 + local.get $18 f64.add f64.mul f64.add @@ -7731,20 +7731,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.mul local.tee $2 local.get $3 - local.get $8 + local.get $13 f64.mul local.get $0 - local.get $8 + local.get $13 f64.const 3 f64.sub - local.get $19 + local.get $12 f64.sub f64.sub - local.get $17 + local.get $18 f64.mul f64.add local.tee $0 @@ -7755,7 +7755,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $19 + local.tee $13 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -7788,14 +7788,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $3 - local.get $8 + local.get $12 local.get $0 f64.sub local.get $2 f64.sub - local.get $19 + local.get $13 f64.sub f64.sub end @@ -7808,7 +7808,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $8 + local.get $12 f64.mul local.get $1 local.get $2 @@ -7816,27 +7816,27 @@ f64.add local.tee $1 local.get $0 - local.get $8 + local.get $12 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $12 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $12 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -7850,14 +7850,14 @@ i32.or br_if $folding-inner0 else - local.get $12 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $12 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -7870,10 +7870,10 @@ select br_if $folding-inner1 end - local.get $12 + local.get $11 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -7881,19 +7881,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $12 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -7904,7 +7904,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -7912,7 +7912,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -7924,7 +7924,7 @@ local.tee $6 i32.sub local.get $6 - local.get $12 + local.get $11 i32.const 0 i32.lt_s select @@ -9536,19 +9536,19 @@ (local $3 f64) (local $4 f64) (local $5 i64) - (local $6 i64) - (local $7 f64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $6 f64) + (local $7 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $8 + local.set $11 local.get $1 i32.const 2147483647 i32.and @@ -9568,26 +9568,26 @@ local.tee $4 local.get $4 f64.mul - local.tee $3 + local.tee $6 local.get $4 f64.mul - local.set $7 + local.set $3 local.get $4 - local.get $7 - f64.const -0.16666666641626524 local.get $3 + f64.const -0.16666666641626524 + local.get $6 f64.const 0.008333329385889463 f64.mul f64.add f64.mul f64.add - local.get $7 - local.get $3 local.get $3 + local.get $6 + local.get $6 f64.mul f64.mul f64.const -1.9839334836096632e-04 - local.get $3 + local.get $6 f64.const 2.718311493989822e-06 f64.mul f64.add @@ -9607,7 +9607,6 @@ end block $~lib/math/rempio2f|inlined.1 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -9631,25 +9630,25 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $2 + local.tee $10 i64.load - local.set $10 - local.get $2 + local.set $7 + local.get $10 i64.load offset=8 - local.set $6 - local.get $9 + local.set $8 + local.get $1 i32.const 63 i32.and i64.extend_i32_s @@ -9657,12 +9656,12 @@ i64.const 32 i64.gt_u if (result i64) - local.get $6 + local.get $8 local.get $5 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $10 i64.load offset=16 i64.const 96 local.get $5 @@ -9670,52 +9669,52 @@ i64.shr_u i64.or else - local.get $6 + local.get $8 i64.const 32 local.get $5 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 + local.tee $9 + local.get $7 local.get $5 i64.shl - local.get $6 + local.get $8 i64.const 64 local.get $5 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $7 i64.const 2 i64.shl - local.tee $6 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $7 i64.const 62 i64.shr_u - local.get $6 + local.get $9 i64.const 63 i64.shr_u i64.add @@ -9723,7 +9722,7 @@ local.tee $1 i32.sub local.get $1 - local.get $8 + local.get $11 select end local.set $1 @@ -9736,24 +9735,24 @@ local.get $3 local.get $3 f64.mul - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 f64.mul - local.set $4 + local.set $3 f64.const 1 - local.get $3 + local.get $4 f64.const -0.499999997251031 f64.mul f64.add - local.get $4 + local.get $3 f64.const 0.04166662332373906 f64.mul f64.add - local.get $4 local.get $3 + local.get $4 f64.mul f64.const -0.001388676377460993 - local.get $3 + local.get $4 f64.const 2.439044879627741e-05 f64.mul f64.add @@ -10380,20 +10379,20 @@ (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 i64) - (local $6 f64) + (local $5 f64) + (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 i32) - (local $10 i64) - (local $11 i64) + (local $8 i64) + (local $9 i64) + (local $10 i32) + (local $11 i32) (local $12 i64) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 31 i32.shr_u - local.set $8 + local.set $11 local.get $1 i32.const 2147483647 i32.and @@ -10410,36 +10409,36 @@ end local.get $0 f64.promote_f32 - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $3 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $6 - local.get $4 - local.get $6 - f64.const 0.3333313950307914 + local.set $3 + local.get $5 local.get $3 + f64.const 0.3333313950307914 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $3 local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $3 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $4 - f64.const 0.002974357433599673 local.get $3 + f64.const 0.002974357433599673 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add @@ -10461,7 +10460,6 @@ end block $~lib/math/rempio2f|inlined.2 (result i32) local.get $2 - local.tee $1 i32.const 1305022427 i32.lt_u if @@ -10485,91 +10483,91 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - local.get $1 + local.get $2 i32.const 23 i32.shr_s i32.const 152 i32.sub - local.tee $9 + local.tee $1 i32.const 6 i32.shr_s i32.const 3 i32.shl i32.const 288 i32.add - local.tee $2 + local.tee $10 i64.load - local.set $10 - local.get $2 - i64.load offset=8 local.set $7 - local.get $9 + local.get $10 + i64.load offset=8 + local.set $8 + local.get $1 i32.const 63 i32.and i64.extend_i32_s - local.tee $5 + local.tee $6 i64.const 32 i64.gt_u if (result i64) - local.get $7 - local.get $5 + local.get $8 + local.get $6 i64.const 32 i64.sub i64.shl - local.get $2 + local.get $10 i64.load offset=16 i64.const 96 - local.get $5 + local.get $6 i64.sub i64.shr_u i64.or else - local.get $7 + local.get $8 i64.const 32 - local.get $5 + local.get $6 i64.sub i64.shr_u end - local.set $11 + local.set $12 f64.const 8.515303950216386e-20 local.get $0 f64.promote_f32 f64.copysign - local.get $1 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or i64.extend_i32_s - local.tee $12 - local.get $10 - local.get $5 - i64.shl + local.tee $9 local.get $7 + local.get $6 + i64.shl + local.get $8 i64.const 64 - local.get $5 + local.get $6 i64.sub i64.shr_u i64.or i64.mul - local.get $11 + local.get $9 local.get $12 i64.mul i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $7 i64.const 2 i64.shl - local.tee $7 + local.tee $9 f64.convert_i64_s f64.mul global.set $~lib/math/rempio2f_y i32.const 0 - local.get $5 + local.get $7 i64.const 62 i64.shr_u - local.get $7 + local.get $9 i64.const 63 i64.shr_u i64.add @@ -10577,40 +10575,40 @@ local.tee $1 i32.sub local.get $1 - local.get $8 + local.get $11 select end global.get $~lib/math/rempio2f_y - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul - local.tee $3 - local.get $4 + local.tee $4 + local.get $5 f64.mul - local.set $6 - local.get $4 - local.get $6 - f64.const 0.3333313950307914 + local.set $3 + local.get $5 local.get $3 + f64.const 0.3333313950307914 + local.get $4 f64.const 0.13339200271297674 f64.mul f64.add f64.mul f64.add - local.get $6 - local.get $3 local.get $3 + local.get $4 + local.get $4 f64.mul - local.tee $4 + local.tee $3 f64.mul f64.const 0.05338123784456704 - local.get $3 + local.get $4 f64.const 0.024528318116654728 f64.mul f64.add - local.get $4 - f64.const 0.002974357433599673 local.get $3 + f64.const 0.002974357433599673 + local.get $4 f64.const 0.009465647849436732 f64.mul f64.add diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 97accf05f4..81062baf99 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -240,18 +240,18 @@ (local $5 i32) (local $6 i32) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) + (local $12 f64) (local $13 f64) - (local $14 i64) - (local $15 f64) - (local $16 i32) - (local $17 f64) - (local $18 i32) - (local $19 f64) + (local $14 f64) + (local $15 i64) + (local $16 f64) + (local $17 i32) + (local $18 f64) + (local $19 i32) local.get $1 f64.abs f64.const 2 @@ -306,28 +306,28 @@ end local.get $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 - local.set $18 - local.get $14 + local.set $19 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $16 + local.tee $17 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $8 i32.const 2147483647 i32.and - local.tee $10 - local.get $14 + local.tee $9 + local.get $15 i32.wrap_i64 local.tee $6 i32.or @@ -339,16 +339,16 @@ i32.const 1 local.get $6 i32.const 0 - local.get $10 + local.get $9 i32.const 2146435072 i32.eq select i32.const 1 - local.get $10 + local.get $9 i32.const 2146435072 i32.gt_s i32.const 1 - local.get $18 + local.get $19 i32.const 0 local.get $4 i32.const 2146435072 @@ -366,51 +366,51 @@ f64.add return end - local.get $16 + local.get $17 i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $10 + local.get $9 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $10 + local.get $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $11 + local.tee $10 i32.const 20 i32.gt_s local.tee $5 select - local.get $11 + local.get $10 i32.sub - local.set $12 + local.set $11 i32.const 2 local.get $6 - local.get $10 + local.get $9 local.get $5 select local.tee $5 - local.get $12 + local.get $11 i32.shr_u - local.tee $11 + local.tee $10 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $10 local.get $11 - local.get $12 i32.shl i32.eq select @@ -423,11 +423,11 @@ local.get $6 i32.eqz if - local.get $10 + local.get $9 i32.const 2146435072 i32.eq if - local.get $18 + local.get $19 local.get $4 i32.const 1072693248 i32.sub @@ -437,7 +437,7 @@ i32.const 1072693248 i32.ge_s if - local.get $9 + local.get $8 i32.const 0 i32.lt_s if @@ -450,7 +450,7 @@ f64.const 0 local.get $1 f64.neg - local.get $9 + local.get $8 i32.const 0 i32.ge_s select @@ -463,11 +463,11 @@ end unreachable end - local.get $10 + local.get $9 i32.const 1072693248 i32.eq if - local.get $9 + local.get $8 i32.const 0 i32.ge_s if @@ -479,7 +479,7 @@ f64.div return end - local.get $9 + local.get $8 i32.const 1073741824 i32.eq if @@ -488,11 +488,11 @@ f64.mul return end - local.get $9 + local.get $8 i32.const 1071644672 i32.eq if - local.get $16 + local.get $17 i32.const 0 i32.ge_s if @@ -505,7 +505,7 @@ local.get $0 f64.abs local.set $2 - local.get $18 + local.get $19 i32.eqz if i32.const 1 @@ -524,12 +524,12 @@ local.get $2 f64.div local.get $2 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select local.set $2 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if (result f64) @@ -562,7 +562,7 @@ end f64.const 1 local.set $7 - local.get $16 + local.get $17 i32.const 0 i32.lt_s if @@ -585,11 +585,11 @@ select local.set $7 end - local.get $10 + local.get $9 i32.const 1105199104 i32.gt_s if (result f64) - local.get $10 + local.get $9 i32.const 1139802112 i32.gt_s if @@ -599,7 +599,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -611,7 +611,7 @@ if f64.const inf f64.const 0 - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -632,7 +632,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.lt_s select @@ -652,7 +652,7 @@ f64.mul f64.const 1e-300 f64.mul - local.get $9 + local.get $8 i32.const 0 i32.gt_s select @@ -690,9 +690,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $0 - local.get $8 + local.get $12 local.get $2 f64.sub f64.sub @@ -752,7 +752,6 @@ end end local.set $5 - f64.const 0.9617967009544373 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -763,7 +762,7 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.const 1.5 f64.const 1 local.get $5 @@ -772,40 +771,42 @@ f64.sub local.tee $2 f64.const 1 - local.get $8 + local.get $13 local.get $3 f64.add f64.div local.tee $0 f64.mul - local.tee $17 + local.tee $18 i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $15 - f64.const 3 - local.get $15 - local.get $15 + local.tee $16 + local.get $16 f64.mul - local.tee $19 + local.set $12 + f64.const 0.9617967009544373 + local.get $16 + f64.const 3 + local.get $12 f64.add - local.get $17 - local.get $17 + local.get $18 + local.get $18 f64.mul - local.tee $13 - local.get $13 + local.tee $14 + local.get $14 f64.mul f64.const 0.5999999999999946 - local.get $13 + local.get $14 f64.const 0.4285714285785502 - local.get $13 + local.get $14 f64.const 0.33333332981837743 - local.get $13 + local.get $14 f64.const 0.272728123808534 - local.get $13 + local.get $14 f64.const 0.23066074577556175 - local.get $13 + local.get $14 f64.const 0.20697501780033842 f64.mul f64.add @@ -820,7 +821,7 @@ f64.mul local.get $0 local.get $2 - local.get $15 + local.get $16 local.get $4 i32.const 1 i32.shr_s @@ -839,8 +840,8 @@ local.tee $0 f64.mul f64.sub - local.get $15 - local.get $8 + local.get $16 + local.get $13 local.get $0 local.get $3 f64.sub @@ -849,8 +850,8 @@ f64.sub f64.mul local.tee $3 - local.get $15 - local.get $17 + local.get $16 + local.get $18 f64.add f64.mul f64.add @@ -860,20 +861,20 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $13 f64.mul local.tee $2 local.get $3 - local.get $8 + local.get $13 f64.mul local.get $0 - local.get $8 + local.get $13 f64.const 3 f64.sub - local.get $19 + local.get $12 f64.sub f64.sub - local.get $17 + local.get $18 f64.mul f64.add local.tee $0 @@ -884,7 +885,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $19 + local.tee $13 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -917,14 +918,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $8 + local.set $12 local.get $3 - local.get $8 + local.get $12 local.get $0 f64.sub local.get $2 f64.sub - local.get $19 + local.get $13 f64.sub f64.sub end @@ -937,7 +938,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $8 + local.get $12 f64.mul local.get $1 local.get $2 @@ -945,27 +946,27 @@ f64.add local.tee $1 local.get $0 - local.get $8 + local.get $12 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $14 + local.tee $15 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $14 + local.get $15 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $12 + local.tee $11 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $12 + local.get $11 i32.const 1083179008 i32.sub i32.or @@ -979,14 +980,14 @@ i32.or br_if $folding-inner0 else - local.get $12 + local.get $11 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s i32.const 0 local.get $5 - local.get $12 + local.get $11 i32.const -1064252416 i32.sub i32.or @@ -999,10 +1000,10 @@ select br_if $folding-inner1 end - local.get $12 + local.get $11 i32.const 2147483647 i32.and - local.tee $11 + local.tee $10 i32.const 20 i32.shr_s i32.const 1023 @@ -1010,19 +1011,19 @@ local.set $5 i32.const 0 local.set $6 - local.get $11 + local.get $10 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $12 + local.get $11 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $11 + local.tee $10 i32.const 2147483647 i32.and i32.const 20 @@ -1033,7 +1034,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $11 + local.get $10 i32.and i64.extend_i32_s i64.const 32 @@ -1041,7 +1042,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $11 + local.get $10 i32.const 1048575 i32.and i32.const 1048576 @@ -1053,7 +1054,7 @@ local.tee $6 i32.sub local.get $6 - local.get $12 + local.get $11 i32.const 0 i32.lt_s select diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 45d813ad5d..6b8c2d7989 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1721,7 +1721,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $3 call $~lib/memory/memory.fill local.get $0 @@ -1742,25 +1742,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 779823594c..2ef44b1f95 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -1451,11 +1451,11 @@ local.get $2 if local.get $5 + local.get $4 local.get $2 i32.const 1 i32.shr_u local.tee $3 - local.get $4 i32.add i32.const 1 i32.shl @@ -2456,9 +2456,9 @@ block $~lib/util/string/isFinalSigma|inlined.0 (result i32) local.get $0 local.set $4 - local.get $6 i32.const 0 local.set $10 + local.get $6 i32.const 0 local.get $6 local.tee $2 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 2decce8dc6..699642a86f 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -6535,7 +6535,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl @@ -6549,23 +6549,24 @@ i64.const 1 i64.add local.tee $3 - local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.set $4 + local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $4 + local.get $7 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $7 + local.get $4 i32.sub local.set $4 local.get $2 @@ -6751,11 +6752,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 0e1dc1a15a..d979f4bd0c 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1538,7 +1538,7 @@ local.tee $3 i32.const 0 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 i32.const 0 local.get $3 call $~lib/memory/memory.fill @@ -1560,25 +1560,24 @@ local.get $0 i32.const 0 i32.store offset=8 - local.get $1 - local.set $2 - local.get $1 + local.get $2 + local.tee $1 local.get $0 i32.load local.tee $4 i32.ne if - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 local.get $4 call $~lib/rt/pure/__release end local.get $0 - local.get $2 + local.get $1 i32.store local.get $0 - local.get $1 + local.get $2 i32.store offset=4 local.get $0 local.get $3 @@ -2205,17 +2204,27 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $3 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 + local.set $3 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add local.tee $0 i32.const 0 @@ -2225,63 +2234,51 @@ select else local.get $1 - local.get $4 + local.get $3 local.get $1 - local.get $4 + local.get $3 i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc local.tee $0 - local.get $3 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $3 - i32.load offset=4 - local.get $1 i32.const 2 i32.shl i32.add i32.store offset=4 - local.get $0 + local.get $4 local.get $2 i32.const 0 i32.lt_s if (result i32) local.get $2 - local.get $4 + local.get $3 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select else local.get $2 - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.lt_s select end - local.tee $2 - local.get $1 - local.get $2 + local.tee $1 + local.get $0 local.get $1 + local.get $0 i32.gt_s select - local.get $1 + local.get $0 i32.sub i32.const 2 i32.shl i32.store offset=8 - local.get $0 + local.get $4 call $~lib/rt/pure/__retain ) (func $~lib/typedarray/Float64Array#__set (; 36 ;) (param $0 i32) (param $1 i32) (param $2 f64) @@ -2312,17 +2309,27 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $3 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 + local.set $3 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.tee $4 + local.get $0 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $4 + local.get $0 + i32.load offset=4 local.get $1 i32.const 0 i32.lt_s if (result i32) local.get $1 - local.get $4 + local.get $3 i32.add local.tee $0 i32.const 0 @@ -2332,63 +2339,51 @@ select else local.get $1 - local.get $4 + local.get $3 local.get $1 - local.get $4 + local.get $3 i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc local.tee $0 - local.get $3 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $3 - i32.load offset=4 - local.get $1 i32.const 3 i32.shl i32.add i32.store offset=4 - local.get $0 + local.get $4 local.get $2 i32.const 0 i32.lt_s if (result i32) local.get $2 - local.get $4 + local.get $3 i32.add - local.tee $2 + local.tee $1 i32.const 0 - local.get $2 + local.get $1 i32.const 0 i32.gt_s select else local.get $2 - local.get $4 + local.get $3 local.get $2 - local.get $4 + local.get $3 i32.lt_s select end - local.tee $2 - local.get $1 - local.get $2 + local.tee $1 + local.get $0 local.get $1 + local.get $0 i32.gt_s select - local.get $1 + local.get $0 i32.sub i32.const 3 i32.shl i32.store offset=8 - local.get $0 + local.get $4 call $~lib/rt/pure/__retain ) (func $~setArgumentsLength (; 38 ;) (param $0 i32) @@ -2943,7 +2938,7 @@ i32.lt_s select end - local.tee $2 + local.tee $0 local.get $3 i32.const 0 i32.lt_s @@ -2951,9 +2946,9 @@ local.get $3 local.get $4 i32.add - local.tee $0 + local.tee $2 i32.const 0 - local.get $0 + local.get $2 i32.const 0 i32.gt_s select @@ -2965,15 +2960,15 @@ i32.lt_s select end - local.tee $0 + local.tee $2 i32.lt_s if - local.get $2 + local.get $0 local.get $6 i32.add local.get $1 - local.get $0 local.get $2 + local.get $0 i32.sub call $~lib/memory/memory.fill end @@ -3275,9 +3270,19 @@ (local $3 i32) (local $4 i32) local.get $0 - local.tee $3 i32.load offset=8 local.set $4 + local.get $0 + local.set $3 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $0 local.get $1 i32.const 0 i32.lt_s @@ -3285,9 +3290,9 @@ local.get $1 local.get $4 i32.add - local.tee $0 + local.tee $1 i32.const 0 - local.get $0 + local.get $1 i32.const 0 i32.gt_s select @@ -3299,17 +3304,7 @@ i32.lt_s select end - local.set $1 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $3 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $0 - local.get $1 + local.tee $1 local.get $3 i32.load offset=4 i32.add @@ -18736,7 +18731,7 @@ local.tee $9 i32.const 0 i32.ne - local.tee $4 + local.tee $7 i64.extend_i32_u i64.const 52 i64.shl @@ -18750,23 +18745,24 @@ i64.const 1 i64.add local.tee $3 - local.get $3 i64.clz i32.wrap_i64 - local.tee $7 + local.set $4 + local.get $3 + local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus local.get $9 i32.const 1 - local.get $4 + local.get $7 select i32.const 1075 i32.sub local.tee $9 i32.const 1 i32.sub - local.get $7 + local.get $4 i32.sub local.set $4 local.get $2 @@ -18952,11 +18948,11 @@ i64.shr_u local.tee $5 i64.mul + local.get $6 local.get $3 i64.const 4294967295 i64.and local.tee $3 - local.get $6 i64.mul local.get $2 i64.const 4294967295 From f4c8e5f3912c3eb12684bea6b8f4a9f1fa16275e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 10 Mar 2020 14:58:26 +0200 Subject: [PATCH 43/51] rebuild --- .../resolve-elementaccess.optimized.wat | 97 +++++++++---------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 2428d99703..a8727ed561 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -1,9 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param 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 (func (param i32) (result i32))) (type $none_=>_none (func)) - (type $i32_=>_none (func (param 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))) @@ -131,7 +130,7 @@ i32.store offset=12 local.get $4 ) - (func $~lib/memory/memory.fill (; 3 ;) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.fill (; 2 ;) (param $0 i32) (param $1 i32) (local $2 i32) block $~lib/util/memory/memset|inlined.0 local.get $1 @@ -194,23 +193,21 @@ i32.const 8 i32.le_u br_if $~lib/util/memory/memset|inlined.0 - local.get $1 + local.get $0 i32.const 0 local.get $0 i32.sub i32.const 3 i32.and - local.tee $1 - i32.sub - local.set $2 - local.get $0 - local.get $1 + local.tee $2 i32.add local.tee $0 i32.const 0 i32.store local.get $0 + local.get $1 local.get $2 + i32.sub i32.const -4 i32.and local.tee $1 @@ -342,7 +339,7 @@ end end ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (; 4 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 3 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) i32.const 2 i32.const 1073741808 @@ -397,7 +394,7 @@ i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Float32Array#__set (; 3 ;) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 4 ;) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -421,7 +418,7 @@ local.get $2 f32.store ) - (func $~lib/typedarray/Float32Array#__get (; 4 ;) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 5 ;) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -444,7 +441,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 6 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -492,7 +489,7 @@ i32.lt_u select ) - (func $~lib/util/number/genDigits (; 6 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 7 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -883,7 +880,7 @@ local.get $6 end ) - (func $~lib/memory/memory.copy (; 7 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) block $~lib/util/memory/memmove|inlined.0 @@ -1056,7 +1053,7 @@ end end ) - (func $~lib/util/number/utoa_simple (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -1083,7 +1080,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/prettify (; 9 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 10 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -1328,7 +1325,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 10 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) (local $4 i32) @@ -1621,7 +1618,7 @@ local.get $8 i32.add ) - (func $~lib/string/String#get:length (; 11 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 12 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -1629,7 +1626,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/string/String#substring (; 12 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 13 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1701,7 +1698,7 @@ call $~lib/memory/memory.copy local.get $2 ) - (func $~lib/util/number/dtoa (; 13 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 14 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1791,7 +1788,7 @@ global.set $~lib/rt/stub/offset end ) - (func $~lib/util/string/compareImpl (; 14 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 15 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -1867,7 +1864,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 15 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1899,7 +1896,7 @@ end i32.const 0 ) - (func $~lib/typedarray/Uint8Array#__set (; 20 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 17 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1919,7 +1916,7 @@ local.get $2 i32.store8 ) - (func $~lib/typedarray/Uint8Array#__get (; 21 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#__get (; 18 ;) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1938,35 +1935,35 @@ i32.add i32.load8_u ) - (func $~lib/util/number/utoa32 (; 22 ;) (param $0 i32) (result i32) + (func $~lib/number/U8#toString (; 19 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 1616 - return + block $__inlined_func$~lib/util/number/utoa32 + local.get $0 + i32.const 255 + i32.and + local.tee $1 + i32.eqz + if + i32.const 1616 + local.set $0 + br $__inlined_func$~lib/util/number/utoa32 + end + local.get $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/stub/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple end local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $2 - ) - (func $~lib/number/U8#toString (; 23 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - call $~lib/util/number/utoa32 ) - (func $start:resolve-elementaccess (; 24 ;) + (func $start:resolve-elementaccess (; 20 ;) (local $0 i32) i32.const 1728 global.set $~lib/rt/stub/startOffset @@ -2163,7 +2160,7 @@ unreachable end ) - (func $~start (; 25 ;) + (func $~start (; 21 ;) call $start:resolve-elementaccess ) ) From 5d0075a2725bb7a8162506ae6d42ab8eb8236180 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Tue, 10 Mar 2020 18:29:49 +0200 Subject: [PATCH 44/51] rebuild --- tests/compiler/resolve-nested.optimized.wat | 56 ++++++++++----------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index ff56d1ef0e..eff12bfccf 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -1,7 +1,6 @@ (module (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_i32_=>_none (func (param i32 i32 i32 i32 i32))) (type $i32_i32_i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32 i32 i32))) @@ -19,20 +18,28 @@ (export "Outer.inner" (func $resolve-nested/Outer.inner)) (export "outer" (func $resolve-nested/outer)) (start $~start) - (func $~lib/rt/stub/maybeGrowMemory (; 0 ;) (param $0 i32) + (func $~lib/rt/stub/__alloc (; 0 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - local.get $0 + (local $3 i32) + (local $4 i32) + global.get $~lib/rt/stub/offset + i32.const 16 + i32.add + local.tee $3 + i32.const 16 + i32.add + local.tee $1 memory.size - local.tee $2 + local.tee $4 i32.const 16 i32.shl - local.tee $1 + local.tee $2 i32.gt_u if - local.get $2 - local.get $0 + local.get $4 local.get $1 + local.get $2 i32.sub i32.const 65535 i32.add @@ -40,16 +47,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $2 + local.get $4 local.get $2 - local.get $1 i32.gt_s select memory.grow i32.const 0 i32.lt_s if - local.get $1 + local.get $2 memory.grow i32.const 0 i32.lt_s @@ -58,20 +65,9 @@ end end end - local.get $0 + local.get $1 global.set $~lib/rt/stub/offset - ) - (func $~lib/rt/stub/__alloc (; 1 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - global.get $~lib/rt/stub/offset - i32.const 16 - i32.add - local.tee $2 - i32.const 16 - i32.add - call $~lib/rt/stub/maybeGrowMemory - local.get $2 + local.get $3 i32.const 16 i32.sub local.tee $1 @@ -86,9 +82,9 @@ local.get $1 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 ) - (func $resolve-nested/Outer.InnerClass#constructor (; 2 ;) (param $0 i32) (result i32) + (func $resolve-nested/Outer.InnerClass#constructor (; 1 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -98,7 +94,7 @@ end local.get $0 ) - (func $resolve-nested/Outer.Inner.EvenInnerClass#constructor (; 3 ;) (param $0 i32) (result i32) + (func $resolve-nested/Outer.Inner.EvenInnerClass#constructor (; 2 ;) (param $0 i32) (result i32) local.get $0 i32.eqz if @@ -108,16 +104,16 @@ end local.get $0 ) - (func $resolve-nested/Outer.Inner.evenInner (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) + (func $resolve-nested/Outer.Inner.evenInner (; 3 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (param $5 i32) nop ) - (func $resolve-nested/Outer.inner (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $resolve-nested/Outer.inner (; 4 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) nop ) - (func $resolve-nested/outer (; 6 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $resolve-nested/outer (; 5 ;) (param $0 i32) (param $1 i32) (param $2 i32) nop ) - (func $~start (; 7 ;) + (func $~start (; 6 ;) i32.const 16 global.set $~lib/rt/stub/startOffset i32.const 16 From d9b8968809a8beac5dd7019b06bd3132a8d0d786 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 12 Mar 2020 08:04:37 +0200 Subject: [PATCH 45/51] early rse --- cli/asc.js | 12 +- tests/compiler/do.optimized.wat | 122 +- .../extends-baseaggregate.optimized.wat | 131 +- tests/compiler/for.optimized.wat | 217 +- .../implicit-getter-setter.optimized.wat | 131 +- tests/compiler/issues/1095.optimized.wat | 122 +- tests/compiler/managed-cast.optimized.wat | 122 +- tests/compiler/mandelbrot.optimized.wat | 58 +- tests/compiler/number.optimized.wat | 2 + tests/compiler/rc/local-init.optimized.wat | 122 +- .../rc/logical-and-mismatch.optimized.wat | 122 +- .../rc/logical-or-mismatch.optimized.wat | 122 +- tests/compiler/rc/optimize.optimized.wat | 122 +- tests/compiler/rc/rereturn.optimized.wat | 131 +- .../rc/ternary-mismatch.optimized.wat | 122 +- tests/compiler/resolve-ternary.optimized.wat | 131 +- .../retain-release-sanity.optimized.wat | 143 +- tests/compiler/retain-return.optimized.wat | 122 +- tests/compiler/runtime-full.optimized.wat | 131 +- tests/compiler/scoped.optimized.wat | 9 +- .../compiler/std/array-literal.optimized.wat | 131 +- tests/compiler/std/array.optimized.wat | 450 +- tests/compiler/std/arraybuffer.optimized.wat | 131 +- tests/compiler/std/dataview.optimized.wat | 131 +- tests/compiler/std/hash.optimized.wat | 11 +- tests/compiler/std/libm.optimized.wat | 992 +- tests/compiler/std/map.optimized.wat | 1535 +- tests/compiler/std/math.optimized.wat | 1209 +- .../std/operator-overloading.optimized.wat | 280 +- tests/compiler/std/set.optimized.wat | 1097 +- tests/compiler/std/staticarray.optimized.wat | 131 +- .../std/string-casemapping.optimized.wat | 181 +- .../std/string-encoding.optimized.wat | 131 +- tests/compiler/std/string.optimized.wat | 778 +- tests/compiler/std/symbol.optimized.wat | 21 +- tests/compiler/std/typedarray.optimized.wat | 11638 ++++++++-------- tests/compiler/while.optimized.wat | 122 +- 37 files changed, 10436 insertions(+), 10727 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index f8f6e30544..36815e16a9 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -744,6 +744,10 @@ exports.main = function main(argv, options, callback) { // if (optimizeLevel >= 3 || shrinkLevel >= 2) { // do it later // add("merge-locals"); // } + if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs + add("rse"); + add("vacuum"); + } add("coalesce-locals"); add("simplify-locals"); add("vacuum"); @@ -771,10 +775,10 @@ exports.main = function main(argv, options, callback) { // add("precompute"); // } add("optimize-instructions"); - if (optimizeLevel >= 2 || shrinkLevel >= 1) { - add("rse"); - } - add("vacuum"); + // if (optimizeLevel >= 2 || shrinkLevel >= 1) { + // add("rse"); + // } + // add("vacuum"); // PassRunner::addDefaultGlobalOptimizationPostPasses if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("dae-optimizing"); diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index e19b279872..bc05b2a5ff 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -112,7 +112,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -124,7 +124,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -149,39 +149,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -193,25 +191,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -223,24 +221,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -249,7 +247,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -259,7 +257,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -276,6 +274,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -361,7 +360,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -373,7 +372,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -382,7 +381,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -390,8 +389,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -451,12 +450,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -473,17 +471,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -495,7 +492,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -503,22 +500,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -531,12 +528,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -668,16 +665,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -689,18 +686,18 @@ unreachable end i32.const 208 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 208 @@ -715,7 +712,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -732,10 +729,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -748,11 +745,12 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -776,12 +774,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -792,9 +790,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 95ab36fe91..bc3da2e9fb 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -37,7 +37,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -49,7 +49,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -74,39 +74,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -118,25 +116,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -148,24 +146,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -174,7 +172,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -184,7 +182,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -201,6 +199,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -286,7 +285,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -298,7 +297,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -307,7 +306,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -315,8 +314,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -376,12 +375,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -398,17 +396,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -420,7 +417,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -428,22 +425,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -456,12 +453,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -593,16 +590,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -614,18 +611,18 @@ unreachable end i32.const 560 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2128 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 560 @@ -640,7 +637,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -657,10 +654,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -673,7 +670,7 @@ i32.const 560 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 5 ;) (param $0 i32) (result i32) local.get $0 @@ -704,12 +701,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -742,17 +738,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index bae59e94d9..4bce148a13 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -109,7 +109,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -121,7 +121,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -146,39 +146,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -190,25 +188,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -220,24 +218,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -246,7 +244,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -256,7 +254,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -273,6 +271,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -358,7 +357,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -370,7 +369,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -379,7 +378,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -387,8 +386,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -448,12 +447,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -470,17 +468,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -492,7 +489,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -500,22 +497,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -528,12 +525,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -665,16 +662,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -686,18 +683,18 @@ unreachable end i32.const 208 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 208 @@ -712,7 +709,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -729,10 +726,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -745,11 +742,12 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -773,12 +771,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -789,9 +787,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add @@ -1047,21 +1045,22 @@ (local $0 i32) (local $1 i32) (local $2 i32) + (local $3 i32) i32.const 0 global.set $for/ran loop $for-loop|0 - local.get $0 + local.get $1 i32.const 10 i32.lt_s if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1077,20 +1076,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $0 + local.set $1 loop $for-loop|00 - local.get $0 + local.get $1 i32.const 10 i32.lt_s if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|00 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1106,20 +1105,20 @@ i32.const 0 global.set $for/ran i32.const 10 - local.set $0 + local.set $1 loop $for-loop|01 - local.get $0 + local.get $1 i32.const 0 i32.gt_s if - local.get $0 + local.get $1 i32.const 1 i32.sub - local.set $0 + local.set $1 br $for-loop|01 end end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1133,20 +1132,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $0 + local.set $1 loop $for-loop|02 - local.get $0 + local.get $1 i32.const 10 i32.ne if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|02 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1162,15 +1161,15 @@ i32.const 0 global.set $for/ran i32.const 10 - local.set $0 + local.set $1 loop $for-loop|03 - local.get $0 + local.get $1 i32.const 1 i32.sub - local.tee $0 + local.tee $1 br_if $for-loop|03 end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1184,17 +1183,17 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $0 + local.set $1 loop $for-loop|04 - local.get $0 + local.get $1 i32.const 1 i32.add - local.tee $0 + local.tee $1 i32.const 10 i32.ne br_if $for-loop|04 end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1214,20 +1213,20 @@ i32.const 0 global.set $for/ran i32.const 0 - local.set $0 + local.set $1 loop $for-loop|05 - local.get $0 + local.get $1 i32.const 10 i32.lt_s if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|05 end end - local.get $0 + local.get $1 i32.const 10 i32.ne if @@ -1264,36 +1263,36 @@ i32.const 0 global.set $for/ran call $for/Ref#constructor - local.set $0 + local.set $1 loop $for-loop|06 - local.get $0 + local.get $1 if - local.get $2 + local.get $3 i32.const 1 i32.add - local.tee $2 + local.tee $3 i32.const 10 i32.eq if i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $1 if - local.get $0 + local.get $1 call $~lib/rt/pure/__release end else call $for/Ref#constructor - local.set $1 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 - local.set $0 + local.get $0 + local.set $1 br $for-loop|06 end end - local.get $2 + local.get $3 i32.const 10 i32.ne if @@ -1304,7 +1303,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 if i32.const 0 i32.const 32 @@ -1315,7 +1314,7 @@ end i32.const 1 global.set $for/ran - local.get $0 + local.get $1 call $~lib/rt/pure/__release global.get $for/ran i32.eqz @@ -1329,8 +1328,6 @@ end i32.const 0 global.set $for/ran - i32.const 0 - local.set $2 call $for/Ref#constructor call $for/Ref#constructor local.set $0 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index d74ce46073..f6f46ba0fe 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -44,7 +44,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -56,7 +56,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -81,39 +81,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -125,25 +123,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -155,24 +153,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -181,7 +179,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -191,7 +189,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -208,6 +206,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -293,7 +292,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -305,7 +304,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -314,7 +313,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -322,8 +321,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -383,12 +382,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -405,17 +403,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -427,7 +424,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -435,22 +432,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -463,12 +460,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -600,16 +597,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -621,18 +618,18 @@ unreachable end i32.const 224 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1792 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 224 @@ -647,7 +644,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -664,10 +661,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -680,19 +677,18 @@ i32.const 224 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -725,17 +721,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 35cc20cbef..8074371a9f 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -28,7 +28,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -40,7 +40,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -65,39 +65,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -109,25 +107,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -139,24 +137,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -165,7 +163,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -175,7 +173,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -192,6 +190,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -277,7 +276,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -289,7 +288,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -298,7 +297,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -306,8 +305,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -367,12 +366,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -389,17 +387,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -411,7 +408,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -419,22 +416,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -447,12 +444,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -584,16 +581,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -605,18 +602,18 @@ unreachable end i32.const 256 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1824 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 256 @@ -631,7 +628,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -648,10 +645,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -664,11 +661,12 @@ i32.const 256 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -692,12 +690,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -708,9 +706,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index 9b3093a5af..e49271e15b 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -30,7 +30,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -42,7 +42,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -67,39 +67,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -111,25 +109,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -141,24 +139,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +165,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -177,7 +175,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -194,6 +192,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -279,7 +278,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -291,7 +290,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -300,7 +299,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -308,8 +307,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -369,12 +368,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -391,17 +389,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -413,7 +410,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -421,22 +418,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -449,12 +446,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -586,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -607,18 +604,18 @@ unreachable end i32.const 272 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1840 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 272 @@ -633,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -650,10 +647,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -666,11 +663,12 @@ i32.const 272 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -694,12 +692,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -710,9 +708,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 6ca5a4ea41..f28e80b650 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -175,11 +175,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) local.get $0 @@ -223,7 +223,7 @@ return end i32.const -54 - local.set $4 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul @@ -279,11 +279,11 @@ local.get $0 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul local.set $3 - local.get $4 + local.get $8 local.get $1 i32.const 20 i32.shr_u @@ -298,25 +298,25 @@ f64.mul local.get $0 f64.mul - local.tee $6 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $8 + local.set $7 local.get $0 - local.get $7 - f64.sub local.get $6 f64.sub local.get $5 - local.get $6 + f64.sub + local.get $4 + local.get $5 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -351,7 +351,7 @@ f64.mul f64.add local.tee $0 - local.get $7 + local.get $6 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -360,12 +360,12 @@ f64.mul f64.add local.get $9 - local.get $8 + local.get $7 f64.sub local.get $10 f64.add f64.add - local.get $8 + local.get $7 f64.add ) (func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) @@ -430,14 +430,12 @@ i32.lt_u select local.set $0 - i32.const 0 - local.set $13 loop $for-loop|0 - local.get $13 + local.get $12 local.get $1 i32.lt_u if - local.get $13 + local.get $12 f64.convert_i32_u local.get $11 f64.mul @@ -449,7 +447,7 @@ f64.const 0 local.set $14 i32.const 0 - local.set $12 + local.set $13 loop $while-continue|1 local.get $5 local.get $5 @@ -478,20 +476,20 @@ local.get $9 f64.add local.set $5 - local.get $12 + local.get $13 local.get $3 i32.ge_u br_if $while-break|1 - local.get $12 + local.get $13 i32.const 1 i32.add - local.set $12 + local.set $13 br $while-continue|1 end end end loop $while-continue|2 - local.get $12 + local.get $13 local.get $0 i32.lt_u if @@ -513,15 +511,15 @@ f64.add local.set $14 local.set $5 - local.get $12 + local.get $13 i32.const 1 i32.add - local.set $12 + local.set $13 br $while-continue|2 end end local.get $2 - local.get $13 + local.get $12 i32.const 1 i32.shl i32.add @@ -537,7 +535,7 @@ f64.gt if (result i32) f64.const 2047 - local.get $12 + local.get $13 i32.const 1 i32.add f64.convert_i32_u @@ -559,10 +557,10 @@ i32.const 2047 end i32.store16 - local.get $13 + local.get $12 i32.const 1 i32.add - local.set $13 + local.set $12 br $for-loop|0 end end diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index ed4a9209e2..3ae28eb06b 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1428,6 +1428,7 @@ select ) (func $~lib/number/F32.isInteger (; 14 ;) (param $0 f32) (result i32) + (local $1 i32) local.get $0 f32.trunc local.get $0 @@ -1453,6 +1454,7 @@ select ) (func $~lib/number/F64.isInteger (; 16 ;) (param $0 f64) (result i32) + (local $1 i32) local.get $0 f64.trunc local.get $0 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 2c7d504573..dc73f938c9 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -27,7 +27,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -39,7 +39,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -64,39 +64,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -108,25 +106,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -138,24 +136,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -164,7 +162,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -174,7 +172,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -191,6 +189,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -276,7 +275,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -288,7 +287,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -297,7 +296,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -305,8 +304,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -366,12 +365,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -388,17 +386,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -410,7 +407,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -418,22 +415,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -446,12 +443,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -583,16 +580,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -604,18 +601,18 @@ unreachable end i32.const 192 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1760 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 192 @@ -630,7 +627,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -647,10 +644,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -663,11 +660,12 @@ i32.const 192 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -691,12 +689,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -707,9 +705,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index 540f432f25..3a6c512fd1 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -27,7 +27,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -39,7 +39,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -64,39 +64,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -108,25 +106,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -138,24 +136,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -164,7 +162,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -174,7 +172,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -191,6 +189,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -276,7 +275,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -288,7 +287,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -297,7 +296,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -305,8 +304,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -366,12 +365,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -388,17 +386,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -410,7 +407,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -418,22 +415,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -446,12 +443,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -583,16 +580,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -604,18 +601,18 @@ unreachable end i32.const 176 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 176 @@ -630,7 +627,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -647,10 +644,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -663,11 +660,12 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -691,12 +689,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -707,9 +705,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index d8b0f05c8e..50ce53221e 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -27,7 +27,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -39,7 +39,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -64,39 +64,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -108,25 +106,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -138,24 +136,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -164,7 +162,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -174,7 +172,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -191,6 +189,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -276,7 +275,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -288,7 +287,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -297,7 +296,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -305,8 +304,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -366,12 +365,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -388,17 +386,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -410,7 +407,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -418,22 +415,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -446,12 +443,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -583,16 +580,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -604,18 +601,18 @@ unreachable end i32.const 176 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 176 @@ -630,7 +627,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -647,10 +644,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -663,11 +660,12 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -691,12 +689,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -707,9 +705,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 78e294b7a9..25899cdd8a 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -117,7 +117,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -129,7 +129,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -154,39 +154,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -198,25 +196,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -228,24 +226,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -254,7 +252,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -264,7 +262,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -281,6 +279,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -366,7 +365,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -378,7 +377,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -387,7 +386,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -395,8 +394,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -456,12 +455,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -478,17 +476,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -500,7 +497,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -508,22 +505,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -536,12 +533,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -673,16 +670,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -694,18 +691,18 @@ unreachable end i32.const 208 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 208 @@ -720,7 +717,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -737,10 +734,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -753,11 +750,12 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 14 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -781,12 +779,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -797,9 +795,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index 3499305b9c..4ae04fcb47 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -30,7 +30,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -42,7 +42,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -67,39 +67,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -111,25 +109,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -141,24 +139,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +165,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -177,7 +175,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -194,6 +192,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -279,7 +278,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -291,7 +290,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -300,7 +299,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -308,8 +307,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -369,12 +368,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -391,17 +389,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -413,7 +410,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -421,22 +418,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -449,12 +446,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -586,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -607,18 +604,18 @@ unreachable end i32.const 224 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1792 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 224 @@ -633,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -650,10 +647,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -666,19 +663,18 @@ i32.const 224 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -711,17 +707,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index f84c8a4d3d..98cf5f078e 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -29,7 +29,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -41,7 +41,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -66,39 +66,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -110,25 +108,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -140,24 +138,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -166,7 +164,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -176,7 +174,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -193,6 +191,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -278,7 +277,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -290,7 +289,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -299,7 +298,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -307,8 +306,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -368,12 +367,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -390,17 +388,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -412,7 +409,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -420,22 +417,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -448,12 +445,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -585,16 +582,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -606,18 +603,18 @@ unreachable end i32.const 176 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 176 @@ -632,7 +629,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -649,10 +646,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -665,11 +662,12 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -693,12 +691,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -709,9 +707,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index c3662a9384..9b673dd93c 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -52,7 +52,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -64,7 +64,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -89,39 +89,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -133,25 +131,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -163,24 +161,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -189,7 +187,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -199,7 +197,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -216,6 +214,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -301,7 +300,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -313,7 +312,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -322,7 +321,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -330,8 +329,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -391,12 +390,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -413,17 +411,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -435,7 +432,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -443,22 +440,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -471,12 +468,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -608,16 +605,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -629,18 +626,18 @@ unreachable end i32.const 1536 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 3104 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 1536 @@ -655,7 +652,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -672,10 +669,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -688,19 +685,18 @@ i32.const 1536 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -733,17 +729,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index b20dbff518..b8761e8a04 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -44,7 +44,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -56,7 +56,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -81,39 +81,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -125,25 +123,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -155,24 +153,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -181,7 +179,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -191,7 +189,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -208,6 +206,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -293,7 +292,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -305,7 +304,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -314,7 +313,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -322,8 +321,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -383,12 +382,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -405,17 +403,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -427,7 +424,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -435,22 +432,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -463,12 +460,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -600,16 +597,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -621,18 +618,18 @@ unreachable end i32.const 720 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2288 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 720 @@ -647,7 +644,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -664,10 +661,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -680,7 +677,7 @@ i32.const 720 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -711,12 +708,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -749,17 +745,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -2065,26 +2060,28 @@ local.get $1 local.get $3 i32.store + local.get $2 + local.set $4 local.get $1 local.tee $3 local.get $2 - local.tee $1 i32.load - local.tee $4 + local.tee $1 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $4 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 + local.get $4 local.get $3 i32.store local.get $0 local.tee $3 - local.get $1 + local.get $4 + local.tee $1 i32.load local.tee $4 i32.ne diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index a20d680328..d511d33206 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -26,7 +26,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -38,7 +38,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -63,39 +63,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -107,25 +105,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -137,24 +135,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -163,7 +161,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -173,7 +171,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -190,6 +188,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -275,7 +274,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -287,7 +286,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -296,7 +295,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -304,8 +303,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -365,12 +364,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -387,17 +385,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -409,7 +406,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -417,22 +414,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -445,12 +442,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -582,16 +579,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -603,18 +600,18 @@ unreachable end i32.const 176 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1744 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 176 @@ -629,7 +626,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -646,10 +643,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -662,11 +659,12 @@ i32.const 176 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -690,12 +688,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -706,9 +704,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 14665fe025..253a6163e8 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -30,7 +30,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -42,7 +42,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -67,39 +67,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -111,25 +109,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -141,24 +139,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -167,7 +165,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -177,7 +175,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -194,6 +192,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -279,7 +278,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -291,7 +290,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -300,7 +299,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -308,8 +307,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -369,12 +368,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -391,17 +389,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -413,7 +410,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -421,22 +418,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -449,12 +446,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -586,16 +583,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -607,18 +604,18 @@ unreachable end i32.const 208 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 208 @@ -633,7 +630,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -650,10 +647,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -666,19 +663,18 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 5 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -711,17 +707,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/scoped.optimized.wat b/tests/compiler/scoped.optimized.wat index 3cad609964..f3c108a010 100644 --- a/tests/compiler/scoped.optimized.wat +++ b/tests/compiler/scoped.optimized.wat @@ -5,6 +5,7 @@ (start $~start) (func $~start (; 0 ;) (local $0 i32) + (local $1 i32) loop $for-loop|0 local.get $0 i32.const 1 @@ -17,17 +18,15 @@ br $for-loop|0 end end - i32.const 0 - local.set $0 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 1 i32.lt_s if - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 15447bd57e..a3d57bb664 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -82,7 +82,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -94,7 +94,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -119,39 +119,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -163,25 +161,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -193,24 +191,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -219,7 +217,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -229,7 +227,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -246,6 +244,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -331,7 +330,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -343,7 +342,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -352,7 +351,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -360,8 +359,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -421,12 +420,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -443,17 +441,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -465,7 +462,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -473,22 +470,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -501,12 +498,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -638,16 +635,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -659,18 +656,18 @@ unreachable end i32.const 528 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2096 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 528 @@ -685,7 +682,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -702,10 +699,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -718,19 +715,18 @@ i32.const 528 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 11 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -763,17 +759,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 76841eb45c..7c8e2cf902 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -242,7 +242,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -254,7 +254,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -279,39 +279,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -323,25 +321,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -353,24 +351,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -379,7 +377,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -389,7 +387,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -406,6 +404,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -491,7 +490,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -503,7 +502,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -512,7 +511,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -520,8 +519,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -581,12 +580,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -603,17 +601,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -625,7 +622,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -633,22 +630,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -661,12 +658,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -798,16 +795,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -819,18 +816,18 @@ unreachable end i32.const 8304 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 9872 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 8304 @@ -845,7 +842,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -862,10 +859,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -878,7 +875,7 @@ i32.const 8304 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) local.get $0 @@ -909,12 +906,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -947,17 +943,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -5981,14 +5976,14 @@ local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $3 i32.const 0 i32.lt_s if i32.const 5120 return end - local.get $2 + local.get $3 i32.eqz if i32.const 5296 @@ -5999,7 +5994,7 @@ call $~lib/rt/pure/__retain return end - local.get $2 + local.get $3 i32.const 5360 call $~lib/string/String#get:length local.tee $4 @@ -6014,12 +6009,10 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 local.set $1 loop $for-loop|1 local.get $5 - local.get $2 + local.get $3 i32.lt_s if local.get $0 @@ -6031,8 +6024,8 @@ i32.const 4 i32.add local.set $6 - local.get $3 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -6044,14 +6037,14 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $6 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $3 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -6060,10 +6053,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -6073,22 +6066,22 @@ end end local.get $0 - local.get $2 + local.get $3 i32.add i32.load8_u - local.tee $2 + local.tee $3 i32.eqz i32.const 4 i32.add local.set $0 - local.get $3 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.const 5296 i32.const 5328 - local.get $2 + local.get $3 select local.get $0 i32.const 1 @@ -6096,19 +6089,19 @@ call $~lib/memory/memory.copy local.get $7 local.get $0 - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $3 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $3 + local.get $1 call $~lib/rt/pure/__release return end - local.get $3 + local.get $1 ) (func $~lib/util/number/decimalCount32 (; 126 ;) (param $0 i32) (result i32) i32.const 1 @@ -6308,16 +6301,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $4 i32.lt_s if - local.get $3 local.get $1 + local.get $3 local.get $0 local.get $6 i32.const 2 @@ -6325,13 +6316,13 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $3 i32.add - local.set $1 + local.set $3 local.get $5 if - local.get $3 local.get $1 + local.get $3 i32.const 1 i32.shl i32.add @@ -6340,10 +6331,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $3 local.get $5 i32.add - local.set $1 + local.set $3 end local.get $6 i32.const 1 @@ -6353,8 +6344,8 @@ end end local.get $7 - local.get $3 local.get $1 + local.get $3 local.get $0 local.get $4 i32.const 2 @@ -6362,19 +6353,19 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $3 i32.add local.tee $0 i32.gt_s if - local.get $3 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $3 + local.get $1 call $~lib/rt/pure/__release return end - local.get $3 + local.get $1 ) (func $~lib/array/Array#join (; 131 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -6470,16 +6461,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $4 i32.lt_s if - local.get $3 local.get $1 + local.get $3 local.get $0 local.get $6 i32.const 2 @@ -6487,13 +6476,13 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $3 i32.add - local.set $1 + local.set $3 local.get $5 if - local.get $3 local.get $1 + local.get $3 i32.const 1 i32.shl i32.add @@ -6502,10 +6491,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $3 local.get $5 i32.add - local.set $1 + local.set $3 end local.get $6 i32.const 1 @@ -6515,8 +6504,8 @@ end end local.get $7 - local.get $3 local.get $1 + local.get $3 local.get $0 local.get $4 i32.const 2 @@ -6524,19 +6513,19 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $3 i32.add local.tee $0 i32.gt_s if - local.get $3 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $3 + local.get $1 call $~lib/rt/pure/__release return end - local.get $3 + local.get $1 ) (func $~lib/array/Array#join (; 135 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -7547,8 +7536,8 @@ call $~lib/util/number/dtoa_core ) (func $~lib/util/string/joinFloatArray (; 140 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 f64) - (local $3 i32) + (local $2 i32) + (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) @@ -7569,7 +7558,7 @@ block $__inlined_func$~lib/util/number/dtoa local.get $0 f64.load - local.tee $2 + local.tee $3 f64.const 0 f64.eq if @@ -7577,14 +7566,14 @@ local.set $0 br $__inlined_func$~lib/util/number/dtoa end - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.sub f64.const 0 f64.ne if - local.get $2 - local.get $2 + local.get $3 + local.get $3 f64.ne if i32.const 5856 @@ -7593,7 +7582,7 @@ end i32.const 5888 i32.const 5936 - local.get $2 + local.get $3 f64.const 0 f64.lt select @@ -7605,7 +7594,7 @@ i32.const 1 call $~lib/rt/tlsf/__alloc local.tee $1 - local.get $2 + local.get $3 call $~lib/util/number/dtoa_core local.tee $0 i32.const 28 @@ -7643,16 +7632,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $4 i32.lt_s if - local.get $3 local.get $1 + local.get $2 local.get $0 local.get $6 i32.const 3 @@ -7660,13 +7647,13 @@ i32.add f64.load call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $5 if - local.get $3 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -7675,10 +7662,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $5 i32.add - local.set $1 + local.set $2 end local.get $6 i32.const 1 @@ -7688,8 +7675,8 @@ end end local.get $7 - local.get $3 local.get $1 + local.get $2 local.get $0 local.get $4 i32.const 3 @@ -7697,19 +7684,19 @@ i32.add f64.load call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $3 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $3 + local.get $1 call $~lib/rt/pure/__release return end - local.get $3 + local.get $1 ) (func $~lib/util/string/joinReferenceArray<~lib/string/String | null> (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -7729,10 +7716,6 @@ i32.const 5120 return end - local.get $2 - local.set $4 - i32.const 0 - local.set $2 local.get $6 i32.eqz if @@ -7757,7 +7740,8 @@ end i32.const 5120 local.set $1 - local.get $4 + local.get $2 + local.tee $4 call $~lib/string/String#get:length local.set $8 loop $for-loop|0 @@ -7765,63 +7749,63 @@ local.get $6 i32.lt_s if - local.get $2 local.get $0 local.get $5 i32.const 2 i32.shl i32.add i32.load - local.tee $3 + local.tee $2 + local.get $3 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 call $~lib/rt/pure/__release end - local.get $3 - local.tee $2 + local.get $2 + local.tee $3 if - local.get $2 + local.get $3 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 local.get $1 - local.get $3 + local.get $2 call $~lib/string/String.__concat local.tee $9 - local.tee $3 + local.tee $2 local.get $1 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $1 call $~lib/rt/pure/__release end call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $3 + local.get $2 local.set $1 end local.get $8 if local.get $1 - local.tee $3 + local.tee $2 local.get $4 call $~lib/string/String.__concat local.tee $7 local.tee $1 - local.get $3 + local.get $2 i32.ne if local.get $1 call $~lib/rt/pure/__retain local.set $1 - local.get $3 + local.get $2 call $~lib/rt/pure/__release end local.get $7 @@ -7834,23 +7818,23 @@ br $for-loop|0 end end - local.get $2 local.get $0 local.get $6 i32.const 2 i32.shl i32.add i32.load - local.tee $3 + local.tee $2 + local.get $3 i32.ne if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 local.get $2 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 call $~lib/rt/pure/__release end - local.get $3 + local.get $2 local.tee $0 if local.get $0 @@ -7859,21 +7843,21 @@ local.get $1 local.get $2 call $~lib/string/String.__concat + local.tee $5 local.tee $2 - local.tee $3 local.get $1 i32.ne if - local.get $3 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 + local.set $2 local.get $1 call $~lib/rt/pure/__release end call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $2 local.set $1 end local.get $0 @@ -8142,28 +8126,26 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.add i32.load8_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -8172,10 +8154,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -8185,26 +8167,26 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.add i32.load8_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) (func $~lib/util/number/itoa_stream (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -8275,16 +8257,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 1 @@ -8292,13 +8272,13 @@ i32.add i32.load16_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -8307,10 +8287,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -8320,8 +8300,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 1 @@ -8329,19 +8309,19 @@ i32.add i32.load16_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) (func $~lib/util/number/decimalCount64 (; 149 ;) (param $0 i64) (result i32) i32.const 10 @@ -8543,16 +8523,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $6 i32.const 3 @@ -8560,13 +8538,13 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $5 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -8575,10 +8553,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $5 i32.add - local.set $1 + local.set $2 end local.get $6 i32.const 1 @@ -8588,8 +8566,8 @@ end end local.get $7 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 3 @@ -8597,19 +8575,19 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) (func $~lib/util/number/itoa_stream (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) @@ -8769,16 +8747,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $6 i32.const 3 @@ -8786,13 +8762,13 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $5 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -8801,10 +8777,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $5 i32.add - local.set $1 + local.set $2 end local.get $6 i32.const 1 @@ -8814,8 +8790,8 @@ end end local.get $7 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $4 i32.const 3 @@ -8823,19 +8799,19 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) (func $~lib/util/string/joinReferenceArray<~lib/array/Array> (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -9074,28 +9050,26 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.add i32.load8_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -9104,10 +9078,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -9117,26 +9091,26 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.add i32.load8_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) (func $~lib/array/Array#toString (; 158 ;) (param $0 i32) (result i32) local.get $0 @@ -9195,6 +9169,7 @@ local.get $5 i32.lt_s if + local.get $3 local.get $0 local.get $4 i32.const 2 @@ -9202,7 +9177,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -9264,6 +9238,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -9271,7 +9246,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -9535,6 +9509,7 @@ local.get $5 i32.lt_s if + local.get $3 local.get $0 local.get $4 i32.const 2 @@ -9542,7 +9517,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 @@ -9604,6 +9578,7 @@ br $for-loop|0 end end + local.get $3 local.get $0 local.get $5 i32.const 2 @@ -9611,7 +9586,6 @@ i32.add i32.load local.tee $2 - local.get $3 i32.ne if local.get $2 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 0f710b1f89..f36b0028ce 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -35,7 +35,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -47,7 +47,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -72,39 +72,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -116,25 +114,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -146,24 +144,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -172,7 +170,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -182,7 +180,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -199,6 +197,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -284,7 +283,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -296,7 +295,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -305,7 +304,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -313,8 +312,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -374,12 +373,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -396,17 +394,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -418,7 +415,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -426,22 +423,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -454,12 +451,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -591,16 +588,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -612,18 +609,18 @@ unreachable end i32.const 432 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2000 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 432 @@ -638,7 +635,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -655,10 +652,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -671,19 +668,18 @@ i32.const 432 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -716,17 +712,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index c4e3fa0f03..b29f7f91d6 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -43,7 +43,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -55,7 +55,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -80,39 +80,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -124,25 +122,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -154,24 +152,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -180,7 +178,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -190,7 +188,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -207,6 +205,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -292,7 +291,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -304,7 +303,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -313,7 +312,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -321,8 +320,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -382,12 +381,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -404,17 +402,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -426,7 +423,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -434,22 +431,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -462,12 +459,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -599,16 +596,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -620,18 +617,18 @@ unreachable end i32.const 512 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2080 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 512 @@ -646,7 +643,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -663,10 +660,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -679,19 +676,18 @@ i32.const 512 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 9 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -724,17 +720,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index 555f58a789..f16ce70060 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -15,11 +15,8 @@ i32.const -2128831035 local.set $2 local.get $0 - local.tee $1 if - i32.const 0 - local.set $0 - local.get $1 + local.get $0 i32.const 16 i32.sub i32.load offset=12 @@ -29,7 +26,7 @@ i32.shl local.set $3 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_u if @@ -42,10 +39,10 @@ i32.const 16777619 i32.mul local.set $2 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index e7362c0dd0..d9fdd1c3e6 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -298,8 +298,8 @@ (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 i64) + (local $5 i64) + (local $6 f64) (local $7 f64) i32.const 1 local.set $3 @@ -372,7 +372,7 @@ local.get $0 f64.add i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -386,9 +386,9 @@ local.tee $3 i32.const 54 i32.lt_s - if (result f64) + if f64.const 1 - local.get $6 + local.get $5 f64.reinterpret_i64 local.tee $1 local.get $0 @@ -405,11 +405,9 @@ select local.get $1 f64.div - else - f64.const 0 + local.set $6 end - local.set $5 - local.get $6 + local.get $5 i64.const 4294967295 i64.and local.get $2 @@ -479,7 +477,7 @@ local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $5 + local.get $6 f64.add f64.add local.get $4 @@ -933,7 +931,8 @@ (local $1 f64) (local $2 f64) (local $3 i32) - (local $4 f64) + (local $4 i32) + (local $5 f64) local.get $0 local.set $1 local.get $0 @@ -943,7 +942,7 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1141899264 i32.ge_u if @@ -959,11 +958,11 @@ f64.copysign return end - local.get $3 + local.get $4 i32.const 1071382528 i32.lt_u if - local.get $3 + local.get $4 i32.const 1044381696 i32.lt_u if @@ -976,16 +975,14 @@ local.get $0 f64.abs local.set $0 - local.get $3 + local.get $4 i32.const 1072889856 i32.lt_u if (result f64) - local.get $3 + local.get $4 i32.const 1072037888 i32.lt_u if (result f64) - i32.const 0 - local.set $3 f64.const 2 local.get $0 f64.mul @@ -1007,7 +1004,7 @@ f64.div end else - local.get $3 + local.get $4 i32.const 1073971200 i32.lt_u if (result f64) @@ -1035,12 +1032,12 @@ local.get $0 local.get $0 f64.mul - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $2 local.get $0 - local.get $4 + local.get $5 f64.const 0.3333333333333293 local.get $2 f64.const 0.14285714272503466 @@ -2560,8 +2557,8 @@ (local $3 f64) (local $4 i32) (local $5 f64) - (local $6 f64) - (local $7 i32) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -2570,11 +2567,11 @@ local.tee $2 i32.const 31 i32.shr_u - local.set $7 + local.set $6 local.get $2 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1082532651 i32.ge_u if @@ -2602,14 +2599,12 @@ return end end - i32.const 0 - local.set $2 - local.get $4 + local.get $2 i32.const 1071001154 i32.gt_u if local.get $0 - local.get $4 + local.get $2 i32.const 1072734898 i32.ge_u if (result i32) @@ -2623,26 +2618,26 @@ i32.trunc_f64_s else i32.const 1 - local.get $7 + local.get $6 i32.const 1 i32.shl i32.sub end - local.tee $2 + local.tee $4 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul f64.sub local.tee $1 - local.get $2 + local.get $4 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul - local.tee $5 + local.tee $7 f64.sub local.set $0 else - local.get $4 + local.get $2 i32.const 1043333120 i32.gt_u if (result f64) @@ -2661,20 +2656,20 @@ local.tee $3 local.get $3 f64.mul - local.set $6 + local.set $5 f64.const 1 local.get $0 local.get $0 local.get $3 f64.const 0.16666666666666602 f64.mul - local.get $6 + local.get $5 f64.const -2.7777777777015593e-03 local.get $3 f64.const 6.613756321437934e-05 f64.mul f64.add - local.get $6 + local.get $5 f64.const -1.6533902205465252e-06 local.get $3 f64.const 4.1381367970572385e-08 @@ -2691,16 +2686,16 @@ local.get $0 f64.sub f64.div - local.get $5 + local.get $7 f64.sub local.get $1 f64.add f64.add local.set $0 - local.get $2 + local.get $4 if local.get $0 - local.get $2 + local.get $4 call $~lib/math/NativeMath.scalbn local.set $0 end @@ -2993,11 +2988,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) @@ -3042,7 +3037,7 @@ return end i32.const -54 - local.set $4 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul @@ -3098,11 +3093,11 @@ local.get $0 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul local.set $3 - local.get $4 + local.get $8 local.get $1 i32.const 20 i32.shr_u @@ -3120,28 +3115,28 @@ f64.mul local.get $0 f64.mul - local.tee $6 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 0.4342944818781689 f64.mul local.tee $11 f64.add - local.set $8 + local.set $7 local.get $9 f64.const 3.694239077158931e-13 f64.mul local.get $0 - local.get $7 - f64.sub local.get $6 f64.sub local.get $5 - local.get $6 + f64.sub + local.get $4 + local.get $5 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -3176,7 +3171,7 @@ f64.mul f64.add local.tee $0 - local.get $7 + local.get $6 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -3186,12 +3181,12 @@ f64.mul f64.add local.get $10 - local.get $8 + local.get $7 f64.sub local.get $11 f64.add f64.add - local.get $8 + local.get $7 f64.add ) (func $../../lib/libm/assembly/libm/log10 (; 36 ;) (param $0 f64) (result f64) @@ -3206,11 +3201,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) local.get $0 @@ -3254,7 +3249,7 @@ return end i32.const -54 - local.set $4 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul @@ -3310,11 +3305,11 @@ local.get $0 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul local.set $3 - local.get $4 + local.get $8 local.get $1 i32.const 20 i32.shr_u @@ -3329,25 +3324,25 @@ f64.mul local.get $0 f64.mul - local.tee $6 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $8 + local.set $7 local.get $0 - local.get $7 - f64.sub local.get $6 f64.sub local.get $5 - local.get $6 + f64.sub + local.get $4 + local.get $5 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -3382,7 +3377,7 @@ f64.mul f64.add local.tee $0 - local.get $7 + local.get $6 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -3391,12 +3386,12 @@ f64.mul f64.add local.get $9 - local.get $8 + local.get $7 f64.sub local.get $10 f64.add f64.add - local.get $8 + local.get $7 f64.add ) (func $../../lib/libm/assembly/libm/log2 (; 39 ;) (param $0 f64) (result f64) @@ -3418,20 +3413,21 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 f64) + (local $6 f64) + (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) + (local $14 i64) + (local $15 f64) + (local $16 i32) (local $17 i32) (local $18 f64) (local $19 i32) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -3486,30 +3482,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $19 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $8 + local.get $14 i32.wrap_i64 - local.tee $6 + local.tee $20 i32.or i32.eqz if @@ -3517,14 +3513,14 @@ return end i32.const 1 - local.get $6 + local.get $20 i32.const 0 - local.get $9 + local.get $8 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $8 i32.const 2146435072 i32.gt_s i32.const 1 @@ -3546,51 +3542,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $8 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $8 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $8 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $9 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $9 i32.sub - local.set $11 + local.set $10 i32.const 2 - local.get $6 - local.get $9 + local.get $20 + local.get $8 local.get $5 select local.tee $5 - local.get $11 + local.get $10 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $9 local.get $10 - local.get $11 i32.shl i32.eq select @@ -3600,10 +3596,10 @@ end local.set $5 end - local.get $6 + local.get $20 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -3617,22 +3613,20 @@ i32.const 1072693248 i32.ge_s if - local.get $8 - i32.const 0 - i32.lt_s - if - f64.const 0 - local.set $1 - end local.get $1 + f64.const 0 + local.get $7 + i32.const 0 + i32.ge_s + select return else - f64.const 0 local.get $1 f64.neg - local.get $8 + f64.const 0 + local.get $7 i32.const 0 - i32.ge_s + i32.lt_s select return end @@ -3643,11 +3637,11 @@ end unreachable end - local.get $9 + local.get $8 i32.const 1072693248 i32.eq if - local.get $8 + local.get $7 i32.const 0 i32.ge_s if @@ -3659,7 +3653,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -3668,11 +3662,11 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -3704,12 +3698,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -3741,8 +3735,8 @@ end end f64.const 1 - local.set $7 - local.get $17 + local.set $6 + local.get $16 i32.const 0 i32.lt_s if @@ -3763,13 +3757,13 @@ i32.const 1 i32.eq select - local.set $7 + local.set $6 end - local.get $9 + local.get $8 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $8 i32.const 1139802112 i32.gt_s if @@ -3779,7 +3773,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -3791,7 +3785,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -3802,17 +3796,17 @@ i32.const 1072693247 i32.lt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -3822,17 +3816,17 @@ i32.const 1072693248 i32.gt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -3870,9 +3864,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $0 - local.get $12 + local.get $11 local.get $2 f64.sub f64.sub @@ -3900,7 +3894,7 @@ i32.const 1023 i32.sub i32.add - local.set $6 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -3910,28 +3904,25 @@ local.set $4 local.get $5 i32.const 235662 - i32.le_s - if (result i32) - i32.const 0 - else + i32.gt_s + if local.get $5 i32.const 767610 i32.lt_s - if (result i32) + if i32.const 1 + local.set $17 else - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 local.get $4 i32.const -1048576 i32.add local.set $4 - i32.const 0 end end - local.set $5 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -3942,16 +3933,16 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.const 1.5 f64.const 1 - local.get $5 + local.get $17 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $12 local.get $3 f64.add f64.div @@ -3962,31 +3953,31 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 + local.tee $15 + local.get $15 f64.mul - local.set $12 + local.set $11 f64.const 0.9617967009544373 - local.get $16 + local.get $15 f64.const 3 - local.get $12 + local.get $11 f64.add local.get $18 local.get $18 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -4001,7 +3992,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -4009,7 +4000,7 @@ i32.or i32.const 524288 i32.add - local.get $5 + local.get $17 i32.const 18 i32.shl i32.add @@ -4020,8 +4011,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $12 local.get $0 local.get $3 f64.sub @@ -4030,7 +4021,7 @@ f64.sub f64.mul local.tee $3 - local.get $16 + local.get $15 local.get $18 f64.add f64.mul @@ -4041,17 +4032,17 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $12 f64.mul local.get $0 - local.get $13 + local.get $12 f64.const 3 f64.sub - local.get $12 + local.get $11 f64.sub f64.sub local.get $18 @@ -4065,7 +4056,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $12 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -4079,18 +4070,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $17 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $17 select local.tee $2 f64.add - local.get $6 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -4098,14 +4089,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $3 - local.get $12 + local.get $11 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $12 f64.sub f64.sub end @@ -4118,7 +4109,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $11 f64.mul local.get $1 local.get $2 @@ -4126,27 +4117,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $11 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $10 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $10 i32.const 1083179008 i32.sub i32.or @@ -4160,50 +4151,50 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $10 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s - i32.const 0 - local.get $5 - local.get $11 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - select - br_if $folding-inner1 + if + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + br_if $folding-inner1 + end end - local.get $11 + local.get $10 i32.const 2147483647 i32.and - local.tee $10 + local.tee $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $6 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $10 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -4214,7 +4205,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -4222,7 +4213,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -4231,14 +4222,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $6 + local.tee $7 i32.sub - local.get $6 - local.get $11 + local.get $7 + local.get $10 i32.const 0 i32.lt_s select - local.set $6 + local.set $7 local.get $3 local.get $0 f64.sub @@ -4272,7 +4263,7 @@ local.get $3 f64.mul local.set $0 - local.get $7 + local.get $6 f64.const 1 local.get $3 local.get $3 @@ -4321,7 +4312,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $6 + local.get $7 i32.const 20 i32.shl i32.add @@ -4332,7 +4323,7 @@ i32.le_s if (result f64) local.get $0 - local.get $6 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -4349,14 +4340,14 @@ f64.mul return end - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -5469,7 +5460,7 @@ local.tee $3 i32.const 25 i32.lt_s - if (result f32) + if f32.const 1 local.get $1 local.get $0 @@ -5486,10 +5477,8 @@ select local.get $1 f32.div - else - f32.const 0 + local.set $5 end - local.set $5 local.get $2 i32.const 8388607 i32.and @@ -5893,16 +5882,17 @@ ) (func $~lib/math/NativeMathf.atan (; 67 ;) (param $0 f32) (result f32) (local $1 f32) - (local $2 i32) - (local $3 f32) - (local $4 f32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) local.get $0 local.set $1 local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1283457024 i32.ge_u if @@ -5918,11 +5908,11 @@ f32.copysign return end - local.get $2 + local.get $4 i32.const 1054867456 i32.lt_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -5930,21 +5920,19 @@ return end i32.const -1 - local.set $2 + local.set $3 else local.get $0 f32.abs local.set $0 - local.get $2 + local.get $4 i32.const 1066926080 i32.lt_u if (result f32) - local.get $2 + local.get $4 i32.const 1060110336 i32.lt_u if (result f32) - i32.const 0 - local.set $2 f32.const 2 local.get $0 f32.mul @@ -5956,7 +5944,7 @@ f32.div else i32.const 1 - local.set $2 + local.set $3 local.get $0 f32.const 1 f32.sub @@ -5966,12 +5954,12 @@ f32.div end else - local.get $2 + local.get $4 i32.const 1075576832 i32.lt_u if (result f32) i32.const 2 - local.set $2 + local.set $3 local.get $0 f32.const 1.5 f32.sub @@ -5983,7 +5971,7 @@ f32.div else i32.const 3 - local.set $2 + local.set $3 f32.const -1 local.get $0 f32.div @@ -5994,38 +5982,38 @@ local.get $0 local.get $0 f32.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f32.mul - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $2 f32.const 0.333333283662796 - local.get $4 + local.get $5 f32.const 0.14253635704517365 - local.get $4 + local.get $5 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $4 + local.get $5 f32.const -0.19999158382415771 - local.get $4 + local.get $5 f32.const -0.106480173766613 f32.mul f32.add f32.mul f32.add f32.mul - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if local.get $0 - local.get $3 + local.get $2 f32.sub return end @@ -6034,15 +6022,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $2 + local.get $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f32.const 0.46364760398864746 - local.get $3 + local.get $2 f32.const 5.01215824399992e-09 f32.sub local.get $0 @@ -6052,7 +6040,7 @@ br $break|0 end f32.const 0.7853981256484985 - local.get $3 + local.get $2 f32.const 3.774894707930798e-08 f32.sub local.get $0 @@ -6062,7 +6050,7 @@ br $break|0 end f32.const 0.9827936887741089 - local.get $3 + local.get $2 f32.const 3.447321716976148e-08 f32.sub local.get $0 @@ -6072,7 +6060,7 @@ br $break|0 end f32.const 1.570796251296997 - local.get $3 + local.get $2 f32.const 7.549789415861596e-08 f32.sub local.get $0 @@ -6144,7 +6132,8 @@ (func $~lib/math/NativeMathf.atan2 (; 70 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) + (local $5 i32) i32.const 1 local.get $0 local.get $0 @@ -6164,7 +6153,7 @@ local.set $2 local.get $1 i32.reinterpret_f32 - local.tee $4 + local.tee $5 i32.const 1065353216 i32.eq if @@ -6172,7 +6161,7 @@ call $~lib/math/NativeMathf.atan return end - local.get $4 + local.get $5 i32.const 30 i32.shr_u i32.const 2 @@ -6182,10 +6171,10 @@ i32.shr_u i32.or local.set $3 - local.get $4 + local.get $5 i32.const 2147483647 i32.and - local.set $4 + local.set $5 local.get $2 i32.const 2147483647 i32.and @@ -6224,10 +6213,10 @@ end end block $folding-inner0 - local.get $4 + local.get $5 i32.eqz br_if $folding-inner0 - local.get $4 + local.get $5 i32.const 2139095040 i32.eq if @@ -6266,7 +6255,7 @@ local.get $2 i32.const 2139095040 i32.eq - local.get $4 + local.get $5 i32.const 218103808 i32.add local.get $2 @@ -6276,23 +6265,22 @@ local.get $2 i32.const 218103808 i32.add - local.get $4 + local.get $5 i32.lt_u i32.const 0 local.get $3 i32.const 2 i32.and select - if (result f32) - f32.const 0 - else + i32.eqz + if local.get $0 local.get $1 f32.div f32.abs call $~lib/math/NativeMathf.atan + local.set $4 end - local.set $0 block $break|1 block $case3|1 block $case2|1 @@ -6300,26 +6288,29 @@ local.get $3 local.tee $2 if - local.get $2 - i32.const 1 - i32.sub - br_table $case1|1 $case2|1 $case3|1 $break|1 + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $tablify|0 + end + br $break|1 end - local.get $0 + local.get $4 return end - local.get $0 + local.get $4 f32.neg return end f32.const 3.1415927410125732 - local.get $0 + local.get $4 f32.const -8.742277657347586e-08 f32.sub f32.sub return end - local.get $0 + local.get $4 f32.const -8.742277657347586e-08 f32.sub f32.const 3.1415927410125732 @@ -6737,33 +6728,34 @@ call $~lib/math/NativeMathf.cos ) (func $~lib/math/NativeMathf.expm1 (; 78 ;) (param $0 f32) (result f32) - (local $1 i32) + (local $1 f32) (local $2 f32) - (local $3 f32) - (local $4 f32) - (local $5 i32) - (local $6 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) local.get $0 i32.reinterpret_f32 - local.tee $1 + local.tee $4 i32.const 31 i32.shr_u - local.set $5 - local.get $1 + local.set $6 + local.get $4 i32.const 2147483647 i32.and - local.tee $1 + local.tee $4 i32.const 1100331076 i32.ge_u if - local.get $1 + local.get $4 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $5 + local.get $6 if f32.const -1 return @@ -6778,13 +6770,13 @@ return end end - local.get $1 + local.get $4 i32.const 1051816472 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -6796,39 +6788,36 @@ f32.copysign f32.add i32.trunc_f32_s - local.get $1 + local.get $4 i32.const 1065686418 i32.lt_u select - local.tee $1 + local.tee $3 f32.convert_i32_s local.tee $0 f32.const 0.6931381225585938 f32.mul f32.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 local.get $0 f32.const 9.05800061445916e-06 f32.mul - local.tee $2 + local.tee $1 f32.sub local.tee $0 f32.sub - local.get $2 + local.get $1 f32.sub - local.set $4 + local.set $5 else - local.get $1 + local.get $4 i32.const 855638016 i32.lt_u - if (result i32) + if local.get $0 return - else - i32.const 0 end - local.set $1 end f32.const 3 f32.const 1 @@ -6836,69 +6825,69 @@ f32.const 0.5 local.get $0 f32.mul - local.tee $3 - f32.mul local.tee $2 + f32.mul + local.tee $1 f32.const -0.03333321213722229 - local.get $2 + local.get $1 f32.const 1.5807170420885086e-03 f32.mul f32.add f32.mul f32.add - local.tee $6 - local.get $3 + local.tee $7 + local.get $2 f32.mul f32.sub - local.set $3 + local.set $2 + local.get $1 + local.get $7 local.get $2 - local.get $6 - local.get $3 f32.sub f32.const 6 local.get $0 - local.get $3 + local.get $2 f32.mul f32.sub f32.div f32.mul - local.set $3 - local.get $1 + local.set $2 + local.get $3 i32.eqz if local.get $0 local.get $0 - local.get $3 - f32.mul local.get $2 + f32.mul + local.get $1 f32.sub f32.sub return end local.get $0 - local.get $3 - local.get $4 + local.get $2 + local.get $5 f32.sub f32.mul - local.get $4 - f32.sub - local.get $2 + local.get $5 f32.sub - local.set $2 local.get $1 + f32.sub + local.set $1 + local.get $3 i32.const -1 i32.eq if f32.const 0.5 local.get $0 - local.get $2 + local.get $1 f32.sub f32.mul f32.const 0.5 f32.sub return end - local.get $1 + local.get $3 i32.const 1 i32.eq if @@ -6907,7 +6896,7 @@ f32.lt if f32.const -2 - local.get $2 + local.get $1 local.get $0 f32.const 0.5 f32.add @@ -6918,30 +6907,30 @@ f32.const 1 f32.const 2 local.get $0 - local.get $2 + local.get $1 f32.sub f32.mul f32.add return end - local.get $1 + local.get $3 i32.const 127 i32.add i32.const 23 i32.shl f32.reinterpret_i32 - local.set $4 + local.set $5 i32.const 1 - local.get $1 + local.get $3 i32.const 56 i32.gt_s - local.get $1 + local.get $3 i32.const 0 i32.lt_s select if local.get $0 - local.get $2 + local.get $1 f32.sub f32.const 1 f32.add @@ -6951,9 +6940,9 @@ f32.const 1701411834604692317316873e14 f32.mul local.get $0 - local.get $4 + local.get $5 f32.mul - local.get $1 + local.get $3 i32.const 128 i32.eq select @@ -6964,26 +6953,26 @@ local.get $0 f32.const 1 i32.const 127 - local.get $1 + local.get $3 i32.sub i32.const 23 i32.shl f32.reinterpret_i32 - local.tee $3 + local.tee $2 f32.sub - local.get $2 + local.get $1 f32.sub f32.const 1 + local.get $1 local.get $2 - local.get $3 f32.add f32.sub - local.get $1 + local.get $3 i32.const 20 i32.lt_s select f32.add - local.get $4 + local.get $5 f32.mul ) (func $~lib/math/NativeMathf.scalbn (; 79 ;) (param $0 f32) (param $1 i32) (result f32) @@ -7063,37 +7052,38 @@ f32.mul ) (func $~lib/math/NativeMathf.exp (; 80 ;) (param $0 f32) (result f32) - (local $1 i32) + (local $1 f32) (local $2 i32) - (local $3 f32) - (local $4 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 - local.tee $1 + local.tee $2 i32.const 31 i32.shr_u - local.set $2 - local.get $1 + local.set $4 + local.get $2 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1118743632 i32.ge_u if - local.get $1 + local.get $2 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $1 + local.get $2 i32.const 1118925336 i32.ge_u if - local.get $2 + local.get $4 if - local.get $1 + local.get $2 i32.const 1120924085 i32.ge_u if @@ -7108,12 +7098,12 @@ end end end - local.get $1 + local.get $2 i32.const 1051816472 i32.gt_u if local.get $0 - local.get $1 + local.get $2 i32.const 1065686418 i32.gt_u if (result i32) @@ -7127,31 +7117,29 @@ i32.trunc_f32_s else i32.const 1 - local.get $2 + local.get $4 i32.const 1 i32.shl i32.sub end - local.tee $1 + local.tee $3 f32.convert_i32_s f32.const 0.693145751953125 f32.mul f32.sub - local.tee $3 - local.get $1 + local.tee $1 + local.get $3 f32.convert_i32_s f32.const 1.428606765330187e-06 f32.mul - local.tee $4 + local.tee $5 f32.sub local.set $0 else - local.get $1 + local.get $2 i32.const 956301312 i32.gt_u if (result f32) - i32.const 0 - local.set $1 local.get $0 else f32.const 1 @@ -7159,7 +7147,7 @@ f32.add return end - local.set $3 + local.set $1 end f32.const 1 local.get $0 @@ -7181,16 +7169,16 @@ local.get $0 f32.sub f32.div - local.get $4 + local.get $5 f32.sub - local.get $3 + local.get $1 f32.add f32.add local.set $0 - local.get $1 + local.get $3 if local.get $0 - local.get $1 + local.get $3 call $~lib/math/NativeMathf.scalbn local.set $0 end @@ -7383,19 +7371,17 @@ ) (func $../../lib/libm/assembly/libmf/imul (; 88 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 f32) - block $~lib/math/NativeMathf.imul|inlined.0 (result f32) - f32.const 0 - local.get $0 - local.tee $2 - local.get $1 - f32.add - local.tee $0 - local.get $0 - f32.sub - f32.const 0 - f32.ne - br_if $~lib/math/NativeMathf.imul|inlined.0 - drop + (local $3 f32) + local.get $0 + local.tee $2 + local.get $1 + f32.add + local.tee $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + if local.get $2 f64.promote_f32 call $~lib/math/dtoi32 @@ -7404,7 +7390,9 @@ call $~lib/math/dtoi32 i32.mul f32.convert_i32_s + local.set $3 end + local.get $3 ) (func $../../lib/libm/assembly/libmf/log (; 89 ;) (param $0 f32) (result f32) local.get $0 @@ -7413,9 +7401,9 @@ (func $~lib/math/NativeMathf.log10 (; 90 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) + (local $3 f32) (local $4 f32) - (local $5 f32) + (local $5 i32) (local $6 f32) local.get $0 i32.reinterpret_f32 @@ -7454,7 +7442,7 @@ return end i32.const -25 - local.set $3 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -7493,11 +7481,11 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul local.set $2 - local.get $3 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7521,11 +7509,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub - local.get $4 + local.get $3 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -7549,7 +7537,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -7558,7 +7546,7 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $5 + local.get $4 f32.const 0.434326171875 f32.mul f32.add @@ -7578,9 +7566,9 @@ (func $~lib/math/NativeMathf.log2 (; 93 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) + (local $3 f32) (local $4 f32) - (local $5 f32) + (local $5 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -7618,7 +7606,7 @@ return end i32.const -25 - local.set $3 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -7657,8 +7645,8 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul local.set $2 local.get $0 @@ -7674,11 +7662,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub - local.get $4 + local.get $3 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -7702,7 +7690,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -7710,11 +7698,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $4 f32.const 1.44287109375 f32.mul f32.add - local.get $3 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7741,11 +7729,14 @@ (func $~lib/math/NativeMathf.pow (; 97 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $4 i32) + (local $5 f32) + (local $6 i64) + (local $7 i32) (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 i32) local.get $1 f32.abs f32.const 2 @@ -7801,7 +7792,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 @@ -7810,42 +7801,42 @@ i32.ge_u i32.const 0 i32.ne - local.tee $2 + local.tee $7 local.get $0 i32.reinterpret_f32 - local.tee $8 + local.tee $11 i32.const 8388608 i32.sub i32.const 2130706432 i32.ge_u i32.or if - local.get $2 + local.get $7 if - local.get $3 + local.get $2 i32.const 1 i32.shl i32.eqz if f32.const 1 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1065353216 i32.eq if f32.const nan:0x400000 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const -16777216 @@ -7855,41 +7846,37 @@ local.get $0 local.get $1 f32.add - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 2130706432 i32.eq if f32.const nan:0x400000 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.eqz - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 2130706432 i32.lt_u i32.eq - if - f32.const 0 - local.set $0 - br $~lib/util/math/powf_lut|inlined.0 - end + br_if $~lib/util/math/powf_lut|inlined.0 local.get $1 local.get $1 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 1 @@ -7901,49 +7888,51 @@ local.get $0 f32.mul local.set $0 - local.get $8 + local.get $11 i32.const 31 i32.shr_u if (result i32) - block $~lib/util/math/checkintf|inlined.0 (result i32) - i32.const 0 - local.get $3 + block $~lib/util/math/checkintf|inlined.0 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $8 + local.tee $11 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 2 - local.get $8 + local.get $11 i32.const 150 i32.gt_u - br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 0 - local.get $3 + if + i32.const 2 + local.set $3 + br $~lib/util/math/checkintf|inlined.0 + end + local.get $2 i32.const 1 i32.const 150 - local.get $8 + local.get $11 i32.sub i32.shl - local.tee $8 + local.tee $11 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 1 - local.get $3 - local.get $8 + local.get $2 + local.get $11 i32.and - br_if $~lib/util/math/checkintf|inlined.0 - drop + if + i32.const 1 + local.set $3 + br $~lib/util/math/checkintf|inlined.0 + end i32.const 2 + local.set $3 end + local.get $3 i32.const 1 i32.eq else @@ -7954,7 +7943,7 @@ f32.neg local.set $0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -7963,53 +7952,56 @@ f32.div local.set $0 end + local.get $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 31 i32.shr_u if - block $~lib/util/math/checkintf|inlined.1 (result i32) - i32.const 0 - local.get $3 - local.tee $2 + block $~lib/util/math/checkintf|inlined.1 + local.get $2 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $3 + local.tee $2 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 2 - local.get $3 + local.get $2 i32.const 150 i32.gt_u - br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 0 - local.get $2 + if + i32.const 2 + local.set $4 + br $~lib/util/math/checkintf|inlined.1 + end + local.get $3 i32.const 1 i32.const 150 - local.get $3 + local.get $2 i32.sub i32.shl - local.tee $3 + local.tee $2 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 1 local.get $2 local.get $3 i32.and - br_if $~lib/util/math/checkintf|inlined.1 - drop + if + i32.const 1 + local.set $4 + br $~lib/util/math/checkintf|inlined.1 + end i32.const 2 + local.set $4 end - local.tee $3 + local.get $4 i32.eqz if local.get $0 @@ -8018,22 +8010,22 @@ local.tee $0 local.get $0 f32.div - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end i32.const 65536 i32.const 0 - local.get $3 + local.get $4 i32.const 1 i32.eq select - local.set $6 - local.get $8 + local.set $8 + local.get $11 i32.const 2147483647 i32.and - local.set $8 + local.set $11 end - local.get $8 + local.get $11 i32.const 8388608 i32.lt_u if @@ -8045,21 +8037,21 @@ i32.and i32.const 192937984 i32.sub - local.set $8 + local.set $11 end end - local.get $8 - local.get $8 + local.get $11 + local.get $11 i32.const 1060306944 i32.sub - local.tee $3 + local.tee $2 i32.const -8388608 i32.and - local.tee $2 + local.tee $4 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $3 + local.get $2 i32.const 19 i32.shr_u i32.const 15 @@ -8068,48 +8060,48 @@ i32.shl i32.const 288 i32.add - local.tee $3 + local.tee $2 f64.load f64.mul f64.const 1 f64.sub - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 f64.mul - local.set $5 + local.set $9 local.get $1 f64.promote_f32 f64.const 0.288457581109214 - local.get $7 + local.get $10 f64.mul f64.const -0.36092606229713164 f64.add - local.get $5 - local.get $5 + local.get $9 + local.get $9 f64.mul f64.mul f64.const 1.4426950408774342 - local.get $7 + local.get $10 f64.mul - local.get $3 - f64.load offset=8 local.get $2 + f64.load offset=8 + local.get $4 i32.const 23 i32.shr_s f64.convert_i32_s f64.add f64.add f64.const 0.480898481472577 - local.get $7 + local.get $10 f64.mul f64.const -0.7213474675006291 f64.add - local.get $5 + local.get $9 f64.mul f64.add f64.add f64.mul - local.tee $7 + local.tee $10 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -8118,59 +8110,59 @@ i64.const 32959 i64.ge_u if - local.get $7 + local.get $10 f64.const 127.99999995700433 f64.gt if f32.const -1584563250285286751870879e5 f32.const 1584563250285286751870879e5 - local.get $6 + local.get $8 select f32.const 1584563250285286751870879e5 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $7 + local.get $10 f64.const -150 f64.le if f32.const -2.524354896707238e-29 f32.const 2.524354896707238e-29 - local.get $6 + local.get $8 select f32.const 2.524354896707238e-29 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end end f64.const 0.6931471806916203 - local.get $7 - local.get $7 + local.get $10 + local.get $10 f64.const 211106232532992 f64.add - local.tee $5 + local.tee $9 f64.const 211106232532992 f64.sub f64.sub - local.tee $7 + local.tee $10 f64.mul f64.const 1 f64.add f64.const 0.05550361559341535 - local.get $7 + local.get $10 f64.mul f64.const 0.2402284522445722 f64.add - local.get $7 - local.get $7 + local.get $10 + local.get $10 f64.mul f64.mul f64.add - local.get $5 + local.get $9 i64.reinterpret_f64 - local.tee $4 + local.tee $6 i32.wrap_i64 i32.const 31 i32.and @@ -8179,8 +8171,8 @@ i32.const 560 i32.add i64.load - local.get $4 local.get $6 + local.get $8 i64.extend_i32_u i64.add i64.const 47 @@ -8189,9 +8181,9 @@ f64.reinterpret_i64 f64.mul f32.demote_f64 - local.set $0 + local.set $5 end - local.get $0 + local.get $5 ) (func $../../lib/libm/assembly/libmf/pow (; 98 ;) (param $0 f32) (param $1 f32) (result f32) local.get $0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 769ba21f99..2fee4f901c 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -51,7 +51,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -63,7 +63,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -88,39 +88,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -132,25 +130,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -162,24 +160,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -188,7 +186,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -198,7 +196,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -215,6 +213,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -300,7 +299,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -312,7 +311,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -321,7 +320,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -329,8 +328,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -390,12 +389,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -412,17 +410,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -434,7 +431,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -442,22 +439,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -470,12 +467,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -607,16 +604,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -628,18 +625,18 @@ unreachable end i32.const 560 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2128 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 560 @@ -654,7 +651,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -671,10 +668,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -687,7 +684,7 @@ i32.const 560 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -718,12 +715,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -756,17 +752,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -2293,16 +2288,14 @@ i32.load offset=16 local.tee $4 call $~lib/array/Array#constructor - local.set $2 - i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 + local.get $2 local.get $4 i32.lt_s if local.get $3 - local.get $1 + local.get $2 i32.const 12 i32.mul i32.add @@ -2312,27 +2305,27 @@ i32.and i32.eqz if - local.get $2 local.get $0 + local.get $1 local.get $5 i32.load offset=4 call $~lib/array/Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 end - local.get $1 + 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 $0 + local.get $1 call $~lib/array/Array#set:length - local.get $2 + local.get $0 ) (func $~lib/map/Map#clear (; 37 ;) (param $0 i32) (local $1 i32) @@ -3057,28 +3050,28 @@ i32.const 3 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $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 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=16 - local.get $1 + local.get $0 i32.const 0 i32.store offset=20 - local.get $1 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3086,8 +3079,8 @@ i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -3097,9 +3090,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3108,8 +3101,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -3120,10 +3113,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3139,14 +3132,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3159,9 +3152,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3169,8 +3162,8 @@ i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -3181,10 +3174,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3200,9 +3193,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3211,8 +3204,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -3223,10 +3216,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 24 i32.shl i32.const 24 @@ -3242,14 +3235,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -3261,100 +3254,98 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 - local.set $0 - local.get $1 - i32.load offset=16 local.set $7 + local.get $0 + i32.load offset=16 + local.set $6 i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $7 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $5 - local.get $7 + local.get $1 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.lt_s if - local.get $0 - local.get $3 + local.get $7 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if + local.get $1 + local.get $3 local.get $5 - local.get $4 - local.get $6 i32.load8_s call $~lib/array/Array#__set - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $5 - local.get $4 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values - local.set $4 + local.set $6 i32.const 24 i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 0 i32.store offset=20 - local.get $2 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 - i32.const 0 - local.set $0 + local.set $4 loop $for-loop|4 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.ge_u if @@ -3365,18 +3356,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=4 i32.add i32.load8_s - local.set $6 - local.get $4 - local.get $0 + local.set $5 + local.get $6 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $6 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -3387,7 +3378,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -3401,27 +3392,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $6 - local.get $6 + local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -3433,7 +3424,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -3446,9 +3437,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|6 - local.get $0 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3456,8 +3447,8 @@ i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3468,10 +3459,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3487,11 +3478,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3501,14 +3492,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3521,9 +3512,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|8 - local.get $0 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3531,8 +3522,8 @@ i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3542,9 +3533,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 24 i32.shl i32.const 24 @@ -3553,8 +3544,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -3565,11 +3556,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -3579,14 +3570,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -3598,9 +3589,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -3610,15 +3601,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $4 + call $~lib/rt/pure/__release + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (; 48 ;) (param $0 i32) (param $1 i32) (result i32) @@ -4220,35 +4211,35 @@ i32.const 8 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $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 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=16 - local.get $1 + local.get $0 i32.const 0 i32.store offset=20 - local.get $1 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -4258,17 +4249,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -4279,10 +4270,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 10 @@ -4296,14 +4287,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4316,16 +4307,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -4336,10 +4327,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 10 @@ -4353,17 +4344,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 255 i32.and i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -4374,10 +4365,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 255 i32.and i32.const 20 @@ -4391,14 +4382,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -4410,100 +4401,98 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 - local.set $0 - local.get $1 - i32.load offset=16 local.set $7 + local.get $0 + i32.load offset=16 + local.set $6 i32.const 16 i32.const 9 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $7 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $5 - local.get $7 + local.get $1 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.lt_s if - local.get $0 - local.get $3 + local.get $7 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if + local.get $1 + local.get $3 local.get $5 - local.get $4 - local.get $6 i32.load8_u call $~lib/array/Array#__set - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $5 - local.get $4 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values - local.set $4 + local.set $6 i32.const 24 i32.const 10 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 0 i32.store offset=20 - local.get $2 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 - i32.const 0 - local.set $0 + local.set $4 loop $for-loop|4 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.ge_u if @@ -4514,18 +4503,18 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=4 i32.add i32.load8_u - local.set $6 - local.get $4 - local.get $0 + local.set $5 + local.get $6 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $6 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -4536,7 +4525,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -4550,27 +4539,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $6 - local.get $6 + local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -4582,7 +4571,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -4595,16 +4584,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|6 - local.get $0 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4615,10 +4604,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 255 i32.and i32.const 20 @@ -4632,11 +4621,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4646,14 +4635,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4666,16 +4655,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|8 - local.get $0 + local.get $2 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4685,17 +4674,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 255 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -4706,11 +4695,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -4720,14 +4709,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -4739,9 +4728,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -4751,15 +4740,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $4 + call $~lib/rt/pure/__release + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/util/hash/hash16 (; 56 ;) (param $0 i32) (result i32) @@ -5479,28 +5468,28 @@ i32.const 11 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $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 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=16 - local.get $1 + local.get $0 i32.const 0 i32.store offset=20 - local.get $1 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5508,8 +5497,8 @@ i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -5519,9 +5508,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5530,8 +5519,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5542,10 +5531,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5561,14 +5550,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5581,9 +5570,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5591,8 +5580,8 @@ i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5603,10 +5592,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5622,9 +5611,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5633,8 +5622,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -5645,10 +5634,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 16 i32.shl i32.const 16 @@ -5664,14 +5653,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -5683,100 +5672,98 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 - local.set $0 - local.get $1 - i32.load offset=16 local.set $7 + local.get $0 + i32.load offset=16 + local.set $6 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $7 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $5 - local.get $7 + local.get $1 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.lt_s if - local.get $0 - local.get $3 + local.get $7 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if + local.get $1 + local.get $3 local.get $5 - local.get $4 - local.get $6 i32.load16_s call $~lib/array/Array#__set - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $5 - local.get $4 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values - local.set $4 + local.set $6 i32.const 24 i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 0 i32.store offset=20 - local.get $2 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 - i32.const 0 - local.set $0 + local.set $4 loop $for-loop|4 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.ge_u if @@ -5787,20 +5774,20 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.load offset=4 - local.get $0 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s - local.set $6 - local.get $4 - local.get $0 + local.set $5 + local.get $6 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $6 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -5811,7 +5798,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -5825,27 +5812,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $6 - local.get $6 + local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -5857,7 +5844,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -5870,9 +5857,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|6 - local.get $0 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5880,8 +5867,8 @@ i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -5892,10 +5879,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5911,11 +5898,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -5925,14 +5912,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -5945,9 +5932,9 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|8 - local.get $0 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5955,8 +5942,8 @@ i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -5966,9 +5953,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 16 i32.shl i32.const 16 @@ -5977,8 +5964,8 @@ i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -5989,11 +5976,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -6003,14 +5990,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -6022,9 +6009,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -6034,15 +6021,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $4 + call $~lib/rt/pure/__release + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (; 68 ;) (param $0 i32) (param $1 i32) (result i32) @@ -6644,35 +6631,35 @@ i32.const 14 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $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 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=16 - local.get $1 + local.get $0 i32.const 0 i32.store offset=20 - local.get $1 + local.get $0 call $~lib/map/Map#clear loop $for-loop|1 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -6682,17 +6669,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 65535 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -6703,10 +6690,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 10 @@ -6720,14 +6707,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -6740,16 +6727,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|3 - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -6760,10 +6747,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 10 @@ -6777,17 +6764,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 65535 i32.and i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -6798,10 +6785,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 65535 i32.and i32.const 20 @@ -6815,14 +6802,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -6834,100 +6821,98 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 - local.set $0 - local.get $1 - i32.load offset=16 local.set $7 + local.get $0 + i32.load offset=16 + local.set $6 i32.const 16 i32.const 15 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $7 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $5 - local.get $7 + local.get $1 + local.get $6 i32.store offset=12 loop $for-loop|0 - local.get $3 - local.get $7 + local.get $4 + local.get $6 i32.lt_s if - local.get $0 - local.get $3 + local.get $7 + local.get $4 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $5 i32.load offset=8 i32.const 1 i32.and i32.eqz if + local.get $1 + local.get $3 local.get $5 - local.get $4 - local.get $6 i32.load16_u call $~lib/array/Array#__set - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $for-loop|0 end end - local.get $5 - local.get $4 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values - local.set $4 + local.set $6 i32.const 24 i32.const 16 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 0 i32.store offset=20 - local.get $2 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $3 - i32.const 0 - local.set $0 + local.set $4 loop $for-loop|4 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.ge_u if @@ -6938,20 +6923,20 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.load offset=4 - local.get $0 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_u - local.set $6 - local.get $4 - local.get $0 + local.set $5 + local.get $6 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $6 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -6962,7 +6947,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -6976,27 +6961,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $6 - local.get $6 + local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $3 + local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7008,7 +6993,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $4 i32.load offset=20 i32.const 100 i32.ne @@ -7021,16 +7006,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|6 - local.get $0 + local.get $2 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7041,10 +7026,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 65535 i32.and i32.const 20 @@ -7058,11 +7043,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7072,14 +7057,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|6 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7092,16 +7077,16 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|8 - local.get $0 + local.get $2 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7111,17 +7096,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 65535 i32.and i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7132,11 +7117,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7146,14 +7131,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|8 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7165,9 +7150,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -7177,15 +7162,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 - call $~lib/rt/pure/__release - local.get $4 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $4 + call $~lib/rt/pure/__release + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#has (; 76 ;) (param $0 i32) (param $1 i32) (result i32) @@ -7285,14 +7270,14 @@ (local $6 i32) (local $7 i32) call $~lib/map/Map#constructor - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -7302,15 +7287,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7321,10 +7306,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7336,14 +7321,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7356,14 +7341,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 100 i32.lt_s if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7374,10 +7359,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7389,15 +7374,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7408,10 +7393,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 20 i32.add i32.ne @@ -7423,14 +7408,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7442,77 +7427,73 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $0 - local.get $1 + local.get $0 i32.load offset=8 - local.set $4 - local.get $1 + local.set $5 + local.get $0 i32.load offset=16 - local.tee $3 + local.tee $6 call $~lib/array/Array#constructor - local.set $5 + local.set $1 loop $for-loop|01 - local.get $0 - local.get $3 + local.get $4 + local.get $6 i32.lt_s if + local.get $5 local.get $4 - local.get $0 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 - local.get $6 + local.get $1 + local.get $3 + local.get $7 i32.load call $~lib/array/Array#__set - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 end - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 br $for-loop|01 end end - local.get $5 - local.get $2 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values local.set $6 call $~lib/map/Map#constructor - local.set $2 + local.set $3 call $~lib/map/Map#constructor local.set $4 - i32.const 0 - local.set $0 loop $for-loop|2 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $0 + local.get $1 + local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $5 local.get $6 - local.get $0 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $3 + local.get $0 + local.get $5 call $~lib/map/Map#has i32.eqz if @@ -7523,7 +7504,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -7537,27 +7518,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 local.get $3 + local.get $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $4 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $5 + local.get $5 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|2 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -7582,14 +7563,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|3 - local.get $0 + local.get $2 i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7600,10 +7581,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 20 i32.add i32.ne @@ -7615,11 +7596,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7629,14 +7610,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7649,14 +7630,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|4 - local.get $0 + local.get $2 i32.const 50 i32.lt_s if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7666,15 +7647,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -7685,11 +7666,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -7699,14 +7680,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -7718,9 +7699,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -7730,15 +7711,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release ) (func $std/map/testNumeric (; 80 ;) @@ -7754,33 +7735,33 @@ i32.const 17 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 i32.const 0 i32.store - local.get $1 + local.get $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 0 i32.store offset=12 - local.get $1 + local.get $0 i32.const 0 i32.store offset=16 - local.get $1 + local.get $0 i32.const 0 i32.store offset=20 - local.get $1 + local.get $0 call $~lib/map/Map#clear loop $for-loop|0 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has if i32.const 0 @@ -7790,15 +7771,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7809,10 +7790,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7824,14 +7805,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7844,14 +7825,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $1 loop $for-loop|1 - local.get $0 + local.get $1 i32.const 100 i32.lt_u if - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7862,10 +7843,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 10 i32.add i32.ne @@ -7877,15 +7858,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $1 + local.get $1 i32.const 20 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#has i32.eqz if @@ -7896,10 +7877,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 call $~lib/map/Map#get - local.get $0 + local.get $1 i32.const 20 i32.add i32.ne @@ -7911,14 +7892,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|1 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 100 i32.ne @@ -7930,12 +7911,10 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $0 - local.get $1 + local.get $0 i32.load offset=8 - local.set $3 - local.get $1 + local.set $6 + local.get $0 i32.load offset=16 local.set $4 i32.const 16 @@ -7945,95 +7924,93 @@ local.get $4 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $5 + local.tee $1 i32.const 0 i32.store offset=12 - local.get $5 + local.get $1 local.get $4 i32.store offset=12 loop $for-loop|00 - local.get $0 + local.get $5 local.get $4 i32.lt_s if - local.get $3 - local.get $0 + local.get $6 + local.get $5 i32.const 12 i32.mul i32.add - local.tee $6 + local.tee $7 i32.load offset=8 i32.const 1 i32.and i32.eqz if - local.get $5 - local.get $2 - local.get $6 + local.get $1 + local.get $3 + local.get $7 i32.load call $~lib/array/Array#__set - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 end - local.get $0 + local.get $5 i32.const 1 i32.add - local.set $0 + local.set $5 br $for-loop|00 end end - local.get $5 - local.get $2 - call $~lib/array/Array#set:length local.get $1 + local.get $3 + call $~lib/array/Array#set:length + local.get $0 call $~lib/map/Map#values local.set $6 i32.const 24 i32.const 19 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $2 + local.tee $3 i32.const 0 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 i32.const 0 i32.store offset=8 - local.get $2 + local.get $3 i32.const 0 i32.store offset=12 - local.get $2 + local.get $3 i32.const 0 i32.store offset=16 - local.get $2 + local.get $3 i32.const 0 i32.store offset=20 - local.get $2 + local.get $3 call $~lib/map/Map#clear call $~lib/map/Map#constructor - local.set $4 - i32.const 0 - local.set $0 + local.set $5 loop $for-loop|2 - local.get $0 - local.get $5 + local.get $2 + local.get $1 i32.load offset=12 i32.lt_s if - local.get $5 - local.get $0 + local.get $1 + local.get $2 call $~lib/array/Array#__get - local.set $3 + local.set $4 local.get $6 - local.get $0 + local.get $2 call $~lib/array/Array#__get local.set $7 - local.get $1 - local.get $3 + local.get $0 + local.get $4 call $~lib/map/Map#has i32.eqz if @@ -8044,7 +8021,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 local.get $7 i32.const 20 i32.sub @@ -8058,27 +8035,27 @@ call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 local.get $3 + local.get $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $4 + local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $3 - local.get $3 + local.tee $4 + local.get $4 call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|2 end end - local.get $2 + local.get $3 i32.load offset=20 i32.const 100 i32.ne @@ -8090,7 +8067,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $5 i32.load offset=20 i32.const 100 i32.ne @@ -8103,14 +8080,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|3 - local.get $0 + local.get $2 i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8121,10 +8098,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#get - local.get $0 + local.get $2 i32.const 20 i32.add i32.ne @@ -8136,11 +8113,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8150,14 +8127,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|3 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -8170,14 +8147,14 @@ unreachable end i32.const 0 - local.set $0 + local.set $2 loop $for-loop|4 - local.get $0 + local.get $2 i32.const 50 i32.lt_u if - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8187,15 +8164,15 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.get $0 local.get $0 + local.get $2 + local.get $2 i32.const 10 i32.add call $~lib/map/Map#set call $~lib/rt/pure/__release - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has i32.eqz if @@ -8206,11 +8183,11 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#delete - local.get $1 local.get $0 + local.get $2 call $~lib/map/Map#has if i32.const 0 @@ -8220,14 +8197,14 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|4 end end - local.get $1 + local.get $0 i32.load offset=20 i32.const 50 i32.ne @@ -8239,9 +8216,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/map/Map#clear - local.get $1 + local.get $0 i32.load offset=20 if i32.const 0 @@ -8251,15 +8228,15 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $5 call $~lib/rt/pure/__release - local.get $1 + local.get $0 call $~lib/rt/pure/__release ) (func $~lib/map/Map#clear (; 81 ;) (param $0 i32) @@ -8718,16 +8695,14 @@ i32.load offset=16 local.tee $4 call $~lib/array/Array#constructor - local.set $2 - i32.const 0 local.set $0 loop $for-loop|0 - local.get $1 + local.get $2 local.get $4 i32.lt_s if local.get $3 - local.get $1 + local.get $2 i32.const 4 i32.shl i32.add @@ -8737,27 +8712,27 @@ i32.and i32.eqz if - local.get $2 local.get $0 + local.get $1 local.get $5 i32.load offset=8 call $~lib/array/Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 end - local.get $1 + 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 $0 + local.get $1 call $~lib/array/Array#set:length - local.get $2 + local.get $0 ) (func $~lib/map/Map#clear (; 91 ;) (param $0 i32) (local $1 i32) @@ -9349,12 +9324,12 @@ local.get $5 i32.store offset=12 loop $for-loop|00 - local.get $2 + local.get $3 local.get $5 i32.lt_s if local.get $4 - local.get $2 + local.get $3 i32.const 4 i32.shl i32.add @@ -9365,24 +9340,24 @@ i32.eqz if local.get $6 - local.get $3 + local.get $2 local.get $8 i64.load call $~lib/array/Array#__set - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|00 end end local.get $6 - local.get $3 + local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values @@ -9875,12 +9850,12 @@ local.get $5 i32.store offset=12 loop $for-loop|00 - local.get $2 + local.get $3 local.get $5 i32.lt_s if local.get $4 - local.get $2 + local.get $3 i32.const 4 i32.shl i32.add @@ -9891,24 +9866,24 @@ i32.eqz if local.get $6 - local.get $3 + local.get $2 local.get $8 i64.load call $~lib/array/Array#__set - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|00 end end local.get $6 - local.get $3 + local.get $2 call $~lib/array/Array#set:length local.get $1 call $~lib/map/Map#values @@ -10504,14 +10479,12 @@ local.get $2 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 local.get $2 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $3 local.get $2 @@ -10531,12 +10504,12 @@ local.get $4 f32.load local.set $6 - local.get $0 local.get $1 + local.get $0 i32.load offset=12 i32.ge_u if - local.get $0 + local.get $1 i32.const 0 i32.lt_s if @@ -10547,29 +10520,29 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 i32.const 1 i32.add local.tee $4 i32.const 2 call $~lib/array/ensureSize - local.get $1 + local.get $0 local.get $4 i32.store offset=12 end - local.get $1 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 2 i32.shl i32.add local.get $6 f32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 end local.get $3 i32.const 1 @@ -10578,10 +10551,10 @@ br $for-loop|0 end end - local.get $1 local.get $0 - call $~lib/array/Array#set:length local.get $1 + call $~lib/array/Array#set:length + local.get $0 ) (func $~lib/map/Map#rehash (; 104 ;) (param $0 i32) (param $1 i32) (local $2 i32) @@ -11678,14 +11651,12 @@ local.get $2 i32.const 3 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $1 + local.tee $0 i32.const 0 i32.store offset=12 - local.get $1 + local.get $0 local.get $2 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $3 local.get $2 @@ -11705,12 +11676,12 @@ local.get $4 f64.load local.set $6 - local.get $0 local.get $1 + local.get $0 i32.load offset=12 i32.ge_u if - local.get $0 + local.get $1 i32.const 0 i32.lt_s if @@ -11721,29 +11692,29 @@ call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 + local.get $1 i32.const 1 i32.add local.tee $4 i32.const 3 call $~lib/array/ensureSize - local.get $1 + local.get $0 local.get $4 i32.store offset=12 end - local.get $1 - i32.load offset=4 local.get $0 + i32.load offset=4 + local.get $1 i32.const 3 i32.shl i32.add local.get $6 f64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 end local.get $3 i32.const 1 @@ -11752,10 +11723,10 @@ br $for-loop|0 end end - local.get $1 local.get $0 - call $~lib/array/Array#set:length local.get $1 + call $~lib/array/Array#set:length + local.get $0 ) (func $~lib/map/Map#rehash (; 114 ;) (param $0 i32) (param $1 i32) (local $2 i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 40064d7f59..0a85829d9d 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -848,8 +848,8 @@ (local $2 i32) (local $3 i32) (local $4 f64) - (local $5 f64) - (local $6 i64) + (local $5 i64) + (local $6 f64) (local $7 f64) i32.const 1 local.set $3 @@ -922,7 +922,7 @@ local.get $0 f64.add i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -936,9 +936,9 @@ local.tee $3 i32.const 54 i32.lt_s - if (result f64) + if f64.const 1 - local.get $6 + local.get $5 f64.reinterpret_i64 local.tee $1 local.get $0 @@ -955,11 +955,9 @@ select local.get $1 f64.div - else - f64.const 0 + local.set $6 end - local.set $5 - local.get $6 + local.get $5 i64.const 4294967295 i64.and local.get $2 @@ -1029,7 +1027,7 @@ local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $5 + local.get $6 f64.add f64.add local.get $4 @@ -1363,7 +1361,7 @@ local.tee $3 i32.const 25 i32.lt_s - if (result f32) + if f32.const 1 local.get $1 local.get $0 @@ -1380,10 +1378,8 @@ select local.get $1 f32.div - else - f32.const 0 + local.set $5 end - local.set $5 local.get $2 i32.const 8388607 i32.and @@ -2037,7 +2033,8 @@ (local $1 f64) (local $2 f64) (local $3 i32) - (local $4 f64) + (local $4 i32) + (local $5 f64) local.get $0 local.set $1 local.get $0 @@ -2047,7 +2044,7 @@ i32.wrap_i64 i32.const 2147483647 i32.and - local.tee $3 + local.tee $4 i32.const 1141899264 i32.ge_u if @@ -2063,11 +2060,11 @@ f64.copysign return end - local.get $3 + local.get $4 i32.const 1071382528 i32.lt_u if - local.get $3 + local.get $4 i32.const 1044381696 i32.lt_u if @@ -2080,16 +2077,14 @@ local.get $0 f64.abs local.set $0 - local.get $3 + local.get $4 i32.const 1072889856 i32.lt_u if (result f64) - local.get $3 + local.get $4 i32.const 1072037888 i32.lt_u if (result f64) - i32.const 0 - local.set $3 f64.const 2 local.get $0 f64.mul @@ -2111,7 +2106,7 @@ f64.div end else - local.get $3 + local.get $4 i32.const 1073971200 i32.lt_u if (result f64) @@ -2139,12 +2134,12 @@ local.get $0 local.get $0 f64.mul - local.tee $4 - local.get $4 + local.tee $5 + local.get $5 f64.mul local.set $2 local.get $0 - local.get $4 + local.get $5 f64.const 0.3333333333333293 local.get $2 f64.const 0.14285714272503466 @@ -2274,16 +2269,17 @@ ) (func $~lib/math/NativeMathf.atan (; 62 ;) (param $0 f32) (result f32) (local $1 f32) - (local $2 i32) - (local $3 f32) - (local $4 f32) + (local $2 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) local.get $0 local.set $1 local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 + local.tee $4 i32.const 1283457024 i32.ge_u if @@ -2299,11 +2295,11 @@ f32.copysign return end - local.get $2 + local.get $4 i32.const 1054867456 i32.lt_u if - local.get $2 + local.get $4 i32.const 964689920 i32.lt_u if @@ -2311,21 +2307,19 @@ return end i32.const -1 - local.set $2 + local.set $3 else local.get $0 f32.abs local.set $0 - local.get $2 + local.get $4 i32.const 1066926080 i32.lt_u if (result f32) - local.get $2 + local.get $4 i32.const 1060110336 i32.lt_u if (result f32) - i32.const 0 - local.set $2 f32.const 2 local.get $0 f32.mul @@ -2337,7 +2331,7 @@ f32.div else i32.const 1 - local.set $2 + local.set $3 local.get $0 f32.const 1 f32.sub @@ -2347,12 +2341,12 @@ f32.div end else - local.get $2 + local.get $4 i32.const 1075576832 i32.lt_u if (result f32) i32.const 2 - local.set $2 + local.set $3 local.get $0 f32.const 1.5 f32.sub @@ -2364,7 +2358,7 @@ f32.div else i32.const 3 - local.set $2 + local.set $3 f32.const -1 local.get $0 f32.div @@ -2375,38 +2369,38 @@ local.get $0 local.get $0 f32.mul - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f32.mul - local.set $4 + local.set $5 local.get $0 - local.get $3 + local.get $2 f32.const 0.333333283662796 - local.get $4 + local.get $5 f32.const 0.14253635704517365 - local.get $4 + local.get $5 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $4 + local.get $5 f32.const -0.19999158382415771 - local.get $4 + local.get $5 f32.const -0.106480173766613 f32.mul f32.add f32.mul f32.add f32.mul - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 0 i32.lt_s if local.get $0 - local.get $3 + local.get $2 f32.sub return end @@ -2415,15 +2409,15 @@ block $case3|0 block $case2|0 block $case1|0 - local.get $2 + local.get $3 if - local.get $2 + local.get $3 i32.const 1 i32.sub br_table $case1|0 $case2|0 $case3|0 $case4|0 end f32.const 0.46364760398864746 - local.get $3 + local.get $2 f32.const 5.01215824399992e-09 f32.sub local.get $0 @@ -2433,7 +2427,7 @@ br $break|0 end f32.const 0.7853981256484985 - local.get $3 + local.get $2 f32.const 3.774894707930798e-08 f32.sub local.get $0 @@ -2443,7 +2437,7 @@ br $break|0 end f32.const 0.9827936887741089 - local.get $3 + local.get $2 f32.const 3.447321716976148e-08 f32.sub local.get $0 @@ -2453,7 +2447,7 @@ br $break|0 end f32.const 1.570796251296997 - local.get $3 + local.get $2 f32.const 7.549789415861596e-08 f32.sub local.get $0 @@ -2827,7 +2821,8 @@ (func $~lib/math/NativeMathf.atan2 (; 68 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) + (local $5 i32) i32.const 1 local.get $0 local.get $0 @@ -2847,7 +2842,7 @@ local.set $2 local.get $1 i32.reinterpret_f32 - local.tee $4 + local.tee $5 i32.const 1065353216 i32.eq if @@ -2855,7 +2850,7 @@ call $~lib/math/NativeMathf.atan return end - local.get $4 + local.get $5 i32.const 30 i32.shr_u i32.const 2 @@ -2865,10 +2860,10 @@ i32.shr_u i32.or local.set $3 - local.get $4 + local.get $5 i32.const 2147483647 i32.and - local.set $4 + local.set $5 local.get $2 i32.const 2147483647 i32.and @@ -2907,10 +2902,10 @@ end end block $folding-inner0 - local.get $4 + local.get $5 i32.eqz br_if $folding-inner0 - local.get $4 + local.get $5 i32.const 2139095040 i32.eq if @@ -2949,7 +2944,7 @@ local.get $2 i32.const 2139095040 i32.eq - local.get $4 + local.get $5 i32.const 218103808 i32.add local.get $2 @@ -2959,23 +2954,22 @@ local.get $2 i32.const 218103808 i32.add - local.get $4 + local.get $5 i32.lt_u i32.const 0 local.get $3 i32.const 2 i32.and select - if (result f32) - f32.const 0 - else + i32.eqz + if local.get $0 local.get $1 f32.div f32.abs call $~lib/math/NativeMathf.atan + local.set $4 end - local.set $0 block $break|1 block $case3|1 block $case2|1 @@ -2983,26 +2977,29 @@ local.get $3 local.tee $2 if - local.get $2 - i32.const 1 - i32.sub - br_table $case1|1 $case2|1 $case3|1 $break|1 + block $tablify|0 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $tablify|0 + end + br $break|1 end - local.get $0 + local.get $4 return end - local.get $0 + local.get $4 f32.neg return end f32.const 3.1415927410125732 - local.get $0 + local.get $4 f32.const -8.742277657347586e-08 f32.sub f32.sub return end - local.get $0 + local.get $4 f32.const -8.742277657347586e-08 f32.sub f32.const 3.1415927410125732 @@ -4480,8 +4477,8 @@ (local $3 f64) (local $4 i32) (local $5 f64) - (local $6 f64) - (local $7 i32) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 i64.const 32 @@ -4490,11 +4487,11 @@ local.tee $2 i32.const 31 i32.shr_u - local.set $7 + local.set $6 local.get $2 i32.const 2147483647 i32.and - local.tee $4 + local.tee $2 i32.const 1082532651 i32.ge_u if @@ -4522,14 +4519,12 @@ return end end - i32.const 0 - local.set $2 - local.get $4 + local.get $2 i32.const 1071001154 i32.gt_u if local.get $0 - local.get $4 + local.get $2 i32.const 1072734898 i32.ge_u if (result i32) @@ -4543,26 +4538,26 @@ i32.trunc_f64_s else i32.const 1 - local.get $7 + local.get $6 i32.const 1 i32.shl i32.sub end - local.tee $2 + local.tee $4 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul f64.sub local.tee $1 - local.get $2 + local.get $4 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul - local.tee $5 + local.tee $7 f64.sub local.set $0 else - local.get $4 + local.get $2 i32.const 1043333120 i32.gt_u if (result f64) @@ -4581,20 +4576,20 @@ local.tee $3 local.get $3 f64.mul - local.set $6 + local.set $5 f64.const 1 local.get $0 local.get $0 local.get $3 f64.const 0.16666666666666602 f64.mul - local.get $6 + local.get $5 f64.const -2.7777777777015593e-03 local.get $3 f64.const 6.613756321437934e-05 f64.mul f64.add - local.get $6 + local.get $5 f64.const -1.6533902205465252e-06 local.get $3 f64.const 4.1381367970572385e-08 @@ -4611,16 +4606,16 @@ local.get $0 f64.sub f64.div - local.get $5 + local.get $7 f64.sub local.get $1 f64.add f64.add local.set $0 - local.get $2 + local.get $4 if local.get $0 - local.get $2 + local.get $4 call $~lib/math/NativeMath.scalbn local.set $0 end @@ -4705,33 +4700,34 @@ end ) (func $~lib/math/NativeMathf.expm1 (; 84 ;) (param $0 f32) (result f32) - (local $1 i32) + (local $1 f32) (local $2 f32) - (local $3 f32) - (local $4 f32) - (local $5 i32) - (local $6 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 i32) + (local $7 f32) local.get $0 i32.reinterpret_f32 - local.tee $1 + local.tee $4 i32.const 31 i32.shr_u - local.set $5 - local.get $1 + local.set $6 + local.get $4 i32.const 2147483647 i32.and - local.tee $1 + local.tee $4 i32.const 1100331076 i32.ge_u if - local.get $1 + local.get $4 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $5 + local.get $6 if f32.const -1 return @@ -4746,13 +4742,13 @@ return end end - local.get $1 + local.get $4 i32.const 1051816472 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -4764,39 +4760,36 @@ f32.copysign f32.add i32.trunc_f32_s - local.get $1 + local.get $4 i32.const 1065686418 i32.lt_u select - local.tee $1 + local.tee $3 f32.convert_i32_s local.tee $0 f32.const 0.6931381225585938 f32.mul f32.sub - local.tee $2 - local.get $2 + local.tee $1 + local.get $1 local.get $0 f32.const 9.05800061445916e-06 f32.mul - local.tee $2 + local.tee $1 f32.sub local.tee $0 f32.sub - local.get $2 + local.get $1 f32.sub - local.set $4 + local.set $5 else - local.get $1 + local.get $4 i32.const 855638016 i32.lt_u - if (result i32) + if local.get $0 return - else - i32.const 0 end - local.set $1 end f32.const 3 f32.const 1 @@ -4804,69 +4797,69 @@ f32.const 0.5 local.get $0 f32.mul - local.tee $3 - f32.mul local.tee $2 + f32.mul + local.tee $1 f32.const -0.03333321213722229 - local.get $2 + local.get $1 f32.const 1.5807170420885086e-03 f32.mul f32.add f32.mul f32.add - local.tee $6 - local.get $3 + local.tee $7 + local.get $2 f32.mul f32.sub - local.set $3 + local.set $2 + local.get $1 + local.get $7 local.get $2 - local.get $6 - local.get $3 f32.sub f32.const 6 local.get $0 - local.get $3 + local.get $2 f32.mul f32.sub f32.div f32.mul - local.set $3 - local.get $1 + local.set $2 + local.get $3 i32.eqz if local.get $0 local.get $0 - local.get $3 - f32.mul local.get $2 + f32.mul + local.get $1 f32.sub f32.sub return end local.get $0 - local.get $3 - local.get $4 + local.get $2 + local.get $5 f32.sub f32.mul - local.get $4 - f32.sub - local.get $2 + local.get $5 f32.sub - local.set $2 local.get $1 + f32.sub + local.set $1 + local.get $3 i32.const -1 i32.eq if f32.const 0.5 local.get $0 - local.get $2 + local.get $1 f32.sub f32.mul f32.const 0.5 f32.sub return end - local.get $1 + local.get $3 i32.const 1 i32.eq if @@ -4875,7 +4868,7 @@ f32.lt if f32.const -2 - local.get $2 + local.get $1 local.get $0 f32.const 0.5 f32.add @@ -4886,30 +4879,30 @@ f32.const 1 f32.const 2 local.get $0 - local.get $2 + local.get $1 f32.sub f32.mul f32.add return end - local.get $1 + local.get $3 i32.const 127 i32.add i32.const 23 i32.shl f32.reinterpret_i32 - local.set $4 + local.set $5 i32.const 1 - local.get $1 + local.get $3 i32.const 56 i32.gt_s - local.get $1 + local.get $3 i32.const 0 i32.lt_s select if local.get $0 - local.get $2 + local.get $1 f32.sub f32.const 1 f32.add @@ -4919,9 +4912,9 @@ f32.const 1701411834604692317316873e14 f32.mul local.get $0 - local.get $4 + local.get $5 f32.mul - local.get $1 + local.get $3 i32.const 128 i32.eq select @@ -4932,60 +4925,61 @@ local.get $0 f32.const 1 i32.const 127 - local.get $1 + local.get $3 i32.sub i32.const 23 i32.shl f32.reinterpret_i32 - local.tee $3 + local.tee $2 f32.sub - local.get $2 + local.get $1 f32.sub f32.const 1 + local.get $1 local.get $2 - local.get $3 f32.add f32.sub - local.get $1 + local.get $3 i32.const 20 i32.lt_s select f32.add - local.get $4 + local.get $5 f32.mul ) (func $~lib/math/NativeMathf.exp (; 85 ;) (param $0 f32) (result f32) - (local $1 i32) + (local $1 f32) (local $2 i32) - (local $3 f32) - (local $4 f32) + (local $3 i32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 - local.tee $1 + local.tee $2 i32.const 31 i32.shr_u - local.set $2 - local.get $1 + local.set $4 + local.get $2 i32.const 2147483647 i32.and - local.tee $1 + local.tee $2 i32.const 1118743632 i32.ge_u if - local.get $1 + local.get $2 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $1 + local.get $2 i32.const 1118925336 i32.ge_u if - local.get $2 + local.get $4 if - local.get $1 + local.get $2 i32.const 1120924085 i32.ge_u if @@ -5000,12 +4994,12 @@ end end end - local.get $1 + local.get $2 i32.const 1051816472 i32.gt_u if local.get $0 - local.get $1 + local.get $2 i32.const 1065686418 i32.gt_u if (result i32) @@ -5019,31 +5013,29 @@ i32.trunc_f32_s else i32.const 1 - local.get $2 + local.get $4 i32.const 1 i32.shl i32.sub end - local.tee $1 + local.tee $3 f32.convert_i32_s f32.const 0.693145751953125 f32.mul f32.sub - local.tee $3 - local.get $1 + local.tee $1 + local.get $3 f32.convert_i32_s f32.const 1.428606765330187e-06 f32.mul - local.tee $4 + local.tee $5 f32.sub local.set $0 else - local.get $1 + local.get $2 i32.const 956301312 i32.gt_u if (result f32) - i32.const 0 - local.set $1 local.get $0 else f32.const 1 @@ -5051,7 +5043,7 @@ f32.add return end - local.set $3 + local.set $1 end f32.const 1 local.get $0 @@ -5073,16 +5065,16 @@ local.get $0 f32.sub f32.div - local.get $4 + local.get $5 f32.sub - local.get $3 + local.get $1 f32.add f32.add local.set $0 - local.get $1 + local.get $3 if local.get $0 - local.get $1 + local.get $3 call $~lib/math/NativeMathf.scalbn local.set $0 end @@ -5205,7 +5197,7 @@ (local $5 i64) (local $6 i32) (local $7 f64) - block $~lib/util/math/exp2_lut|inlined.0 (result f64) + block $~lib/util/math/exp2_lut|inlined.0 local.get $0 i64.reinterpret_f64 local.tee $2 @@ -5220,45 +5212,48 @@ i32.const 63 i32.ge_u if - f64.const 1 local.get $3 i32.const 969 i32.sub i32.const -2147483648 i32.ge_u - br_if $~lib/util/math/exp2_lut|inlined.0 - drop + if + f64.const 1 + local.set $1 + br $~lib/util/math/exp2_lut|inlined.0 + end local.get $3 i32.const 1033 i32.ge_u if - f64.const 0 local.get $2 i64.const -4503599627370496 i64.eq br_if $~lib/util/math/exp2_lut|inlined.0 - drop - f64.const 1 - local.get $0 - f64.add local.get $3 i32.const 2047 i32.ge_u - br_if $~lib/util/math/exp2_lut|inlined.0 - drop - f64.const inf + if + f64.const 1 + local.get $0 + f64.add + local.set $1 + br $~lib/util/math/exp2_lut|inlined.0 + end local.get $2 i64.const 63 i64.shr_u i64.eqz - br_if $~lib/util/math/exp2_lut|inlined.0 - drop - f64.const 0 - local.get $2 - i64.const -4570929321408987136 - i64.ge_u - br_if $~lib/util/math/exp2_lut|inlined.0 - drop + if + f64.const inf + local.set $1 + br $~lib/util/math/exp2_lut|inlined.0 + else + local.get $2 + i64.const -4570929321408987136 + i64.ge_u + br_if $~lib/util/math/exp2_lut|inlined.0 + end end i32.const 0 local.get $3 @@ -5388,6 +5383,7 @@ f64.const 2.2250738585072014e-308 f64.mul end + local.set $1 br $~lib/util/math/exp2_lut|inlined.0 end local.get $2 @@ -5397,7 +5393,9 @@ f64.mul local.get $1 f64.add + local.set $1 end + local.get $1 ) (func $std/math/test_exp2 (; 92 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 @@ -5418,60 +5416,61 @@ ) (func $~lib/math/NativeMathf.exp2 (; 93 ;) (param $0 f32) (result f32) (local $1 f64) - (local $2 i32) + (local $2 f32) (local $3 i32) - (local $4 f64) - (local $5 i64) - block $~lib/util/math/exp2f_lut|inlined.0 (result f32) - local.get $0 - f64.promote_f32 - local.set $1 + (local $4 i32) + (local $5 f64) + (local $6 i64) + local.get $0 + f64.promote_f32 + local.set $1 + block $~lib/util/math/exp2f_lut|inlined.0 local.get $0 i32.reinterpret_f32 - local.tee $2 + local.tee $3 i32.const 20 i32.shr_u i32.const 2047 i32.and - local.tee $3 + local.tee $4 i32.const 1072 i32.ge_u if - f32.const 0 - local.get $2 + local.get $3 i32.const -8388608 i32.eq br_if $~lib/util/math/exp2f_lut|inlined.0 - drop - local.get $0 - local.get $0 - f32.add - local.get $3 + local.get $4 i32.const 2040 i32.ge_u - br_if $~lib/util/math/exp2f_lut|inlined.0 - drop - local.get $0 - f32.const 1701411834604692317316873e14 - f32.mul + if + local.get $0 + local.get $0 + f32.add + local.set $2 + br $~lib/util/math/exp2f_lut|inlined.0 + end local.get $0 f32.const 0 f32.gt - br_if $~lib/util/math/exp2f_lut|inlined.0 - drop - f32.const 0 + if + local.get $0 + f32.const 1701411834604692317316873e14 + f32.mul + local.set $2 + br $~lib/util/math/exp2f_lut|inlined.0 + end local.get $0 f32.const -150 f32.le br_if $~lib/util/math/exp2f_lut|inlined.0 - drop end f64.const 0.6931471806916203 local.get $1 local.get $1 f64.const 211106232532992 f64.add - local.tee $4 + local.tee $5 f64.const 211106232532992 f64.sub f64.sub @@ -5489,9 +5488,9 @@ f64.mul f64.mul f64.add - local.get $4 + local.get $5 i64.reinterpret_f64 - local.tee $5 + local.tee $6 i32.wrap_i64 i32.const 31 i32.and @@ -5500,14 +5499,16 @@ i32.const 2400 i32.add i64.load - local.get $5 + local.get $6 i64.const 47 i64.shl i64.add f64.reinterpret_i64 f64.mul f32.demote_f64 + local.set $2 end + local.get $2 ) (func $std/math/test_exp2f (; 94 ;) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -5857,11 +5858,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) @@ -5906,7 +5907,7 @@ return end i32.const -54 - local.set $4 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul @@ -5962,11 +5963,11 @@ local.get $0 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul local.set $3 - local.get $4 + local.get $8 local.get $1 i32.const 20 i32.shr_u @@ -5984,28 +5985,28 @@ f64.mul local.get $0 f64.mul - local.tee $6 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 0.4342944818781689 f64.mul local.tee $11 f64.add - local.set $8 + local.set $7 local.get $9 f64.const 3.694239077158931e-13 f64.mul local.get $0 - local.get $7 - f64.sub local.get $6 f64.sub local.get $5 - local.get $6 + f64.sub + local.get $4 + local.get $5 local.get $3 f64.const 0.6666666666666735 local.get $3 @@ -6040,7 +6041,7 @@ f64.mul f64.add local.tee $0 - local.get $7 + local.get $6 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -6050,12 +6051,12 @@ f64.mul f64.add local.get $10 - local.get $8 + local.get $7 f64.sub local.get $11 f64.add f64.add - local.get $8 + local.get $7 f64.add ) (func $std/math/test_log10 (; 104 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6077,9 +6078,9 @@ (func $~lib/math/NativeMathf.log10 (; 105 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) + (local $3 f32) (local $4 f32) - (local $5 f32) + (local $5 i32) (local $6 f32) local.get $0 i32.reinterpret_f32 @@ -6118,7 +6119,7 @@ return end i32.const -25 - local.set $3 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -6157,11 +6158,11 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul local.set $2 - local.get $3 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -6185,11 +6186,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub - local.get $4 + local.get $3 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -6213,7 +6214,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -6222,7 +6223,7 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $5 + local.get $4 f32.const 0.434326171875 f32.mul f32.add @@ -6265,11 +6266,11 @@ (local $1 i32) (local $2 i64) (local $3 f64) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) local.get $0 @@ -6313,7 +6314,7 @@ return end i32.const -54 - local.set $4 + local.set $8 local.get $0 f64.const 18014398509481984 f64.mul @@ -6369,11 +6370,11 @@ local.get $0 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul local.set $3 - local.get $4 + local.get $8 local.get $1 i32.const 20 i32.shr_u @@ -6388,27 +6389,27 @@ f64.mul local.get $0 f64.mul - local.tee $6 + local.tee $5 f64.sub i64.reinterpret_f64 i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $7 + local.tee $6 f64.const 1.4426950407214463 f64.mul local.tee $10 f64.add - local.set $8 + local.set $7 local.get $0 - local.get $7 - f64.sub local.get $6 f64.sub local.get $5 - local.get $6 - local.get $3 - f64.const 0.6666666666666735 + f64.sub + local.get $4 + local.get $5 + local.get $3 + f64.const 0.6666666666666735 local.get $3 local.get $3 f64.mul @@ -6441,7 +6442,7 @@ f64.mul f64.add local.tee $0 - local.get $7 + local.get $6 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -6450,12 +6451,12 @@ f64.mul f64.add local.get $9 - local.get $8 + local.get $7 f64.sub local.get $10 f64.add f64.add - local.get $8 + local.get $7 f64.add ) (func $std/math/test_log2 (; 110 ;) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -6477,9 +6478,9 @@ (func $~lib/math/NativeMathf.log2 (; 111 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) + (local $3 f32) (local $4 f32) - (local $5 f32) + (local $5 i32) local.get $0 i32.reinterpret_f32 local.tee $1 @@ -6517,7 +6518,7 @@ return end i32.const -25 - local.set $3 + local.set $5 local.get $0 f32.const 33554432 f32.mul @@ -6556,8 +6557,8 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul local.set $2 local.get $0 @@ -6573,11 +6574,11 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $5 + local.tee $4 f32.sub local.get $0 f32.sub - local.get $4 + local.get $3 local.get $0 local.get $2 f32.const 0.6666666269302368 @@ -6601,7 +6602,7 @@ f32.mul f32.add local.tee $0 - local.get $5 + local.get $4 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -6609,11 +6610,11 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $5 + local.get $4 f32.const 1.44287109375 f32.mul f32.add - local.get $3 + local.get $5 local.get $1 i32.const 23 i32.shr_u @@ -7108,20 +7109,21 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 f64) + (local $6 f64) + (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) + (local $14 i64) + (local $15 f64) + (local $16 i32) (local $17 i32) (local $18 f64) (local $19 i32) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -7176,30 +7178,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $19 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $8 + local.get $14 i32.wrap_i64 - local.tee $6 + local.tee $20 i32.or i32.eqz if @@ -7207,14 +7209,14 @@ return end i32.const 1 - local.get $6 + local.get $20 i32.const 0 - local.get $9 + local.get $8 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $8 i32.const 2146435072 i32.gt_s i32.const 1 @@ -7236,51 +7238,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $8 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $8 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $8 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $9 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $9 i32.sub - local.set $11 + local.set $10 i32.const 2 - local.get $6 - local.get $9 + local.get $20 + local.get $8 local.get $5 select local.tee $5 - local.get $11 + local.get $10 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $9 local.get $10 - local.get $11 i32.shl i32.eq select @@ -7290,10 +7292,10 @@ end local.set $5 end - local.get $6 + local.get $20 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -7307,22 +7309,20 @@ i32.const 1072693248 i32.ge_s if - local.get $8 - i32.const 0 - i32.lt_s - if - f64.const 0 - local.set $1 - end local.get $1 + f64.const 0 + local.get $7 + i32.const 0 + i32.ge_s + select return else - f64.const 0 local.get $1 f64.neg - local.get $8 + f64.const 0 + local.get $7 i32.const 0 - i32.ge_s + i32.lt_s select return end @@ -7333,11 +7333,11 @@ end unreachable end - local.get $9 + local.get $8 i32.const 1072693248 i32.eq if - local.get $8 + local.get $7 i32.const 0 i32.ge_s if @@ -7349,7 +7349,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -7358,11 +7358,11 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -7394,12 +7394,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -7431,8 +7431,8 @@ end end f64.const 1 - local.set $7 - local.get $17 + local.set $6 + local.get $16 i32.const 0 i32.lt_s if @@ -7453,13 +7453,13 @@ i32.const 1 i32.eq select - local.set $7 + local.set $6 end - local.get $9 + local.get $8 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $8 i32.const 1139802112 i32.gt_s if @@ -7469,7 +7469,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -7481,7 +7481,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -7492,17 +7492,17 @@ i32.const 1072693247 i32.lt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -7512,17 +7512,17 @@ i32.const 1072693248 i32.gt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -7560,9 +7560,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $0 - local.get $12 + local.get $11 local.get $2 f64.sub f64.sub @@ -7590,7 +7590,7 @@ i32.const 1023 i32.sub i32.add - local.set $6 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -7600,28 +7600,25 @@ local.set $4 local.get $5 i32.const 235662 - i32.le_s - if (result i32) - i32.const 0 - else + i32.gt_s + if local.get $5 i32.const 767610 i32.lt_s - if (result i32) + if i32.const 1 + local.set $17 else - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 local.get $4 i32.const -1048576 i32.add local.set $4 - i32.const 0 end end - local.set $5 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -7632,16 +7629,16 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.const 1.5 f64.const 1 - local.get $5 + local.get $17 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $12 local.get $3 f64.add f64.div @@ -7652,31 +7649,31 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 + local.tee $15 + local.get $15 f64.mul - local.set $12 + local.set $11 f64.const 0.9617967009544373 - local.get $16 + local.get $15 f64.const 3 - local.get $12 + local.get $11 f64.add local.get $18 local.get $18 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -7691,7 +7688,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -7699,7 +7696,7 @@ i32.or i32.const 524288 i32.add - local.get $5 + local.get $17 i32.const 18 i32.shl i32.add @@ -7710,8 +7707,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $12 local.get $0 local.get $3 f64.sub @@ -7720,7 +7717,7 @@ f64.sub f64.mul local.tee $3 - local.get $16 + local.get $15 local.get $18 f64.add f64.mul @@ -7731,17 +7728,17 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $12 f64.mul local.get $0 - local.get $13 + local.get $12 f64.const 3 f64.sub - local.get $12 + local.get $11 f64.sub f64.sub local.get $18 @@ -7755,7 +7752,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $12 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -7769,18 +7766,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $17 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $17 select local.tee $2 f64.add - local.get $6 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -7788,14 +7785,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $3 - local.get $12 + local.get $11 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $12 f64.sub f64.sub end @@ -7808,7 +7805,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $11 f64.mul local.get $1 local.get $2 @@ -7816,27 +7813,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $11 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $10 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $10 i32.const 1083179008 i32.sub i32.or @@ -7850,50 +7847,50 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $10 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s - i32.const 0 - local.get $5 - local.get $11 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - select - br_if $folding-inner1 + if + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + br_if $folding-inner1 + end end - local.get $11 + local.get $10 i32.const 2147483647 i32.and - local.tee $10 + local.tee $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $6 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $10 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -7904,7 +7901,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -7912,7 +7909,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -7921,14 +7918,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $6 + local.tee $7 i32.sub - local.get $6 - local.get $11 + local.get $7 + local.get $10 i32.const 0 i32.lt_s select - local.set $6 + local.set $7 local.get $3 local.get $0 f64.sub @@ -7962,7 +7959,7 @@ local.get $3 f64.mul local.set $0 - local.get $7 + local.get $6 f64.const 1 local.get $3 local.get $3 @@ -8011,7 +8008,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $6 + local.get $7 i32.const 20 i32.shl i32.add @@ -8022,7 +8019,7 @@ i32.le_s if (result f64) local.get $0 - local.get $6 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -8039,14 +8036,14 @@ f64.mul return end - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 @@ -8073,11 +8070,14 @@ (func $~lib/math/NativeMathf.pow (; 123 ;) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $4 i32) + (local $5 f32) + (local $6 i64) + (local $7 i32) (local $8 i32) + (local $9 f64) + (local $10 f64) + (local $11 i32) local.get $1 f32.abs f32.const 2 @@ -8133,7 +8133,7 @@ block $~lib/util/math/powf_lut|inlined.0 local.get $1 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1 i32.shl i32.const 1 @@ -8142,42 +8142,42 @@ i32.ge_u i32.const 0 i32.ne - local.tee $2 + local.tee $7 local.get $0 i32.reinterpret_f32 - local.tee $8 + local.tee $11 i32.const 8388608 i32.sub i32.const 2130706432 i32.ge_u i32.or if - local.get $2 + local.get $7 if - local.get $3 + local.get $2 i32.const 1 i32.shl i32.eqz if f32.const 1 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1065353216 i32.eq if f32.const nan:0x400000 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end i32.const 1 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const -16777216 i32.gt_u - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const -16777216 @@ -8187,41 +8187,37 @@ local.get $0 local.get $1 f32.add - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 2130706432 i32.eq if f32.const nan:0x400000 - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u i32.eqz - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 2130706432 i32.lt_u i32.eq - if - f32.const 0 - local.set $0 - br $~lib/util/math/powf_lut|inlined.0 - end + br_if $~lib/util/math/powf_lut|inlined.0 local.get $1 local.get $1 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 1 i32.shl i32.const 1 @@ -8233,49 +8229,51 @@ local.get $0 f32.mul local.set $0 - local.get $8 + local.get $11 i32.const 31 i32.shr_u if (result i32) - block $~lib/util/math/checkintf|inlined.0 (result i32) - i32.const 0 - local.get $3 + block $~lib/util/math/checkintf|inlined.0 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $8 + local.tee $11 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 2 - local.get $8 + local.get $11 i32.const 150 i32.gt_u - br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 0 - local.get $3 + if + i32.const 2 + local.set $3 + br $~lib/util/math/checkintf|inlined.0 + end + local.get $2 i32.const 1 i32.const 150 - local.get $8 + local.get $11 i32.sub i32.shl - local.tee $8 + local.tee $11 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.0 - drop - i32.const 1 - local.get $3 - local.get $8 + local.get $2 + local.get $11 i32.and - br_if $~lib/util/math/checkintf|inlined.0 - drop + if + i32.const 1 + local.set $3 + br $~lib/util/math/checkintf|inlined.0 + end i32.const 2 + local.set $3 end + local.get $3 i32.const 1 i32.eq else @@ -8286,7 +8284,7 @@ f32.neg local.set $0 end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -8295,53 +8293,56 @@ f32.div local.set $0 end + local.get $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $8 + local.get $11 i32.const 31 i32.shr_u if - block $~lib/util/math/checkintf|inlined.1 (result i32) - i32.const 0 - local.get $3 - local.tee $2 + block $~lib/util/math/checkintf|inlined.1 + local.get $2 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.tee $3 + local.tee $2 i32.const 127 i32.lt_u br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 2 - local.get $3 + local.get $2 i32.const 150 i32.gt_u - br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 0 - local.get $2 + if + i32.const 2 + local.set $4 + br $~lib/util/math/checkintf|inlined.1 + end + local.get $3 i32.const 1 i32.const 150 - local.get $3 + local.get $2 i32.sub i32.shl - local.tee $3 + local.tee $2 i32.const 1 i32.sub i32.and br_if $~lib/util/math/checkintf|inlined.1 - drop - i32.const 1 local.get $2 local.get $3 i32.and - br_if $~lib/util/math/checkintf|inlined.1 - drop + if + i32.const 1 + local.set $4 + br $~lib/util/math/checkintf|inlined.1 + end i32.const 2 + local.set $4 end - local.tee $3 + local.get $4 i32.eqz if local.get $0 @@ -8350,22 +8351,22 @@ local.tee $0 local.get $0 f32.div - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end i32.const 65536 i32.const 0 - local.get $3 + local.get $4 i32.const 1 i32.eq select - local.set $6 - local.get $8 + local.set $8 + local.get $11 i32.const 2147483647 i32.and - local.set $8 + local.set $11 end - local.get $8 + local.get $11 i32.const 8388608 i32.lt_u if @@ -8377,21 +8378,21 @@ i32.and i32.const 192937984 i32.sub - local.set $8 + local.set $11 end end - local.get $8 - local.get $8 + local.get $11 + local.get $11 i32.const 1060306944 i32.sub - local.tee $3 + local.tee $2 i32.const -8388608 i32.and - local.tee $2 + local.tee $4 i32.sub f32.reinterpret_i32 f64.promote_f32 - local.get $3 + local.get $2 i32.const 19 i32.shr_u i32.const 15 @@ -8400,48 +8401,48 @@ i32.shl i32.const 2672 i32.add - local.tee $3 + local.tee $2 f64.load f64.mul f64.const 1 f64.sub - local.tee $7 - local.get $7 + local.tee $10 + local.get $10 f64.mul - local.set $5 + local.set $9 local.get $1 f64.promote_f32 f64.const 0.288457581109214 - local.get $7 + local.get $10 f64.mul f64.const -0.36092606229713164 f64.add - local.get $5 - local.get $5 + local.get $9 + local.get $9 f64.mul f64.mul f64.const 1.4426950408774342 - local.get $7 + local.get $10 f64.mul - local.get $3 - f64.load offset=8 local.get $2 + f64.load offset=8 + local.get $4 i32.const 23 i32.shr_s f64.convert_i32_s f64.add f64.add f64.const 0.480898481472577 - local.get $7 + local.get $10 f64.mul f64.const -0.7213474675006291 f64.add - local.get $5 + local.get $9 f64.mul f64.add f64.add f64.mul - local.tee $7 + local.tee $10 i64.reinterpret_f64 i64.const 47 i64.shr_u @@ -8450,59 +8451,59 @@ i64.const 32959 i64.ge_u if - local.get $7 + local.get $10 f64.const 127.99999995700433 f64.gt if f32.const -1584563250285286751870879e5 f32.const 1584563250285286751870879e5 - local.get $6 + local.get $8 select f32.const 1584563250285286751870879e5 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end - local.get $7 + local.get $10 f64.const -150 f64.le if f32.const -2.524354896707238e-29 f32.const 2.524354896707238e-29 - local.get $6 + local.get $8 select f32.const 2.524354896707238e-29 f32.mul - local.set $0 + local.set $5 br $~lib/util/math/powf_lut|inlined.0 end end f64.const 0.6931471806916203 - local.get $7 - local.get $7 + local.get $10 + local.get $10 f64.const 211106232532992 f64.add - local.tee $5 + local.tee $9 f64.const 211106232532992 f64.sub f64.sub - local.tee $7 + local.tee $10 f64.mul f64.const 1 f64.add f64.const 0.05550361559341535 - local.get $7 + local.get $10 f64.mul f64.const 0.2402284522445722 f64.add - local.get $7 - local.get $7 + local.get $10 + local.get $10 f64.mul f64.mul f64.add - local.get $5 + local.get $9 i64.reinterpret_f64 - local.tee $4 + local.tee $6 i32.wrap_i64 i32.const 31 i32.and @@ -8511,8 +8512,8 @@ i32.const 2400 i32.add i64.load - local.get $4 local.get $6 + local.get $8 i64.extend_i32_u i64.add i64.const 47 @@ -8521,9 +8522,9 @@ f64.reinterpret_i64 f64.mul f32.demote_f64 - local.set $0 + local.set $5 end - local.get $0 + local.get $5 ) (func $std/math/test_powf (; 124 ;) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (result i32) local.get $0 @@ -8587,6 +8588,7 @@ i32.xor ) (func $~lib/math/NativeMath.seedRandom (; 127 ;) (param $0 i64) + (local $1 i32) i32.const 1 global.set $~lib/math/random_seeded local.get $0 @@ -8693,8 +8695,8 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i64) + (local $5 i64) + (local $6 i32) (local $7 f64) (local $8 i32) local.get $1 @@ -8704,7 +8706,7 @@ i64.shr_u i64.const 2047 i64.and - local.set $6 + local.set $5 i32.const 1 local.get $1 local.get $1 @@ -8771,18 +8773,18 @@ i64.or end local.set $2 - local.get $6 + local.get $5 i64.eqz if (result i64) local.get $4 i64.const 0 - local.get $6 + local.get $5 local.get $4 i64.const 12 i64.shl i64.clz i64.sub - local.tee $6 + local.tee $5 i64.sub i64.const 1 i64.add @@ -8797,10 +8799,10 @@ local.set $4 block $do-break|0 local.get $3 - local.get $6 + local.get $5 i64.lt_s if - local.get $6 + local.get $5 local.get $3 i64.const 1 i64.add @@ -8811,30 +8813,30 @@ end loop $while-continue|1 local.get $3 - local.get $6 + local.get $5 i64.gt_s if local.get $2 local.get $4 i64.ge_u - if + if (result i64) + local.get $6 + i32.const 1 + i32.add + local.set $6 local.get $2 local.get $4 i64.sub - local.set $2 - local.get $5 - i32.const 1 - i32.add - local.set $5 + else + local.get $2 end - local.get $2 i64.const 1 i64.shl local.set $2 - local.get $5 + local.get $6 i32.const 1 i32.shl - local.set $5 + local.set $6 local.get $3 i64.const 1 i64.sub @@ -8846,14 +8848,14 @@ local.get $4 i64.ge_u if + local.get $6 + i32.const 1 + i32.add + local.set $6 local.get $2 local.get $4 i64.sub local.set $2 - local.get $5 - i32.const 1 - i32.add - local.set $5 end local.get $2 i64.eqz @@ -8906,7 +8908,7 @@ local.get $0 i32.const 1 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.and i32.const 0 @@ -8919,14 +8921,14 @@ f64.gt select i32.const 0 - local.get $6 + local.get $5 local.get $3 i64.const 1 i64.add i64.eq select local.get $3 - local.get $6 + local.get $5 i64.eq select select @@ -8954,6 +8956,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) local.get $0 i32.reinterpret_f32 local.tee $3 @@ -8961,26 +8964,26 @@ i32.shr_u i32.const 255 i32.and - local.set $8 + local.set $9 local.get $1 i32.reinterpret_f32 - local.tee $7 + local.tee $6 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 + local.set $8 local.get $3 local.set $2 i32.const 1 local.get $1 local.get $1 f32.ne - local.get $8 + local.get $9 i32.const 255 i32.eq i32.const 1 - local.get $7 + local.get $6 i32.const 1 i32.shl select @@ -9005,7 +9008,7 @@ local.get $2 i32.const 31 i32.shr_u - local.get $8 + local.get $9 if (result i32) local.get $2 i32.const 8388607 @@ -9015,47 +9018,45 @@ else local.get $2 i32.const 1 - local.get $8 + local.get $9 local.get $2 i32.const 9 i32.shl i32.clz i32.sub - local.tee $8 + local.tee $9 i32.sub i32.shl end local.set $3 - local.get $6 + local.get $8 if (result i32) - local.get $7 + local.get $6 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $7 + local.get $6 i32.const 1 + local.get $8 local.get $6 - local.get $7 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $8 i32.sub i32.shl end - local.set $7 - i32.const 0 local.set $2 block $do-break|0 + local.get $9 local.get $8 - local.get $6 i32.lt_s if - local.get $6 local.get $8 + local.get $9 i32.const 1 i32.add i32.eq @@ -9064,20 +9065,20 @@ return end loop $while-continue|1 + local.get $9 local.get $8 - local.get $6 i32.gt_s if local.get $3 - local.get $7 + local.get $2 i32.ge_u if (result i32) - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 local.get $3 - local.get $7 + local.get $2 i32.sub else local.get $3 @@ -9085,27 +9086,27 @@ i32.const 1 i32.shl local.set $3 - local.get $2 + local.get $7 i32.const 1 i32.shl - local.set $2 - local.get $8 + local.set $7 + local.get $9 i32.const 1 i32.sub - local.set $8 + local.set $9 br $while-continue|1 end end local.get $3 - local.get $7 + local.get $2 i32.ge_u if - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 local.get $3 - local.get $7 + local.get $2 i32.sub local.set $3 end @@ -9113,18 +9114,18 @@ i32.eqz if i32.const -30 - local.set $8 + local.set $9 else - local.get $8 + local.get $9 local.get $3 i32.const 8 i32.shl i32.clz - local.tee $7 + local.tee $2 i32.sub - local.set $8 + local.set $9 local.get $3 - local.get $7 + local.get $2 i32.shl local.set $3 end @@ -9132,16 +9133,16 @@ local.get $3 i32.const 8388608 i32.sub - local.get $8 + local.get $9 i32.const 23 i32.shl i32.or local.get $3 i32.const 1 - local.get $8 + local.get $9 i32.sub i32.shr_u - local.get $8 + local.get $9 i32.const 0 i32.gt_s select @@ -9158,7 +9159,7 @@ local.get $0 i32.const 1 i32.const 1 - local.get $2 + local.get $7 i32.const 1 i32.and i32.const 0 @@ -9171,14 +9172,14 @@ f32.gt select i32.const 0 - local.get $6 local.get $8 + local.get $9 i32.const 1 i32.add i32.eq select - local.get $6 local.get $8 + local.get $9 i32.eq select select diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 81062baf99..783a07b9e7 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -238,20 +238,21 @@ (local $3 f64) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 f64) + (local $6 f64) + (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) + (local $11 f64) (local $12 f64) (local $13 f64) - (local $14 f64) - (local $15 i64) - (local $16 f64) + (local $14 i64) + (local $15 f64) + (local $16 i32) (local $17 i32) (local $18 f64) (local $19 i32) + (local $20 i32) local.get $1 f64.abs f64.const 2 @@ -306,30 +307,30 @@ end local.get $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $19 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $17 + local.tee $16 i32.const 2147483647 i32.and local.set $4 local.get $1 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $8 + local.tee $7 i32.const 2147483647 i32.and - local.tee $9 - local.get $15 + local.tee $8 + local.get $14 i32.wrap_i64 - local.tee $6 + local.tee $20 i32.or i32.eqz if @@ -337,14 +338,14 @@ return end i32.const 1 - local.get $6 + local.get $20 i32.const 0 - local.get $9 + local.get $8 i32.const 2146435072 i32.eq select i32.const 1 - local.get $9 + local.get $8 i32.const 2146435072 i32.gt_s i32.const 1 @@ -366,51 +367,51 @@ f64.add return end - local.get $17 + local.get $16 i32.const 0 i32.lt_s if - local.get $9 + local.get $8 i32.const 1128267776 i32.ge_s if (result i32) i32.const 2 else - local.get $9 + local.get $8 i32.const 1072693248 i32.ge_s if (result i32) i32.const 52 i32.const 20 - local.get $9 + local.get $8 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.tee $10 + local.tee $9 i32.const 20 i32.gt_s local.tee $5 select - local.get $10 + local.get $9 i32.sub - local.set $11 + local.set $10 i32.const 2 - local.get $6 - local.get $9 + local.get $20 + local.get $8 local.get $5 select local.tee $5 - local.get $11 + local.get $10 i32.shr_u - local.tee $10 + local.tee $9 i32.const 1 i32.and i32.sub i32.const 0 local.get $5 + local.get $9 local.get $10 - local.get $11 i32.shl i32.eq select @@ -420,10 +421,10 @@ end local.set $5 end - local.get $6 + local.get $20 i32.eqz if - local.get $9 + local.get $8 i32.const 2146435072 i32.eq if @@ -437,22 +438,20 @@ i32.const 1072693248 i32.ge_s if - local.get $8 - i32.const 0 - i32.lt_s - if - f64.const 0 - local.set $1 - end local.get $1 + f64.const 0 + local.get $7 + i32.const 0 + i32.ge_s + select return else - f64.const 0 local.get $1 f64.neg - local.get $8 + f64.const 0 + local.get $7 i32.const 0 - i32.ge_s + i32.lt_s select return end @@ -463,11 +462,11 @@ end unreachable end - local.get $9 + local.get $8 i32.const 1072693248 i32.eq if - local.get $8 + local.get $7 i32.const 0 i32.ge_s if @@ -479,7 +478,7 @@ f64.div return end - local.get $8 + local.get $7 i32.const 1073741824 i32.eq if @@ -488,11 +487,11 @@ f64.mul return end - local.get $8 + local.get $7 i32.const 1071644672 i32.eq if - local.get $17 + local.get $16 i32.const 0 i32.ge_s if @@ -524,12 +523,12 @@ local.get $2 f64.div local.get $2 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select local.set $2 - local.get $17 + local.get $16 i32.const 0 i32.lt_s if (result f64) @@ -561,8 +560,8 @@ end end f64.const 1 - local.set $7 - local.get $17 + local.set $6 + local.get $16 i32.const 0 i32.lt_s if @@ -583,13 +582,13 @@ i32.const 1 i32.eq select - local.set $7 + local.set $6 end - local.get $9 + local.get $8 i32.const 1105199104 i32.gt_s if (result f64) - local.get $9 + local.get $8 i32.const 1139802112 i32.gt_s if @@ -599,7 +598,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -611,7 +610,7 @@ if f64.const inf f64.const 0 - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -622,17 +621,17 @@ i32.const 1072693247 i32.lt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.lt_s select @@ -642,17 +641,17 @@ i32.const 1072693248 i32.gt_s if - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 f64.mul - local.get $8 + local.get $7 i32.const 0 i32.gt_s select @@ -690,9 +689,9 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $0 - local.get $12 + local.get $11 local.get $2 f64.sub f64.sub @@ -720,7 +719,7 @@ i32.const 1023 i32.sub i32.add - local.set $6 + local.set $7 local.get $4 i32.const 1048575 i32.and @@ -730,28 +729,25 @@ local.set $4 local.get $5 i32.const 235662 - i32.le_s - if (result i32) - i32.const 0 - else + i32.gt_s + if local.get $5 i32.const 767610 i32.lt_s - if (result i32) + if i32.const 1 + local.set $17 else - local.get $6 + local.get $7 i32.const 1 i32.add - local.set $6 + local.set $7 local.get $4 i32.const -1048576 i32.add local.set $4 - i32.const 0 end end - local.set $5 local.get $2 i64.reinterpret_f64 i64.const 4294967295 @@ -762,16 +758,16 @@ i64.shl i64.or f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.const 1.5 f64.const 1 - local.get $5 + local.get $17 select local.tee $3 f64.sub local.tee $2 f64.const 1 - local.get $13 + local.get $12 local.get $3 f64.add f64.div @@ -782,31 +778,31 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $16 - local.get $16 + local.tee $15 + local.get $15 f64.mul - local.set $12 + local.set $11 f64.const 0.9617967009544373 - local.get $16 + local.get $15 f64.const 3 - local.get $12 + local.get $11 f64.add local.get $18 local.get $18 f64.mul - local.tee $14 - local.get $14 + local.tee $13 + local.get $13 f64.mul f64.const 0.5999999999999946 - local.get $14 + local.get $13 f64.const 0.4285714285785502 - local.get $14 + local.get $13 f64.const 0.33333332981837743 - local.get $14 + local.get $13 f64.const 0.272728123808534 - local.get $14 + local.get $13 f64.const 0.23066074577556175 - local.get $14 + local.get $13 f64.const 0.20697501780033842 f64.mul f64.add @@ -821,7 +817,7 @@ f64.mul local.get $0 local.get $2 - local.get $16 + local.get $15 local.get $4 i32.const 1 i32.shr_s @@ -829,7 +825,7 @@ i32.or i32.const 524288 i32.add - local.get $5 + local.get $17 i32.const 18 i32.shl i32.add @@ -840,8 +836,8 @@ local.tee $0 f64.mul f64.sub - local.get $16 - local.get $13 + local.get $15 + local.get $12 local.get $0 local.get $3 f64.sub @@ -850,7 +846,7 @@ f64.sub f64.mul local.tee $3 - local.get $16 + local.get $15 local.get $18 f64.add f64.mul @@ -861,17 +857,17 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $13 + local.tee $12 f64.mul local.tee $2 local.get $3 - local.get $13 + local.get $12 f64.mul local.get $0 - local.get $13 + local.get $12 f64.const 3 f64.sub - local.get $12 + local.get $11 f64.sub f64.sub local.get $18 @@ -885,7 +881,7 @@ f64.reinterpret_i64 local.tee $3 f64.mul - local.tee $13 + local.tee $12 f64.const -7.028461650952758e-09 local.get $3 f64.mul @@ -899,18 +895,18 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $5 + local.get $17 select f64.add local.tee $3 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $5 + local.get $17 select local.tee $2 f64.add - local.get $6 + local.get $7 f64.convert_i32_s local.tee $0 f64.add @@ -918,14 +914,14 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.set $12 + local.set $11 local.get $3 - local.get $12 + local.get $11 local.get $0 f64.sub local.get $2 f64.sub - local.get $13 + local.get $12 f64.sub f64.sub end @@ -938,7 +934,7 @@ f64.reinterpret_i64 local.tee $0 f64.sub - local.get $12 + local.get $11 f64.mul local.get $1 local.get $2 @@ -946,27 +942,27 @@ f64.add local.tee $1 local.get $0 - local.get $12 + local.get $11 f64.mul local.tee $3 f64.add local.tee $0 i64.reinterpret_f64 - local.tee $15 + local.tee $14 i32.wrap_i64 local.set $5 block $folding-inner1 block $folding-inner0 - local.get $15 + local.get $14 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $11 + local.tee $10 i32.const 1083179008 i32.ge_s if local.get $5 - local.get $11 + local.get $10 i32.const 1083179008 i32.sub i32.or @@ -980,50 +976,50 @@ i32.or br_if $folding-inner0 else - local.get $11 + local.get $10 i32.const 2147483647 i32.and i32.const 1083231232 i32.ge_s - i32.const 0 - local.get $5 - local.get $11 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - select - br_if $folding-inner1 + if + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + br_if $folding-inner1 + end end - local.get $11 + local.get $10 i32.const 2147483647 i32.and - local.tee $10 + local.tee $9 i32.const 20 i32.shr_s i32.const 1023 i32.sub local.set $5 i32.const 0 - local.set $6 - local.get $10 + local.set $7 + local.get $9 i32.const 1071644672 i32.gt_s if i32.const 1048575 - local.get $11 + local.get $10 i32.const 1048576 local.get $5 i32.const 1 i32.add i32.shr_s i32.add - local.tee $10 + local.tee $9 i32.const 2147483647 i32.and i32.const 20 @@ -1034,7 +1030,7 @@ i32.shr_s i32.const -1 i32.xor - local.get $10 + local.get $9 i32.and i64.extend_i32_s i64.const 32 @@ -1042,7 +1038,7 @@ f64.reinterpret_i64 local.set $0 i32.const 0 - local.get $10 + local.get $9 i32.const 1048575 i32.and i32.const 1048576 @@ -1051,14 +1047,14 @@ local.get $5 i32.sub i32.shr_s - local.tee $6 + local.tee $7 i32.sub - local.get $6 - local.get $11 + local.get $7 + local.get $10 i32.const 0 i32.lt_s select - local.set $6 + local.set $7 local.get $3 local.get $0 f64.sub @@ -1092,7 +1088,7 @@ local.get $3 f64.mul local.set $0 - local.get $7 + local.get $6 f64.const 1 local.get $3 local.get $3 @@ -1141,7 +1137,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.get $6 + local.get $7 i32.const 20 i32.shl i32.add @@ -1152,7 +1148,7 @@ i32.le_s if (result f64) local.get $0 - local.get $6 + local.get $7 call $~lib/math/NativeMath.scalbn else local.get $0 @@ -1169,14 +1165,14 @@ f64.mul return end - local.get $7 + local.get $6 f64.const 1.e+300 f64.mul f64.const 1.e+300 f64.mul return end - local.get $7 + local.get $6 f64.const 1e-300 f64.mul f64.const 1e-300 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 6b8c2d7989..5b818498c6 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -48,7 +48,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -60,7 +60,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -85,39 +85,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -129,25 +127,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -159,24 +157,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -185,7 +183,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -195,7 +193,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -212,6 +210,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -297,7 +296,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -309,7 +308,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -318,7 +317,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -326,8 +325,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -387,12 +386,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -409,17 +407,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -431,7 +428,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -439,22 +436,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -467,12 +464,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -604,16 +601,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -625,18 +622,18 @@ unreachable end i32.const 448 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2016 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 448 @@ -651,7 +648,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -668,10 +665,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -684,7 +681,7 @@ i32.const 448 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 10 ;) (param $0 i32) (result i32) local.get $0 @@ -715,12 +712,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -753,17 +749,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -2283,10 +2278,11 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 24 i32.shl i32.const 24 @@ -2294,8 +2290,8 @@ i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -2305,12 +2301,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2321,14 +2317,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -2341,9 +2337,9 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|3 - local.get $1 + local.get $0 i32.const 24 i32.shl i32.const 24 @@ -2351,8 +2347,8 @@ i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2363,12 +2359,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -2379,14 +2375,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -2398,38 +2394,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 4 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|0 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -2440,9 +2434,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load8_s call $~lib/array/Array#__set end @@ -2455,17 +2449,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|4 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -2478,21 +2470,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -2504,9 +2496,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|6 - local.get $1 + local.get $3 i32.const 24 i32.shl i32.const 24 @@ -2514,8 +2506,8 @@ i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -2526,11 +2518,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -2540,14 +2532,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|6 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -2560,9 +2552,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|8 - local.get $1 + local.get $3 i32.const 24 i32.shl i32.const 24 @@ -2570,8 +2562,8 @@ i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -2581,12 +2573,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -2597,11 +2589,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -2611,14 +2603,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|8 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -2630,9 +2622,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -2642,11 +2634,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 35 ;) (result i32) @@ -2993,17 +2985,18 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3013,12 +3006,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3029,14 +3022,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -3049,16 +3042,16 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|3 - local.get $1 + local.get $0 i32.const 255 i32.and i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3069,12 +3062,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3085,14 +3078,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -3104,38 +3097,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 6 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 0 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|0 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -3146,9 +3137,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load8_u call $~lib/array/Array#__set end @@ -3161,17 +3152,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|4 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3184,21 +3173,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -3210,16 +3199,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|6 - local.get $1 + local.get $3 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3230,11 +3219,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -3244,14 +3233,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|6 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -3264,16 +3253,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|8 - local.get $1 + local.get $3 i32.const 255 i32.and i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -3283,12 +3272,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -3299,11 +3288,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -3313,14 +3302,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|8 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -3332,9 +3321,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -3344,11 +3333,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 42 ;) (result i32) @@ -3799,10 +3788,11 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -3810,8 +3800,8 @@ i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -3821,12 +3811,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3837,14 +3827,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -3857,9 +3847,9 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|3 - local.get $1 + local.get $0 i32.const 16 i32.shl i32.const 16 @@ -3867,8 +3857,8 @@ i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3879,12 +3869,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -3895,14 +3885,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -3914,38 +3904,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 8 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|0 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -3956,9 +3944,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load16_s call $~lib/array/Array#__set end @@ -3971,17 +3959,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|4 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -3994,21 +3980,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -4020,9 +4006,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|6 - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -4030,8 +4016,8 @@ i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4042,11 +4028,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4056,14 +4042,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|6 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -4076,9 +4062,9 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|8 - local.get $1 + local.get $3 i32.const 16 i32.shl i32.const 16 @@ -4086,8 +4072,8 @@ i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4097,12 +4083,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4113,11 +4099,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4127,14 +4113,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|8 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -4146,9 +4132,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -4158,11 +4144,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 52 ;) (result i32) @@ -4511,17 +4497,18 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -4531,12 +4518,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4547,14 +4534,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -4567,16 +4554,16 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|3 - local.get $1 + local.get $0 i32.const 65535 i32.and i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4587,12 +4574,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -4603,14 +4590,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -4622,38 +4609,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 10 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 1 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|0 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -4664,9 +4649,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load16_u call $~lib/array/Array#__set end @@ -4679,17 +4664,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|4 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -4702,21 +4685,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -4728,16 +4711,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|6 - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4748,11 +4731,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4762,14 +4745,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|6 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -4782,16 +4765,16 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|8 - local.get $1 + local.get $3 i32.const 65535 i32.and i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4801,12 +4784,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -4817,11 +4800,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -4831,14 +4814,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|8 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -4850,9 +4833,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -4862,11 +4845,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 59 ;) (result i32) @@ -5319,15 +5302,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5337,12 +5321,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5353,14 +5337,14 @@ call $~lib/builtins/abort unreachable end - 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 $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5373,14 +5357,14 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5391,12 +5375,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5407,14 +5391,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5426,38 +5410,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 12 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -5468,9 +5450,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load call $~lib/array/Array#__set end @@ -5483,17 +5465,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|2 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5506,21 +5486,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|2 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -5532,14 +5512,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|3 - local.get $1 + local.get $3 i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5550,11 +5530,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5564,14 +5544,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -5584,14 +5564,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|4 - local.get $1 + local.get $3 i32.const 50 i32.lt_s if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5601,12 +5581,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5617,11 +5597,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5631,14 +5611,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -5650,9 +5630,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -5662,11 +5642,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#constructor (; 69 ;) (result i32) @@ -5706,15 +5686,16 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) call $~lib/set/Set#constructor - local.set $7 + local.set $2 loop $for-loop|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has if i32.const 0 @@ -5724,12 +5705,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5740,14 +5721,14 @@ call $~lib/builtins/abort unreachable end - 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 $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5760,14 +5741,14 @@ unreachable end i32.const 50 - local.set $1 + local.set $0 loop $for-loop|1 - local.get $1 + local.get $0 i32.const 100 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5778,12 +5759,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $0 call $~lib/set/Set#has i32.eqz if @@ -5794,14 +5775,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|1 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 100 i32.ne @@ -5813,38 +5794,36 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 i32.load offset=8 - local.set $3 - local.get $7 + local.set $7 + local.get $2 i32.load offset=16 - local.set $4 + local.set $6 i32.const 16 i32.const 14 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.get $4 + local.get $6 i32.const 2 call $~lib/arraybuffer/ArrayBufferView#constructor - local.tee $6 + local.tee $4 i32.const 0 i32.store offset=12 - local.get $6 local.get $4 + local.get $6 i32.store offset=12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $5 - local.get $4 + local.get $6 i32.lt_s if - local.get $3 + local.get $7 local.get $5 i32.const 3 i32.shl i32.add - local.tee $2 + local.tee $8 i32.load offset=4 i32.const 1 i32.and @@ -5855,9 +5834,9 @@ i32.const 1 i32.add local.set $1 - local.get $6 + local.get $4 local.get $0 - local.get $2 + local.get $8 i32.load call $~lib/array/Array#__set end @@ -5870,17 +5849,15 @@ end call $~lib/set/Set#constructor local.set $0 - i32.const 0 - local.set $1 loop $for-loop|2 - local.get $1 - local.get $6 + local.get $3 + local.get $4 i32.load offset=12 i32.lt_s if - local.get $7 - local.get $6 - local.get $1 + local.get $2 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#has i32.eqz @@ -5893,21 +5870,21 @@ unreachable end local.get $0 - local.get $6 - local.get $1 + local.get $4 + local.get $3 call $~lib/array/Array#__get call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|2 end end local.get $0 i32.load offset=20 - local.get $7 + local.get $2 i32.load offset=20 i32.ne if @@ -5919,14 +5896,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|3 - local.get $1 + local.get $3 i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -5937,11 +5914,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5951,14 +5928,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|3 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -5971,14 +5948,14 @@ unreachable end i32.const 0 - local.set $1 + local.set $3 loop $for-loop|4 - local.get $1 + local.get $3 i32.const 50 i32.lt_u if - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -5988,12 +5965,12 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#add call $~lib/rt/pure/__release - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has i32.eqz if @@ -6004,11 +5981,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#delete - local.get $7 - local.get $1 + local.get $2 + local.get $3 call $~lib/set/Set#has if i32.const 0 @@ -6018,14 +5995,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|4 end end - local.get $7 + local.get $2 i32.load offset=20 i32.const 50 i32.ne @@ -6037,9 +6014,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $2 call $~lib/set/Set#clear - local.get $7 + local.get $2 i32.load offset=20 if i32.const 0 @@ -6049,11 +6026,11 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $4 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/set/Set#clear (; 71 ;) (param $0 i32) @@ -6719,13 +6696,13 @@ i32.and i32.eqz if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 local.get $4 - local.get $1 + local.get $0 local.get $9 i64.load call $~lib/array/Array#__set @@ -7104,13 +7081,13 @@ i32.and i32.eqz if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 local.get $4 - local.get $1 + local.get $0 local.get $9 i64.load call $~lib/array/Array#__set @@ -7630,8 +7607,6 @@ local.get $2 local.get $3 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $4 local.get $3 @@ -7648,20 +7623,20 @@ i32.and i32.eqz if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 local.get $5 f32.load local.set $7 - local.get $1 + local.get $0 local.get $2 i32.load offset=12 i32.ge_u if - local.get $1 + local.get $0 i32.const 0 i32.lt_s if @@ -7673,7 +7648,7 @@ unreachable end local.get $2 - local.get $1 + local.get $0 i32.const 1 i32.add local.tee $5 @@ -7685,7 +7660,7 @@ end local.get $2 i32.load offset=4 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -8407,8 +8382,6 @@ local.get $2 local.get $3 i32.store offset=12 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $4 local.get $3 @@ -8425,20 +8398,20 @@ i32.and i32.eqz if - local.get $0 - local.tee $1 + local.get $1 + local.tee $0 i32.const 1 i32.add - local.set $0 + local.set $1 local.get $5 f64.load local.set $7 - local.get $1 + local.get $0 local.get $2 i32.load offset=12 i32.ge_u if - local.get $1 + local.get $0 i32.const 0 i32.lt_s if @@ -8450,7 +8423,7 @@ unreachable end local.get $2 - local.get $1 + local.get $0 i32.const 1 i32.add local.tee $5 @@ -8462,7 +8435,7 @@ end local.get $2 i32.load offset=4 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index 69936d2256..ec1bab9275 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -84,7 +84,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -96,7 +96,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -121,39 +121,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -165,25 +163,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -195,24 +193,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -221,7 +219,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -231,7 +229,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -248,6 +246,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -333,7 +332,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -345,7 +344,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -354,7 +353,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -362,8 +361,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -423,12 +422,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -445,17 +443,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -467,7 +464,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -475,22 +472,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -503,12 +500,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -640,16 +637,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -661,18 +658,18 @@ unreachable end i32.const 464 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 2032 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 464 @@ -687,7 +684,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -704,10 +701,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -720,19 +717,18 @@ i32.const 464 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 12 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -765,17 +761,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index 2ef44b1f95..770fbcc097 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -363,7 +363,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -375,7 +375,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -400,39 +400,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -444,25 +442,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -474,24 +472,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -500,7 +498,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -510,7 +508,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -527,6 +525,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -612,7 +611,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -624,7 +623,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -633,7 +632,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -641,8 +640,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -702,12 +701,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -724,17 +722,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -746,7 +743,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -754,22 +751,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -782,12 +779,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -919,16 +916,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -940,18 +937,18 @@ unreachable end i32.const 17376 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 18944 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 17376 @@ -966,7 +963,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -983,10 +980,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -999,7 +996,7 @@ i32.const 17376 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 15 ;) (param $0 i32) (result i32) local.get $0 @@ -1030,12 +1027,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -1068,17 +1064,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -1893,17 +1888,17 @@ i32.const 1 i32.shl call $~lib/rt/tlsf/__alloc - local.set $7 + local.set $8 i32.const 208 call $~lib/string/String#get:length local.set $3 loop $for-loop|0 - local.get $9 + local.get $7 local.get $6 i32.lt_u if local.get $0 - local.get $9 + local.get $7 i32.const 1 i32.shl i32.add @@ -1913,7 +1908,7 @@ i32.shr_u if block $for-continue|0 - local.get $9 + local.get $7 local.get $6 i32.const 1 i32.sub @@ -1927,22 +1922,22 @@ select if local.get $0 - local.get $9 + local.get $7 i32.const 1 i32.shl i32.add i32.load16_u offset=2 - local.tee $8 + local.tee $9 i32.const 56319 i32.sub i32.const 1025 i32.lt_u if - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 - local.get $8 + local.set $7 + local.get $9 i32.const 1023 i32.and local.get $2 @@ -1958,13 +1953,13 @@ i32.const 131072 i32.ge_u if - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl i32.add local.get $1 - local.get $8 + local.get $9 i32.const 16 i32.shl i32.or @@ -1983,7 +1978,7 @@ i32.const 25 i32.le_u if - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl @@ -2018,7 +2013,7 @@ i32.shr_u i32.const 2 i32.shl - local.tee $8 + local.tee $9 i32.const 1 i32.shl i32.const 208 @@ -2032,18 +2027,18 @@ i32.const 31 i32.shr_u if - local.get $8 + local.get $9 i32.const 4 i32.add local.set $5 else - local.get $8 + local.get $9 i32.const 4 i32.sub local.set $1 end else - local.get $8 + local.get $9 br $~lib/util/casemap/bsearch|inlined.0 end br $while-continue|1 @@ -2065,16 +2060,16 @@ local.tee $1 i32.load16_u offset=6 local.set $2 - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl i32.add - local.tee $8 + local.tee $9 local.get $1 i32.load offset=2 i32.store - local.get $8 + local.get $9 local.get $2 i32.store16 offset=4 local.get $10 @@ -2095,7 +2090,7 @@ i32.const 65536 i32.lt_s if - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl @@ -2103,7 +2098,7 @@ local.get $2 i32.store16 else - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl @@ -2134,7 +2129,7 @@ end end else - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl @@ -2154,10 +2149,10 @@ i32.and i32.store16 end - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 local.get $10 i32.const 1 i32.add @@ -2165,7 +2160,7 @@ br $for-loop|0 end end - local.get $7 + local.get $8 local.get $10 i32.const 1 i32.shl diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index aea8288809..694df981e5 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -104,7 +104,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -116,7 +116,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -141,39 +141,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -185,25 +183,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -215,24 +213,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -241,7 +239,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -251,7 +249,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -268,6 +266,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -353,7 +352,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -365,7 +364,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -374,7 +373,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -382,8 +381,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -443,12 +442,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -465,17 +463,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -487,7 +484,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -495,22 +492,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -523,12 +520,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -660,16 +657,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -681,18 +678,18 @@ unreachable end i32.const 21056 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 22624 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 21056 @@ -707,7 +704,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -724,10 +721,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -740,7 +737,7 @@ i32.const 21056 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 12 ;) (param $0 i32) (result i32) local.get $0 @@ -771,12 +768,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -809,17 +805,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 699642a86f..65c9981e5b 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -588,7 +588,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -600,7 +600,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -625,39 +625,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -669,25 +667,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -699,24 +697,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -725,7 +723,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -735,7 +733,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -752,6 +750,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -837,7 +836,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -849,7 +848,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -858,7 +857,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -866,8 +865,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -927,12 +926,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -949,17 +947,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -971,7 +968,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -979,22 +976,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -1007,12 +1004,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -1144,16 +1141,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -1165,18 +1162,18 @@ unreachable end i32.const 17008 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 18576 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 17008 @@ -1191,7 +1188,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -1208,10 +1205,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -1224,7 +1221,7 @@ i32.const 17008 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 16 ;) (param $0 i32) (result i32) local.get $0 @@ -1255,12 +1252,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -1293,17 +1289,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -2244,35 +2239,35 @@ return end block $break|0 - local.get $0 - i32.const 5760 - i32.eq - local.get $0 - i32.const 8232 - i32.eq - i32.or - local.get $0 - i32.const 8233 - i32.eq - local.get $0 - i32.const 8239 - i32.eq - i32.or - i32.or - local.get $0 - i32.const 8287 - i32.eq - local.get $0 - i32.const 12288 - i32.eq - i32.or - local.get $0 - i32.const 65279 - i32.eq - i32.or - i32.or - i32.eqz - if + block $case6|0 + local.get $0 + i32.const 5760 + i32.eq + local.get $0 + i32.const 8232 + i32.eq + i32.or + local.get $0 + i32.const 8233 + i32.eq + local.get $0 + i32.const 8239 + i32.eq + i32.or + i32.or + br_if $case6|0 + local.get $0 + i32.const 8287 + i32.eq + local.get $0 + i32.const 12288 + i32.eq + i32.or + local.get $0 + i32.const 65279 + i32.eq + i32.or + br_if $case6|0 br $break|0 end i32.const 1 @@ -3250,30 +3245,33 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - (local $6 i32) - (local $7 i64) - (local $8 i64) - (local $9 f64) - (local $10 i32) - (local $11 i64) - (local $12 f64) - (local $13 i64) + (local $5 i32) + (local $6 i64) + (local $7 i32) + (local $8 i32) + (local $9 i64) + (local $10 i64) + (local $11 f64) + (local $12 i64) + (local $13 f64) + (local $14 i32) + (local $15 i32) + (local $16 i64) block $folding-inner0 local.get $0 call $~lib/string/String#get:length - local.tee $4 + local.tee $5 i32.eqz br_if $folding-inner0 local.get $0 i32.load16_u - local.set $6 + local.set $7 f64.const 1 - local.set $12 + local.set $13 loop $while-continue|0 - local.get $4 + local.get $5 if (result i32) - local.get $6 + local.get $7 call $~lib/util/string/isSpace else i32.const 0 @@ -3284,43 +3282,43 @@ i32.add local.tee $0 i32.load16_u - local.set $6 - local.get $4 + local.set $7 + local.get $5 i32.const 1 i32.sub - local.set $4 + local.set $5 br $while-continue|0 end end - local.get $4 + local.get $5 i32.eqz br_if $folding-inner0 - local.get $6 + local.get $7 i32.const 45 i32.eq if (result i32) - local.get $4 + local.get $5 i32.const 1 i32.sub - local.tee $4 + local.tee $5 i32.eqz br_if $folding-inner0 f64.const -1 - local.set $12 + local.set $13 local.get $0 i32.const 2 i32.add local.tee $0 i32.load16_u else - local.get $6 + local.get $7 i32.const 43 i32.eq if (result i32) - local.get $4 + local.get $5 i32.const 1 i32.sub - local.tee $4 + local.tee $5 i32.eqz br_if $folding-inner0 local.get $0 @@ -3329,14 +3327,14 @@ local.tee $0 i32.load16_u else - local.get $6 + local.get $7 end end - local.tee $6 + local.tee $7 i32.const 73 i32.eq i32.const 0 - local.get $4 + local.get $5 i32.const 8 i32.ge_s select @@ -3355,27 +3353,27 @@ end if f64.const inf - local.get $12 + local.get $13 f64.copysign return end br $folding-inner0 end - local.get $6 + local.get $7 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $6 + local.get $7 i32.const 46 i32.ne select br_if $folding-inner0 local.get $0 - local.set $1 + local.set $4 loop $while-continue|1 - local.get $6 + local.get $7 i32.const 48 i32.eq if @@ -3384,61 +3382,61 @@ i32.add local.tee $0 i32.load16_u - local.set $6 - local.get $4 + local.set $7 + local.get $5 i32.const 1 i32.sub - local.set $4 + local.set $5 br $while-continue|1 end end - local.get $4 + local.get $5 i32.const 0 i32.le_s if f64.const 0 return end - local.get $6 + local.get $7 i32.const 46 i32.eq if - local.get $1 + local.get $4 local.get $0 i32.sub i32.eqz - local.set $1 + local.set $4 local.get $0 i32.const 2 i32.add local.set $0 - local.get $4 + local.get $5 i32.const 1 i32.sub - local.tee $4 + local.tee $5 if (result i32) i32.const 0 else - local.get $1 + local.get $4 end br_if $folding-inner0 i32.const 1 - local.set $10 + local.set $14 loop $for-loop|2 local.get $0 i32.load16_u - local.tee $6 + local.tee $7 i32.const 48 i32.eq if - local.get $4 + local.get $5 i32.const 1 i32.sub - local.set $4 - local.get $3 + local.set $5 + local.get $2 i32.const 1 i32.sub - local.set $3 + local.set $2 local.get $0 i32.const 2 i32.add @@ -3446,82 +3444,80 @@ br $for-loop|2 end end - local.get $4 + local.get $5 i32.const 0 i32.le_s if f64.const 0 return end - local.get $3 - if - i32.const 0 - local.set $1 - end - local.get $6 + local.get $7 i32.const 48 i32.sub i32.const 10 i32.ge_u i32.const 0 - local.get $1 + i32.const 0 + local.get $4 + local.get $2 + select select br_if $folding-inner0 end - local.get $6 + local.get $7 i32.const 48 i32.sub - local.set $1 + local.set $8 loop $for-loop|3 i32.const 1 - local.get $10 + local.get $14 i32.eqz i32.const 0 - local.get $6 + local.get $7 i32.const 46 i32.eq select - local.get $1 + local.get $8 i32.const 10 i32.lt_u select if block $for-break3 - local.get $1 + local.get $8 i32.const 10 i32.lt_u if - local.get $1 + local.get $8 i64.extend_i32_u - local.get $5 + local.get $6 i64.const 10 i64.mul i64.add - local.get $5 - local.get $1 + local.get $6 + local.get $8 i32.eqz i32.eqz i64.extend_i32_u i64.or - local.get $2 + local.get $1 i32.const 19 i32.lt_s select - local.set $5 - local.get $2 + local.set $6 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 else - local.get $2 - local.set $3 + local.get $1 + local.set $2 i32.const 1 - local.set $10 + local.set $14 end - local.get $4 + local.get $5 i32.const 1 i32.sub - local.tee $4 + local.tee $5 i32.eqz br_if $for-break3 local.get $0 @@ -3529,161 +3525,157 @@ i32.add local.tee $0 i32.load16_u - local.tee $6 + local.tee $7 i32.const 48 i32.sub - local.set $1 + local.set $8 br $for-loop|3 end end end - block $~lib/util/string/scientific|inlined.0 - i32.const 1 - local.get $3 - local.get $2 - local.get $10 - select - i32.const 19 - local.get $2 - i32.const 19 + local.get $2 + local.get $1 + local.get $14 + select + i32.const 19 + local.get $1 + i32.const 19 + local.get $1 + i32.lt_s + select + i32.sub + local.set $4 + i32.const 1 + local.set $1 + block $~lib/util/string/parseExp|inlined.0 + local.get $0 + local.tee $2 + i32.load16_u + i32.const 32 + i32.or + i32.const 101 + i32.ne + br_if $~lib/util/string/parseExp|inlined.0 local.get $2 - i32.lt_s - select - i32.sub - block $~lib/util/string/parseExp|inlined.0 (result i32) + i32.const 2 + i32.add + local.tee $8 + i32.load16_u + local.tee $0 + i32.const 45 + i32.eq + if (result i32) + local.get $5 i32.const 1 - local.set $3 - i32.const 0 - local.set $2 - i32.const 0 - local.get $0 - local.tee $1 - i32.load16_u - i32.const 32 - i32.or - i32.const 101 - i32.ne + i32.sub + local.tee $5 + i32.eqz br_if $~lib/util/string/parseExp|inlined.0 - drop - local.get $1 + i32.const -1 + local.set $1 + local.get $8 i32.const 2 i32.add - local.tee $1 + local.tee $8 i32.load16_u - local.tee $0 - i32.const 45 + else + local.get $0 + i32.const 43 i32.eq if (result i32) - i32.const 0 - local.get $4 + local.get $5 i32.const 1 i32.sub - local.tee $4 + local.tee $5 i32.eqz br_if $~lib/util/string/parseExp|inlined.0 - drop - i32.const -1 - local.set $3 - local.get $1 + local.get $8 i32.const 2 i32.add - local.tee $1 + local.tee $8 i32.load16_u else local.get $0 - i32.const 43 - i32.eq - if (result i32) - i32.const 0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.eqz - br_if $~lib/util/string/parseExp|inlined.0 - drop - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load16_u - else - local.get $0 - end - end - local.set $0 - loop $while-continue|4 - local.get $0 - i32.const 48 - i32.eq - if - i32.const 0 - local.get $4 - i32.const 1 - i32.sub - local.tee $4 - i32.eqz - br_if $~lib/util/string/parseExp|inlined.0 - drop - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load16_u - local.set $0 - br $while-continue|4 - end end + end + local.set $0 + loop $while-continue|4 local.get $0 i32.const 48 - i32.sub - local.set $0 - loop $for-loop|5 - local.get $0 - i32.const 10 - i32.lt_u - i32.const 0 - local.get $4 - select + i32.eq + if + local.get $5 + i32.const 1 + i32.sub + local.tee $5 + i32.eqz + br_if $~lib/util/string/parseExp|inlined.0 + local.get $8 + i32.const 2 + i32.add + local.tee $8 + i32.load16_u + local.set $0 + br $while-continue|4 + end + end + local.get $0 + i32.const 48 + i32.sub + local.set $0 + loop $for-loop|5 + local.get $0 + i32.const 10 + i32.lt_u + i32.const 0 + local.get $5 + select + if + local.get $3 + i32.const 3200 + i32.ge_s if - local.get $3 - i32.const 3200 - i32.mul - local.get $2 + local.get $1 i32.const 3200 - i32.ge_s - br_if $~lib/util/string/parseExp|inlined.0 - drop - local.get $0 - local.get $2 - i32.const 10 i32.mul - i32.add - local.set $2 - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - i32.const 2 - i32.add - local.tee $1 - i32.load16_u - i32.const 48 - i32.sub - local.set $0 - br $for-loop|5 + local.set $15 + br $~lib/util/string/parseExp|inlined.0 end + local.get $0 + local.get $3 + i32.const 10 + i32.mul + i32.add + local.set $3 + local.get $5 + i32.const 1 + i32.sub + local.set $5 + local.get $8 + i32.const 2 + i32.add + local.tee $8 + i32.load16_u + i32.const 48 + i32.sub + local.set $0 + br $for-loop|5 end - local.get $2 - local.get $3 - i32.mul end + local.get $1 + local.get $3 + i32.mul + local.set $15 + end + block $~lib/util/string/scientific|inlined.0 + i32.const 1 + local.get $4 + local.get $15 i32.add local.tee $0 i32.const -342 i32.lt_s - local.get $5 + local.get $6 i64.eqz select br_if $~lib/util/string/scientific|inlined.0 @@ -3692,12 +3684,12 @@ i32.gt_s if f64.const inf - local.set $9 + local.set $11 br $~lib/util/string/scientific|inlined.0 end - local.get $5 + local.get $6 f64.convert_i64_u - local.set $9 + local.set $11 local.get $0 i32.eqz br_if $~lib/util/string/scientific|inlined.0 @@ -3710,7 +3702,7 @@ i32.gt_s select if - local.get $9 + local.get $11 local.get $0 i32.const 3 i32.shl @@ -3718,20 +3710,20 @@ i32.add f64.load f64.mul - local.set $9 + local.set $11 i32.const 22 local.set $0 end - local.get $5 + local.get $6 i64.const 9007199254740991 i64.le_u if (result i32) local.get $0 i32.const 31 i32.shr_s - local.tee $2 + local.tee $1 local.get $0 - local.get $2 + local.get $1 i32.add i32.xor i32.const 22 @@ -3744,7 +3736,7 @@ i32.const 0 i32.gt_s if - local.get $9 + local.get $11 local.get $0 i32.const 3 i32.shl @@ -3752,10 +3744,10 @@ i32.add f64.load f64.mul - local.set $9 + local.set $11 br $~lib/util/string/scientific|inlined.0 end - local.get $9 + local.get $11 i32.const 0 local.get $0 i32.sub @@ -3770,33 +3762,33 @@ i32.const 0 i32.lt_s if (result f64) - local.get $5 - local.get $5 + local.get $6 + local.get $6 i64.clz - local.tee $7 + local.tee $9 i64.shl - local.set $5 + local.set $6 local.get $0 - local.tee $3 + local.tee $1 i64.extend_i32_s - local.get $7 + local.get $9 i64.sub - local.set $7 + local.set $9 loop $for-loop|6 - local.get $3 + local.get $1 i32.const -14 i32.le_s if f64.const 0.00004294967296 - local.get $5 + local.get $6 i64.const 6103515625 i64.rem_u - local.get $5 + local.get $6 i64.const 6103515625 i64.div_u - local.tee $11 + local.tee $12 i64.clz - local.tee $8 + local.tee $10 i64.const 18 i64.sub i64.shl @@ -3804,91 +3796,91 @@ f64.mul f64.nearest i64.trunc_f64_u - local.get $11 - local.get $8 + local.get $12 + local.get $10 i64.shl i64.add - local.set $5 - local.get $7 - local.get $8 + local.set $6 + local.get $9 + local.get $10 i64.sub - local.set $7 - local.get $3 + local.set $9 + local.get $1 i32.const 14 i32.add - local.set $3 + local.set $1 br $for-loop|6 end end - local.get $5 + local.get $6 i32.const 0 - local.get $3 + local.get $1 i32.sub call $~lib/math/ipow32 i64.extend_i32_s - local.tee $11 + local.tee $12 i64.div_u - local.tee $13 + local.tee $16 i64.clz - local.set $8 - local.get $5 - local.get $11 + local.set $10 + local.get $6 + local.get $12 i64.rem_u f64.convert_i64_u i64.reinterpret_f64 - local.get $8 + local.get $10 i64.const 52 i64.shl i64.add f64.reinterpret_i64 - local.get $11 + local.get $12 f64.convert_i64_u f64.div i64.trunc_f64_u - local.get $13 - local.get $8 + local.get $16 + local.get $10 i64.shl i64.add f64.convert_i64_u - local.get $7 - local.get $8 + local.get $9 + local.get $10 i64.sub i32.wrap_i64 call $~lib/math/NativeMath.scalbn else - local.get $5 - local.get $5 + local.get $6 + local.get $6 i64.ctz - local.tee $7 + local.tee $9 i64.shr_u - local.set $5 - local.get $7 + local.set $6 + local.get $9 local.get $0 - local.tee $2 + local.tee $3 i64.extend_i32_s i64.add global.set $~lib/util/string/__fixmulShift loop $for-loop|7 - local.get $2 + local.get $3 i32.const 13 i32.ge_s if i64.const 32 - local.get $5 + local.get $6 i64.const 32 i64.shr_u i64.const 1220703125 i64.mul - local.get $5 + local.get $6 i64.const 4294967295 i64.and i64.const 1220703125 i64.mul - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i64.add - local.tee $7 + local.tee $9 i64.const 32 i64.shr_u i32.wrap_i64 @@ -3896,11 +3888,11 @@ local.tee $0 i64.extend_i32_u i64.sub - local.tee $8 + local.tee $10 global.get $~lib/util/string/__fixmulShift i64.add global.set $~lib/util/string/__fixmulShift - local.get $5 + local.get $6 local.get $0 i64.extend_i32_u i64.shl @@ -3908,46 +3900,46 @@ i64.shr_u i64.const 1 i64.and - local.get $7 + local.get $9 local.get $0 i64.extend_i32_u i64.shl - local.get $5 + local.get $6 i64.const 4294967295 i64.and - local.get $8 + local.get $10 i64.shr_u i64.or i64.add - local.set $5 - local.get $2 + local.set $6 + local.get $3 i32.const 13 i32.sub - local.set $2 + local.set $3 br $for-loop|7 end end - local.get $2 + local.get $3 call $~lib/math/ipow32 local.tee $0 i64.extend_i32_u - local.get $5 + local.get $6 i64.const 4294967295 i64.and i64.mul - local.set $7 + local.set $9 i64.const 32 local.get $0 i64.extend_i32_u - local.get $5 + local.get $6 i64.const 32 i64.shr_u i64.mul - local.get $7 + local.get $9 i64.const 32 i64.shr_u i64.add - local.tee $5 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 @@ -3955,11 +3947,11 @@ local.tee $0 i64.extend_i32_u i64.sub - local.tee $8 + local.tee $10 global.get $~lib/util/string/__fixmulShift i64.add global.set $~lib/util/string/__fixmulShift - local.get $7 + local.get $9 local.get $0 i64.extend_i32_u i64.shl @@ -3967,14 +3959,14 @@ i64.shr_u i64.const 1 i64.and - local.get $5 + local.get $6 local.get $0 i64.extend_i32_u i64.shl - local.get $7 + local.get $9 i64.const 4294967295 i64.and - local.get $8 + local.get $10 i64.shr_u i64.or i64.add @@ -3984,10 +3976,10 @@ call $~lib/math/NativeMath.scalbn end end - local.set $9 + local.set $11 end - local.get $9 - local.get $12 + local.get $11 + local.get $13 f64.copysign return end @@ -4490,11 +4482,11 @@ local.get $1 local.tee $4 call $~lib/string/String#get:length - local.tee $9 + local.tee $10 i32.le_u if local.get $3 - local.get $9 + local.get $10 i32.lt_u if (result i32) local.get $0 @@ -4513,7 +4505,7 @@ local.get $5 call $~lib/string/String#get:length local.set $2 - local.get $9 + local.get $10 i32.eqz if local.get $2 @@ -4534,7 +4526,7 @@ i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $6 + local.tee $4 local.get $5 local.get $2 i32.const 1 @@ -4542,26 +4534,24 @@ call $~lib/memory/memory.copy local.get $2 local.set $1 - i32.const 0 - local.set $4 loop $for-loop|0 - local.get $4 + local.get $9 local.get $3 i32.lt_u if - local.get $6 + local.get $4 local.get $1 i32.const 1 i32.shl i32.add local.get $0 - local.get $4 + local.get $9 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 - local.get $6 + local.get $4 local.get $1 i32.const 1 i32.add @@ -4578,19 +4568,19 @@ local.get $2 i32.add local.set $1 - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 + local.set $9 br $for-loop|0 end end - local.get $6 + local.get $4 call $~lib/rt/pure/__retain return end local.get $2 - local.get $9 + local.get $10 i32.eq if local.get $3 @@ -4623,7 +4613,7 @@ i32.shl call $~lib/memory/memory.copy local.get $3 - local.get $9 + local.get $10 i32.add local.set $7 br $while-continue|1 @@ -4640,7 +4630,7 @@ local.get $4 local.get $7 call $~lib/string/String#indexOf - local.tee $10 + local.tee $9 i32.const -1 i32.xor if @@ -4678,7 +4668,7 @@ i32.const 1 i32.shl i32.add - local.get $10 + local.get $9 local.get $7 i32.sub local.tee $7 @@ -5328,7 +5318,7 @@ local.set $2 local.get $1 call $~lib/string/String#get:length - local.tee $9 + local.tee $8 if local.get $5 i32.eqz @@ -5406,11 +5396,11 @@ local.get $1 local.get $4 call $~lib/string/String#indexOf - local.tee $8 + local.tee $7 i32.const -1 i32.xor if - local.get $8 + local.get $7 local.get $4 i32.sub local.tee $6 @@ -5423,7 +5413,7 @@ local.tee $6 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $10 + local.tee $9 local.get $0 local.get $4 i32.const 1 @@ -5432,7 +5422,7 @@ local.get $6 call $~lib/memory/memory.copy local.get $3 - local.get $10 + local.get $9 call $~lib/array/Array<~lib/string/String>#push else local.get $3 @@ -5440,17 +5430,17 @@ call $~lib/array/Array<~lib/string/String>#push end local.get $2 - local.get $7 + local.get $10 i32.const 1 i32.add - local.tee $7 + local.tee $10 i32.eq if local.get $3 return end + local.get $7 local.get $8 - local.get $9 i32.add local.set $4 br $while-continue|1 diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1d10307b22..dc1adebb97 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -426,40 +426,37 @@ (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $2 + local.set $1 local.get $0 - local.tee $1 if - i32.const 0 - local.set $0 - local.get $1 + local.get $0 call $~lib/string/String#get:length i32.const 1 i32.shl local.set $3 loop $for-loop|0 - local.get $0 + local.get $2 local.get $3 i32.lt_u if - local.get $2 - local.get $0 local.get $1 + local.get $0 + local.get $2 i32.add i32.load8_u i32.xor i32.const 16777619 i32.mul - local.set $2 - local.get $0 + local.set $1 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end end - local.get $2 + local.get $1 ) (func $~lib/util/string/compareImpl (; 8 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index d979f4bd0c..51182021f4 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -214,7 +214,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -226,7 +226,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -251,39 +251,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -295,25 +293,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -325,24 +323,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -351,7 +349,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -361,7 +359,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -378,6 +376,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -463,7 +462,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -475,7 +474,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -484,7 +483,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -492,8 +491,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -553,12 +552,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -575,17 +573,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -597,7 +594,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -605,22 +602,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -633,12 +630,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -770,16 +767,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -791,18 +788,18 @@ unreachable end i32.const 7392 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 8960 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 7392 @@ -817,7 +814,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -834,10 +831,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -850,7 +847,7 @@ i32.const 7392 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/prepareSize (; 11 ;) (param $0 i32) (result i32) local.get $0 @@ -881,12 +878,11 @@ local.get $1 i32.const 256 i32.lt_u - if (result i32) + if local.get $1 i32.const 4 i32.shr_u local.set $1 - i32.const 0 else local.get $1 i32.const 536870904 @@ -919,17 +915,16 @@ local.get $2 i32.const 7 i32.sub + local.set $2 end - local.tee $2 + local.get $1 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $2 i32.const 23 i32.lt_u - if (result i32) - local.get $1 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -4404,7 +4399,8 @@ i32.const 16 i32.add ) - (func $~lib/typedarray/Int8Array#filter (; 92 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 92 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4412,101 +4408,92 @@ (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 + i32.const 6 + call $~lib/typedarray/Int8Array#constructor 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 + 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 i32.load offset=8 - local.set $4 + local.set $5 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $4 + local.set $4 + local.get $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 + local.set $6 + local.get $1 i32.load offset=4 - local.set $7 - i32.const 0 local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if local.get $0 - local.get $7 + local.get $3 i32.add i32.load8_s - local.set $6 + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $0 + local.get $7 + local.get $3 local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 if local.get $2 - local.get $5 - i32.add local.get $6 + i32.add + local.get $7 i32.store8 local.get $2 i32.const 1 i32.add local.set $2 end - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $0 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> (; 93 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Int8Array#constructor 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 5 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#filter - local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4516,7 +4503,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -4528,7 +4515,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Int8Array#__get i32.const 3 @@ -4541,7 +4528,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Int8Array#__get i32.const 4 @@ -4554,7 +4541,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Int8Array#__get i32.const 5 @@ -4567,19 +4554,20 @@ call $~lib/builtins/abort unreachable end - local.get $0 - 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 (; 94 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 93 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (; 95 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 94 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4587,101 +4575,92 @@ (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor local.tee $1 - i32.load offset=8 - local.set $4 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $4 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 - i32.load offset=4 - local.set $7 i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s + 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 + local.get $1 + 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 + i32.load offset=8 + local.set $5 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.set $4 + local.get $5 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $6 + local.get $1 + i32.load offset=4 + local.set $0 + loop $for-loop|0 + local.get $3 + local.get $5 + i32.lt_s if local.get $0 - local.get $7 + local.get $3 i32.add i32.load8_u - local.set $6 + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $0 + local.get $7 + local.get $3 local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $2 - local.get $5 - i32.add local.get $6 + i32.add + local.get $7 i32.store8 local.get $2 i32.const 1 i32.add local.set $2 end - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $0 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> (; 96 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint8Array#constructor 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 5 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#filter - local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4691,7 +4670,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -4703,7 +4682,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array#__get i32.const 3 @@ -4716,7 +4695,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8Array#__get i32.const 4 @@ -4729,7 +4708,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8Array#__get i32.const 5 @@ -4742,12 +4721,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (; 97 ;) (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 95 ;) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4755,101 +4735,92 @@ (local $5 i32) (local $6 i32) (local $7 i32) - local.get $0 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor 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 + local.get $1 + 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 i32.load offset=8 - local.set $4 + local.set $5 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $4 + local.set $4 + local.get $5 i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $5 - local.get $0 + local.set $6 + local.get $1 i32.load offset=4 - local.set $7 - i32.const 0 local.set $0 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $3 + local.get $5 i32.lt_s if local.get $0 - local.get $7 + local.get $3 i32.add i32.load8_u - local.set $6 + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $6 - local.get $0 + local.get $7 + local.get $3 local.get $1 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 if local.get $2 - local.get $5 - i32.add local.get $6 + i32.add + local.get $7 i32.store8 local.get $2 i32.const 1 i32.add local.set $2 end - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end - local.get $3 - local.get $5 + local.get $4 + local.get $6 local.get $2 call $~lib/rt/tlsf/__realloc local.tee $0 call $~lib/rt/pure/__retain i32.store - local.get $3 + local.get $4 local.get $2 i32.store offset=8 - local.get $3 + local.get $4 local.get $0 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> (; 98 ;) - (local $0 i32) - (local $1 i32) - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor 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 5 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#filter - local.tee $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset if i32.const 0 @@ -4859,7 +4830,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load offset=8 i32.const 3 i32.ne @@ -4871,7 +4842,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 @@ -4884,7 +4855,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 1 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 @@ -4897,7 +4868,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 2 call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 @@ -4910,12 +4881,12 @@ call $~lib/builtins/abort unreachable end - local.get $0 - 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 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 96 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -4924,7 +4895,7 @@ i32.const 2 i32.gt_s ) - (func $~lib/typedarray/Int16Array#filter (; 100 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (; 97 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4933,16 +4904,15 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $1 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 + local.set $1 i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.shl i32.const 0 @@ -4951,15 +4921,13 @@ local.get $0 i32.load offset=4 local.set $7 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s if local.get $7 - local.get $4 + local.get $3 i32.const 1 i32.shl i32.add @@ -4968,49 +4936,49 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $4 - local.get $1 + local.get $3 + local.get $0 call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 if local.get $5 - local.get $0 + local.get $4 i32.const 1 i32.shl i32.add local.get $6 i32.store16 - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $2 local.get $5 - local.get $0 + local.get $4 i32.const 1 i32.shl - local.tee $2 - call $~lib/rt/tlsf/__realloc local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $3 local.get $2 - i32.store offset=8 - local.get $3 local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 101 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (; 98 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5105,14 +5073,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 102 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 99 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint16Array#filter (; 103 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (; 100 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5121,16 +5089,15 @@ (local $6 i32) (local $7 i32) local.get $0 - local.tee $1 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 + local.set $1 i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.shl i32.const 0 @@ -5139,15 +5106,13 @@ local.get $0 i32.load offset=4 local.set $7 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s if local.get $7 - local.get $4 + local.get $3 i32.const 1 i32.shl i32.add @@ -5156,49 +5121,49 @@ i32.const 3 global.set $~argumentsLength local.get $6 - local.get $4 - local.get $1 + local.get $3 + local.get $0 call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 if local.get $5 - local.get $0 + local.get $4 i32.const 1 i32.shl i32.add local.get $6 i32.store16 - local.get $0 + local.get $4 i32.const 1 i32.add - local.set $0 + local.set $4 end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $for-loop|0 end end - local.get $3 + local.get $2 local.get $5 - local.get $0 + local.get $4 i32.const 1 i32.shl - local.tee $2 - call $~lib/rt/tlsf/__realloc local.tee $0 + call $~lib/rt/tlsf/__realloc + local.tee $1 call $~lib/rt/pure/__retain i32.store - local.get $3 local.get $2 - i32.store offset=8 - local.get $3 local.get $0 + i32.store offset=8 + local.get $2 + local.get $1 i32.store offset=4 - local.get $3 + local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 104 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (; 101 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5293,12 +5258,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 102 ;) (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 (; 106 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#filter (; 103 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5309,25 +5274,23 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $6 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if local.get $6 @@ -5336,24 +5299,24 @@ i32.shl i32.add i32.load - local.set $5 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $0 i32.const 2 i32.gt_s if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl i32.add - local.get $5 - i32.store local.get $0 + i32.store + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -5363,8 +5326,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl local.tee $0 @@ -5381,7 +5344,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 107 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (; 104 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5476,12 +5439,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 108 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 105 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint32Array#filter (; 109 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (; 106 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5492,25 +5455,23 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 local.set $6 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if local.get $6 @@ -5519,24 +5480,24 @@ i32.shl i32.add i32.load - local.set $5 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $0 i32.const 2 i32.gt_u if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl i32.add - local.get $5 - i32.store local.get $0 + i32.store + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -5546,8 +5507,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl local.tee $0 @@ -5564,7 +5525,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 110 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (; 107 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5659,67 +5620,65 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 111 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 108 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_s ) - (func $~lib/typedarray/Int64Array#filter (; 112 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (; 109 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - (local $6 i32) + (local $5 i32) + (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 - local.set $6 - i32.const 0 local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if - local.get $6 + local.get $0 local.get $1 i32.const 3 i32.shl i32.add i64.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $6 i64.const 2 i64.gt_s if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 i64.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -5729,8 +5688,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl local.tee $0 @@ -5747,7 +5706,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 113 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (; 110 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -5842,67 +5801,65 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 114 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 111 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.gt_u ) - (func $~lib/typedarray/Uint64Array#filter (; 115 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (; 112 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - (local $6 i32) + (local $5 i32) + (local $6 i64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 - local.set $6 - i32.const 0 local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if - local.get $6 + local.get $0 local.get $1 i32.const 3 i32.shl i32.add i64.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $6 i64.const 2 i64.gt_u if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 i64.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -5912,8 +5869,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl local.tee $0 @@ -5930,7 +5887,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 116 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (; 113 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6025,67 +5982,65 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 117 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 114 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.gt ) - (func $~lib/typedarray/Float32Array#filter (; 118 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (; 115 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) - (local $6 i32) + (local $5 i32) + (local $6 f32) local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 - local.set $6 - i32.const 0 local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if - local.get $6 + local.get $0 local.get $1 i32.const 2 i32.shl i32.add f32.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $6 f32.const 2 f32.gt if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl i32.add - local.get $5 + local.get $6 f32.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -6095,8 +6050,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 2 i32.shl local.tee $0 @@ -6113,7 +6068,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 119 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (; 116 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6208,67 +6163,65 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 120 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 117 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.gt ) - (func $~lib/typedarray/Float64Array#filter (; 121 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (; 118 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) - (local $6 i32) + (local $5 i32) + (local $6 f64) local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 + local.set $4 i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc local.set $2 - local.get $3 + local.get $4 i32.const 3 i32.shl i32.const 0 call $~lib/rt/tlsf/__alloc - local.set $4 + local.set $5 local.get $0 i32.load offset=4 - local.set $6 - i32.const 0 local.set $0 loop $for-loop|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if - local.get $6 + local.get $0 local.get $1 i32.const 3 i32.shl i32.add f64.load - local.set $5 + local.set $6 i32.const 3 global.set $~argumentsLength - local.get $5 + local.get $6 f64.const 2 f64.gt if - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl i32.add - local.get $5 + local.get $6 f64.store - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 end local.get $1 i32.const 1 @@ -6278,8 +6231,8 @@ end end local.get $2 - local.get $4 - local.get $0 + local.get $5 + local.get $3 i32.const 3 i32.shl local.tee $0 @@ -6296,7 +6249,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 122 ;) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (; 119 ;) (local $0 i32) (local $1 i32) i32.const 6 @@ -6391,32 +6344,32 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 123 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 120 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 124 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 121 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $2 local.get $3 i32.add @@ -6425,8 +6378,11 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6434,34 +6390,34 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 125 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 122 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#some (; 126 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 123 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $2 local.get $3 i32.add @@ -6470,8 +6426,11 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6479,37 +6438,37 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 127 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 124 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 128 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 125 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 1 @@ -6520,8 +6479,11 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6529,36 +6491,36 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 129 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 126 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $~lib/typedarray/Uint16Array#some (; 130 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 127 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 1 @@ -6569,8 +6531,11 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6578,35 +6543,35 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 131 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 128 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 132 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 129 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 2 @@ -6617,8 +6582,11 @@ local.get $0 local.get $1 call_indirect (type $i32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6626,39 +6594,39 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 133 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 130 ;) (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 (; 134 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 131 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 135 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 132 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 3 @@ -6669,8 +6637,11 @@ local.get $0 local.get $1 call_indirect (type $i64_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6678,39 +6649,39 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 136 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 133 ;) (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 (; 137 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 134 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 135 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 2 @@ -6721,8 +6692,11 @@ local.get $0 local.get $1 call_indirect (type $f32_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6730,40 +6704,40 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 139 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 136 ;) (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 (; 140 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 141 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 138 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 i32.const 3 global.set $~argumentsLength - i32.const 1 local.get $3 local.get $2 i32.const 3 @@ -6774,8 +6748,11 @@ local.get $0 local.get $1 call_indirect (type $f64_i32_i32_=>_i32) - br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - drop + if + i32.const 1 + local.set $5 + br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + end local.get $2 i32.const 1 i32.add @@ -6783,15 +6760,15 @@ br $for-loop|0 end end - i32.const 0 end + local.get $5 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 142 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 139 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 143 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 140 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6830,14 +6807,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 141 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 145 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 142 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6876,7 +6853,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#findIndex (; 146 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 143 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6919,14 +6896,14 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 144 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 148 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 145 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6969,7 +6946,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#findIndex (; 149 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 146 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7012,12 +6989,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 150 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 147 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 151 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 148 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7060,12 +7037,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 152 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 149 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 153 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 150 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7108,12 +7085,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 154 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 151 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 155 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 152 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7156,12 +7133,12 @@ end local.get $2 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 156 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 153 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 157 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 154 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -7171,17 +7148,18 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 158 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 155 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7189,7 +7167,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $2 local.get $3 i32.add @@ -7200,7 +7177,6 @@ call_indirect (type $i32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7209,33 +7185,35 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 159 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 156 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 160 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 157 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - i32.const 3 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 + loop $for-loop|0 + local.get $2 + local.get $4 + i32.lt_s + if + i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $2 local.get $3 i32.add @@ -7246,7 +7224,6 @@ call_indirect (type $i32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7255,9 +7232,11 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 158 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7267,19 +7246,20 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 162 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 159 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7287,7 +7267,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 1 @@ -7300,7 +7279,6 @@ call_indirect (type $i32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7309,21 +7287,24 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $~lib/typedarray/Uint16Array#every (; 163 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 160 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7331,7 +7312,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 1 @@ -7344,7 +7324,6 @@ call_indirect (type $i32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7353,27 +7332,30 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 164 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 161 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 165 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 162 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7381,7 +7363,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 2 @@ -7394,7 +7375,6 @@ call_indirect (type $i32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7403,27 +7383,30 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 166 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 163 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.eqz ) - (func $~lib/typedarray/Int64Array#every (; 167 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 164 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7431,7 +7414,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 3 @@ -7444,7 +7426,6 @@ call_indirect (type $i64_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7453,15 +7434,17 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 168 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 165 ;) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.eqz ) - (func $~lib/math/NativeMathf.mod (; 169 ;) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 166 ;) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7608,25 +7591,26 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 170 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 167 ;) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 171 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 168 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7634,7 +7618,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 2 @@ -7647,7 +7630,6 @@ call_indirect (type $f32_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7656,9 +7638,11 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $~lib/math/NativeMath.mod (; 172 ;) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 169 ;) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -7812,25 +7796,26 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 173 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 170 ;) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 174 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 171 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - i32.load offset=4 - local.set $3 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $4 + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $4 + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 loop $for-loop|0 local.get $2 local.get $4 @@ -7838,7 +7823,6 @@ if i32.const 3 global.set $~argumentsLength - i32.const 0 local.get $3 local.get $2 i32.const 3 @@ -7851,7 +7835,6 @@ call_indirect (type $f64_i32_i32_=>_i32) i32.eqz br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - drop local.get $2 i32.const 1 i32.add @@ -7860,9 +7843,11 @@ end end i32.const 1 + local.set $5 end + local.get $5 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 172 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and @@ -7907,7 +7892,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 176 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 173 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7940,7 +7925,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 177 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 174 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and @@ -7985,7 +7970,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 178 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 175 ;) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -8026,7 +8011,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 179 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 176 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8063,7 +8048,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 180 ;) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 177 ;) (param $0 i64) (param $1 i32) (param $2 i32) i32.const 1696 local.get $1 call $~lib/array/Array#__get @@ -8105,7 +8090,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 181 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 178 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8142,7 +8127,7 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 182 ;) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 179 ;) (param $0 f32) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -8184,7 +8169,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 183 ;) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 180 ;) (param $0 f64) (param $1 i32) (param $2 i32) local.get $0 i32.const 1696 local.get $1 @@ -8226,7 +8211,7 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#reverse (; 184 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 181 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8237,26 +8222,24 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if - local.get $0 + local.get $1 local.get $4 i32.add local.tee $2 i32.load8_s local.set $5 local.get $2 - local.get $1 + local.get $0 local.get $4 i32.add local.tee $2 @@ -8265,20 +8248,20 @@ local.get $2 local.get $5 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 185 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 182 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8434,7 +8417,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#reverse (; 186 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 183 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8445,26 +8428,24 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if - local.get $0 + local.get $1 local.get $4 i32.add local.tee $2 i32.load8_u local.set $5 local.get $2 - local.get $1 + local.get $0 local.get $4 i32.add local.tee $2 @@ -8473,20 +8454,20 @@ local.get $2 local.get $5 i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $~lib/typedarray/Uint8Array#subarray (; 187 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 184 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8547,7 +8528,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 188 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 185 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8696,7 +8677,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 186 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8757,7 +8738,7 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 190 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 187 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -8906,7 +8887,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#reverse (; 191 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 188 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -8917,22 +8898,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 1 i32.shl i32.add @@ -8941,7 +8920,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add @@ -8951,20 +8930,20 @@ local.get $2 local.get $5 i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $~lib/typedarray/Int16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 189 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9032,7 +9011,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 193 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 190 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9187,7 +9166,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#reverse (; 194 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 191 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9198,22 +9177,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 1 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 1 i32.shl i32.add @@ -9222,7 +9199,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 1 i32.shl i32.add @@ -9232,20 +9209,20 @@ local.get $2 local.get $5 i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $~lib/typedarray/Uint16Array#subarray (; 195 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 192 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9313,7 +9290,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 196 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 193 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9462,7 +9439,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#reverse (; 197 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 194 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9473,22 +9450,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add @@ -9497,7 +9472,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -9507,20 +9482,20 @@ local.get $2 local.get $5 i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 198 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 195 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9664,7 +9639,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 196 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9732,7 +9707,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 200 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 197 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9875,7 +9850,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#reverse (; 201 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 198 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9886,22 +9861,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add @@ -9910,7 +9883,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -9920,20 +9893,20 @@ local.get $2 local.get $5 i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $~lib/typedarray/Int64Array#subarray (; 202 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 199 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10001,7 +9974,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 203 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 200 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10147,7 +10120,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 201 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10215,7 +10188,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 205 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 202 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10361,7 +10334,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#reverse (; 206 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 203 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10372,22 +10345,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add @@ -10396,7 +10367,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 2 i32.shl i32.add @@ -10406,20 +10377,20 @@ local.get $2 local.get $5 f32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $~lib/typedarray/Float32Array#subarray (; 207 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 204 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10487,7 +10458,7 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 208 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 205 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10633,7 +10604,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#reverse (; 209 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 206 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -10644,22 +10615,20 @@ local.tee $3 i32.load offset=4 local.set $4 - i32.const 0 - local.set $0 local.get $3 i32.load offset=8 i32.const 3 i32.shr_u i32.const 1 i32.sub - local.set $1 + local.set $0 loop $for-loop|0 - local.get $0 local.get $1 + local.get $0 i32.lt_u if local.get $4 - local.get $0 + local.get $1 i32.const 3 i32.shl i32.add @@ -10668,7 +10637,7 @@ local.set $5 local.get $2 local.get $4 - local.get $1 + local.get $0 i32.const 3 i32.shl i32.add @@ -10678,20 +10647,20 @@ local.get $2 local.get $5 f64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $for-loop|0 end end local.get $3 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 210 ;) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 207 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10838,7 +10807,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#indexOf (; 211 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#indexOf (; 208 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -10900,7 +10869,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf (; 212 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf (; 209 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 @@ -10957,7 +10926,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 213 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#lastIndexOf|trampoline (; 210 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -10978,7 +10947,7 @@ local.get $2 call $~lib/typedarray/Int8Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 214 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> (; 211 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11398,7 +11367,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 215 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> (; 212 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11815,7 +11784,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 216 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> (; 213 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12232,7 +12201,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#indexOf (; 217 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#indexOf (; 214 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -12298,7 +12267,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf (; 218 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf (; 215 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 @@ -12359,7 +12328,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 219 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#lastIndexOf|trampoline (; 216 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -12382,7 +12351,7 @@ local.get $2 call $~lib/typedarray/Int16Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 220 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> (; 217 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12801,7 +12770,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 221 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> (; 218 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13218,7 +13187,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#indexOf (; 222 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#indexOf (; 219 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -13282,7 +13251,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf (; 223 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf (; 220 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 @@ -13341,7 +13310,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 224 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#lastIndexOf|trampoline (; 221 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -13364,7 +13333,7 @@ local.get $2 call $~lib/typedarray/Int32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 225 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> (; 222 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13780,7 +13749,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 226 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> (; 223 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14195,7 +14164,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#indexOf (; 227 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#indexOf (; 224 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -14259,7 +14228,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf (; 228 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf (; 225 ;) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 @@ -14318,7 +14287,7 @@ end local.get $2 ) - (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 229 ;) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/typedarray/Int64Array#lastIndexOf|trampoline (; 226 ;) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -14341,7 +14310,7 @@ local.get $2 call $~lib/typedarray/Int64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 230 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> (; 227 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14757,7 +14726,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 231 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> (; 228 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15173,7 +15142,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float32Array#indexOf (; 232 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#indexOf (; 229 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -15237,7 +15206,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf (; 233 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf (; 230 ;) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 @@ -15296,7 +15265,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 234 ;) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/typedarray/Float32Array#lastIndexOf|trampoline (; 231 ;) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15319,7 +15288,7 @@ local.get $2 call $~lib/typedarray/Float32Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 235 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> (; 232 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -15735,7 +15704,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#indexOf (; 236 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#indexOf (; 233 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -15799,7 +15768,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 237 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf (; 234 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 @@ -15858,7 +15827,7 @@ end local.get $2 ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 238 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 235 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) block $1of1 block $0of1 @@ -15881,7 +15850,7 @@ local.get $2 call $~lib/typedarray/Float64Array#lastIndexOf ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 239 ;) + (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 236 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16298,7 +16267,7 @@ local.get $0 call $~lib/rt/pure/__release ) - (func $~lib/util/number/decimalCount32 (; 240 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 237 ;) (param $0 i32) (result i32) i32.const 1 i32.const 2 local.get $0 @@ -16346,7 +16315,7 @@ i32.lt_u select ) - (func $~lib/util/number/utoa_simple (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 238 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -16373,7 +16342,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa32 (; 242 ;) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 239 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16415,7 +16384,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/string/String#get:length (; 243 ;) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 240 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub @@ -16423,7 +16392,7 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/number/itoa_stream (; 244 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -16478,7 +16447,7 @@ end local.get $2 ) - (func $~lib/string/String#substring (; 245 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 242 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16552,7 +16521,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/string/joinIntegerArray (; 246 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 243 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16591,28 +16560,26 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.add i32.load8_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -16621,10 +16588,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -16634,35 +16601,35 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.add i32.load8_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Int8Array#join (; 247 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#join (; 244 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/string/compareImpl (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 245 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -16738,7 +16705,7 @@ end i32.const 0 ) - (func $~lib/string/String.__eq (; 249 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 246 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -16772,7 +16739,7 @@ call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/util/number/utoa32 (; 250 ;) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 247 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -16795,7 +16762,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 248 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -16825,7 +16792,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 252 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 249 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16864,28 +16831,26 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.add i32.load8_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -16894,10 +16859,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -16907,35 +16872,35 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.add i32.load8_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Uint8Array#join (; 253 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#join (; 250 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 i32.load offset=8 call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 254 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -16990,7 +16955,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 252 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17029,16 +16994,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 1 @@ -17046,13 +17009,13 @@ i32.add i32.load16_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -17061,10 +17024,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -17074,8 +17037,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 1 @@ -17083,21 +17046,21 @@ i32.add i32.load16_s call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Int16Array#join (; 256 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#join (; 253 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17106,7 +17069,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 254 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17136,7 +17099,7 @@ call $~lib/util/number/utoa_simple local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 255 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17175,16 +17138,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 1 @@ -17192,13 +17153,13 @@ i32.add i32.load16_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -17207,10 +17168,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -17220,8 +17181,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 1 @@ -17229,21 +17190,21 @@ i32.add i32.load16_u call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Uint16Array#join (; 259 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#join (; 256 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17252,7 +17213,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 257 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17294,7 +17255,7 @@ end local.get $2 ) - (func $~lib/util/string/joinIntegerArray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17333,16 +17294,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 2 @@ -17350,13 +17309,13 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -17365,10 +17324,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -17378,8 +17337,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 2 @@ -17387,21 +17346,21 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Int32Array#join (; 262 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#join (; 259 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17410,7 +17369,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 263 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 260 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -17434,7 +17393,7 @@ call $~lib/util/number/utoa_simple local.get $0 ) - (func $~lib/util/string/joinIntegerArray (; 264 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 261 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -17473,16 +17432,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 2 @@ -17490,13 +17447,13 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -17505,10 +17462,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -17518,8 +17475,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 2 @@ -17527,21 +17484,21 @@ i32.add i32.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Uint32Array#join (; 265 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#join (; 262 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17550,7 +17507,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount64 (; 266 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 263 ;) (param $0 i64) (result i32) i32.const 10 i32.const 11 i32.const 12 @@ -17603,7 +17560,7 @@ i64.lt_u select ) - (func $~lib/util/number/utoa_simple (; 267 ;) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa_simple (; 264 ;) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) loop $do-continue|0 local.get $1 @@ -17633,7 +17590,7 @@ br_if $do-continue|0 end ) - (func $~lib/util/number/itoa_stream (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $0 @@ -17694,7 +17651,7 @@ end local.get $3 ) - (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 266 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i64) (local $4 i32) @@ -17791,16 +17748,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $6 i32.const 3 @@ -17808,13 +17763,13 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $5 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -17823,10 +17778,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $5 i32.add - local.set $1 + local.set $2 end local.get $6 i32.const 1 @@ -17836,8 +17791,8 @@ end end local.get $7 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $4 i32.const 3 @@ -17845,21 +17800,21 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Int64Array#join (; 270 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#join (; 267 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -17868,7 +17823,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/itoa_stream (; 271 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 268 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -17908,7 +17863,7 @@ end local.get $1 ) - (func $~lib/util/string/joinIntegerArray (; 272 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -17985,16 +17940,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $6 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $6 i32.const 3 @@ -18002,13 +17955,13 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $5 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -18017,10 +17970,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $5 i32.add - local.set $1 + local.set $2 end local.get $6 i32.const 1 @@ -18030,8 +17983,8 @@ end end local.get $7 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 3 @@ -18039,21 +17992,21 @@ i32.add i64.load call $~lib/util/number/itoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Uint64Array#join (; 273 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 270 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -18062,7 +18015,7 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/genDigits (; 274 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 271 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -18453,7 +18406,7 @@ local.get $6 end ) - (func $~lib/util/number/prettify (; 275 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 272 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz @@ -18698,7 +18651,7 @@ end end ) - (func $~lib/util/number/dtoa_core (; 276 ;) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 273 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) (local $4 i32) @@ -18991,7 +18944,7 @@ local.get $8 i32.add ) - (func $~lib/util/number/dtoa (; 277 ;) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 274 ;) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 @@ -19045,7 +18998,7 @@ call $~lib/rt/tlsf/checkUsedBlock call $~lib/rt/tlsf/freeBlock ) - (func $~lib/util/number/dtoa_stream (; 278 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 275 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -19116,7 +19069,7 @@ local.get $2 call $~lib/util/number/dtoa_core ) - (func $~lib/util/string/joinFloatArray (; 279 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 276 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -19156,16 +19109,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 2 @@ -19174,13 +19125,13 @@ f32.load f64.promote_f32 call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -19189,10 +19140,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -19202,8 +19153,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 2 @@ -19212,21 +19163,21 @@ f32.load f64.promote_f32 call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Float32Array#join (; 280 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#join (; 277 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -19235,7 +19186,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $~lib/util/string/joinFloatArray (; 281 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinFloatArray (; 278 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -19274,16 +19225,14 @@ i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 local.get $5 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $5 i32.const 3 @@ -19291,13 +19240,13 @@ i32.add f64.load call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add - local.set $1 + local.set $2 local.get $4 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add @@ -19306,10 +19255,10 @@ i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.get $4 i32.add - local.set $1 + local.set $2 end local.get $5 i32.const 1 @@ -19319,8 +19268,8 @@ end end local.get $6 - local.get $2 local.get $1 + local.get $2 local.get $0 local.get $3 i32.const 3 @@ -19328,21 +19277,21 @@ i32.add f64.load call $~lib/util/number/dtoa_stream - local.get $1 + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Float64Array#join (; 282 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#join (; 279 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 @@ -19351,7 +19300,7 @@ i32.shr_u call $~lib/util/string/joinFloatArray ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 283 ;) (param $0 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 280 ;) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 1073741808 @@ -19374,7 +19323,7 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 284 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap|trampoline (; 281 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $2of2 @@ -19462,7 +19411,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 285 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 282 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 i32.const 16 @@ -19532,61 +19481,60 @@ local.get $3 call $~lib/rt/pure/__retain ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 286 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> (; 283 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.tee $5 + local.tee $3 call $~lib/typedarray/Int8Array#constructor - local.tee $6 - local.set $3 + local.tee $2 + local.set $4 loop $for-loop|0 - local.get $2 local.get $5 + local.get $3 i32.lt_s if - local.get $3 - local.get $2 + local.get $4 + local.get $5 i32.const 3296 - local.get $2 + local.get $5 call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 + local.set $5 br $for-loop|0 end end - local.get $3 + local.get $4 i32.load - local.get $3 + local.get $4 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $4 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $4 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 + local.set $5 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $2 + local.get $5 i32.const 16 i32.sub i32.load offset=12 - local.tee $1 + local.tee $0 i32.gt_u if i32.const 368 @@ -19596,34 +19544,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $0 + local.get $0 + local.set $1 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 + local.tee $0 + local.get $5 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $0 - i32.store offset=8 local.get $1 - local.get $2 + i32.store offset=8 + local.get $0 + local.get $5 i32.store offset=4 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain local.set $0 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $4 - local.get $5 + local.get $1 + local.get $3 i32.lt_s if - local.get $3 local.get $4 + local.get $1 call $~lib/typedarray/Int8Array#__get local.get $0 - local.get $4 + local.get $1 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -19634,21 +19584,21 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 287 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> (; 284 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19657,13 +19607,13 @@ (local $5 i32) i32.const 3308 i32.load - local.tee $3 + local.tee $2 call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $3 + local.get $2 i32.lt_s if local.get $1 @@ -19691,23 +19641,25 @@ i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $0 + local.set $3 i32.const 1 global.set $~argumentsLength - local.get $0 + local.get $3 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline local.set $4 + i32.const 0 + local.set $0 loop $for-loop|1 + local.get $0 local.get $2 - local.get $3 i32.lt_s if local.get $1 - local.get $2 + local.get $0 call $~lib/typedarray/Uint8Array#__get local.get $4 - local.get $2 + local.get $0 call $~lib/typedarray/Uint8Array#__get i32.ne if @@ -19718,73 +19670,72 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|1 end end local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 288 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> (; 285 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load - local.tee $5 + local.tee $3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $6 - local.set $3 + local.tee $2 + local.set $4 loop $for-loop|0 - local.get $2 local.get $5 + local.get $3 i32.lt_s if - local.get $3 - local.get $2 + local.get $4 + local.get $5 i32.const 3296 - local.get $2 + local.get $5 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 + local.set $5 br $for-loop|0 end end - local.get $3 + local.get $4 i32.load - local.get $3 + local.get $4 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $4 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $3 + local.get $4 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $2 + local.set $5 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $2 + local.get $5 i32.const 16 i32.sub i32.load offset=12 - local.tee $1 + local.tee $0 i32.gt_u if i32.const 368 @@ -19794,34 +19745,36 @@ call $~lib/builtins/abort unreachable end - local.get $1 - local.set $0 + local.get $0 + local.set $1 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $2 + local.tee $0 + local.get $5 call $~lib/rt/pure/__retain i32.store - local.get $1 local.get $0 - i32.store offset=8 local.get $1 - local.get $2 + i32.store offset=8 + local.get $0 + local.get $5 i32.store offset=4 - local.get $1 + local.get $0 call $~lib/rt/pure/__retain local.set $0 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $4 - local.get $5 + local.get $1 + local.get $3 i32.lt_s if - local.get $3 local.get $4 + local.get $1 call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.get $4 + local.get $1 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -19832,40 +19785,39 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $1 i32.const 1 i32.add - local.set $4 + local.set $1 br $for-loop|1 end end - local.get $6 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 289 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> (; 286 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int16Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -19882,13 +19834,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -19900,7 +19852,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -19910,7 +19862,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 1 i32.and if @@ -19924,29 +19876,31 @@ i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Int16Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Int16Array#__get i32.ne if @@ -19957,40 +19911,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 290 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 287 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20005,13 +19958,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20023,7 +19976,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20033,7 +19986,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 1 i32.and if @@ -20047,29 +20000,31 @@ i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Uint16Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Uint16Array#__get i32.ne if @@ -20080,40 +20035,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 291 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 288 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int32Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20126,13 +20080,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20144,7 +20098,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20154,7 +20108,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 3 i32.and if @@ -20168,29 +20122,31 @@ i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Int32Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Int32Array#__get i32.ne if @@ -20201,40 +20157,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 292 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 289 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint32Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20247,13 +20202,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20265,7 +20220,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20275,7 +20230,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 3 i32.and if @@ -20289,29 +20244,31 @@ i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Uint32Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Uint32Array#__get i32.ne if @@ -20322,40 +20279,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 293 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 290 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int64Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20369,13 +20325,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20387,7 +20343,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20397,7 +20353,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 7 i32.and if @@ -20411,29 +20367,31 @@ i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Int64Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Int64Array#__get i64.ne if @@ -20444,40 +20402,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 294 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 291 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint64Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20491,13 +20448,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20509,7 +20466,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20519,7 +20476,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 7 i32.and if @@ -20533,29 +20490,31 @@ i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Uint64Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Uint64Array#__get i64.ne if @@ -20566,40 +20525,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 295 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 292 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Float32Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20613,13 +20571,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20631,7 +20589,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20641,7 +20599,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 3 i32.and if @@ -20655,29 +20613,31 @@ i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Float32Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Float32Array#__get f32.ne if @@ -20688,40 +20648,39 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 296 ;) + (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 293 ;) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Float64Array#constructor - local.tee $6 - local.set $1 + local.tee $5 + local.set $2 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $1 + local.get $2 local.get $0 i32.const 3296 local.get $0 @@ -20735,13 +20694,13 @@ br $for-loop|0 end end - local.get $1 + local.get $2 i32.load - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $1 + local.get $2 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20753,7 +20712,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $5 + local.tee $3 i32.gt_u if i32.const 368 @@ -20763,7 +20722,7 @@ call $~lib/builtins/abort unreachable end - local.get $5 + local.get $3 i32.const 7 i32.and if @@ -20777,29 +20736,31 @@ i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $5 + local.get $1 + local.get $3 i32.store offset=8 - local.get $2 + local.get $1 local.get $0 i32.store offset=4 - local.get $2 + local.get $1 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 + i32.const 0 + local.set $1 loop $for-loop|1 - local.get $3 + local.get $1 local.get $4 i32.lt_s if + local.get $2 local.get $1 - local.get $3 call $~lib/typedarray/Float64Array#__get - local.get $2 local.get $3 + local.get $1 call $~lib/typedarray/Float64Array#__get f64.ne if @@ -20810,21 +20771,21 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $1 i32.const 1 i32.add - local.set $3 + local.set $1 br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 297 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 294 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -20843,17 +20804,15 @@ end local.get $0 i32.load offset=4 - local.set $1 + local.set $0 i32.const 3364 i32.load local.set $2 i32.const 3372 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if @@ -20861,21 +20820,21 @@ local.get $1 i32.add local.get $2 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add i32.load i32.store8 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 298 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> (; 295 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -20935,7 +20894,7 @@ end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 299 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (; 296 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -20959,7 +20918,7 @@ i32.load offset=4 i32.const 6 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -20968,10 +20927,8 @@ i32.const 3 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if @@ -20979,21 +20936,21 @@ local.get $2 i32.add local.get $3 - local.get $0 + local.get $2 i32.const 3 i32.shl i32.add i64.load i64.store8 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 300 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (; 297 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 local.get $0 @@ -21015,7 +20972,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 301 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> (; 298 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -21039,7 +20996,7 @@ i32.load offset=4 i32.const 4 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -21048,10 +21005,8 @@ i32.const 1 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if @@ -21059,21 +21014,21 @@ local.get $2 i32.add local.get $3 - local.get $0 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s i32.store8 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 302 ;) (param $0 i32) + (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 299 ;) (param $0 i32) i32.const 3580 i32.load i32.const 7 @@ -21099,7 +21054,7 @@ i32.load call $~lib/memory/memory.copy ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 303 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> (; 300 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21246,6 +21201,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + i32.const 0 + local.set $0 i32.const 3516 i32.load i32.const 2 @@ -21265,8 +21222,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $12 @@ -21353,14 +21308,14 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/array/Array#__unchecked_get (; 304 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 301 ;) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load offset=4 local.get $1 i32.add i32.load8_u ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 305 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (; 302 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21420,7 +21375,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 306 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (; 303 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21567,6 +21522,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 0 + local.set $0 i32.const 3516 i32.load i32.const 2 @@ -21586,8 +21543,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $12 @@ -21674,7 +21629,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 307 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (; 304 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -21734,9 +21689,9 @@ end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 308 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i64) - (local $4 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (; 305 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i64) local.get $2 i32.const 0 i32.lt_s @@ -21769,41 +21724,39 @@ local.get $0 i32.load offset=4 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 - local.set $4 + local.set $2 local.get $1 i32.load offset=8 i32.const 3 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $3 local.get $1 i32.lt_s if local.get $0 - local.get $2 + local.get $3 i32.add - local.get $4 - local.get $0 + local.get $2 + local.get $3 i32.const 3 i32.shl i32.add i64.load - local.tee $3 + local.tee $4 i32.wrap_i64 i32.const 31 i32.shr_s i32.const -1 i32.xor i64.extend_i32_s - local.get $3 + local.get $4 i32.const 255 - local.get $3 + local.get $4 i32.wrap_i64 i32.sub i32.const 31 @@ -21812,15 +21765,15 @@ i64.or i64.and i64.store8 - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 309 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (; 306 ;) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) local.get $2 @@ -21858,51 +21811,49 @@ local.set $2 local.get $1 i32.load offset=4 - local.set $3 + local.set $4 local.get $1 i32.load offset=8 i32.const 1 i32.shr_u - local.set $4 - i32.const 0 - local.set $0 + local.set $1 loop $for-loop|0 - local.get $0 - local.get $4 + local.get $3 + local.get $1 i32.lt_s if - local.get $0 local.get $2 + local.get $3 i32.add + local.get $4 local.get $3 - local.get $0 i32.const 1 i32.shl i32.add i32.load16_s - local.tee $1 + local.tee $0 i32.const 31 i32.shr_s i32.const -1 i32.xor - local.get $1 + local.get $0 i32.const 255 - local.get $1 + local.get $0 i32.sub i32.const 31 i32.shr_s i32.or i32.and i32.store8 - local.get $0 + local.get $3 i32.const 1 i32.add - local.set $0 + local.set $3 br $for-loop|0 end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 310 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (; 307 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -21933,19 +21884,19 @@ call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $3 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $3 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set @@ -21966,7 +21917,7 @@ i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 - local.set $0 + local.set $2 block $folding-inner0 i32.const 3372 i32.load @@ -21974,39 +21925,37 @@ i32.load offset=8 i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $2 i32.load offset=4 local.set $9 i32.const 3364 i32.load - local.set $3 + local.set $4 i32.const 3372 i32.load - local.set $4 - i32.const 0 - local.set $0 + local.set $5 loop $for-loop|0 local.get $0 - local.get $4 + local.get $5 i32.lt_s if local.get $0 local.get $9 i32.add - local.get $3 + local.get $4 local.get $0 i32.const 2 i32.shl i32.add i32.load - local.tee $5 + local.tee $2 i32.const 31 i32.shr_s i32.const -1 i32.xor - local.get $5 + local.get $2 i32.const 255 - local.get $5 + local.get $2 i32.sub i32.const 31 i32.shr_s @@ -22029,6 +21978,8 @@ call $~lib/rt/pure/__retain local.tee $9 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 i32.const 3436 i32.load i32.const 3 @@ -22041,24 +21992,22 @@ i32.load offset=4 i32.const 3 i32.add - local.set $3 + local.set $4 i32.const 3428 i32.load - local.set $4 + local.set $5 i32.const 3436 i32.load local.set $6 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $6 i32.lt_s if local.get $0 - local.get $3 - i32.add local.get $4 + i32.add + local.get $5 local.get $0 i32.const 2 i32.shl @@ -22094,7 +22043,7 @@ i32.const 4112 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> local.get $1 local.get $7 @@ -22107,8 +22056,10 @@ i32.const 4144 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $5 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 i32.const 3516 i32.load i32.const 2 @@ -22128,8 +22079,6 @@ i32.const 3516 i32.load local.set $11 - i32.const 0 - local.set $0 loop $for-loop|01 local.get $0 local.get $11 @@ -22179,12 +22128,14 @@ local.get $0 call $~lib/rt/pure/__release local.get $1 - local.get $2 + local.get $3 call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> local.get $1 local.get $8 i32.const 4 call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 i32.const 3580 i32.load i32.const 7 @@ -22204,8 +22155,6 @@ i32.const 3580 i32.load local.set $11 - i32.const 0 - local.set $0 loop $for-loop|02 local.get $0 local.get $11 @@ -22218,14 +22167,14 @@ local.get $10 i32.add i32.load8_s - local.tee $5 + local.tee $2 i32.const 31 i32.shr_s i32.const -1 i32.xor - local.get $5 + local.get $2 i32.const 255 - local.get $5 + local.get $2 i32.sub i32.const 31 i32.shr_s @@ -22252,7 +22201,7 @@ call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -22260,10 +22209,10 @@ call $~lib/rt/pure/__release local.get $9 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 return end i32.const 368 @@ -22273,7 +22222,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 311 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 308 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22294,41 +22243,39 @@ end local.get $0 i32.load offset=4 - local.set $1 + local.set $0 i32.const 3364 i32.load local.set $2 i32.const 3372 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 1 i32.shl i32.add local.get $2 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add i32.load i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 312 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> (; 309 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22398,7 +22345,7 @@ end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 313 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (; 310 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22424,7 +22371,7 @@ i32.load offset=4 i32.const 12 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -22433,34 +22380,32 @@ i32.const 3 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 1 i32.shl i32.add local.get $3 - local.get $0 + local.get $2 i32.const 3 i32.shl i32.add i64.load i64.store16 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 314 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (; 311 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -22480,39 +22425,37 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 local.get $1 i32.load offset=8 local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 1 i32.shl i32.add - local.get $0 + local.get $2 local.get $3 i32.add i32.load8_u i32.store16 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 315 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (; 312 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 1 @@ -22542,7 +22485,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 316 ;) (param $0 i32) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (; 313 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -22567,39 +22510,37 @@ i32.load offset=4 i32.const 14 i32.add - local.set $1 + local.set $0 i32.const 3572 i32.load local.set $2 i32.const 3580 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 1 i32.shl i32.add - local.get $0 + local.get $1 local.get $2 i32.add i32.load8_s i32.store16 - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 317 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> (; 314 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -22750,6 +22691,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 i32.const 3516 i32.load i32.const 2 @@ -22771,8 +22714,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $12 @@ -22861,7 +22802,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 318 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> (; 315 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -22931,7 +22872,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 319 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> (; 316 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23082,6 +23023,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + i32.const 0 + local.set $0 i32.const 3516 i32.load i32.const 2 @@ -23103,8 +23046,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $12 @@ -23193,7 +23134,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 320 ;) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 317 ;) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 0 i32.lt_s @@ -23234,7 +23175,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 321 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> (; 318 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23296,7 +23237,7 @@ end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 322 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (; 319 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23322,7 +23263,7 @@ i32.load offset=4 i32.const 24 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -23331,34 +23272,32 @@ i32.const 3 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 2 i32.shl i32.add local.get $3 - local.get $0 + local.get $2 i32.const 3 i32.shl i32.add i64.load i64.store32 - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 323 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (; 320 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23378,39 +23317,37 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 local.get $1 i32.load offset=8 local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 2 i32.shl i32.add - local.get $0 + local.get $2 local.get $3 i32.add i32.load8_u i32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 324 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> (; 321 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -23436,7 +23373,7 @@ i32.load offset=4 i32.const 16 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -23445,34 +23382,32 @@ i32.const 1 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 2 i32.shl i32.add local.get $3 - local.get $0 + local.get $2 i32.const 1 i32.shl i32.add i32.load16_s i32.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 325 ;) (param $0 i32) + (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (; 322 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -23497,39 +23432,37 @@ i32.load offset=4 i32.const 28 i32.add - local.set $1 + local.set $0 i32.const 3572 i32.load local.set $2 i32.const 3580 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 2 i32.shl i32.add - local.get $0 + local.get $1 local.get $2 i32.add i32.load8_s i32.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 326 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> (; 323 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -23681,6 +23614,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + i32.const 0 + local.set $1 i32.const 3516 i32.load i32.const 2 @@ -23702,8 +23637,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $1 local.get $12 @@ -23792,7 +23725,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 327 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (; 324 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -23854,7 +23787,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 328 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (; 325 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24006,6 +23939,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + i32.const 0 + local.set $1 i32.const 3516 i32.load i32.const 2 @@ -24027,8 +23962,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $1 local.get $12 @@ -24117,7 +24050,7 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 329 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 326 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24138,41 +24071,39 @@ end local.get $0 i32.load offset=4 - local.set $1 + local.set $0 i32.const 3364 i32.load local.set $2 i32.const 3372 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3 i32.shl i32.add local.get $2 - local.get $0 + local.get $1 i32.const 2 i32.shl i32.add i64.load32_s i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $~lib/array/Array#__unchecked_get (; 330 ;) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__unchecked_get (; 327 ;) (param $0 i32) (param $1 i32) (result i64) local.get $0 i32.load offset=4 local.get $1 @@ -24181,7 +24112,7 @@ i32.add i64.load ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 331 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> (; 328 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -24243,7 +24174,7 @@ end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 332 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (; 329 ;) (param $0 i32) (param $1 i32) local.get $1 i32.load offset=8 i32.const 3 @@ -24273,7 +24204,7 @@ i32.load offset=8 call $~lib/memory/memory.copy ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 333 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (; 330 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24293,39 +24224,37 @@ end local.get $0 i32.load offset=4 - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 local.get $1 i32.load offset=8 local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 3 i32.shl i32.add - local.get $0 + local.get $2 local.get $3 i32.add i64.load8_u i64.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 334 ;) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> (; 331 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 @@ -24351,7 +24280,7 @@ i32.load offset=4 i32.const 32 i32.add - local.set $2 + local.set $0 local.get $1 i32.load offset=4 local.set $3 @@ -24360,34 +24289,32 @@ i32.const 1 i32.shr_u local.set $1 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $2 local.get $1 i32.lt_s if - local.get $2 local.get $0 + local.get $2 i32.const 3 i32.shl i32.add local.get $3 - local.get $0 + local.get $2 i32.const 1 i32.shl i32.add i64.load16_s i64.store - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|0 end end ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 335 ;) (param $0 i32) + (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (; 332 ;) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -24412,39 +24339,37 @@ i32.load offset=4 i32.const 56 i32.add - local.set $1 + local.set $0 i32.const 3572 i32.load local.set $2 i32.const 3580 i32.load local.set $3 - i32.const 0 - local.set $0 loop $for-loop|0 - local.get $0 + local.get $1 local.get $3 i32.lt_s if - local.get $1 local.get $0 + local.get $1 i32.const 3 i32.shl i32.add - local.get $0 + local.get $1 local.get $2 i32.add i64.load8_s i64.store - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 336 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> (; 333 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24596,6 +24521,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.const 0 + local.set $1 i32.const 3516 i32.load i32.const 2 @@ -24617,8 +24544,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $1 local.get $12 @@ -24706,7 +24631,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 337 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (; 334 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i64) @@ -24768,7 +24693,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 338 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> (; 335 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -24920,6 +24845,8 @@ call $~lib/rt/pure/__retain local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + i32.const 0 + local.set $1 i32.const 3516 i32.load i32.const 2 @@ -24941,8 +24868,6 @@ i32.const 3516 i32.load local.set $12 - i32.const 0 - local.set $1 loop $for-loop|00 local.get $1 local.get $12 @@ -25030,7 +24955,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 339 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (; 336 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 i32) @@ -25100,7 +25025,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 340 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> (; 337 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25161,7 +25086,7 @@ i32.const 10 call $~lib/typedarray/Float32Array#constructor local.tee $1 - local.set $0 + local.set $7 block $folding-inner0 i32.const 3372 i32.load @@ -25171,23 +25096,21 @@ i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $7 i32.load offset=4 - local.set $9 + local.set $7 i32.const 3364 i32.load local.set $10 i32.const 3372 i32.load - local.set $7 - i32.const 0 - local.set $0 + local.set $8 loop $for-loop|0 local.get $0 - local.get $7 + local.get $8 i32.lt_s if - local.get $9 + local.get $7 local.get $0 i32.const 2 i32.shl @@ -25213,7 +25136,7 @@ i32.const 6608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $7 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $1 i32.const 3424 @@ -25228,6 +25151,8 @@ call $~lib/rt/pure/__retain local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + i32.const 0 + local.set $0 local.get $5 i32.load offset=8 i32.const 3 @@ -25244,7 +25169,7 @@ i32.load offset=4 i32.const 24 i32.add - local.set $7 + local.set $8 local.get $5 i32.load offset=4 local.set $2 @@ -25253,14 +25178,12 @@ i32.const 3 i32.shr_u local.set $4 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $4 i32.lt_s if - local.get $7 + local.get $8 local.get $0 i32.const 2 i32.shl @@ -25287,8 +25210,10 @@ i32.const 6784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + i32.const 0 + local.set $0 local.get $3 i32.load offset=8 local.get $1 @@ -25305,12 +25230,10 @@ local.set $4 local.get $3 i32.load offset=8 - local.set $8 - i32.const 0 - local.set $0 + local.set $9 loop $for-loop|01 local.get $0 - local.get $8 + local.get $9 i32.lt_s if local.get $2 @@ -25331,6 +25254,8 @@ br $for-loop|01 end end + i32.const 0 + local.set $0 local.get $6 i32.load offset=8 i32.const 1 @@ -25355,12 +25280,10 @@ i32.load offset=8 i32.const 1 i32.shr_u - local.set $8 - i32.const 0 - local.set $0 + local.set $9 loop $for-loop|02 local.get $0 - local.get $8 + local.get $9 i32.lt_s if local.get $2 @@ -25383,6 +25306,8 @@ br $for-loop|02 end end + i32.const 0 + local.set $0 i32.const 3580 i32.load i32.const 7 @@ -25403,12 +25328,10 @@ local.set $4 i32.const 3580 i32.load - local.set $8 - i32.const 0 - local.set $0 + local.set $9 loop $for-loop|03 local.get $0 - local.get $8 + local.get $9 i32.lt_s if local.get $2 @@ -25448,11 +25371,11 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $9 + local.get $7 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release return end @@ -25463,7 +25386,7 @@ call $~lib/builtins/abort unreachable ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 341 ;) (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> (; 338 ;) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -25531,7 +25454,7 @@ end end ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 342 ;) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (; 339 ;) (local $0 i32) (local $1 i32) (local $2 i32) @@ -25592,7 +25515,7 @@ i32.const 10 call $~lib/typedarray/Float64Array#constructor local.tee $1 - local.set $0 + local.set $9 block $folding-inner0 i32.const 3372 i32.load @@ -25602,28 +25525,26 @@ i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $0 + local.get $9 i32.load offset=4 - local.set $10 + local.set $9 i32.const 3364 i32.load - local.set $9 + local.set $10 i32.const 3372 i32.load local.set $4 - i32.const 0 - local.set $0 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $10 + local.get $9 local.get $0 i32.const 3 i32.shl i32.add - local.get $9 + local.get $10 local.get $0 i32.const 2 i32.shl @@ -25645,8 +25566,10 @@ i32.const 6912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $9 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 0 + local.set $0 i32.const 3436 i32.load i32.const 3 @@ -25661,21 +25584,19 @@ i32.load offset=4 i32.const 24 i32.add - local.set $9 + local.set $10 i32.const 3428 i32.load local.set $4 i32.const 3436 i32.load local.set $2 - i32.const 0 - local.set $0 loop $for-loop|00 local.get $0 local.get $2 i32.lt_s if - local.get $9 + local.get $10 local.get $0 i32.const 3 i32.shl @@ -25702,8 +25623,10 @@ i32.const 7056 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 0 + local.set $0 local.get $7 i32.load offset=8 i32.const 3 @@ -25729,8 +25652,6 @@ i32.const 3 i32.shr_u local.set $5 - i32.const 0 - local.set $0 loop $for-loop|01 local.get $0 local.get $5 @@ -25764,6 +25685,8 @@ call $~lib/rt/pure/__retain local.tee $4 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> + i32.const 0 + local.set $0 local.get $3 i32.load offset=8 local.get $1 @@ -25781,8 +25704,6 @@ local.get $3 i32.load offset=8 local.set $6 - i32.const 0 - local.set $0 loop $for-loop|02 local.get $0 local.get $6 @@ -25806,6 +25727,8 @@ br $for-loop|02 end end + i32.const 0 + local.set $0 local.get $8 i32.load offset=8 i32.const 1 @@ -25831,8 +25754,6 @@ i32.const 1 i32.shr_u local.set $6 - i32.const 0 - local.set $0 loop $for-loop|03 local.get $0 local.get $6 @@ -25858,6 +25779,8 @@ br $for-loop|03 end end + i32.const 0 + local.set $0 i32.const 3580 i32.load i32.const 7 @@ -25879,8 +25802,6 @@ i32.const 3580 i32.load local.set $6 - i32.const 0 - local.set $0 loop $for-loop|04 local.get $0 local.get $6 @@ -25923,10 +25844,10 @@ call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release return @@ -25938,156 +25859,10 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (; 343 ;) (param $0 i32) (param $1 i32) - (local $2 f32) - (local $3 i32) - (local $4 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $3 - local.get $1 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $1 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $3 - i32.add - local.get $4 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $2 - local.get $2 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $2 - 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|0 - end - end - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (; 344 ;) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $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 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $4 - i32.const 0 - local.set $0 - loop $for-loop|0 - local.get $0 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - i32.add - local.get $3 - local.get $0 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $1 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $1 - i32.const 255 - local.get $1 - 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 - ) - (func $start:std/typedarray (; 345 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) + (func $start:std/typedarray (; 340 ;) + (local $0 i32) + (local $1 i32) + (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -26608,7 +26383,7 @@ i32.const 640 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $25 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26632,7 +26407,7 @@ i32.const 672 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -26733,10 +26508,10 @@ call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $24 @@ -26850,7 +26625,7 @@ i32.const 912 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26874,7 +26649,7 @@ i32.const 960 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -26977,10 +26752,10 @@ call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release local.get $24 @@ -27242,14 +27017,14 @@ i32.const 3 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $26 + local.tee $25 i32.const 5 i32.const 2 i32.const 15 i32.const 1136 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $25 + local.tee $26 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -27560,10 +27335,10 @@ call $~lib/rt/pure/__release local.get $27 call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release local.get $25 call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release local.get $24 call $~lib/rt/pure/__release local.get $23 @@ -27900,4319 +27675,4440 @@ br $for-loop|0 end end - block $folding-inner15 - block $folding-inner14 - block $folding-inner13 - block $folding-inner12 - 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 $1 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - local.get $1 - i32.const 3 - 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 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 - local.get $1 - i32.const 4 - 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 - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|00 - local.get $0 - local.get $27 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $28 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $1 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - loop $for-loop|01 - local.get $0 - local.get $27 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $1 - local.get $28 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $1 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 7 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 8 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 9 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 10 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - loop $for-loop|02 + block $folding-inner16 + block $folding-inner15 + block $folding-inner14 + block $folding-inner13 + block $folding-inner12 + 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 $1 - local.get $28 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $21 - local.get $29 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $21 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|02 - end - end - local.get $21 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - i32.const 0 - local.set $1 - f64.const 0 - local.set $22 - local.get $0 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - loop $for-loop|03 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $1 - local.get $28 - i32.lt_s - if - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $29 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $22 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|03 - end - end - local.get $22 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|04 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $1 - local.get $28 - i32.add - i32.load8_s - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|04 - end - end - local.get $0 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - local.get $1 - i32.const 14 - 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 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 - local.get $1 - i32.const 15 - 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 - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|05 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 3 + 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 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $0 - local.get $28 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|05 - end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $29 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $29 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - local.get $29 - i32.load offset=4 - local.set $28 - local.get $29 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $1 - loop $for-loop|06 + 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 local.get $1 + i32.const 4 + 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 + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $29 i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $1 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + loop $for-loop|00 local.get $0 - local.get $28 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $for-loop|06 + local.get $27 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $28 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end - end - local.get $0 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $29 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 18 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 19 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 20 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 21 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 $21 - local.get $1 - i32.load offset=4 - local.set $29 - local.get $1 - 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 + local.get $1 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $29 i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $21 - local.get $29 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - f32.add - local.set $21 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|07 - end - end - local.get $21 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 $22 - local.get $1 - i32.load offset=4 - local.set $29 - local.get $1 - 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 1 + call $~lib/typedarray/Uint16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set i32.const 0 - i32.ge_s - if - i32.const 4 - global.set $~argumentsLength - local.get $22 - local.get $29 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - f64.add - local.set $22 + local.set $0 + i32.const 0 + local.set $1 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + loop $for-loop|01 local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|08 - end - end - local.get $22 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 3 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $28 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $27 - loop $for-loop|09 - local.get $1 - local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 local.get $27 - i32.add - local.get $1 - local.get $26 - i32.add - i32.load8_s - local.tee $25 - local.get $25 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $1 + local.get $28 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end end - end - local.get $29 - local.get $27 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $27 - i32.store offset=4 - local.get $29 - local.get $28 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 4 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $28 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $27 - loop $for-loop|010 local.get $1 - local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.tee $25 - local.get $25 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - local.get $29 - local.get $27 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $27 - i32.store offset=4 - local.get $29 - local.get $28 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - local.set $28 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 5 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $28 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $27 - loop $for-loop|011 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set local.get $1 - local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $27 - i32.add - local.get $1 - local.get $26 - i32.add - i32.load8_u - local.tee $25 - local.get $25 - i32.mul - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 - end - end - local.get $29 - local.get $27 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $27 - i32.store offset=4 - local.get $29 - local.get $28 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 6 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|012 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 7 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 8 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 9 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 10 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + loop $for-loop|02 local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_s - local.tee $23 - local.get $23 - i32.mul - local.set $23 - local.get $24 local.get $28 - i32.add - local.get $23 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $21 + local.get $29 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $21 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|02 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 7 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 1 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|013 - local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 + local.get $21 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + i32.const 0 + local.set $1 + f64.const 0 + local.set $22 + local.get $0 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + loop $for-loop|03 local.get $1 - i32.const 1 - i32.shl - local.tee $24 - i32.add - i32.load16_u - local.tee $23 - local.get $23 - i32.mul - local.set $23 - local.get $24 local.get $28 - i32.add - local.get $23 - i32.store16 + i32.lt_s + if + i32.const 4 + global.set $~argumentsLength + local.get $22 + local.get $29 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $22 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|03 + end + end + local.get $22 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $29 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|04 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|013 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $1 + local.get $28 + i32.add + i32.load8_s + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|04 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 8 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|014 + local.get $0 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.tee $23 - local.get $23 - i32.mul - local.set $23 - local.get $24 - local.get $28 - i32.add - local.get $23 - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|014 - end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 9 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|015 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - i32.load - local.tee $23 - local.get $23 - i32.mul - local.set $23 - local.get $24 - local.get $28 - i32.add - local.get $23 - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|015 - end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 10 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 3 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|016 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 + i32.const 14 + 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 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 + local.get $1 + i32.const 15 + 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 + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $29 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|05 local.get $1 - i32.const 3 - i32.shl - local.tee $24 - i32.add - i64.load - local.tee $20 - local.get $20 - i64.mul - local.set $20 - local.get $24 - local.get $28 - i32.add - local.get $20 - i64.store + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $28 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|05 + end + end + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $29 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $29 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $29 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $29 + i32.load offset=4 + local.set $28 + local.get $29 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $1 + loop $for-loop|06 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|016 + i32.const 0 + i32.ge_s + if + i32.const 4 + global.set $~argumentsLength + local.get $0 + local.get $28 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $for-loop|06 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 11 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 3 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|017 + local.get $0 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $29 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 - local.get $1 - i32.const 3 - i32.shl - local.tee $24 - i32.add - i64.load - local.tee $20 - local.get $20 - i64.mul - local.set $20 - local.get $24 - local.get $28 - i32.add - local.get $20 - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|017 + 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 + local.get $1 + i32.const 18 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 19 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 20 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 21 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 $21 + local.get $1 + i32.load offset=4 + local.set $29 + local.get $1 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $21 + local.get $29 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + f32.add + local.set $21 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 12 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 2 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|018 + local.get $21 + f32.const 6 + f32.ne + br_if $folding-inner1 local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 - local.get $1 - i32.const 2 - i32.shl - local.tee $24 - i32.add - f32.load - local.tee $21 - local.get $21 - f32.mul - local.set $21 - local.get $24 - local.get $28 - i32.add - local.get $21 - f32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|018 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 $22 + local.get $1 + i32.load offset=4 + local.set $29 + local.get $1 + 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 + i32.const 4 + global.set $~argumentsLength + local.get $22 + local.get $29 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + f64.add + local.set $22 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - i32.const 0 - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $27 - local.get $0 - i32.load offset=4 - local.set $26 - i32.const 12 - i32.const 13 - call $~lib/rt/tlsf/__alloc - local.set $29 - local.get $27 - i32.const 3 - i32.shl - local.tee $25 - i32.const 0 - call $~lib/rt/tlsf/__alloc - local.set $28 - loop $for-loop|019 + local.get $22 + f64.const 6 + f64.ne + br_if $folding-inner1 local.get $1 - local.get $27 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $26 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + local.set $28 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 3 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $28 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|09 local.get $1 - i32.const 3 - i32.shl - local.tee $24 - i32.add - f64.load - local.tee $22 - local.get $22 - f64.mul - local.set $22 - local.get $24 local.get $28 - i32.add - local.get $22 - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|019 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.get $1 + local.get $25 + i32.add + i32.load8_s + local.tee $26 + local.get $26 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|09 + end end - end - local.get $29 - local.get $28 - call $~lib/rt/pure/__retain - i32.store - local.get $29 - local.get $28 - i32.store offset=4 - local.get $29 - local.get $25 - i32.store offset=8 - local.get $29 - call $~lib/rt/pure/__retain - 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 $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 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 46 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 47 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 48 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 49 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 50 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 51 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 52 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 53 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 54 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 55 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 56 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 57 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 58 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 59 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 60 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 61 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 62 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 63 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 64 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 65 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 66 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner5 - local.get $1 - i32.const 67 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - 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 - local.get $1 - i32.const 68 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 69 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - 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 - local.get $1 - i32.const 70 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 71 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 - local.get $1 - i32.const 72 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 73 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - i32.const 74 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 75 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - 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 - local.get $1 - i32.const 76 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 77 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 78 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 79 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 80 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 81 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 82 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 83 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 84 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 85 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - 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 - local.get $1 - i32.const 86 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 87 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - 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 - local.get $1 - i32.const 88 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $1 - i32.const 89 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 90 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 91 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 92 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 93 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 94 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 95 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 96 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 97 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 98 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 99 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 100 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 101 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 102 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 103 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 104 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 105 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 106 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 107 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 108 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 109 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 110 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner9 - local.get $1 - i32.const 111 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - local.set $28 - loop $for-loop|020 + local.get $29 + local.get $27 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $27 + i32.store offset=4 + local.get $29 + local.get $28 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + local.set $28 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 4 + call $~lib/rt/tlsf/__alloc + local.set $29 local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $29 - i32.add - i32.load8_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|010 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|020 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.get $1 + local.get $25 + i32.add + i32.load8_u + local.tee $26 + local.get $26 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|010 + end end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 113 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 114 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|021 + local.get $29 + local.get $27 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $27 + i32.store offset=4 + local.get $29 + local.get $28 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + local.set $28 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 5 + call $~lib/rt/tlsf/__alloc + local.set $29 local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $27 + loop $for-loop|011 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|021 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $27 + i32.add + local.get $1 + local.get $25 + i32.add + i32.load8_u + local.tee $26 + local.get $26 + i32.mul + i32.store8 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|011 + end end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $28 - loop $for-loop|022 - local.get $1 + local.get $29 + local.get $27 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $27 + i32.store offset=4 + local.get $29 local.get $28 - i32.lt_s - if - i32.const 3 - global.set $~argumentsLength - local.get $29 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 6 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 1 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|012 local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|022 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 1 + i32.shl + local.tee $24 + i32.add + i32.load16_s + local.tee $23 + local.get $23 + i32.mul + local.set $23 + local.get $24 + local.get $28 + i32.add + local.get $23 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|012 + end end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - 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 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 117 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 118 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 119 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 1696 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 1 - i32.const 1696 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 2 - i32.const 1696 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 120 - 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 - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $28 - loop $for-loop|023 + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 7 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 1 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|013 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 1 + i32.shl + local.tee $24 + i32.add + i32.load16_u + local.tee $23 + local.get $23 + i32.mul + local.set $23 + local.get $24 + local.get $28 + i32.add + local.get $23 + i32.store16 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|013 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 8 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 2 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|014 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 2 + i32.shl + local.tee $24 + i32.add + i32.load + local.tee $23 + local.get $23 + i32.mul + local.set $23 + local.get $24 + local.get $28 + i32.add + local.get $23 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|014 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 9 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 2 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|015 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 2 + i32.shl + local.tee $24 + i32.add + i32.load + local.tee $23 + local.get $23 + i32.mul + local.set $23 + local.get $24 + local.get $28 + i32.add + local.get $23 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|015 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 10 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|016 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 3 + i32.shl + local.tee $24 + i32.add + i64.load + local.tee $20 + local.get $20 + i64.mul + local.set $20 + local.get $24 + local.get $28 + i32.add + local.get $20 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|016 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 11 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|017 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 3 + i32.shl + local.tee $24 + i32.add + i64.load + local.tee $20 + local.get $20 + i64.mul + local.set $20 + local.get $24 + local.get $28 + i32.add + local.get $20 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|017 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 12 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 2 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|018 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 2 + i32.shl + local.tee $24 + i32.add + f32.load + local.tee $21 + local.get $21 + f32.mul + local.set $21 + local.get $24 + local.get $28 + i32.add + local.get $21 + f32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|018 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $0 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + i32.const 0 + local.set $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $27 + local.get $0 + i32.load offset=4 + local.set $25 + i32.const 12 + i32.const 13 + call $~lib/rt/tlsf/__alloc + local.set $29 + local.get $27 + i32.const 3 + i32.shl + local.tee $26 + i32.const 0 + call $~lib/rt/tlsf/__alloc + local.set $28 + loop $for-loop|019 + local.get $1 + local.get $27 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $25 + local.get $1 + i32.const 3 + i32.shl + local.tee $24 + i32.add + f64.load + local.tee $22 + local.get $22 + f64.mul + local.set $22 + local.get $24 + local.get $28 + i32.add + local.get $22 + f64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|019 + end + end + local.get $29 + local.get $28 + call $~lib/rt/pure/__retain + i32.store + local.get $29 + local.get $28 + i32.store offset=4 + local.get $29 + local.get $26 + i32.store offset=8 + local.get $29 + call $~lib/rt/pure/__retain + 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 $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 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 46 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 47 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 48 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 49 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 50 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 51 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 52 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 53 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 54 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 55 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 56 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 57 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 58 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 59 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 60 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 61 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 62 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 63 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 64 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 65 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 66 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner5 + local.get $1 + i32.const 67 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + 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 + local.get $1 + i32.const 68 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 69 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + 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 + local.get $1 + i32.const 70 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 71 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 + local.get $1 + i32.const 72 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 73 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + 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 + local.get $1 + i32.const 74 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 75 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + 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 + local.get $1 + i32.const 76 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 77 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 78 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 79 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 80 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 81 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 82 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 83 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 84 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 85 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + 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 + local.get $1 + i32.const 86 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 87 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + 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 + local.get $1 + i32.const 88 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $1 + i32.const 89 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 90 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 91 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 92 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 93 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 94 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 95 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 96 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 97 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 98 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 99 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 100 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 101 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 102 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 103 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 104 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 105 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 106 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 107 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 108 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 109 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 110 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner9 + local.get $1 + i32.const 111 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + local.set $28 + loop $for-loop|020 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $29 + i32.add + i32.load8_s + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|020 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 113 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 114 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|021 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|021 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $28 + loop $for-loop|022 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $29 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|022 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 117 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 118 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 119 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + global.set $std/typedarray/forEachSelf + local.get $1 + i32.const 0 + i32.const 1696 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i32.const 1696 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i32.const 1696 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 120 + 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 + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $28 + loop $for-loop|023 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $29 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|023 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 1696 + 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 1696 + 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 1696 + 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 + i32.load offset=4 + local.set $29 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $28 + loop $for-loop|024 + local.get $1 + local.get $28 + i32.lt_s + if + i32.const 3 + global.set $~argumentsLength + local.get $29 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|024 + end + end + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + 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 $29 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $29 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 607 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $1 + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $29 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $28 + if (result i32) + i32.const 0 + local.get $28 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $29 + i32.load offset=4 + local.set $25 + loop $while-continue|0 + local.get $1 + local.get $28 + i32.lt_s + if + local.get $25 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $22 + f64.const nan:0x8000000000000 + f64.eq + if (result i32) + i32.const 1 + else + local.get $22 + local.get $22 + f64.ne + end + if + i32.const 1 + local.set $0 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $while-continue|0 + end + end + end + local.get $0 + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 608 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $0 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 613 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $28 + i32.const 0 + local.set $1 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $27 + if (result i32) + i32.const 0 + local.get $27 + i32.ge_s + else + i32.const 1 + end + br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $0 + i32.load offset=4 + local.set $26 + loop $while-continue|025 + local.get $28 + local.get $27 + i32.lt_s + if + local.get $26 + local.get $28 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $21 + f32.const nan:0x400000 + f32.eq + if (result i32) + i32.const 1 + else + local.get $21 + local.get $21 + f32.ne + end + if + i32.const 1 + local.set $1 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $28 + i32.const 1 + i32.add + local.set $28 + br $while-continue|025 + end + end + end + local.get $1 + i32.const 0 + i32.ne + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 304 + i32.const 614 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $29 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Int8Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Uint8Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Int16Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Uint16Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Int32Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + 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 + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Uint32Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Int64Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + 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 + local.get $1 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $0 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner12 + local.get $1 + call $~lib/typedarray/Uint64Array#join + local.tee $29 + i32.const 2000 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner13 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + 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 + local.get $1 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 4 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $0 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $1 + call $~lib/typedarray/Float32Array#join + local.tee $29 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + 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 + local.get $1 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set local.get $1 - local.get $28 - i32.lt_s + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $0 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $1 + call $~lib/typedarray/Float64Array#join + local.tee $29 + i32.const 3168 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + i32.const 2 + global.set $~argumentsLength + local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.tee $29 + i32.load offset=8 if - i32.const 3 - global.set $~argumentsLength - local.get $29 - local.get $1 + i32.const 0 + i32.const 304 + i32.const 691 i32.const 2 - i32.shl - i32.add - f32.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|023 + call $~lib/builtins/abort + unreachable end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - 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 $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 1696 - 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 1696 - 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 1696 - 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 - i32.load offset=4 - local.set $29 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $28 - loop $for-loop|024 + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 local.get $1 - local.get $28 - i32.lt_s + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap|trampoline + local.set $1 + local.get $29 + call $~lib/rt/pure/__release + local.get $1 + i32.load offset=8 if - i32.const 3 - global.set $~argumentsLength - local.get $29 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - local.get $0 - call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|024 + i32.const 0 + i32.const 304 + i32.const 695 + i32.const 2 + call $~lib/builtins/abort + unreachable end - end - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - 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 $0 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $0 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + 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 $29 i32.const 0 - i32.const 304 - i32.const 607 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $29 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $29 i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $1 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $28 i32.const 0 - local.get $0 - i32.load offset=8 + i64.const -10 + call $~lib/typedarray/Int64Array#__set + local.get $28 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set + local.get $28 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set + local.get $28 i32.const 3 + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $27 + i32.const 0 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $27 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $1 + local.get $29 + i32.load offset=8 + i32.const 2 i32.shr_u - local.tee $28 - if (result i32) - i32.const 0 - local.get $28 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop + i32.const 1 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner16 local.get $0 i32.load offset=4 + i32.const 1 + i32.add local.set $26 - loop $while-continue|0 + local.get $29 + i32.load offset=4 + local.set $24 + local.get $29 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $23 + loop $for-loop|026 local.get $1 - local.get $28 + local.get $23 i32.lt_s if - i32.const 1 + local.get $1 local.get $26 + i32.add + local.get $24 local.get $1 - i32.const 3 + i32.const 2 i32.shl i32.add - f64.load - local.tee $22 - f64.const nan:0x8000000000000 - f64.eq + f32.load + local.tee $21 + local.get $21 + f32.sub + f32.const 0 + f32.eq if (result i32) - i32.const 1 + f32.const 0 + f32.const 255 + local.get $21 + f32.min + f32.max + i32.trunc_f32_u else - local.get $22 - local.get $22 - f64.ne + i32.const 0 end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop + i32.store8 local.get $1 i32.const 1 i32.add local.set $1 - br $while-continue|0 + br $for-loop|026 end end + local.get $0 + local.get $28 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if + local.set $1 + local.get $27 + 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 + br_if $folding-inner16 + local.get $0 + i32.load offset=4 + i32.const 8 + i32.add + local.set $26 + local.get $27 + i32.load offset=4 + local.set $24 + local.get $27 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $23 + loop $for-loop|027 + local.get $1 + local.get $23 + i32.lt_s + if + local.get $1 + local.get $26 + i32.add + local.get $24 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $25 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $25 + i32.const 255 + local.get $25 + 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|027 + end + end + local.get $0 + i32.const 10 + i32.const 0 + i32.const 21 + i32.const 7344 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $24 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 i32.const 0 - i32.const 304 - i32.const 608 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $1 i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $1 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 3 + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $25 i32.const 0 - i32.const 304 - i32.const 613 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $25 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $25 i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $29 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $25 + i32.const 3 + i32.const 300 + call $~lib/typedarray/Int16Array#__set i32.const 0 + local.set $26 local.get $1 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $27 - if (result i32) - i32.const 0 - local.get $27 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner16 + local.get $0 + i32.load offset=4 + local.set $23 local.get $1 i32.load offset=4 - local.set $25 - loop $while-continue|025 - local.get $29 - local.get $27 + local.set $19 + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $18 + loop $for-loop|028 + local.get $26 + local.get $18 i32.lt_s if - i32.const 1 - local.get $25 - local.get $29 + local.get $23 + local.get $26 + i32.add + i32.const 255 + local.get $19 + local.get $26 i32.const 2 i32.shl i32.add - f32.load - local.tee $21 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $21 - local.get $21 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $29 + i32.load + local.tee $17 + i32.const 255 + local.get $17 + i32.lt_u + select + i32.store8 + local.get $26 i32.const 1 i32.add - local.set $29 - br $while-continue|025 + local.set $26 + br $for-loop|028 end end + local.get $0 + local.get $25 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + local.get $0 + i32.const 10 i32.const 0 - end - i32.const 0 - i32.ne - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 614 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Int8Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint8Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Int16Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint16Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Int32Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - 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 - local.get $1 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint32Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Int64Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - 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 - local.get $1 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $0 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner12 - local.get $1 - call $~lib/typedarray/Uint64Array#join - local.tee $29 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner13 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - 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 - local.get $1 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $0 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $1 - call $~lib/typedarray/Float32Array#join - local.tee $29 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - 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 - local.get $1 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $0 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $1 - call $~lib/typedarray/Float64Array#join - local.tee $29 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $0 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.tee $29 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 691 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - local.get $1 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength - local.get $0 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap|trampoline - local.set $1 - local.get $29 - call $~lib/rt/pure/__release - local.get $1 - i32.load offset=8 - if - i32.const 0 - i32.const 304 - i32.const 695 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - 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 $1 - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $26 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $26 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $26 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $29 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $29 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $25 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $25 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - local.get $1 - local.get $26 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> - local.get $1 - local.get $29 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $1 - local.get $25 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> - local.get $1 - i32.const 10 - i32.const 0 - i32.const 21 - i32.const 7344 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $24 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $28 - i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $28 - i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $1 - i32.load offset=8 - i32.gt_s - if - i32.const 368 - i32.const 432 - i32.const 1775 - i32.const 46 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=4 - local.set $23 - local.get $0 - i32.load offset=4 - local.set $19 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $18 - i32.const 0 - local.set $27 - loop $for-loop|026 + i32.const 21 + i32.const 7376 + call $~lib/rt/__allocArray + call $~lib/rt/pure/__retain + local.tee $26 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release + local.get $28 + call $~lib/rt/pure/__release local.get $27 - local.get $18 - i32.lt_s - if - local.get $23 - local.get $27 - i32.add - i32.const 255 - local.get $19 - local.get $27 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $17 - i32.const 255 - local.get $17 - i32.lt_u - select - i32.store8 - local.get $27 - i32.const 1 - i32.add - local.set $27 - br $for-loop|026 - end + call $~lib/rt/pure/__release + local.get $24 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $25 + call $~lib/rt/pure/__release + local.get $26 + call $~lib/rt/pure/__release + return end - local.get $1 - local.get $28 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $1 - i32.const 10 i32.const 0 - i32.const 21 - i32.const 7376 - call $~lib/rt/__allocArray - call $~lib/rt/pure/__retain - local.tee $27 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $26 - call $~lib/rt/pure/__release - local.get $29 - call $~lib/rt/pure/__release - local.get $25 - call $~lib/rt/pure/__release - local.get $24 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release - local.get $27 - call $~lib/rt/pure/__release - return + i32.const 304 + i32.const 323 + i32.const 2 + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 304 - i32.const 323 + i32.const 344 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 344 + i32.const 365 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 365 + i32.const 366 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 366 + i32.const 367 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 367 + i32.const 415 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 415 + i32.const 417 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 417 + i32.const 438 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 438 + i32.const 440 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 440 + i32.const 461 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 461 + i32.const 463 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 463 + i32.const 495 i32.const 2 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 495 - i32.const 2 + i32.const 629 + i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 629 + i32.const 630 i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 630 + i32.const 626 i32.const 4 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 304 - i32.const 626 + i32.const 627 i32.const 4 call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 + i32.const 368 + i32.const 432 + i32.const 1775 + i32.const 46 call $~lib/builtins/abort unreachable ) - (func $~start (; 346 ;) + (func $~start (; 341 ;) global.get $~started if return @@ -32222,7 +32118,7 @@ end call $start:std/typedarray ) - (func $~lib/rt/pure/decrement (; 347 ;) (param $0 i32) + (func $~lib/rt/pure/decrement (; 342 ;) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 2b6d821c8b..607cbe75c3 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -117,7 +117,7 @@ (local $5 i32) local.get $1 i32.load - local.tee $3 + local.tee $2 i32.const 1 i32.and i32.eqz @@ -129,7 +129,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const -4 i32.and local.tee $2 @@ -154,39 +154,37 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 local.get $2 i32.clz i32.sub - local.tee $3 + local.tee $4 i32.const 4 i32.sub i32.shr_u i32.const 16 i32.xor local.set $2 - local.get $3 + local.get $4 i32.const 7 i32.sub + local.set $4 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $4 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -198,25 +196,25 @@ end local.get $1 i32.load offset=20 - local.set $4 + local.set $3 local.get $1 i32.load offset=16 local.tee $5 if local.get $5 - local.get $4 + local.get $3 i32.store offset=20 end - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $5 i32.store offset=16 end local.get $1 local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add @@ -228,24 +226,24 @@ if local.get $0 local.get $2 - local.get $3 + local.get $4 i32.const 4 i32.shl i32.add i32.const 2 i32.shl i32.add - local.get $4 + local.get $3 i32.store offset=96 - local.get $4 + local.get $3 i32.eqz if local.get $0 - local.get $3 + local.get $4 i32.const 2 i32.shl i32.add - local.tee $4 + local.tee $3 i32.load offset=4 i32.const 1 local.get $2 @@ -254,7 +252,7 @@ i32.xor i32.and local.set $1 - local.get $4 + local.get $3 local.get $1 i32.store offset=4 local.get $1 @@ -264,7 +262,7 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $4 i32.shl i32.const -1 i32.xor @@ -281,6 +279,7 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if @@ -366,7 +365,7 @@ i32.load local.tee $2 i32.load - local.tee $6 + local.tee $7 i32.const 1 i32.and i32.eqz @@ -378,7 +377,7 @@ call $~lib/builtins/abort unreachable end - local.get $6 + local.get $7 i32.const -4 i32.and i32.const 16 @@ -387,7 +386,7 @@ i32.const -4 i32.and i32.add - local.tee $7 + local.tee $8 i32.const 1073741808 i32.lt_u if @@ -395,8 +394,8 @@ local.get $2 call $~lib/rt/tlsf/removeBlock local.get $2 + local.get $8 local.get $7 - local.get $6 i32.const 3 i32.and i32.or @@ -456,12 +455,11 @@ local.get $2 i32.const 256 i32.lt_u - if (result i32) + if local.get $2 i32.const 4 i32.shr_u local.set $2 - i32.const 0 else local.get $2 i32.const 31 @@ -478,17 +476,16 @@ local.get $3 i32.const 7 i32.sub + local.set $6 end - local.tee $3 + local.get $2 + i32.const 16 + i32.lt_u + i32.const 0 + local.get $6 i32.const 23 i32.lt_u - if (result i32) - local.get $2 - i32.const 16 - i32.lt_u - else - i32.const 0 - end + select i32.eqz if i32.const 0 @@ -500,7 +497,7 @@ end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -508,22 +505,22 @@ i32.shl i32.add i32.load offset=96 - local.set $4 + local.set $3 local.get $1 i32.const 0 i32.store offset=16 local.get $1 - local.get $4 + local.get $3 i32.store offset=20 - local.get $4 + local.get $3 if - local.get $4 + local.get $3 local.get $1 i32.store offset=16 end local.get $0 local.get $2 - local.get $3 + local.get $6 i32.const 4 i32.shl i32.add @@ -536,12 +533,12 @@ local.get $0 i32.load i32.const 1 - local.get $3 + local.get $6 i32.shl i32.or i32.store local.get $0 - local.get $3 + local.get $6 i32.const 2 i32.shl i32.add @@ -673,16 +670,16 @@ (local $1 i32) (local $2 i32) global.get $~lib/rt/tlsf/ROOT - local.tee $1 + local.tee $0 i32.eqz if i32.const 1 memory.size - local.tee $1 + local.tee $0 i32.gt_s if (result i32) i32.const 1 - local.get $1 + local.get $0 i32.sub memory.grow i32.const 0 @@ -694,18 +691,18 @@ unreachable end i32.const 208 - local.tee $1 + local.tee $0 i32.const 0 i32.store i32.const 1776 i32.const 0 i32.store loop $for-loop|0 - local.get $0 + local.get $1 i32.const 23 i32.lt_u if - local.get $0 + local.get $1 i32.const 2 i32.shl i32.const 208 @@ -720,7 +717,7 @@ i32.lt_u if local.get $2 - local.get $0 + local.get $1 i32.const 4 i32.shl i32.add @@ -737,10 +734,10 @@ br $for-loop|1 end end - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $for-loop|0 end end @@ -753,11 +750,12 @@ i32.const 208 global.set $~lib/rt/tlsf/ROOT end - local.get $1 + local.get $0 ) (func $~lib/rt/tlsf/searchBlock (; 10 ;) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + nop local.get $0 i32.load offset=4 i32.const -2 @@ -781,12 +779,12 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load offset=4 - local.tee $1 + local.tee $2 i32.eqz if i32.const 0 @@ -797,9 +795,9 @@ unreachable end local.get $0 - local.get $1 - i32.ctz local.get $2 + i32.ctz + local.get $1 i32.const 4 i32.shl i32.add From 94374490e8dc0a5b058319cee3ccf1223de19d12 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 12 Mar 2020 08:07:41 +0200 Subject: [PATCH 46/51] and second rse --- cli/asc.js | 8 +- .../retain-release-sanity.optimized.wat | 12 +- tests/compiler/std/libm.optimized.wat | 39 +- tests/compiler/std/math.optimized.wat | 39 +- .../std/operator-overloading.optimized.wat | 28 +- tests/compiler/std/string.optimized.wat | 58 +- tests/compiler/std/typedarray.optimized.wat | 532 +++++++++--------- 7 files changed, 348 insertions(+), 368 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 36815e16a9..4d134e35fb 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -775,10 +775,10 @@ exports.main = function main(argv, options, callback) { // add("precompute"); // } add("optimize-instructions"); - // if (optimizeLevel >= 2 || shrinkLevel >= 1) { - // add("rse"); - // } - // add("vacuum"); + if (optimizeLevel >= 2 || shrinkLevel >= 1) { + add("rse"); + } + add("vacuum"); // PassRunner::addDefaultGlobalOptimizationPostPasses if (optimizeLevel >= 2 || shrinkLevel >= 1) { add("dae-optimizing"); diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index b8761e8a04..0444134c58 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -2060,28 +2060,26 @@ local.get $1 local.get $3 i32.store - local.get $2 - local.set $4 local.get $1 local.tee $3 local.get $2 - i32.load local.tee $1 + i32.load + local.tee $4 i32.ne if local.get $3 call $~lib/rt/pure/__retain local.set $3 - local.get $1 + local.get $4 call $~lib/rt/pure/__release end - local.get $4 + local.get $1 local.get $3 i32.store local.get $0 local.tee $3 - local.get $4 - local.tee $1 + local.get $1 i32.load local.tee $4 i32.ne diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index d9fdd1c3e6..3870a71f93 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -4156,20 +4156,20 @@ i32.and i32.const 1083231232 i32.ge_s - if - local.get $5 - local.get $10 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - br_if $folding-inner1 - end + i32.const 0 + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + select + br_if $folding-inner1 end local.get $10 i32.const 2147483647 @@ -6288,13 +6288,10 @@ local.get $3 local.tee $2 if - block $tablify|0 - local.get $2 - i32.const 1 - i32.sub - br_table $case1|1 $case2|1 $case3|1 $tablify|0 - end - br $break|1 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 end local.get $4 return diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 0a85829d9d..e0fc057db8 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -2977,13 +2977,10 @@ local.get $3 local.tee $2 if - block $tablify|0 - local.get $2 - i32.const 1 - i32.sub - br_table $case1|1 $case2|1 $case3|1 $tablify|0 - end - br $break|1 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|1 $case2|1 $case3|1 $break|1 end local.get $4 return @@ -7852,20 +7849,20 @@ i32.and i32.const 1083231232 i32.ge_s - if - local.get $5 - local.get $10 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - br_if $folding-inner1 - end + i32.const 0 + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + select + br_if $folding-inner1 end local.get $10 i32.const 2147483647 diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 783a07b9e7..6a862039d2 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -981,20 +981,20 @@ i32.and i32.const 1083231232 i32.ge_s - if - local.get $5 - local.get $10 - i32.const -1064252416 - i32.sub - i32.or - local.get $1 - local.get $0 - local.get $3 - f64.sub - f64.le - i32.or - br_if $folding-inner1 - end + i32.const 0 + local.get $5 + local.get $10 + i32.const -1064252416 + i32.sub + i32.or + local.get $1 + local.get $0 + local.get $3 + f64.sub + f64.le + i32.or + select + br_if $folding-inner1 end local.get $10 i32.const 2147483647 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 65c9981e5b..62af48f4e5 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -2239,35 +2239,35 @@ return end block $break|0 - block $case6|0 - local.get $0 - i32.const 5760 - i32.eq - local.get $0 - i32.const 8232 - i32.eq - i32.or - local.get $0 - i32.const 8233 - i32.eq - local.get $0 - i32.const 8239 - i32.eq - i32.or - i32.or - br_if $case6|0 - local.get $0 - i32.const 8287 - i32.eq - local.get $0 - i32.const 12288 - i32.eq - i32.or - local.get $0 - i32.const 65279 - i32.eq - i32.or - br_if $case6|0 + local.get $0 + i32.const 5760 + i32.eq + local.get $0 + i32.const 8232 + i32.eq + i32.or + local.get $0 + i32.const 8233 + i32.eq + local.get $0 + i32.const 8239 + i32.eq + i32.or + i32.or + local.get $0 + i32.const 8287 + i32.eq + local.get $0 + i32.const 12288 + i32.eq + i32.or + local.get $0 + i32.const 65279 + i32.eq + i32.or + i32.or + i32.eqz + if br $break|0 end i32.const 1 diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 51182021f4..5f2ba9e660 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -19488,53 +19488,54 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 + local.tee $5 call $~lib/typedarray/Int8Array#constructor - local.tee $2 - local.set $4 + local.tee $6 + local.set $3 loop $for-loop|0 + local.get $2 local.get $5 - local.get $3 i32.lt_s if - local.get $4 - local.get $5 + local.get $3 + local.get $2 i32.const 3296 - local.get $5 + local.get $2 call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s call $~lib/typedarray/Int8Array#__set - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $for-loop|0 end end - local.get $4 + local.get $3 i32.load - local.get $4 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $4 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $4 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $5 + local.set $2 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $5 + local.get $2 i32.const 16 i32.sub i32.load offset=12 - local.tee $0 + local.tee $1 i32.gt_u if i32.const 368 @@ -19544,36 +19545,34 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $1 + local.get $1 + local.set $0 i32.const 12 i32.const 3 call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $5 + local.tee $1 + local.get $2 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=8 local.get $0 - local.get $5 + i32.store offset=8 + local.get $1 + local.get $2 i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/pure/__retain local.set $0 - i32.const 0 - local.set $1 loop $for-loop|1 - local.get $1 - local.get $3 + local.get $4 + local.get $5 i32.lt_s if + local.get $3 local.get $4 - local.get $1 call $~lib/typedarray/Int8Array#__get local.get $0 - local.get $1 + local.get $4 call $~lib/typedarray/Int8Array#__get i32.ne if @@ -19584,16 +19583,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 i32.const 1 i32.add - local.set $1 + local.set $4 br $for-loop|1 end end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -19607,13 +19606,13 @@ (local $5 i32) i32.const 3308 i32.load - local.tee $2 + local.tee $3 call $~lib/typedarray/Uint8Array#constructor local.tee $5 local.set $1 loop $for-loop|0 local.get $0 - local.get $2 + local.get $3 i32.lt_s if local.get $1 @@ -19641,25 +19640,23 @@ i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $3 + local.set $0 i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $0 i32.const 0 call $~lib/typedarray/Uint8Array.wrap|trampoline local.set $4 - i32.const 0 - local.set $0 loop $for-loop|1 - local.get $0 local.get $2 + local.get $3 i32.lt_s if local.get $1 - local.get $0 + local.get $2 call $~lib/typedarray/Uint8Array#__get local.get $4 - local.get $0 + local.get $2 call $~lib/typedarray/Uint8Array#__get i32.ne if @@ -19670,16 +19667,16 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $for-loop|1 end end local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release @@ -19691,51 +19688,52 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load - local.tee $3 + local.tee $5 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 - local.set $4 + local.tee $6 + local.set $3 loop $for-loop|0 + local.get $2 local.get $5 - local.get $3 i32.lt_s if - local.get $4 - local.get $5 + local.get $3 + local.get $2 i32.const 3296 - local.get $5 + local.get $2 call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $for-loop|0 end end - local.get $4 + local.get $3 i32.load - local.get $4 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $4 + local.get $3 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $4 + local.get $3 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice - local.set $5 + local.set $2 i32.const 1 global.set $~argumentsLength i32.const 0 - local.get $5 + local.get $2 i32.const 16 i32.sub i32.load offset=12 - local.tee $0 + local.tee $1 i32.gt_u if i32.const 368 @@ -19745,36 +19743,34 @@ call $~lib/builtins/abort unreachable end - local.get $0 - local.set $1 + local.get $1 + local.set $0 i32.const 12 i32.const 5 call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $5 + local.tee $1 + local.get $2 call $~lib/rt/pure/__retain i32.store - local.get $0 local.get $1 - i32.store offset=8 local.get $0 - local.get $5 + i32.store offset=8 + local.get $1 + local.get $2 i32.store offset=4 - local.get $0 + local.get $1 call $~lib/rt/pure/__retain local.set $0 - i32.const 0 - local.set $1 loop $for-loop|1 - local.get $1 - local.get $3 + local.get $4 + local.get $5 i32.lt_s if + local.get $3 local.get $4 - local.get $1 call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 - local.get $1 + local.get $4 call $~lib/typedarray/Uint8ClampedArray#__get i32.ne if @@ -19785,16 +19781,16 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $4 i32.const 1 i32.add - local.set $1 + local.set $4 br $for-loop|1 end end - local.get $2 + local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $2 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release @@ -19806,18 +19802,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int16Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -19834,13 +19831,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -19852,7 +19849,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -19862,7 +19859,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1 i32.and if @@ -19876,31 +19873,29 @@ i32.const 12 i32.const 6 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Int16Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Int16Array#__get i32.ne if @@ -19911,18 +19906,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> (; 287 ;) @@ -19932,18 +19927,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -19958,13 +19954,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -19976,7 +19972,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -19986,7 +19982,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1 i32.and if @@ -20000,31 +19996,29 @@ i32.const 12 i32.const 7 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Uint16Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Uint16Array#__get i32.ne if @@ -20035,18 +20029,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> (; 288 ;) @@ -20056,18 +20050,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int32Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20080,13 +20075,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20098,7 +20093,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20108,7 +20103,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 3 i32.and if @@ -20122,31 +20117,29 @@ i32.const 12 i32.const 8 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Int32Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Int32Array#__get i32.ne if @@ -20157,18 +20150,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> (; 289 ;) @@ -20178,18 +20171,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint32Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20202,13 +20196,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20220,7 +20214,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20230,7 +20224,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 3 i32.and if @@ -20244,31 +20238,29 @@ i32.const 12 i32.const 9 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Uint32Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Uint32Array#__get i32.ne if @@ -20279,18 +20271,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> (; 290 ;) @@ -20300,18 +20292,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Int64Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20325,13 +20318,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20343,7 +20336,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20353,7 +20346,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 7 i32.and if @@ -20367,31 +20360,29 @@ i32.const 12 i32.const 10 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Int64Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Int64Array#__get i64.ne if @@ -20402,18 +20393,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> (; 291 ;) @@ -20423,18 +20414,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Uint64Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20448,13 +20440,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20466,7 +20458,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20476,7 +20468,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 7 i32.and if @@ -20490,31 +20482,29 @@ i32.const 12 i32.const 11 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Uint64Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Uint64Array#__get i64.ne if @@ -20525,18 +20515,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> (; 292 ;) @@ -20546,18 +20536,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Float32Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20571,13 +20562,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20589,7 +20580,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20599,7 +20590,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 3 i32.and if @@ -20613,31 +20604,29 @@ i32.const 12 i32.const 12 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Float32Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Float32Array#__get f32.ne if @@ -20648,18 +20637,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> (; 293 ;) @@ -20669,18 +20658,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) i32.const 3308 i32.load local.tee $4 call $~lib/typedarray/Float64Array#constructor - local.tee $5 - local.set $2 + local.tee $6 + local.set $1 loop $for-loop|0 local.get $0 local.get $4 i32.lt_s if - local.get $2 + local.get $1 local.get $0 i32.const 3296 local.get $0 @@ -20694,13 +20684,13 @@ br $for-loop|0 end end - local.get $2 + local.get $1 i32.load - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 call $~lib/arraybuffer/ArrayBufferView#get:byteOffset - local.get $2 + local.get $1 i32.load offset=8 i32.add call $~lib/arraybuffer/ArrayBuffer#slice @@ -20712,7 +20702,7 @@ i32.const 16 i32.sub i32.load offset=12 - local.tee $3 + local.tee $5 i32.gt_u if i32.const 368 @@ -20722,7 +20712,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 7 i32.and if @@ -20736,31 +20726,29 @@ i32.const 12 i32.const 13 call $~lib/rt/tlsf/__alloc - local.tee $1 + local.tee $2 local.get $0 call $~lib/rt/pure/__retain i32.store - local.get $1 - local.get $3 + local.get $2 + local.get $5 i32.store offset=8 - local.get $1 + local.get $2 local.get $0 i32.store offset=4 - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.set $3 - i32.const 0 - local.set $1 + local.set $2 loop $for-loop|1 - local.get $1 + local.get $3 local.get $4 i32.lt_s if - local.get $2 local.get $1 + local.get $3 call $~lib/typedarray/Float64Array#__get + local.get $2 local.get $3 - local.get $1 call $~lib/typedarray/Float64Array#__get f64.ne if @@ -20771,18 +20759,18 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|1 end end - local.get $5 + local.get $6 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (; 294 ;) (param $0 i32) From 2fd004e47128a76d261bd7967a44023850fdc557 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 12 Mar 2020 08:13:25 +0200 Subject: [PATCH 47/51] rebuild examples --- examples/game-of-life/build/optimized.wasm | Bin 896 -> 896 bytes examples/game-of-life/build/optimized.wat | 18 ++++++------- examples/mandelbrot/build/optimized.wasm | Bin 543 -> 539 bytes examples/mandelbrot/build/optimized.wat | 28 ++++++++++----------- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 672a030e6555defb6a1580fe96c6d9a396da03e7..e4ac2a2a0f3937335b99798264c68476f6b99bc4 100644 GIT binary patch delta 66 zcmZo*Z(yHrf{$5&(SyaokwKA(*+GG6;x!EwCS_IyW@YA_tSm>S5(O4BCI$s2N5(8g TCLTs^ZUtr#lXS5(O4BCI$s&N5(8g TW*$avZUrU~lWDUOV;mCzu67Hh diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index f56cb47219..a3e72635a7 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -28,14 +28,14 @@ i32.mul global.set $assembly/index/offset loop $for-loop|0 - local.get $2 + local.get $3 local.get $1 i32.lt_s if i32.const 0 - local.set $3 + local.set $2 loop $for-loop|1 - local.get $3 + local.get $2 local.get $0 i32.lt_s if @@ -52,9 +52,9 @@ i32.or end local.set $4 - local.get $3 - global.get $assembly/index/offset local.get $2 + global.get $assembly/index/offset + local.get $3 global.get $assembly/index/width i32.mul i32.add @@ -63,17 +63,17 @@ i32.shl local.get $4 i32.store - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $for-loop|1 end end - local.get $2 + local.get $3 i32.const 1 i32.add - local.set $2 + local.set $3 br $for-loop|0 end end diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index 13f792e7c045fb62bfd154c563b3090cdda09894..3890e717f72ff42f8ba8d879a85592c37236427d 100644 GIT binary patch delta 118 zcmbQwGMi;W9Lr>8#t9RXid2~$6j&4(Jz0R%4h7yt3S0{nxm_5bK#5(E&yhiqb>d$; zF;)d;e_jR!R!7DxMOGdrZfXJnbYk Date: Thu, 12 Mar 2020 10:18:36 +0200 Subject: [PATCH 48/51] add early rse --- cli/asc.js | 1 + tests/compiler/comma.optimized.wat | 7 +- tests/compiler/std/array.optimized.wat | 661 +++++----- tests/compiler/std/libm.optimized.wat | 68 +- tests/compiler/std/math.optimized.wat | 68 +- tests/compiler/std/string.optimized.wat | 1500 +++++++++++------------ 6 files changed, 1104 insertions(+), 1201 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 4d134e35fb..37f19ce1b6 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -709,6 +709,7 @@ exports.main = function main(argv, options, callback) { add("reorder-locals"); // differs add("flatten"); add("local-cse"); + add("rse"); } if (hasARC) { // differs if (optimizeLevel < 3) { diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index a8362b0abf..a2ebe17d46 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -10,12 +10,13 @@ (start $~start) (func $start:comma (; 1 ;) (local $0 i32) + (local $1 i32) global.get $comma/a - local.tee $0 + local.tee $1 i32.const 1 i32.add global.set $comma/a - local.get $0 + local.get $1 global.set $comma/b global.get $comma/a i32.const 1 @@ -101,8 +102,6 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $0 loop $for-loop|0 local.get $0 global.get $comma/a diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 7c8e2cf902..c2710fcf03 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -9652,8 +9652,8 @@ (local $24 i32) (local $25 i32) (local $26 i32) - (local $27 i64) - (local $28 i32) + (local $27 i32) + (local $28 i64) (local $29 i32) (local $30 i32) (local $31 i32) @@ -9661,8 +9661,8 @@ (local $33 i32) (local $34 i32) (local $35 i32) - (local $36 f64) - (local $37 i32) + (local $36 i32) + (local $37 f64) (local $38 i32) (local $39 i32) (local $40 i32) @@ -9684,6 +9684,7 @@ (local $56 i32) (local $57 i32) (local $58 i32) + (local $59 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -9753,7 +9754,7 @@ i32.const 560 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 call $std/array/isArraysEqual i32.eqz if @@ -9777,7 +9778,7 @@ i32.const 592 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 call $std/array/isArraysEqual i32.eqz if @@ -9801,7 +9802,7 @@ i32.const 624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $56 call $std/array/isArraysEqual i32.eqz if @@ -9825,7 +9826,7 @@ i32.const 656 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $57 call $std/array/isArraysEqual i32.eqz if @@ -9840,14 +9841,14 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release - local.get $55 + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 7 @@ -9892,7 +9893,7 @@ i32.const 784 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9917,7 +9918,7 @@ i32.const 832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9942,7 +9943,7 @@ i32.const 880 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9967,7 +9968,7 @@ i32.const 928 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -9983,14 +9984,14 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release - local.get $55 + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release + local.get $57 + call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 if @@ -10262,18 +10263,18 @@ i32.store offset=4 local.get $0 i32.load offset=12 - local.tee $57 + local.tee $58 i32.const 0 i32.gt_s if local.get $0 i32.load offset=4 local.tee $1 - local.get $57 + local.get $58 i32.const 2 i32.shl i32.add - local.set $57 + local.set $58 loop $do-continue|0 local.get $1 i32.load @@ -10282,7 +10283,7 @@ i32.const 4 i32.add local.tee $1 - local.get $57 + local.get $58 i32.lt_u br_if $do-continue|0 end @@ -10312,7 +10313,7 @@ global.get $std/array/arr local.get $0 call $~lib/array/Array#concat - local.set $57 + local.set $58 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -10337,7 +10338,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.load offset=12 i32.const 3 i32.ne @@ -10349,14 +10350,14 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 i32.const 2 i32.const 3 i32.const 1024 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $56 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -10371,7 +10372,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -10384,7 +10385,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -10397,7 +10398,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -10420,7 +10421,7 @@ local.get $0 call $~lib/array/Array#concat local.set $1 - local.get $57 + local.get $58 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -10544,7 +10545,7 @@ i32.const 1040 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.load offset=12 if i32.const 0 @@ -10554,13 +10555,13 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 global.get $std/array/arr call $~lib/array/Array#concat - local.set $58 + local.set $59 local.get $1 call $~lib/rt/pure/__release - local.get $58 + local.get $59 i32.load offset=12 i32.const 3 i32.ne @@ -10572,7 +10573,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.load offset=12 if i32.const 0 @@ -10584,11 +10585,11 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $55 + local.get $56 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -10601,14 +10602,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $57 + local.tee $58 i32.const 5 i32.const 2 i32.const 3 i32.const 1104 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10634,14 +10635,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $55 + local.tee $56 i32.const 5 i32.const 2 i32.const 3 i32.const 1200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10666,14 +10667,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $54 + local.tee $43 i32.const 5 i32.const 2 i32.const 3 i32.const 1296 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10769,7 +10770,7 @@ i32.const 1584 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10826,14 +10827,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $44 + local.tee $32 i32.const 5 i32.const 2 i32.const 3 i32.const 1776 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $32 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10858,14 +10859,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $43 + local.tee $48 i32.const 5 i32.const 2 i32.const 3 i32.const 1872 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10890,14 +10891,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $41 + local.tee $40 i32.const 5 i32.const 2 i32.const 3 i32.const 1968 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10923,14 +10924,14 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $39 + local.tee $38 i32.const 5 i32.const 2 i32.const 3 i32.const 2064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -10977,17 +10978,17 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $57 - call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release - local.get $55 + local.get $59 call $~lib/rt/pure/__release local.get $56 call $~lib/rt/pure/__release - local.get $54 + local.get $57 call $~lib/rt/pure/__release - local.get $37 + local.get $43 + call $~lib/rt/pure/__release + local.get $54 call $~lib/rt/pure/__release local.get $53 call $~lib/rt/pure/__release @@ -10999,19 +11000,17 @@ call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release - local.get $48 + local.get $47 call $~lib/rt/pure/__release local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release - local.get $43 + local.get $44 call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release local.get $41 call $~lib/rt/pure/__release @@ -11021,6 +11020,8 @@ call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release + local.get $36 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release local.get $35 @@ -11199,7 +11200,7 @@ global.get $std/array/arr local.tee $0 i32.load offset=12 - local.tee $57 + local.tee $58 i32.const 1 i32.lt_s if @@ -11218,21 +11219,21 @@ local.get $1 i32.const 4 i32.add - local.get $57 + local.get $58 i32.const 1 i32.sub - local.tee $57 + local.tee $58 i32.const 2 i32.shl - local.tee $55 + local.tee $56 call $~lib/memory/memory.copy local.get $1 - local.get $55 + local.get $56 i32.add i32.const 0 i32.store local.get $0 - local.get $57 + local.get $58 i32.store offset=12 global.set $std/array/i global.get $std/array/i @@ -11400,14 +11401,14 @@ unreachable end global.get $std/array/arr - local.tee $57 + local.tee $58 i32.load offset=12 local.tee $1 if - local.get $57 + local.get $58 i32.load offset=4 local.set $0 - local.get $57 + local.get $58 i32.load offset=4 local.get $1 i32.const 1 @@ -11423,13 +11424,13 @@ if local.get $0 i32.load - local.set $58 + local.set $59 local.get $0 local.get $1 i32.load i32.store local.get $1 - local.get $58 + local.get $59 i32.store local.get $0 i32.const 4 @@ -11677,16 +11678,16 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $0 - local.set $55 + local.set $56 i32.const 0 local.set $1 block $__inlined_func$~lib/array/Array#indexOf local.get $0 i32.load offset=12 - local.tee $57 + local.tee $58 if (result i32) i32.const 0 - local.get $57 + local.get $58 i32.ge_s else i32.const 1 @@ -11696,15 +11697,15 @@ local.set $1 br $__inlined_func$~lib/array/Array#indexOf end - local.get $55 + local.get $56 i32.load offset=4 - local.set $58 + local.set $59 loop $while-continue|022 local.get $1 - local.get $57 + local.get $58 i32.lt_s if - local.get $58 + local.get $59 local.get $1 i32.const 2 i32.shl @@ -11740,17 +11741,17 @@ i32.const 2240 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 - local.set $56 + local.tee $58 + local.set $57 i32.const 0 local.set $1 block $__inlined_func$~lib/array/Array#indexOf - local.get $57 + local.get $58 i32.load offset=12 - local.tee $58 + local.tee $59 if (result i32) i32.const 0 - local.get $58 + local.get $59 i32.ge_s else i32.const 1 @@ -11760,15 +11761,15 @@ local.set $1 br $__inlined_func$~lib/array/Array#indexOf end - local.get $56 + local.get $57 i32.load offset=4 - local.set $55 + local.set $56 loop $while-continue|023 local.get $1 - local.get $58 + local.get $59 i32.lt_s if - local.get $55 + local.get $56 local.get $1 i32.const 3 i32.shl @@ -11800,7 +11801,7 @@ end local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -11948,28 +11949,28 @@ i32.const 2272 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 - i32.load offset=12 local.tee $58 + i32.load offset=12 + local.tee $59 if (result i32) i32.const 0 - local.get $58 + local.get $59 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $57 + local.get $58 i32.load offset=4 - local.set $56 + local.set $57 loop $while-continue|024 local.get $0 - local.get $58 + local.get $59 i32.lt_s if i32.const 1 - local.get $56 + local.get $57 local.get $0 i32.const 2 i32.shl @@ -12015,41 +12016,41 @@ i32.const 2304 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.load offset=12 - local.tee $55 + local.tee $56 if (result i32) i32.const 0 - local.get $55 + local.get $56 i32.ge_s else i32.const 1 end br_if $__inlined_func$~lib/array/Array#includes drop - local.get $58 + local.get $59 i32.load offset=4 - local.set $54 + local.set $43 loop $while-continue|025 local.get $0 - local.get $55 + local.get $56 i32.lt_s if i32.const 1 - local.get $54 + local.get $43 local.get $0 i32.const 3 i32.shl i32.add f64.load - local.tee $36 + local.tee $37 f64.const nan:0x8000000000000 f64.eq if (result i32) i32.const 1 else - local.get $36 - local.get $36 + local.get $37 + local.get $37 f64.ne end br_if $__inlined_func$~lib/array/Array#includes @@ -12127,10 +12128,10 @@ call $~lib/builtins/abort unreachable end - local.get $57 - call $~lib/rt/pure/__release local.get $58 call $~lib/rt/pure/__release + local.get $59 + call $~lib/rt/pure/__release i32.const 5 i32.const 2 i32.const 3 @@ -12141,7 +12142,7 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $56 + local.tee $57 i32.const 5 i32.const 2 i32.const 3 @@ -12250,7 +12251,7 @@ i32.const 2608 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12320,7 +12321,7 @@ i32.const 2752 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12344,14 +12345,14 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $47 + local.tee $41 i32.const 1 i32.const 2 i32.const 3 i32.const 2832 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $40 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12370,7 +12371,7 @@ i32.const 2864 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12394,14 +12395,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $39 + local.tee $38 i32.const 1 i32.const 2 i32.const 3 i32.const 2944 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $36 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12494,14 +12495,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $28 + local.tee $34 i32.const 1 i32.const 2 i32.const 3 i32.const 3168 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $33 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12520,7 +12521,7 @@ i32.const 3200 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $33 + local.tee $27 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12789,10 +12790,10 @@ i32.const 3792 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $59 local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $59 i32.const 7 i32.const 5 call $~lib/array/Array#splice @@ -12815,7 +12816,7 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $59 i32.const 5 i32.const 2 i32.const 3 @@ -12843,7 +12844,7 @@ local.tee $0 i32.const 1 call $~lib/array/Array#splice - local.tee $55 + local.tee $56 i32.load offset=12 if i32.const 0 @@ -12869,7 +12870,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $57 + local.tee $58 i32.load offset=4 local.tee $1 i32.const 1 @@ -12893,13 +12894,13 @@ i32.store offset=16 local.get $0 call $~lib/rt/pure/__release - local.get $57 + local.get $58 i32.const 2 call $~lib/array/Array#splice - local.set $37 - local.get $55 + local.set $43 + local.get $56 call $~lib/rt/pure/__release - local.get $37 + local.get $43 i32.load offset=12 i32.const 2 i32.ne @@ -12911,7 +12912,7 @@ call $~lib/builtins/abort unreachable end - local.get $37 + local.get $43 i32.const 0 call $~lib/array/Array#__get local.tee $8 @@ -12926,7 +12927,7 @@ call $~lib/builtins/abort unreachable end - local.get $37 + local.get $43 i32.const 1 call $~lib/array/Array#__get local.tee $7 @@ -12941,7 +12942,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.load offset=12 i32.const 3 i32.ne @@ -12953,7 +12954,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 0 call $~lib/array/Array#__get local.tee $6 @@ -12968,7 +12969,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 1 call $~lib/array/Array#__get local.tee $5 @@ -12983,7 +12984,7 @@ call $~lib/builtins/abort unreachable end - local.get $57 + local.get $58 i32.const 2 call $~lib/array/Array#__get local.tee $4 @@ -13004,7 +13005,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $55 + local.tee $56 i32.load offset=4 local.tee $1 i32.const 1 @@ -13017,7 +13018,7 @@ i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $55 + local.get $56 call $~lib/array/Array#splice local.tee $32 i32.load offset=12 @@ -13056,7 +13057,7 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $56 i32.load offset=12 i32.const 2 i32.ne @@ -13068,7 +13069,7 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $56 i32.const 0 call $~lib/array/Array#__get local.tee $3 @@ -13080,7 +13081,7 @@ call $~lib/builtins/abort unreachable end - local.get $55 + local.get $56 i32.const 1 call $~lib/array/Array#__get local.tee $0 @@ -13105,9 +13106,9 @@ call $~lib/builtins/abort unreachable end - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $56 + local.get $57 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release @@ -13121,7 +13122,7 @@ call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release - local.get $48 + local.get $47 call $~lib/rt/pure/__release local.get $46 call $~lib/rt/pure/__release @@ -13129,9 +13130,7 @@ call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release - local.get $43 - call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release local.get $41 call $~lib/rt/pure/__release @@ -13141,6 +13140,8 @@ call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release + local.get $36 + call $~lib/rt/pure/__release local.get $35 call $~lib/rt/pure/__release local.get $31 @@ -13149,12 +13150,12 @@ call $~lib/rt/pure/__release local.get $29 call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release local.get $34 call $~lib/rt/pure/__release local.get $33 call $~lib/rt/pure/__release + local.get $27 + call $~lib/rt/pure/__release local.get $26 call $~lib/rt/pure/__release local.get $25 @@ -13678,20 +13679,18 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.set $1 loop $for-loop|0 - local.get $1 + local.get $55 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $1 + local.get $55 i32.const 1 i32.add - local.set $1 + local.set $55 br $for-loop|0 end end @@ -13710,9 +13709,9 @@ i32.const 0 local.set $0 global.get $std/array/arr - local.tee $58 + local.tee $59 i32.load offset=12 - local.tee $56 + local.tee $57 i32.const 2 i32.const 9 i32.const 0 @@ -13720,15 +13719,15 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=4 - local.set $54 + local.set $55 loop $for-loop|043 local.get $0 - local.get $56 - local.get $58 + local.get $57 + local.get $59 i32.load offset=12 - local.tee $53 - local.get $56 - local.get $53 + local.tee $54 + local.get $57 + local.get $54 i32.lt_s select i32.lt_s @@ -13738,15 +13737,15 @@ local.get $0 i32.const 2 i32.shl - local.tee $53 - local.get $58 + local.tee $54 + local.get $59 i32.load offset=4 i32.add i32.load f32.convert_i32_s local.set $42 - local.get $53 local.get $54 + local.get $55 i32.add local.get $42 f32.store @@ -14296,10 +14295,10 @@ call $~lib/array/Array#push call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $27 + local.set $28 i32.const 1 global.set $~lib/math/random_seeded - local.get $27 + local.get $28 call $~lib/math/murmurHash3 global.set $~lib/math/random_state0_64 global.get $~lib/math/random_state0_64 @@ -14307,7 +14306,7 @@ i64.xor call $~lib/math/murmurHash3 global.set $~lib/math/random_state1_64 - local.get $27 + local.get $28 i32.wrap_i64 call $~lib/math/splitMix32 global.set $~lib/math/random_state0_32 @@ -14358,27 +14357,27 @@ i32.const 4320 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $56 + local.set $57 i32.const 0 local.set $1 i32.const 0 local.get $0 i32.load offset=12 - local.tee $54 - local.get $56 + local.tee $55 + local.get $57 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 local.get $0 - local.get $56 + local.get $57 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|00 local.get $1 - local.get $54 + local.get $55 i32.lt_s if local.get $0 @@ -14388,7 +14387,7 @@ local.get $42 f32.ne if (result i32) - local.get $56 + local.get $57 local.get $1 call $~lib/array/Array#__get local.tee $42 @@ -14403,7 +14402,7 @@ local.get $0 local.get $1 call $~lib/array/Array#__get - local.get $56 + local.get $57 local.get $1 call $~lib/array/Array#__get f32.ne @@ -14434,10 +14433,10 @@ i32.const 4368 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $59 i32.const 0 global.set $~argumentsLength - local.get $58 + local.get $59 call $~lib/array/Array#sort|trampoline call $~lib/rt/pure/__release block $__inlined_func$std/array/isArraysEqual (result i32) @@ -14447,41 +14446,41 @@ i32.const 4448 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $54 + local.set $55 i32.const 0 local.set $1 i32.const 0 - local.get $58 + local.get $59 i32.load offset=12 - local.tee $52 - local.get $54 + local.tee $53 + local.get $55 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual drop i32.const 1 - local.get $54 - local.get $58 + local.get $55 + local.get $59 i32.eq br_if $__inlined_func$std/array/isArraysEqual drop loop $for-loop|01 local.get $1 - local.get $52 + local.get $53 i32.lt_s if - local.get $58 + local.get $59 local.get $1 call $~lib/array/Array#__get - local.tee $36 - local.get $36 + local.tee $37 + local.get $37 f64.ne if (result i32) - local.get $54 + local.get $55 local.get $1 call $~lib/array/Array#__get - local.tee $36 - local.get $36 + local.tee $37 + local.get $37 f64.ne else i32.const 0 @@ -14489,10 +14488,10 @@ i32.eqz if i32.const 0 - local.get $58 + local.get $59 local.get $1 call $~lib/array/Array#__get - local.get $54 + local.get $55 local.get $1 call $~lib/array/Array#__get f64.ne @@ -14523,14 +14522,14 @@ i32.const 4528 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $54 i32.const 0 global.set $~argumentsLength - local.get $53 + local.get $54 i32.const 46 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $53 + local.get $54 i32.const 5 i32.const 2 i32.const 3 @@ -14555,14 +14554,14 @@ i32.const 4624 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 + local.set $53 i32.const 0 global.set $~argumentsLength - local.get $52 + local.get $53 i32.const 47 call $~lib/array/Array#sort call $~lib/rt/pure/__release - local.get $52 + local.get $53 i32.const 5 i32.const 2 i32.const 7 @@ -14587,28 +14586,28 @@ i32.const 4720 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $43 + local.set $44 i32.const 1 i32.const 2 i32.const 3 i32.const 4736 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $51 + local.set $52 i32.const 2 i32.const 2 i32.const 3 i32.const 4768 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $50 + local.set $51 i32.const 4 i32.const 2 i32.const 3 i32.const 4800 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $49 + local.set $50 i32.const 4 i32.const 2 i32.const 3 @@ -14618,26 +14617,26 @@ local.set $1 i32.const 64 call $std/array/createReverseOrderedArray - local.set $48 + local.set $49 i32.const 128 call $std/array/createReverseOrderedArray - local.set $46 + local.set $47 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $45 + local.set $46 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $44 + local.set $45 i32.const 512 call $std/array/createRandomOrderedArray - local.set $47 - local.get $43 + local.set $48 + local.get $44 i32.const 48 call $std/array/assertSorted - local.get $51 + local.get $52 i32.const 48 call $std/array/assertSorted - local.get $51 + local.get $52 i32.const 1 i32.const 2 i32.const 3 @@ -14656,10 +14655,10 @@ call $~lib/builtins/abort unreachable end - local.get $50 + local.get $51 i32.const 48 call $std/array/assertSorted - local.get $50 + local.get $51 i32.const 2 i32.const 2 i32.const 3 @@ -14678,10 +14677,10 @@ call $~lib/builtins/abort unreachable end - local.get $49 + local.get $50 i32.const 48 call $std/array/assertSorted - local.get $49 + local.get $50 local.get $1 i32.const 0 call $std/array/isArraysEqual @@ -14694,10 +14693,10 @@ call $~lib/builtins/abort unreachable end - local.get $48 + local.get $49 i32.const 48 call $std/array/assertSorted - local.get $48 + local.get $49 local.get $1 i32.const 4 call $std/array/isArraysEqual @@ -14710,10 +14709,10 @@ call $~lib/builtins/abort unreachable end - local.get $46 + local.get $47 i32.const 48 call $std/array/assertSorted - local.get $46 + local.get $47 local.get $1 i32.const 4 call $std/array/isArraysEqual @@ -14726,10 +14725,10 @@ call $~lib/builtins/abort unreachable end - local.get $45 + local.get $46 i32.const 48 call $std/array/assertSorted - local.get $45 + local.get $46 local.get $1 i32.const 4 call $std/array/isArraysEqual @@ -14742,10 +14741,10 @@ call $~lib/builtins/abort unreachable end - local.get $44 + local.get $45 i32.const 48 call $std/array/assertSorted - local.get $44 + local.get $45 local.get $1 i32.const 4 call $std/array/isArraysEqual @@ -14758,44 +14757,44 @@ call $~lib/builtins/abort unreachable end - local.get $47 + local.get $48 i32.const 48 call $std/array/assertSorted local.get $0 call $~lib/rt/pure/__release - local.get $56 + local.get $57 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $54 + local.get $55 call $~lib/rt/pure/__release - local.get $53 + local.get $54 call $~lib/rt/pure/__release local.get $41 call $~lib/rt/pure/__release - local.get $52 + local.get $53 call $~lib/rt/pure/__release local.get $40 call $~lib/rt/pure/__release - local.get $43 + local.get $44 + call $~lib/rt/pure/__release + local.get $52 call $~lib/rt/pure/__release local.get $51 call $~lib/rt/pure/__release local.get $50 call $~lib/rt/pure/__release - local.get $49 - call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $48 + local.get $49 + call $~lib/rt/pure/__release + local.get $47 call $~lib/rt/pure/__release local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release local.get $39 call $~lib/rt/pure/__release @@ -14845,7 +14844,7 @@ if i32.const 1 call $~lib/array/Array#constructor - local.tee $58 + local.tee $59 i32.const 0 i32.const 1 local.get $0 @@ -14853,9 +14852,9 @@ call $~lib/array/Array#__set local.get $1 local.get $0 - local.get $58 + local.get $59 call $~lib/array/Array<~lib/array/Array>#__set - local.get $58 + local.get $59 call $~lib/rt/pure/__release local.get $0 i32.const 1 @@ -14893,16 +14892,16 @@ i32.const 13 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.const 511 local.get $0 i32.sub i32.store local.get $1 local.get $0 - local.get $58 + local.get $59 call $~lib/array/Array<~lib/array/Array>#__set - local.get $58 + local.get $59 call $~lib/rt/pure/__release local.get $0 i32.const 1 @@ -14929,7 +14928,7 @@ i32.const 5184 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $58 + local.set $59 i32.const 1 global.set $~argumentsLength local.get $0 @@ -14940,44 +14939,44 @@ i32.const 0 local.get $0 i32.load offset=12 - local.tee $53 - local.get $58 + local.tee $54 + local.get $59 i32.load offset=12 i32.ne br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop i32.const 1 local.get $0 - local.get $58 + local.get $59 i32.eq br_if $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> drop loop $for-loop|04 local.get $1 - local.get $53 + local.get $54 i32.lt_s if local.get $0 local.get $1 call $~lib/array/Array#__get - local.tee $56 - local.get $58 + local.tee $57 + local.get $59 local.get $1 call $~lib/array/Array#__get - local.tee $54 + local.tee $55 call $~lib/string/String.__eq i32.eqz if - local.get $56 + local.get $57 call $~lib/rt/pure/__release - local.get $54 + local.get $55 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isArraysEqual<~lib/string/String | null> end - local.get $56 + local.get $57 call $~lib/rt/pure/__release - local.get $54 + local.get $55 call $~lib/rt/pure/__release local.get $1 i32.const 1 @@ -15006,7 +15005,7 @@ call $std/array/assertSorted<~lib/array/Array> local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release @@ -15040,10 +15039,10 @@ i32.const 5440 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $53 + local.tee $54 i32.const 5120 call $~lib/array/Array#join - local.tee $52 + local.tee $53 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15061,10 +15060,10 @@ i32.const 5536 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $52 i32.const 5568 call $~lib/array/Array#join - local.tee $50 + local.tee $51 i32.const 5504 call $~lib/string/String.__eq i32.eqz @@ -15082,10 +15081,10 @@ i32.const 5600 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $50 i32.const 5632 call $~lib/array/Array#join - local.tee $48 + local.tee $49 i32.const 5664 call $~lib/string/String.__eq i32.eqz @@ -15108,9 +15107,9 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.tee $58 - local.set $46 - local.get $58 + local.tee $59 + local.set $47 + local.get $59 i32.const 6944 call $~lib/string/String.__eq i32.eqz @@ -15128,10 +15127,10 @@ i32.const 7072 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $45 + local.tee $46 i32.const 5120 call $~lib/array/Array<~lib/string/String | null>#join - local.tee $44 + local.tee $45 i32.const 7040 call $~lib/string/String.__eq i32.eqz @@ -15149,22 +15148,22 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.load offset=4 - local.tee $56 + local.tee $57 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $56 + local.get $57 i32.const 0 i32.store offset=4 - local.get $56 + local.get $57 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $58 + local.get $59 call $~lib/array/Array#join - local.tee $43 + local.tee $44 i32.const 7152 call $~lib/string/String.__eq i32.eqz @@ -15182,19 +15181,19 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $56 + local.tee $57 i32.load offset=4 - local.tee $47 + local.tee $48 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $47 + local.get $48 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $56 + local.get $57 call $~lib/array/Array#join - local.tee $47 + local.tee $48 i32.const 7232 call $~lib/string/String.__eq i32.eqz @@ -15209,6 +15208,8 @@ local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__release + local.get $54 + call $~lib/rt/pure/__release local.get $53 call $~lib/rt/pure/__release local.get $52 @@ -15219,23 +15220,21 @@ call $~lib/rt/pure/__release local.get $49 call $~lib/rt/pure/__release - local.get $48 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release + local.get $47 + call $~lib/rt/pure/__release local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release - local.get $44 - call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release - local.get $43 + local.get $44 call $~lib/rt/pure/__release - local.get $56 + local.get $57 call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -15243,29 +15242,29 @@ i32.const 7312 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $56 + local.set $57 i32.const 1 i32.const 2 i32.const 3 i32.const 7328 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $54 + local.set $55 i32.const 2 i32.const 2 i32.const 3 i32.const 7360 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $53 + local.set $54 i32.const 4 i32.const 2 i32.const 3 i32.const 7392 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.set $52 - local.get $56 + local.set $53 + local.get $57 i32.const 5360 call $~lib/array/Array#join local.tee $1 @@ -15281,11 +15280,11 @@ call $~lib/builtins/abort unreachable end - local.get $54 + local.get $55 i32.const 5360 call $~lib/array/Array#join local.tee $1 - local.set $45 + local.set $46 local.get $1 i32.const 7040 call $~lib/string/String.__eq @@ -15298,11 +15297,11 @@ call $~lib/builtins/abort unreachable end - local.get $53 + local.get $54 i32.const 5360 call $~lib/array/Array#join local.tee $1 - local.set $44 + local.set $45 local.get $1 i32.const 7424 call $~lib/string/String.__eq @@ -15315,11 +15314,11 @@ call $~lib/builtins/abort unreachable end - local.get $52 + local.get $53 i32.const 5360 call $~lib/array/Array#join local.tee $1 - local.set $43 + local.set $44 local.get $1 i32.const 7456 call $~lib/string/String.__eq @@ -15338,13 +15337,13 @@ i32.const 7488 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $51 + local.tee $52 i32.load offset=4 - local.get $51 + local.get $52 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 - local.set $47 + local.set $48 local.get $1 i32.const 7520 call $~lib/string/String.__eq @@ -15363,9 +15362,9 @@ i32.const 7552 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $51 i32.load offset=4 - local.get $50 + local.get $51 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 @@ -15388,9 +15387,9 @@ i32.const 7632 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $50 i32.load offset=4 - local.get $49 + local.get $50 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 @@ -15413,9 +15412,9 @@ i32.const 7744 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $48 + local.tee $49 i32.load offset=4 - local.get $48 + local.get $49 i32.load offset=12 call $~lib/util/string/joinIntegerArray local.tee $1 @@ -15442,7 +15441,7 @@ i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $35 + local.set $36 local.get $1 i32.const 7952 call $~lib/string/String.__eq @@ -15461,11 +15460,11 @@ i32.const 8064 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $31 + local.tee $35 i32.const 5360 call $~lib/array/Array<~lib/string/String | null>#join local.tee $1 - local.set $30 + local.set $31 local.get $1 i32.const 8096 call $~lib/string/String.__eq @@ -15508,7 +15507,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> local.tee $0 - local.set $29 + local.set $30 local.get $0 i32.const 8192 call $~lib/string/String.__eq @@ -15529,7 +15528,7 @@ call $~lib/rt/pure/__retain local.tee $0 i32.load offset=4 - local.tee $58 + local.tee $59 i32.const 2 i32.const 0 i32.const 6 @@ -15537,7 +15536,7 @@ call $~lib/rt/__allocArray call $~lib/rt/pure/__retain i32.store - local.get $58 + local.get $59 i32.const 2 i32.const 0 i32.const 6 @@ -15550,9 +15549,9 @@ local.get $0 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.tee $58 - local.set $28 - local.get $58 + local.tee $59 + local.set $29 + local.get $59 i32.const 8192 call $~lib/string/String.__eq i32.eqz @@ -15570,7 +15569,7 @@ i32.const 0 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain - local.tee $58 + local.tee $59 i32.load offset=4 i32.const 1 i32.const 2 @@ -15589,9 +15588,9 @@ i32.store local.get $33 i32.store - local.get $58 + local.get $59 i32.load offset=4 - local.get $58 + local.get $59 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> local.tee $34 @@ -15608,39 +15607,41 @@ call $~lib/builtins/abort unreachable end - local.get $56 + local.get $57 + call $~lib/rt/pure/__release + local.get $55 call $~lib/rt/pure/__release local.get $54 call $~lib/rt/pure/__release local.get $53 call $~lib/rt/pure/__release - local.get $52 call $~lib/rt/pure/__release + local.get $46 call $~lib/rt/pure/__release local.get $45 call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release - local.get $43 - call $~lib/rt/pure/__release - local.get $51 + local.get $52 call $~lib/rt/pure/__release - local.get $47 + local.get $48 call $~lib/rt/pure/__release - local.get $50 + local.get $51 call $~lib/rt/pure/__release local.get $41 call $~lib/rt/pure/__release - local.get $49 + local.get $50 call $~lib/rt/pure/__release local.get $40 call $~lib/rt/pure/__release - local.get $48 + local.get $49 call $~lib/rt/pure/__release local.get $39 call $~lib/rt/pure/__release local.get $38 call $~lib/rt/pure/__release + local.get $36 + call $~lib/rt/pure/__release local.get $35 call $~lib/rt/pure/__release local.get $31 @@ -15649,17 +15650,15 @@ call $~lib/rt/pure/__release local.get $29 call $~lib/rt/pure/__release - local.get $28 - call $~lib/rt/pure/__release local.get $33 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release - local.get $57 + local.get $58 call $~lib/rt/pure/__release - local.get $37 + local.get $43 call $~lib/rt/pure/__release - local.get $55 + local.get $56 call $~lib/rt/pure/__release local.get $32 call $~lib/rt/pure/__release @@ -15667,7 +15666,7 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $58 + local.get $59 call $~lib/rt/pure/__release ) (func $~start (; 164 ;) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 3870a71f93..2d691bf183 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1214,8 +1214,9 @@ (local $3 i32) (local $4 i32) (local $5 i64) - (local $6 i32) + (local $6 f64) (local $7 i32) + (local $8 i32) i32.const 1 local.get $0 local.get $0 @@ -1236,7 +1237,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $5 i32.wrap_i64 local.set $2 @@ -1246,11 +1247,11 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $7 + local.set $8 local.get $5 i32.wrap_i64 local.tee $4 - local.get $7 + local.get $8 i32.const 1072693248 i32.sub i32.or @@ -1260,24 +1261,24 @@ call $~lib/math/NativeMath.atan return end - local.get $7 + local.get $8 i32.const 30 i32.shr_u i32.const 2 i32.and - local.get $6 + local.get $7 i32.const 31 i32.shr_u i32.or local.set $3 - local.get $7 + local.get $8 i32.const 2147483647 i32.and - local.set $7 - local.get $6 + local.set $8 + local.get $7 i32.const 2147483647 i32.and - local.tee $6 + local.tee $7 local.get $2 i32.or i32.eqz @@ -1309,15 +1310,15 @@ end block $folding-inner0 local.get $4 - local.get $7 + local.get $8 i32.or i32.eqz br_if $folding-inner0 - local.get $7 + local.get $8 i32.const 2146435072 i32.eq if - local.get $6 + local.get $7 i32.const 2146435072 i32.eq if @@ -1347,36 +1348,35 @@ return end i32.const 1 - local.get $6 + local.get $7 i32.const 2146435072 i32.eq - local.get $7 + local.get $8 i32.const 67108864 i32.add - local.get $6 + local.get $7 i32.lt_u select br_if $folding-inner0 - local.get $6 + local.get $7 i32.const 67108864 i32.add - local.get $7 + local.get $8 i32.lt_u i32.const 0 local.get $3 i32.const 2 i32.and select - if (result f64) - f64.const 0 - else + i32.eqz + if local.get $0 local.get $1 f64.div f64.abs call $~lib/math/NativeMath.atan + local.set $6 end - local.set $0 block $break|1 block $case3|1 block $case2|1 @@ -1389,21 +1389,21 @@ i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 end - local.get $0 + local.get $6 return end - local.get $0 + local.get $6 f64.neg return end f64.const 3.141592653589793 - local.get $0 + local.get $6 f64.const 1.2246467991473532e-16 f64.sub f64.sub return end - local.get $0 + local.get $6 f64.const 1.2246467991473532e-16 f64.sub f64.const 3.141592653589793 @@ -5982,25 +5982,25 @@ local.get $0 local.get $0 f32.mul - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 f32.mul - local.set $5 + local.set $2 local.get $0 - local.get $2 - f32.const 0.333333283662796 local.get $5 + f32.const 0.333333283662796 + local.get $2 f32.const 0.14253635704517365 - local.get $5 + local.get $2 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $5 + local.get $2 f32.const -0.19999158382415771 - local.get $5 + local.get $2 f32.const -0.106480173766613 f32.mul f32.add diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index e0fc057db8..12a278edbf 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -2369,25 +2369,25 @@ local.get $0 local.get $0 f32.mul - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 f32.mul - local.set $5 + local.set $2 local.get $0 - local.get $2 - f32.const 0.333333283662796 local.get $5 + f32.const 0.333333283662796 + local.get $2 f32.const 0.14253635704517365 - local.get $5 + local.get $2 f32.const 0.06168760731816292 f32.mul f32.add f32.mul f32.add f32.mul - local.get $5 + local.get $2 f32.const -0.19999158382415771 - local.get $5 + local.get $2 f32.const -0.106480173766613 f32.mul f32.add @@ -2595,8 +2595,9 @@ (local $3 i32) (local $4 i32) (local $5 i64) - (local $6 i32) + (local $6 f64) (local $7 i32) + (local $8 i32) i32.const 1 local.get $0 local.get $0 @@ -2617,7 +2618,7 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $6 + local.set $7 local.get $5 i32.wrap_i64 local.set $2 @@ -2627,11 +2628,11 @@ i64.const 32 i64.shr_u i32.wrap_i64 - local.set $7 + local.set $8 local.get $5 i32.wrap_i64 local.tee $4 - local.get $7 + local.get $8 i32.const 1072693248 i32.sub i32.or @@ -2641,24 +2642,24 @@ call $~lib/math/NativeMath.atan return end - local.get $7 + local.get $8 i32.const 30 i32.shr_u i32.const 2 i32.and - local.get $6 + local.get $7 i32.const 31 i32.shr_u i32.or local.set $3 - local.get $7 + local.get $8 i32.const 2147483647 i32.and - local.set $7 - local.get $6 + local.set $8 + local.get $7 i32.const 2147483647 i32.and - local.tee $6 + local.tee $7 local.get $2 i32.or i32.eqz @@ -2690,15 +2691,15 @@ end block $folding-inner0 local.get $4 - local.get $7 + local.get $8 i32.or i32.eqz br_if $folding-inner0 - local.get $7 + local.get $8 i32.const 2146435072 i32.eq if - local.get $6 + local.get $7 i32.const 2146435072 i32.eq if @@ -2728,36 +2729,35 @@ return end i32.const 1 - local.get $6 + local.get $7 i32.const 2146435072 i32.eq - local.get $7 + local.get $8 i32.const 67108864 i32.add - local.get $6 + local.get $7 i32.lt_u select br_if $folding-inner0 - local.get $6 + local.get $7 i32.const 67108864 i32.add - local.get $7 + local.get $8 i32.lt_u i32.const 0 local.get $3 i32.const 2 i32.and select - if (result f64) - f64.const 0 - else + i32.eqz + if local.get $0 local.get $1 f64.div f64.abs call $~lib/math/NativeMath.atan + local.set $6 end - local.set $0 block $break|1 block $case3|1 block $case2|1 @@ -2770,21 +2770,21 @@ i32.sub br_table $case1|1 $case2|1 $case3|1 $break|1 end - local.get $0 + local.get $6 return end - local.get $0 + local.get $6 f64.neg return end f64.const 3.141592653589793 - local.get $0 + local.get $6 f64.const 1.2246467991473532e-16 f64.sub f64.sub return end - local.get $0 + local.get $6 f64.const 1.2246467991473532e-16 f64.sub f64.const 3.141592653589793 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 62af48f4e5..a4fd4c1f34 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -5343,44 +5343,42 @@ local.get $2 i32.lt_s select - local.tee $3 + local.tee $2 call $~lib/rt/__allocArray call $~lib/rt/pure/__retain local.tee $4 i32.load offset=4 local.set $5 - i32.const 0 - local.set $1 loop $for-loop|0 - local.get $1 local.get $3 + local.get $2 i32.lt_s if i32.const 2 i32.const 1 call $~lib/rt/tlsf/__alloc - local.tee $2 + local.tee $1 local.get $0 - local.get $1 + local.get $3 i32.const 1 i32.shl i32.add i32.load16_u i32.store16 local.get $5 - local.get $1 + local.get $3 i32.const 2 i32.shl i32.add - local.get $2 + local.get $1 i32.store - local.get $2 + local.get $1 call $~lib/rt/pure/__retain drop - local.get $1 + local.get $3 i32.const 1 i32.add - local.set $1 + local.set $3 br $for-loop|0 end end @@ -6843,7 +6841,7 @@ (func $start:std/string (; 72 ;) (local $0 i32) (local $1 i32) - (local $2 i32) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7051,7 +7049,7 @@ (local $207 i32) (local $208 i32) (local $209 i32) - (local $210 f64) + (local $210 i32) (local $211 i32) global.get $std/string/str i32.const 32 @@ -7116,12 +7114,12 @@ i32.const -1 i32.const 0 global.get $std/string/str - local.tee $1 + local.tee $0 call $~lib/string/String#get:length i32.ge_u br_if $__inlined_func$~lib/string/String#charCodeAt drop - local.get $1 + local.get $0 i32.load16_u end i32.const 104 @@ -7175,7 +7173,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode|trampoline - local.tee $207 + local.tee $41 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7191,7 +7189,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode|trampoline - local.tee $206 + local.tee $42 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7207,7 +7205,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode|trampoline - local.tee $205 + local.tee $43 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7222,7 +7220,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $204 + local.tee $44 i32.const 496 call $~lib/string/String.__eq i32.eqz @@ -7236,7 +7234,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $203 + local.tee $45 i32.const 288 call $~lib/string/String.__eq i32.eqz @@ -7250,7 +7248,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $202 + local.tee $46 i32.const 464 call $~lib/string/String.__eq i32.eqz @@ -7264,7 +7262,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $201 + local.tee $47 i32.const 576 call $~lib/string/String.__eq i32.eqz @@ -7277,50 +7275,50 @@ unreachable end global.get $std/string/str - local.set $208 + local.set $12 i32.const 608 - local.tee $0 + local.tee $1 i32.eqz if i32.const 608 call $~lib/rt/pure/__release i32.const 640 - local.set $0 + local.set $1 end block $__inlined_func$~lib/string/String#startsWith i32.const 0 - local.get $208 + local.get $12 call $~lib/string/String#get:length - local.tee $211 + local.tee $11 i32.const 0 - local.get $211 + local.get $11 i32.lt_s select - local.tee $209 - local.get $0 + local.tee $8 + local.get $1 call $~lib/string/String#get:length - local.tee $1 + local.tee $0 i32.add - local.get $211 + local.get $11 i32.gt_s if - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 0 - local.set $1 + local.set $0 br $__inlined_func$~lib/string/String#startsWith end - local.get $208 - local.get $209 - local.get $0 + local.get $12 + local.get $8 local.get $1 + local.get $0 call $~lib/util/string/compareImpl i32.eqz - local.set $1 - local.get $0 + local.set $0 + local.get $1 call $~lib/rt/pure/__release end - local.get $1 + local.get $0 i32.eqz if i32.const 0 @@ -7334,26 +7332,26 @@ i32.const 0 i32.const 536870904 global.get $std/string/str - local.tee $209 + local.tee $8 call $~lib/string/String#get:length - local.tee $1 + local.tee $0 i32.const 536870904 - local.get $1 + local.get $0 i32.lt_s select i32.const 672 call $~lib/string/String#get:length - local.tee $0 - i32.sub local.tee $1 + i32.sub + local.tee $0 i32.const 0 i32.lt_s br_if $__inlined_func$~lib/string/String#endsWith drop - local.get $209 - local.get $1 - i32.const 672 + local.get $8 local.get $0 + i32.const 672 + local.get $1 call $~lib/util/string/compareImpl i32.eqz end @@ -7384,7 +7382,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padStart - local.tee $200 + local.tee $48 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7400,7 +7398,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padStart - local.tee $199 + local.tee $49 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7416,7 +7414,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padStart - local.tee $198 + local.tee $50 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7432,7 +7430,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padStart - local.tee $197 + local.tee $51 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7448,7 +7446,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padStart - local.tee $196 + local.tee $52 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7464,7 +7462,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padStart - local.tee $195 + local.tee $53 i32.const 832 call $~lib/string/String.__eq i32.eqz @@ -7480,7 +7478,7 @@ i32.const 6 i32.const 864 call $~lib/string/String#padStart - local.tee $194 + local.tee $54 i32.const 896 call $~lib/string/String.__eq i32.eqz @@ -7496,7 +7494,7 @@ i32.const 8 i32.const 864 call $~lib/string/String#padStart - local.tee $193 + local.tee $55 i32.const 928 call $~lib/string/String.__eq i32.eqz @@ -7512,7 +7510,7 @@ i32.const 0 i32.const 736 call $~lib/string/String#padEnd - local.tee $192 + local.tee $56 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7528,7 +7526,7 @@ i32.const 15 i32.const 736 call $~lib/string/String#padEnd - local.tee $191 + local.tee $57 global.get $std/string/str call $~lib/string/String.__eq i32.eqz @@ -7544,7 +7542,7 @@ i32.const 3 i32.const 736 call $~lib/string/String#padEnd - local.tee $190 + local.tee $58 i32.const 768 call $~lib/string/String.__eq i32.eqz @@ -7560,7 +7558,7 @@ i32.const 10 i32.const 272 call $~lib/string/String#padEnd - local.tee $189 + local.tee $59 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -7576,7 +7574,7 @@ i32.const 100 i32.const 272 call $~lib/string/String#padEnd - local.tee $188 + local.tee $60 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -7592,7 +7590,7 @@ i32.const 5 i32.const 736 call $~lib/string/String#padEnd - local.tee $187 + local.tee $61 i32.const 960 call $~lib/string/String.__eq i32.eqz @@ -7608,7 +7606,7 @@ i32.const 6 i32.const 800 call $~lib/string/String#padEnd - local.tee $186 + local.tee $62 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -7624,7 +7622,7 @@ i32.const 8 i32.const 800 call $~lib/string/String#padEnd - local.tee $185 + local.tee $63 i32.const 1024 call $~lib/string/String.__eq i32.eqz @@ -8047,7 +8045,7 @@ end i32.const 272 call $~lib/string/String#trimStart - local.tee $184 + local.tee $64 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8061,7 +8059,7 @@ end i32.const 1280 call $~lib/string/String#trimStart - local.tee $183 + local.tee $65 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8075,7 +8073,7 @@ end i32.const 1312 call $~lib/string/String#trimStart - local.tee $182 + local.tee $66 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8089,7 +8087,7 @@ end i32.const 272 call $~lib/string/String#trimEnd - local.tee $181 + local.tee $67 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8103,7 +8101,7 @@ end i32.const 1280 call $~lib/string/String#trimEnd - local.tee $180 + local.tee $68 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8117,7 +8115,7 @@ end i32.const 1312 call $~lib/string/String#trimEnd - local.tee $179 + local.tee $69 i32.const 1392 call $~lib/string/String.__eq i32.eqz @@ -8131,7 +8129,7 @@ end i32.const 272 call $~lib/string/String#trim - local.tee $178 + local.tee $70 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -8145,7 +8143,7 @@ end i32.const 1280 call $~lib/string/String#trim - local.tee $177 + local.tee $71 i32.const 1280 call $~lib/string/String.__eq i32.eqz @@ -8159,7 +8157,7 @@ end i32.const 1312 call $~lib/string/String#trim - local.tee $176 + local.tee $72 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -8603,8 +8601,8 @@ end i32.const 272 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9252,8 +9250,8 @@ end i32.const 4576 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9265,8 +9263,8 @@ end i32.const 4608 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9278,8 +9276,8 @@ end i32.const 4640 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9291,8 +9289,8 @@ end i32.const 4672 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9304,8 +9302,8 @@ end i32.const 4704 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9317,8 +9315,8 @@ end i32.const 4736 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9330,8 +9328,8 @@ end i32.const 4768 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9343,8 +9341,8 @@ end i32.const 4800 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9356,8 +9354,8 @@ end i32.const 4832 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9369,8 +9367,8 @@ end i32.const 4864 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9382,8 +9380,8 @@ end i32.const 4896 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9395,8 +9393,8 @@ end i32.const 4928 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9408,8 +9406,8 @@ end i32.const 4960 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9421,8 +9419,8 @@ end i32.const 4992 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9434,8 +9432,8 @@ end i32.const 5024 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9447,8 +9445,8 @@ end i32.const 5056 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9760,8 +9758,8 @@ end i32.const 6192 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9773,8 +9771,8 @@ end i32.const 6224 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9786,8 +9784,8 @@ end i32.const 6256 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -9836,16 +9834,16 @@ i32.const 6864 i32.const 7024 call $~lib/string/String.__concat - local.tee $175 + local.tee $73 i32.const 7184 call $~lib/string/String.__concat - local.tee $174 + local.tee $74 i32.const 7344 call $~lib/string/String.__concat - local.tee $173 + local.tee $75 i32.const 7504 call $~lib/string/String.__concat - local.tee $172 + local.tee $76 call $~lib/util/string/strtod f64.const 1797693134862315708145274e284 f64.ne @@ -10147,8 +10145,8 @@ end i32.const 10352 call $~lib/util/string/strtod - local.tee $210 - local.get $210 + local.tee $2 + local.get $2 f64.eq if i32.const 0 @@ -10173,8 +10171,8 @@ i32.const 320 i32.const 10416 call $~lib/string/String.__concat - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10196,7 +10194,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release i32.const 272 i32.const 272 @@ -10528,15 +10526,15 @@ end i32.const 65377 call $~lib/string/String.fromCodePoint - local.tee $211 + local.tee $11 i32.const 55296 call $~lib/string/String.fromCodePoint - local.tee $209 + local.tee $8 i32.const 56322 call $~lib/string/String.fromCodePoint - local.tee $0 - call $~lib/string/String.__concat local.tee $1 + call $~lib/string/String.__concat + local.tee $0 call $~lib/string/String.__gt i32.eqz if @@ -10547,14 +10545,14 @@ call $~lib/builtins/abort unreachable end - local.get $211 - call $~lib/rt/pure/__release - local.get $209 + local.get $11 call $~lib/rt/pure/__release - local.get $0 + 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 864 call $~lib/string/String#get:length i32.const 3 @@ -10570,7 +10568,7 @@ i32.const 272 i32.const 100 call $~lib/string/String#repeat - local.tee $171 + local.tee $77 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10585,7 +10583,7 @@ i32.const 320 i32.const 0 call $~lib/string/String#repeat - local.tee $170 + local.tee $78 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10600,7 +10598,7 @@ i32.const 320 i32.const 1 call $~lib/string/String#repeat - local.tee $169 + local.tee $79 i32.const 320 call $~lib/string/String.__eq i32.eqz @@ -10615,7 +10613,7 @@ i32.const 320 i32.const 2 call $~lib/string/String#repeat - local.tee $168 + local.tee $80 i32.const 10864 call $~lib/string/String.__eq i32.eqz @@ -10630,7 +10628,7 @@ i32.const 320 i32.const 3 call $~lib/string/String#repeat - local.tee $167 + local.tee $81 i32.const 10944 call $~lib/string/String.__eq i32.eqz @@ -10645,7 +10643,7 @@ i32.const 10448 i32.const 4 call $~lib/string/String#repeat - local.tee $166 + local.tee $82 i32.const 10976 call $~lib/string/String.__eq i32.eqz @@ -10660,7 +10658,7 @@ i32.const 320 i32.const 5 call $~lib/string/String#repeat - local.tee $165 + local.tee $83 i32.const 11008 call $~lib/string/String.__eq i32.eqz @@ -10675,7 +10673,7 @@ i32.const 320 i32.const 6 call $~lib/string/String#repeat - local.tee $164 + local.tee $84 i32.const 11040 call $~lib/string/String.__eq i32.eqz @@ -10690,7 +10688,7 @@ i32.const 320 i32.const 7 call $~lib/string/String#repeat - local.tee $163 + local.tee $85 i32.const 11072 call $~lib/string/String.__eq i32.eqz @@ -10706,7 +10704,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $162 + local.tee $86 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10722,7 +10720,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $161 + local.tee $87 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10738,7 +10736,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replace - local.tee $160 + local.tee $88 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -10754,7 +10752,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replace - local.tee $159 + local.tee $89 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10770,7 +10768,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $158 + local.tee $90 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10786,7 +10784,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replace - local.tee $157 + local.tee $91 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -10802,7 +10800,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replace - local.tee $156 + local.tee $92 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10818,7 +10816,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replace - local.tee $155 + local.tee $93 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10834,7 +10832,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replace - local.tee $154 + local.tee $94 i32.const 11136 call $~lib/string/String.__eq i32.eqz @@ -10850,7 +10848,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replace - local.tee $153 + local.tee $95 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10866,7 +10864,7 @@ i32.const 11232 i32.const 4576 call $~lib/string/String#replace - local.tee $152 + local.tee $96 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -10882,7 +10880,7 @@ i32.const 11264 i32.const 11296 call $~lib/string/String#replace - local.tee $151 + local.tee $97 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -10898,7 +10896,7 @@ i32.const 11264 i32.const 272 call $~lib/string/String#replace - local.tee $150 + local.tee $98 i32.const 10448 call $~lib/string/String.__eq i32.eqz @@ -10914,7 +10912,7 @@ i32.const 272 i32.const 800 call $~lib/string/String#replaceAll - local.tee $149 + local.tee $99 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10930,7 +10928,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $148 + local.tee $100 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -10946,7 +10944,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $147 + local.tee $101 i32.const 11296 call $~lib/string/String.__eq i32.eqz @@ -10962,7 +10960,7 @@ i32.const 800 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $146 + local.tee $102 i32.const 11408 call $~lib/string/String.__eq i32.eqz @@ -10978,7 +10976,7 @@ i32.const 10448 i32.const 10448 call $~lib/string/String#replaceAll - local.tee $145 + local.tee $103 i32.const 992 call $~lib/string/String.__eq i32.eqz @@ -10994,7 +10992,7 @@ i32.const 320 i32.const 11408 call $~lib/string/String#replaceAll - local.tee $144 + local.tee $104 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -11010,7 +11008,7 @@ i32.const 10448 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $143 + local.tee $105 i32.const 11520 call $~lib/string/String.__eq i32.eqz @@ -11026,7 +11024,7 @@ i32.const 11584 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $142 + local.tee $106 i32.const 11616 call $~lib/string/String.__eq i32.eqz @@ -11042,7 +11040,7 @@ i32.const 1248 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $141 + local.tee $107 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11058,7 +11056,7 @@ i32.const 11648 i32.const 11296 call $~lib/string/String#replaceAll - local.tee $140 + local.tee $108 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11074,7 +11072,7 @@ i32.const 11680 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $139 + local.tee $109 i32.const 11712 call $~lib/string/String.__eq i32.eqz @@ -11090,7 +11088,7 @@ i32.const 10448 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $138 + local.tee $110 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11106,7 +11104,7 @@ i32.const 4608 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $137 + local.tee $111 i32.const 11744 call $~lib/string/String.__eq i32.eqz @@ -11122,7 +11120,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $136 + local.tee $112 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11138,7 +11136,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $135 + local.tee $113 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11154,7 +11152,7 @@ i32.const 4576 i32.const 272 call $~lib/string/String#replaceAll - local.tee $134 + local.tee $114 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11170,7 +11168,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $133 + local.tee $115 i32.const 4576 call $~lib/string/String.__eq i32.eqz @@ -11186,7 +11184,7 @@ i32.const 800 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $132 + local.tee $116 i32.const 4608 call $~lib/string/String.__eq i32.eqz @@ -11202,7 +11200,7 @@ i32.const 1216 i32.const 4608 call $~lib/string/String#replaceAll - local.tee $131 + local.tee $117 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11218,7 +11216,7 @@ i32.const 272 i32.const 4576 call $~lib/string/String#replaceAll - local.tee $130 + local.tee $118 i32.const 11776 call $~lib/string/String.__eq i32.eqz @@ -11234,7 +11232,7 @@ i32.const 272 i32.const 272 call $~lib/string/String#replaceAll - local.tee $129 + local.tee $119 i32.const 800 call $~lib/string/String.__eq i32.eqz @@ -11254,7 +11252,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#slice - local.tee $128 + local.tee $120 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11270,7 +11268,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#slice - local.tee $127 + local.tee $121 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11286,7 +11284,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#slice - local.tee $126 + local.tee $122 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11302,7 +11300,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#slice - local.tee $125 + local.tee $123 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11334,7 +11332,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#slice - local.tee $123 + local.tee $125 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11350,7 +11348,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#slice - local.tee $122 + local.tee $126 i32.const 11984 call $~lib/string/String.__eq i32.eqz @@ -11366,7 +11364,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substr - local.tee $121 + local.tee $127 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11382,7 +11380,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substr - local.tee $120 + local.tee $128 i32.const 11856 call $~lib/string/String.__eq i32.eqz @@ -11398,7 +11396,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substr - local.tee $119 + local.tee $129 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -11414,7 +11412,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substr - local.tee $118 + local.tee $130 i32.const 12032 call $~lib/string/String.__eq i32.eqz @@ -11430,7 +11428,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substr - local.tee $117 + local.tee $131 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11446,7 +11444,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substr - local.tee $116 + local.tee $132 i32.const 12064 call $~lib/string/String.__eq i32.eqz @@ -11462,7 +11460,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substr - local.tee $115 + local.tee $133 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11478,7 +11476,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substr - local.tee $114 + local.tee $134 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11494,7 +11492,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substr - local.tee $113 + local.tee $135 i32.const 12096 call $~lib/string/String.__eq i32.eqz @@ -11510,7 +11508,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substr - local.tee $112 + local.tee $136 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11526,7 +11524,7 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#substring - local.tee $111 + local.tee $137 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11542,7 +11540,7 @@ i32.const -1 i32.const 2147483647 call $~lib/string/String#substring - local.tee $110 + local.tee $138 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11558,7 +11556,7 @@ i32.const -5 i32.const 2147483647 call $~lib/string/String#substring - local.tee $109 + local.tee $139 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11574,7 +11572,7 @@ i32.const 2 i32.const 7 call $~lib/string/String#substring - local.tee $108 + local.tee $140 i32.const 11920 call $~lib/string/String.__eq i32.eqz @@ -11590,7 +11588,7 @@ i32.const -11 i32.const -6 call $~lib/string/String#substring - local.tee $107 + local.tee $141 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11606,7 +11604,7 @@ i32.const 4 i32.const 3 call $~lib/string/String#substring - local.tee $106 + local.tee $142 i32.const 12128 call $~lib/string/String.__eq i32.eqz @@ -11622,7 +11620,7 @@ i32.const 0 i32.const -1 call $~lib/string/String#substring - local.tee $105 + local.tee $143 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11638,7 +11636,7 @@ i32.const 0 i32.const 100 call $~lib/string/String#substring - local.tee $104 + local.tee $144 i32.const 11808 call $~lib/string/String.__eq i32.eqz @@ -11654,7 +11652,7 @@ i32.const 4 i32.const 4 call $~lib/string/String#substring - local.tee $103 + local.tee $145 i32.const 272 call $~lib/string/String.__eq i32.eqz @@ -11670,7 +11668,7 @@ i32.const 4 i32.const -3 call $~lib/string/String#substring - local.tee $102 + local.tee $146 i32.const 1248 call $~lib/string/String.__eq i32.eqz @@ -11686,25 +11684,22 @@ i32.const 0 i32.const 2147483647 call $~lib/string/String#split - local.tee $209 + local.tee $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $209 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 272 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $9 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $9 i32.eqz if i32.const 0 @@ -11719,7 +11714,7 @@ i32.const 2147483647 call $~lib/string/String#split local.set $0 - local.get $209 + local.get $1 call $~lib/rt/pure/__release local.get $0 i32.load offset=12 @@ -11735,27 +11730,25 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split + local.set $9 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $9 i32.load offset=12 i32.const 1 i32.eq if - local.get $0 + local.get $9 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 272 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $13 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $13 i32.eqz if i32.const 0 @@ -11769,27 +11762,25 @@ i32.const 4768 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $1 + local.get $9 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 12384 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $5 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $5 i32.eqz if i32.const 0 @@ -11803,57 +11794,49 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $5 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $5 i32.load offset=12 i32.const 3 i32.eq if - local.get $0 + local.get $5 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $14 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $14 if - local.get $0 + local.get $5 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $15 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $15 if - local.get $0 + local.get $5 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $16 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $16 i32.eqz if i32.const 0 @@ -11867,57 +11850,49 @@ i32.const 12448 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $1 + local.get $5 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.load offset=12 i32.const 3 i32.eq if - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $17 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $17 if - local.get $0 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $18 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $18 if - local.get $0 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $3 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $3 i32.eqz if i32.const 0 @@ -11931,72 +11906,61 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $3 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $3 i32.load offset=12 i32.const 4 i32.eq if - local.get $0 + local.get $3 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $19 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $19 if - local.get $0 + local.get $3 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $20 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $20 if - local.get $0 + local.get $3 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 272 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $21 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $21 if - local.get $0 + local.get $3 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $22 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $22 i32.eqz if i32.const 0 @@ -12010,72 +11974,61 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $1 + local.get $3 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.load offset=12 i32.const 4 i32.eq if - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 272 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $23 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $23 if - local.get $0 + local.get $1 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $24 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $24 if - local.get $0 + local.get $1 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $25 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $25 if - local.get $0 + local.get $1 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $4 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $4 i32.eqz if i32.const 0 @@ -12089,72 +12042,61 @@ i32.const 1056 i32.const 2147483647 call $~lib/string/String#split - local.get $0 + local.set $4 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $4 i32.load offset=12 i32.const 4 i32.eq if - local.get $0 + local.get $4 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $26 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $26 if - local.get $0 + local.get $4 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $27 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $27 if - local.get $0 + local.get $4 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $28 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $28 if - local.get $0 + local.get $4 i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 272 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $29 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $29 i32.eqz if i32.const 0 @@ -12169,7 +12111,7 @@ i32.const 2147483647 call $~lib/string/String#split local.set $1 - local.get $0 + local.get $4 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -12182,14 +12124,11 @@ local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 + local.set $30 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $30 if local.get $1 i32.const 1 @@ -12197,14 +12136,11 @@ local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 + local.set $31 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $31 if local.get $1 i32.const 2 @@ -12212,14 +12148,11 @@ local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 + local.set $10 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $10 i32.eqz if i32.const 0 @@ -12250,27 +12183,25 @@ i32.const 272 i32.const 1 call $~lib/string/String#split + local.set $10 local.get $0 call $~lib/rt/pure/__release - local.tee $0 + local.get $10 i32.load offset=12 i32.const 1 i32.eq if - local.get $0 + local.get $10 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $32 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $32 i32.eqz if i32.const 0 @@ -12284,27 +12215,25 @@ i32.const 1056 i32.const 1 call $~lib/string/String#split - local.get $0 + local.set $1 + local.get $10 call $~lib/rt/pure/__release - local.tee $0 + local.get $1 i32.load offset=12 i32.const 1 i32.eq if - local.get $0 + local.get $1 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $6 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $6 i32.eqz if i32.const 0 @@ -12318,57 +12247,49 @@ i32.const 272 i32.const 4 call $~lib/string/String#split - local.get $0 + local.set $6 + local.get $1 call $~lib/rt/pure/__release - local.tee $0 + local.get $6 i32.load offset=12 i32.const 3 i32.eq if - local.get $0 + local.get $6 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $33 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $33 if - local.get $0 + local.get $6 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $34 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $34 if - local.get $0 + local.get $6 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $7 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $7 i32.eqz if i32.const 0 @@ -12382,57 +12303,49 @@ i32.const 272 i32.const -1 call $~lib/string/String#split - local.get $0 + local.set $7 + local.get $6 call $~lib/rt/pure/__release - local.tee $0 + local.get $7 i32.load offset=12 i32.const 3 i32.eq if - local.get $0 + local.get $7 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $35 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $35 if - local.get $0 + local.get $7 i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $36 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $36 if - local.get $0 + local.get $7 i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - local.tee $1 + local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 - local.get $1 + local.set $37 + local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $37 i32.eqz if i32.const 0 @@ -12447,7 +12360,7 @@ i32.const -1 call $~lib/string/String#split local.set $1 - local.get $0 + local.get $7 call $~lib/rt/pure/__release local.get $1 i32.load offset=12 @@ -12460,14 +12373,11 @@ local.tee $0 i32.const 320 call $~lib/string/String.__eq - local.set $211 + local.set $38 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $38 if local.get $1 i32.const 1 @@ -12475,14 +12385,11 @@ local.tee $0 i32.const 10416 call $~lib/string/String.__eq - local.set $211 + local.set $39 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $39 if local.get $1 i32.const 2 @@ -12490,14 +12397,11 @@ local.tee $0 i32.const 11264 call $~lib/string/String.__eq - local.set $211 + local.set $40 local.get $0 call $~lib/rt/pure/__release - else - i32.const 0 - local.set $211 end - local.get $211 + local.get $40 i32.eqz if i32.const 0 @@ -12511,7 +12415,7 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/util/number/itoa32 - local.tee $101 + local.tee $147 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12525,7 +12429,7 @@ end i32.const 1 call $~lib/util/number/itoa32 - local.tee $100 + local.tee $148 i32.const 1488 call $~lib/string/String.__eq i32.eqz @@ -12539,7 +12443,7 @@ end i32.const 8 call $~lib/util/number/itoa32 - local.tee $99 + local.tee $149 i32.const 12576 call $~lib/string/String.__eq i32.eqz @@ -12553,7 +12457,7 @@ end i32.const 12 call $~lib/util/number/itoa32 - local.tee $98 + local.tee $150 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12567,7 +12471,7 @@ end i32.const 123 call $~lib/util/number/itoa32 - local.tee $97 + local.tee $151 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12581,7 +12485,7 @@ end i32.const -1000 call $~lib/util/number/itoa32 - local.tee $96 + local.tee $152 i32.const 12640 call $~lib/string/String.__eq i32.eqz @@ -12595,7 +12499,7 @@ end i32.const 1234 call $~lib/util/number/itoa32 - local.tee $95 + local.tee $153 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12609,7 +12513,7 @@ end i32.const 12345 call $~lib/util/number/itoa32 - local.tee $94 + local.tee $154 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12623,7 +12527,7 @@ end i32.const 123456 call $~lib/util/number/itoa32 - local.tee $93 + local.tee $155 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12637,7 +12541,7 @@ end i32.const 1111111 call $~lib/util/number/itoa32 - local.tee $92 + local.tee $156 i32.const 12768 call $~lib/string/String.__eq i32.eqz @@ -12651,7 +12555,7 @@ end i32.const 1234567 call $~lib/util/number/itoa32 - local.tee $91 + local.tee $157 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12665,7 +12569,7 @@ end i32.const 12345678 call $~lib/util/number/itoa32 - local.tee $90 + local.tee $158 i32.const 12832 call $~lib/string/String.__eq i32.eqz @@ -12679,7 +12583,7 @@ end i32.const 123456789 call $~lib/util/number/itoa32 - local.tee $89 + local.tee $159 i32.const 12864 call $~lib/string/String.__eq i32.eqz @@ -12693,7 +12597,7 @@ end i32.const 2147483646 call $~lib/util/number/itoa32 - local.tee $88 + local.tee $160 i32.const 12912 call $~lib/string/String.__eq i32.eqz @@ -12707,7 +12611,7 @@ end i32.const 2147483647 call $~lib/util/number/itoa32 - local.tee $87 + local.tee $161 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12721,7 +12625,7 @@ end i32.const -2147483648 call $~lib/util/number/itoa32 - local.tee $86 + local.tee $162 i32.const 13008 call $~lib/string/String.__eq i32.eqz @@ -12735,7 +12639,7 @@ end i32.const -1 call $~lib/util/number/itoa32 - local.tee $85 + local.tee $163 i32.const 13056 call $~lib/string/String.__eq i32.eqz @@ -12749,7 +12653,7 @@ end i32.const 0 call $~lib/util/number/utoa32 - local.tee $84 + local.tee $164 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12763,7 +12667,7 @@ end i32.const 1000 call $~lib/util/number/utoa32 - local.tee $83 + local.tee $165 i32.const 13088 call $~lib/string/String.__eq i32.eqz @@ -12777,7 +12681,7 @@ end i32.const 2147483647 call $~lib/util/number/utoa32 - local.tee $82 + local.tee $166 i32.const 12960 call $~lib/string/String.__eq i32.eqz @@ -12791,7 +12695,7 @@ end i32.const -2147483648 call $~lib/util/number/utoa32 - local.tee $81 + local.tee $167 i32.const 13120 call $~lib/string/String.__eq i32.eqz @@ -12805,7 +12709,7 @@ end i32.const -1 call $~lib/util/number/utoa32 - local.tee $80 + local.tee $168 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12819,7 +12723,7 @@ end i64.const 0 call $~lib/util/number/utoa64 - local.tee $79 + local.tee $169 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -12833,7 +12737,7 @@ end i64.const 12 call $~lib/util/number/utoa64 - local.tee $78 + local.tee $170 i32.const 12608 call $~lib/string/String.__eq i32.eqz @@ -12847,7 +12751,7 @@ end i64.const 123 call $~lib/util/number/utoa64 - local.tee $77 + local.tee $171 i32.const 864 call $~lib/string/String.__eq i32.eqz @@ -12861,7 +12765,7 @@ end i64.const 1234 call $~lib/util/number/utoa64 - local.tee $76 + local.tee $172 i32.const 12672 call $~lib/string/String.__eq i32.eqz @@ -12875,7 +12779,7 @@ end i64.const 12345 call $~lib/util/number/utoa64 - local.tee $75 + local.tee $173 i32.const 12704 call $~lib/string/String.__eq i32.eqz @@ -12889,7 +12793,7 @@ end i64.const 123456 call $~lib/util/number/utoa64 - local.tee $74 + local.tee $174 i32.const 12736 call $~lib/string/String.__eq i32.eqz @@ -12903,7 +12807,7 @@ end i64.const 1234567 call $~lib/util/number/utoa64 - local.tee $73 + local.tee $175 i32.const 12800 call $~lib/string/String.__eq i32.eqz @@ -12917,7 +12821,7 @@ end i64.const 99999999 call $~lib/util/number/utoa64 - local.tee $72 + local.tee $176 i32.const 13216 call $~lib/string/String.__eq i32.eqz @@ -12931,7 +12835,7 @@ end i64.const 100000000 call $~lib/util/number/utoa64 - local.tee $71 + local.tee $177 i32.const 13248 call $~lib/string/String.__eq i32.eqz @@ -12945,7 +12849,7 @@ end i64.const 4294967295 call $~lib/util/number/utoa64 - local.tee $70 + local.tee $178 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -12959,7 +12863,7 @@ end i64.const 4294967297 call $~lib/util/number/utoa64 - local.tee $69 + local.tee $179 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -12973,7 +12877,7 @@ end i64.const 68719476735 call $~lib/util/number/utoa64 - local.tee $68 + local.tee $180 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -12987,7 +12891,7 @@ end i64.const 868719476735 call $~lib/util/number/utoa64 - local.tee $67 + local.tee $181 i32.const 13392 call $~lib/string/String.__eq i32.eqz @@ -13001,7 +12905,7 @@ end i64.const 8687194767350 call $~lib/util/number/utoa64 - local.tee $66 + local.tee $182 i32.const 13440 call $~lib/string/String.__eq i32.eqz @@ -13015,7 +12919,7 @@ end i64.const 86871947673501 call $~lib/util/number/utoa64 - local.tee $65 + local.tee $183 i32.const 13488 call $~lib/string/String.__eq i32.eqz @@ -13029,7 +12933,7 @@ end i64.const 999868719476735 call $~lib/util/number/utoa64 - local.tee $64 + local.tee $184 i32.const 13536 call $~lib/string/String.__eq i32.eqz @@ -13043,7 +12947,7 @@ end i64.const 9999868719476735 call $~lib/util/number/utoa64 - local.tee $63 + local.tee $185 i32.const 13584 call $~lib/string/String.__eq i32.eqz @@ -13057,7 +12961,7 @@ end i64.const 19999868719476735 call $~lib/util/number/utoa64 - local.tee $62 + local.tee $186 i32.const 13632 call $~lib/string/String.__eq i32.eqz @@ -13071,7 +12975,7 @@ end i64.const 129999868719476735 call $~lib/util/number/utoa64 - local.tee $61 + local.tee $187 i32.const 13696 call $~lib/string/String.__eq i32.eqz @@ -13085,7 +12989,7 @@ end i64.const 1239999868719476735 call $~lib/util/number/utoa64 - local.tee $60 + local.tee $188 i32.const 13760 call $~lib/string/String.__eq i32.eqz @@ -13099,7 +13003,7 @@ end i64.const -1 call $~lib/util/number/utoa64 - local.tee $59 + local.tee $189 i32.const 13824 call $~lib/string/String.__eq i32.eqz @@ -13113,7 +13017,7 @@ end i64.const 0 call $~lib/util/number/itoa64 - local.tee $58 + local.tee $190 i32.const 1424 call $~lib/string/String.__eq i32.eqz @@ -13127,7 +13031,7 @@ end i64.const -1234 call $~lib/util/number/itoa64 - local.tee $57 + local.tee $191 i32.const 13888 call $~lib/string/String.__eq i32.eqz @@ -13141,7 +13045,7 @@ end i64.const 4294967295 call $~lib/util/number/itoa64 - local.tee $56 + local.tee $192 i32.const 13168 call $~lib/string/String.__eq i32.eqz @@ -13155,7 +13059,7 @@ end i64.const 4294967297 call $~lib/util/number/itoa64 - local.tee $55 + local.tee $193 i32.const 13296 call $~lib/string/String.__eq i32.eqz @@ -13169,7 +13073,7 @@ end i64.const -4294967295 call $~lib/util/number/itoa64 - local.tee $54 + local.tee $194 i32.const 13920 call $~lib/string/String.__eq i32.eqz @@ -13183,7 +13087,7 @@ end i64.const 68719476735 call $~lib/util/number/itoa64 - local.tee $53 + local.tee $195 i32.const 13344 call $~lib/string/String.__eq i32.eqz @@ -13197,7 +13101,7 @@ end i64.const -68719476735 call $~lib/util/number/itoa64 - local.tee $52 + local.tee $196 i32.const 13968 call $~lib/string/String.__eq i32.eqz @@ -13211,7 +13115,7 @@ end i64.const -868719476735 call $~lib/util/number/itoa64 - local.tee $51 + local.tee $197 i32.const 14016 call $~lib/string/String.__eq i32.eqz @@ -13225,7 +13129,7 @@ end i64.const -999868719476735 call $~lib/util/number/itoa64 - local.tee $50 + local.tee $198 i32.const 14064 call $~lib/string/String.__eq i32.eqz @@ -13239,7 +13143,7 @@ end i64.const -19999868719476735 call $~lib/util/number/itoa64 - local.tee $49 + local.tee $199 i32.const 14112 call $~lib/string/String.__eq i32.eqz @@ -13253,7 +13157,7 @@ end i64.const 9223372036854775807 call $~lib/util/number/itoa64 - local.tee $48 + local.tee $200 i32.const 14176 call $~lib/string/String.__eq i32.eqz @@ -13267,7 +13171,7 @@ end i64.const -9223372036854775808 call $~lib/util/number/itoa64 - local.tee $47 + local.tee $201 i32.const 14240 call $~lib/string/String.__eq i32.eqz @@ -13281,7 +13185,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $46 + local.tee $202 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13295,7 +13199,7 @@ end f64.const -0 call $~lib/util/number/dtoa - local.tee $45 + local.tee $203 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13309,7 +13213,7 @@ end f64.const nan:0x8000000000000 call $~lib/util/number/dtoa - local.tee $44 + local.tee $204 i32.const 4832 call $~lib/string/String.__eq i32.eqz @@ -13323,7 +13227,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $43 + local.tee $205 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13337,7 +13241,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $42 + local.tee $206 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13351,7 +13255,7 @@ end f64.const 2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $41 + local.tee $207 i32.const 5344 call $~lib/string/String.__eq i32.eqz @@ -13365,7 +13269,7 @@ end f64.const -2.220446049250313e-16 call $~lib/util/number/dtoa - local.tee $40 + local.tee $208 i32.const 15344 call $~lib/string/String.__eq i32.eqz @@ -13379,7 +13283,7 @@ end f64.const 1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $39 + local.tee $209 i32.const 5408 call $~lib/string/String.__eq i32.eqz @@ -13393,7 +13297,7 @@ end f64.const -1797693134862315708145274e284 call $~lib/util/number/dtoa - local.tee $38 + local.tee $210 i32.const 15408 call $~lib/string/String.__eq i32.eqz @@ -13407,7 +13311,7 @@ end f64.const 4185580496821356722454785e274 call $~lib/util/number/dtoa - local.tee $37 + local.tee $211 i32.const 15472 call $~lib/string/String.__eq i32.eqz @@ -13421,7 +13325,7 @@ end f64.const 2.2250738585072014e-308 call $~lib/util/number/dtoa - local.tee $36 + local.tee $12 i32.const 15536 call $~lib/string/String.__eq i32.eqz @@ -13435,7 +13339,7 @@ end f64.const 4.940656e-318 call $~lib/util/number/dtoa - local.tee $35 + local.tee $11 i32.const 15600 call $~lib/string/String.__eq i32.eqz @@ -13449,7 +13353,7 @@ end f64.const 9060801153433600 call $~lib/util/number/dtoa - local.tee $34 + local.tee $8 i32.const 15648 call $~lib/string/String.__eq i32.eqz @@ -13463,7 +13367,7 @@ end f64.const 4708356024711512064 call $~lib/util/number/dtoa - local.tee $33 + local.tee $9 i32.const 15712 call $~lib/string/String.__eq i32.eqz @@ -13477,7 +13381,7 @@ end f64.const 9409340012568248320 call $~lib/util/number/dtoa - local.tee $32 + local.tee $13 i32.const 15776 call $~lib/string/String.__eq i32.eqz @@ -13491,7 +13395,7 @@ end f64.const 5e-324 call $~lib/util/number/dtoa - local.tee $31 + local.tee $5 i32.const 5472 call $~lib/string/String.__eq i32.eqz @@ -13505,7 +13409,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $30 + local.tee $14 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13519,7 +13423,7 @@ end f64.const 0.1 call $~lib/util/number/dtoa - local.tee $29 + local.tee $15 i32.const 2480 call $~lib/string/String.__eq i32.eqz @@ -13533,7 +13437,7 @@ end f64.const -1 call $~lib/util/number/dtoa - local.tee $28 + local.tee $16 i32.const 15872 call $~lib/string/String.__eq i32.eqz @@ -13547,7 +13451,7 @@ end f64.const -0.1 call $~lib/util/number/dtoa - local.tee $27 + local.tee $17 i32.const 15904 call $~lib/string/String.__eq i32.eqz @@ -13561,7 +13465,7 @@ end f64.const 1e6 call $~lib/util/number/dtoa - local.tee $26 + local.tee $18 i32.const 15936 call $~lib/string/String.__eq i32.eqz @@ -13575,7 +13479,7 @@ end f64.const 1e-06 call $~lib/util/number/dtoa - local.tee $25 + local.tee $3 i32.const 15984 call $~lib/string/String.__eq i32.eqz @@ -13589,7 +13493,7 @@ end f64.const -1e6 call $~lib/util/number/dtoa - local.tee $24 + local.tee $19 i32.const 16016 call $~lib/string/String.__eq i32.eqz @@ -13603,7 +13507,7 @@ end f64.const -1e-06 call $~lib/util/number/dtoa - local.tee $23 + local.tee $20 i32.const 16064 call $~lib/string/String.__eq i32.eqz @@ -13617,7 +13521,7 @@ end f64.const 1e7 call $~lib/util/number/dtoa - local.tee $22 + local.tee $21 i32.const 16112 call $~lib/string/String.__eq i32.eqz @@ -13631,7 +13535,7 @@ end f64.const 1e-07 call $~lib/util/number/dtoa - local.tee $21 + local.tee $22 i32.const 16160 call $~lib/string/String.__eq i32.eqz @@ -13645,7 +13549,7 @@ end f64.const 1.e+308 call $~lib/util/number/dtoa - local.tee $20 + local.tee $23 i32.const 2704 call $~lib/string/String.__eq i32.eqz @@ -13659,7 +13563,7 @@ end f64.const -1.e+308 call $~lib/util/number/dtoa - local.tee $19 + local.tee $24 i32.const 16192 call $~lib/string/String.__eq i32.eqz @@ -13673,7 +13577,7 @@ end f64.const inf call $~lib/util/number/dtoa - local.tee $18 + local.tee $25 i32.const 14336 call $~lib/string/String.__eq i32.eqz @@ -13687,7 +13591,7 @@ end f64.const -inf call $~lib/util/number/dtoa - local.tee $17 + local.tee $4 i32.const 6048 call $~lib/string/String.__eq i32.eqz @@ -13701,7 +13605,7 @@ end f64.const 1e-308 call $~lib/util/number/dtoa - local.tee $16 + local.tee $26 i32.const 16224 call $~lib/string/String.__eq i32.eqz @@ -13715,7 +13619,7 @@ end f64.const -1e-308 call $~lib/util/number/dtoa - local.tee $15 + local.tee $27 i32.const 16256 call $~lib/string/String.__eq i32.eqz @@ -13729,7 +13633,7 @@ end f64.const 1e-323 call $~lib/util/number/dtoa - local.tee $14 + local.tee $28 i32.const 16288 call $~lib/string/String.__eq i32.eqz @@ -13743,7 +13647,7 @@ end f64.const -1e-323 call $~lib/util/number/dtoa - local.tee $13 + local.tee $29 i32.const 16320 call $~lib/string/String.__eq i32.eqz @@ -13757,7 +13661,7 @@ end f64.const 0 call $~lib/util/number/dtoa - local.tee $12 + local.tee $30 i32.const 14304 call $~lib/string/String.__eq i32.eqz @@ -13771,7 +13675,7 @@ end f64.const 4294967272 call $~lib/util/number/dtoa - local.tee $11 + local.tee $31 i32.const 16352 call $~lib/string/String.__eq i32.eqz @@ -13799,7 +13703,7 @@ end f64.const 555555555.5555556 call $~lib/util/number/dtoa - local.tee $9 + local.tee $32 i32.const 16464 call $~lib/string/String.__eq i32.eqz @@ -13813,7 +13717,7 @@ end f64.const 0.9999999999999999 call $~lib/util/number/dtoa - local.tee $8 + local.tee $6 i32.const 16528 call $~lib/string/String.__eq i32.eqz @@ -13827,7 +13731,7 @@ end f64.const 1 call $~lib/util/number/dtoa - local.tee $7 + local.tee $33 i32.const 15840 call $~lib/string/String.__eq i32.eqz @@ -13841,7 +13745,7 @@ end f64.const 12.34 call $~lib/util/number/dtoa - local.tee $6 + local.tee $34 i32.const 16592 call $~lib/string/String.__eq i32.eqz @@ -13855,7 +13759,7 @@ end f64.const 0.3333333333333333 call $~lib/util/number/dtoa - local.tee $5 + local.tee $7 i32.const 16624 call $~lib/string/String.__eq i32.eqz @@ -13869,7 +13773,7 @@ end f64.const 1234e17 call $~lib/util/number/dtoa - local.tee $4 + local.tee $35 i32.const 16688 call $~lib/string/String.__eq i32.eqz @@ -13883,7 +13787,7 @@ end f64.const 1234e18 call $~lib/util/number/dtoa - local.tee $3 + local.tee $36 i32.const 16752 call $~lib/string/String.__eq i32.eqz @@ -13897,7 +13801,7 @@ end f64.const 2.71828 call $~lib/util/number/dtoa - local.tee $2 + local.tee $37 i32.const 16800 call $~lib/string/String.__eq i32.eqz @@ -13911,7 +13815,7 @@ end f64.const 0.0271828 call $~lib/util/number/dtoa - local.tee $208 + local.tee $38 i32.const 16832 call $~lib/string/String.__eq i32.eqz @@ -13925,7 +13829,7 @@ end f64.const 271.828 call $~lib/util/number/dtoa - local.tee $211 + local.tee $39 i32.const 16880 call $~lib/string/String.__eq i32.eqz @@ -13939,7 +13843,7 @@ end f64.const 1.1e+128 call $~lib/util/number/dtoa - local.tee $209 + local.tee $40 i32.const 16912 call $~lib/string/String.__eq i32.eqz @@ -13953,7 +13857,7 @@ end f64.const 1.1e-64 call $~lib/util/number/dtoa - local.tee $0 + local.tee $1 i32.const 16944 call $~lib/string/String.__eq i32.eqz @@ -13967,7 +13871,7 @@ end f64.const 0.000035689 call $~lib/util/number/dtoa - local.tee $1 + local.tee $0 i32.const 16976 call $~lib/string/String.__eq i32.eqz @@ -13981,428 +13885,428 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $207 + local.get $41 call $~lib/rt/pure/__release - local.get $206 + local.get $42 call $~lib/rt/pure/__release - local.get $205 + local.get $43 call $~lib/rt/pure/__release - local.get $204 + local.get $44 call $~lib/rt/pure/__release - local.get $203 + local.get $45 call $~lib/rt/pure/__release - local.get $202 + local.get $46 call $~lib/rt/pure/__release - local.get $201 + local.get $47 call $~lib/rt/pure/__release - local.get $200 + local.get $48 call $~lib/rt/pure/__release - local.get $199 + local.get $49 call $~lib/rt/pure/__release - local.get $198 + local.get $50 call $~lib/rt/pure/__release - local.get $197 + local.get $51 call $~lib/rt/pure/__release - local.get $196 + local.get $52 call $~lib/rt/pure/__release - local.get $195 + local.get $53 call $~lib/rt/pure/__release - local.get $194 + local.get $54 call $~lib/rt/pure/__release - local.get $193 + local.get $55 call $~lib/rt/pure/__release - local.get $192 + local.get $56 call $~lib/rt/pure/__release - local.get $191 + local.get $57 call $~lib/rt/pure/__release - local.get $190 + local.get $58 call $~lib/rt/pure/__release - local.get $189 + local.get $59 call $~lib/rt/pure/__release - local.get $188 + local.get $60 call $~lib/rt/pure/__release - local.get $187 + local.get $61 call $~lib/rt/pure/__release - local.get $186 + local.get $62 call $~lib/rt/pure/__release - local.get $185 + local.get $63 call $~lib/rt/pure/__release - local.get $184 + local.get $64 call $~lib/rt/pure/__release - local.get $183 + local.get $65 call $~lib/rt/pure/__release - local.get $182 + local.get $66 call $~lib/rt/pure/__release - local.get $181 + local.get $67 call $~lib/rt/pure/__release - local.get $180 + local.get $68 call $~lib/rt/pure/__release - local.get $179 + local.get $69 call $~lib/rt/pure/__release - local.get $178 + local.get $70 call $~lib/rt/pure/__release - local.get $177 + local.get $71 call $~lib/rt/pure/__release - local.get $176 + local.get $72 call $~lib/rt/pure/__release - local.get $175 + local.get $73 call $~lib/rt/pure/__release - local.get $174 + local.get $74 call $~lib/rt/pure/__release - local.get $173 + local.get $75 call $~lib/rt/pure/__release - local.get $172 + local.get $76 call $~lib/rt/pure/__release - local.get $168 + local.get $80 call $~lib/rt/pure/__release - local.get $167 + local.get $81 call $~lib/rt/pure/__release - local.get $169 + local.get $79 call $~lib/rt/pure/__release - local.get $170 + local.get $78 call $~lib/rt/pure/__release - local.get $171 + local.get $77 call $~lib/rt/pure/__release - local.get $166 + local.get $82 call $~lib/rt/pure/__release - local.get $165 + local.get $83 call $~lib/rt/pure/__release - local.get $164 + local.get $84 call $~lib/rt/pure/__release - local.get $163 + local.get $85 call $~lib/rt/pure/__release - local.get $162 + local.get $86 call $~lib/rt/pure/__release - local.get $161 + local.get $87 call $~lib/rt/pure/__release - local.get $160 + local.get $88 call $~lib/rt/pure/__release - local.get $159 + local.get $89 call $~lib/rt/pure/__release - local.get $158 + local.get $90 call $~lib/rt/pure/__release - local.get $157 + local.get $91 call $~lib/rt/pure/__release - local.get $156 + local.get $92 call $~lib/rt/pure/__release - local.get $155 + local.get $93 call $~lib/rt/pure/__release - local.get $154 + local.get $94 call $~lib/rt/pure/__release - local.get $153 + local.get $95 call $~lib/rt/pure/__release - local.get $152 + local.get $96 call $~lib/rt/pure/__release - local.get $151 + local.get $97 call $~lib/rt/pure/__release - local.get $150 + local.get $98 call $~lib/rt/pure/__release - local.get $149 + local.get $99 call $~lib/rt/pure/__release - local.get $148 + local.get $100 call $~lib/rt/pure/__release - local.get $147 + local.get $101 call $~lib/rt/pure/__release - local.get $146 + local.get $102 call $~lib/rt/pure/__release - local.get $145 + local.get $103 call $~lib/rt/pure/__release - local.get $144 + local.get $104 call $~lib/rt/pure/__release - local.get $143 + local.get $105 call $~lib/rt/pure/__release - local.get $142 + local.get $106 call $~lib/rt/pure/__release - local.get $141 + local.get $107 call $~lib/rt/pure/__release - local.get $140 + local.get $108 call $~lib/rt/pure/__release - local.get $139 + local.get $109 call $~lib/rt/pure/__release - local.get $138 + local.get $110 call $~lib/rt/pure/__release - local.get $137 + local.get $111 call $~lib/rt/pure/__release - local.get $136 + local.get $112 call $~lib/rt/pure/__release - local.get $135 + local.get $113 call $~lib/rt/pure/__release - local.get $134 + local.get $114 call $~lib/rt/pure/__release - local.get $133 + local.get $115 call $~lib/rt/pure/__release - local.get $132 + local.get $116 call $~lib/rt/pure/__release - local.get $131 + local.get $117 call $~lib/rt/pure/__release - local.get $130 + local.get $118 call $~lib/rt/pure/__release - local.get $129 + local.get $119 call $~lib/rt/pure/__release - local.get $128 + local.get $120 call $~lib/rt/pure/__release - local.get $127 + local.get $121 call $~lib/rt/pure/__release - local.get $126 + local.get $122 call $~lib/rt/pure/__release - local.get $125 + local.get $123 call $~lib/rt/pure/__release local.get $124 call $~lib/rt/pure/__release - local.get $123 - call $~lib/rt/pure/__release - local.get $122 + local.get $125 call $~lib/rt/pure/__release - local.get $121 + local.get $126 call $~lib/rt/pure/__release - local.get $120 + local.get $127 call $~lib/rt/pure/__release - local.get $119 + local.get $128 call $~lib/rt/pure/__release - local.get $118 + local.get $129 call $~lib/rt/pure/__release - local.get $117 + local.get $130 call $~lib/rt/pure/__release - local.get $116 + local.get $131 call $~lib/rt/pure/__release - local.get $115 + local.get $132 call $~lib/rt/pure/__release - local.get $114 + local.get $133 call $~lib/rt/pure/__release - local.get $113 + local.get $134 call $~lib/rt/pure/__release - local.get $112 + local.get $135 call $~lib/rt/pure/__release - local.get $111 + local.get $136 call $~lib/rt/pure/__release - local.get $110 + local.get $137 call $~lib/rt/pure/__release - local.get $109 + local.get $138 call $~lib/rt/pure/__release - local.get $108 + local.get $139 call $~lib/rt/pure/__release - local.get $107 + local.get $140 call $~lib/rt/pure/__release - local.get $106 + local.get $141 call $~lib/rt/pure/__release - local.get $105 + local.get $142 call $~lib/rt/pure/__release - local.get $104 + local.get $143 call $~lib/rt/pure/__release - local.get $103 + local.get $144 call $~lib/rt/pure/__release - local.get $102 + local.get $145 call $~lib/rt/pure/__release - local.get $101 + local.get $146 call $~lib/rt/pure/__release - local.get $99 + local.get $147 call $~lib/rt/pure/__release - local.get $100 + local.get $149 call $~lib/rt/pure/__release - local.get $98 + local.get $148 call $~lib/rt/pure/__release - local.get $97 + local.get $150 call $~lib/rt/pure/__release - local.get $96 + local.get $151 call $~lib/rt/pure/__release - local.get $95 + local.get $152 call $~lib/rt/pure/__release - local.get $94 + local.get $153 call $~lib/rt/pure/__release - local.get $93 + local.get $154 call $~lib/rt/pure/__release - local.get $92 + local.get $155 call $~lib/rt/pure/__release - local.get $91 + local.get $156 call $~lib/rt/pure/__release - local.get $90 + local.get $157 call $~lib/rt/pure/__release - local.get $89 + local.get $158 call $~lib/rt/pure/__release - local.get $88 + local.get $159 call $~lib/rt/pure/__release - local.get $87 + local.get $160 call $~lib/rt/pure/__release - local.get $86 + local.get $161 call $~lib/rt/pure/__release - local.get $85 + local.get $162 call $~lib/rt/pure/__release - local.get $84 + local.get $163 call $~lib/rt/pure/__release - local.get $83 + local.get $164 call $~lib/rt/pure/__release - local.get $82 + local.get $165 call $~lib/rt/pure/__release - local.get $81 + local.get $166 call $~lib/rt/pure/__release - local.get $80 + local.get $167 call $~lib/rt/pure/__release - local.get $79 + local.get $168 call $~lib/rt/pure/__release - local.get $78 + local.get $169 call $~lib/rt/pure/__release - local.get $77 + local.get $170 call $~lib/rt/pure/__release - local.get $76 + local.get $171 call $~lib/rt/pure/__release - local.get $75 + local.get $172 call $~lib/rt/pure/__release - local.get $74 + local.get $173 call $~lib/rt/pure/__release - local.get $73 + local.get $174 call $~lib/rt/pure/__release - local.get $72 + local.get $175 call $~lib/rt/pure/__release - local.get $71 + local.get $176 call $~lib/rt/pure/__release - local.get $70 + local.get $177 call $~lib/rt/pure/__release - local.get $69 + local.get $178 call $~lib/rt/pure/__release - local.get $68 + local.get $179 call $~lib/rt/pure/__release - local.get $67 + local.get $180 call $~lib/rt/pure/__release - local.get $66 + local.get $181 call $~lib/rt/pure/__release - local.get $65 + local.get $182 call $~lib/rt/pure/__release - local.get $64 + local.get $183 call $~lib/rt/pure/__release - local.get $63 + local.get $184 call $~lib/rt/pure/__release - local.get $62 + local.get $185 call $~lib/rt/pure/__release - local.get $61 + local.get $186 call $~lib/rt/pure/__release - local.get $60 + local.get $187 call $~lib/rt/pure/__release - local.get $59 + local.get $188 call $~lib/rt/pure/__release - local.get $58 + local.get $189 call $~lib/rt/pure/__release - local.get $57 + local.get $190 call $~lib/rt/pure/__release - local.get $56 + local.get $191 call $~lib/rt/pure/__release - local.get $55 + local.get $192 call $~lib/rt/pure/__release - local.get $54 + local.get $193 call $~lib/rt/pure/__release - local.get $53 + local.get $194 call $~lib/rt/pure/__release - local.get $52 + local.get $195 call $~lib/rt/pure/__release - local.get $51 + local.get $196 call $~lib/rt/pure/__release - local.get $50 + local.get $197 call $~lib/rt/pure/__release - local.get $49 + local.get $198 call $~lib/rt/pure/__release - local.get $48 + local.get $199 call $~lib/rt/pure/__release - local.get $47 + local.get $200 call $~lib/rt/pure/__release - local.get $46 + local.get $201 call $~lib/rt/pure/__release - local.get $45 + local.get $202 call $~lib/rt/pure/__release - local.get $44 + local.get $203 call $~lib/rt/pure/__release - local.get $43 + local.get $204 call $~lib/rt/pure/__release - local.get $42 + local.get $205 call $~lib/rt/pure/__release - local.get $41 + local.get $206 call $~lib/rt/pure/__release - local.get $40 + local.get $207 call $~lib/rt/pure/__release - local.get $39 + local.get $208 call $~lib/rt/pure/__release - local.get $38 + local.get $209 call $~lib/rt/pure/__release - local.get $37 + local.get $210 call $~lib/rt/pure/__release - local.get $36 + local.get $211 call $~lib/rt/pure/__release - local.get $35 + local.get $12 call $~lib/rt/pure/__release - local.get $34 + local.get $11 call $~lib/rt/pure/__release - local.get $33 + local.get $8 call $~lib/rt/pure/__release - local.get $32 + local.get $9 call $~lib/rt/pure/__release - local.get $31 + local.get $13 call $~lib/rt/pure/__release - local.get $30 + local.get $5 call $~lib/rt/pure/__release - local.get $29 + local.get $14 call $~lib/rt/pure/__release - local.get $28 + local.get $15 call $~lib/rt/pure/__release - local.get $27 + local.get $16 call $~lib/rt/pure/__release - local.get $26 + local.get $17 call $~lib/rt/pure/__release - local.get $25 + local.get $18 call $~lib/rt/pure/__release - local.get $24 + local.get $3 call $~lib/rt/pure/__release - local.get $23 + local.get $19 call $~lib/rt/pure/__release - local.get $22 + local.get $20 call $~lib/rt/pure/__release local.get $21 call $~lib/rt/pure/__release - local.get $20 - call $~lib/rt/pure/__release - local.get $19 + local.get $22 call $~lib/rt/pure/__release - local.get $18 + local.get $23 call $~lib/rt/pure/__release - local.get $17 + local.get $24 call $~lib/rt/pure/__release - local.get $16 + local.get $25 call $~lib/rt/pure/__release - local.get $15 + local.get $4 call $~lib/rt/pure/__release - local.get $14 + local.get $26 call $~lib/rt/pure/__release - local.get $13 + local.get $27 call $~lib/rt/pure/__release - local.get $12 + local.get $28 call $~lib/rt/pure/__release - local.get $11 + local.get $29 call $~lib/rt/pure/__release - local.get $10 + local.get $30 call $~lib/rt/pure/__release - local.get $9 + local.get $31 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release - local.get $7 + local.get $32 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $5 + local.get $33 call $~lib/rt/pure/__release - local.get $4 + local.get $34 call $~lib/rt/pure/__release - local.get $3 + local.get $7 call $~lib/rt/pure/__release - local.get $2 + local.get $35 call $~lib/rt/pure/__release - local.get $208 + local.get $36 call $~lib/rt/pure/__release - local.get $211 + local.get $37 call $~lib/rt/pure/__release - local.get $209 + local.get $38 call $~lib/rt/pure/__release - local.get $0 + local.get $39 + call $~lib/rt/pure/__release + local.get $40 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) (func $std/string/getString (; 73 ;) (result i32) global.get $std/string/str From aecd4057ba96858236b538eb254ef558a00488d4 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 12 Mar 2020 10:24:49 +0200 Subject: [PATCH 49/51] cleanups --- cli/asc.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index 37f19ce1b6..e800540bed 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -709,6 +709,8 @@ exports.main = function main(argv, options, callback) { add("reorder-locals"); // differs add("flatten"); add("local-cse"); + } + if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs add("rse"); } if (hasARC) { // differs @@ -745,10 +747,6 @@ exports.main = function main(argv, options, callback) { // if (optimizeLevel >= 3 || shrinkLevel >= 2) { // do it later // add("merge-locals"); // } - if (optimizeLevel >= 2 || shrinkLevel >= 1) { // differs - add("rse"); - add("vacuum"); - } add("coalesce-locals"); add("simplify-locals"); add("vacuum"); From 777b2daca43f091422ea71313369d65c5864ec4e Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 13 Mar 2020 12:37:20 +0200 Subject: [PATCH 50/51] enhance setAlwaysInlineMaxSize treshold --- cli/asc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/asc.js b/cli/asc.js index e800540bed..da478bcad9 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -684,7 +684,7 @@ exports.main = function main(argv, options, callback) { module.setFlexibleInlineMaxSize(70); module.setOneCallerInlineMaxSize(200); } else { - shrinkLevel >= 2 + optimizeLevel === 0 && shrinkLevel >= 0 ? module.setAlwaysInlineMaxSize(2) : module.setAlwaysInlineMaxSize(4); // default: 2 module.setFlexibleInlineMaxSize(65); // default: 20 From dfbce8e66a5aaeb567e9c37b27c58d33376c4c70 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Fri, 13 Mar 2020 12:46:40 +0200 Subject: [PATCH 51/51] rebuild --- cli/asc.js | 3 +- tests/compiler/number.optimized.wat | 16 +- tests/compiler/resolve-access.optimized.wat | 124 +- tests/compiler/resolve-binary.optimized.wat | 18 +- .../resolve-elementaccess.optimized.wat | 179 +- .../resolve-function-expression.optimized.wat | 92 +- .../resolve-propertyaccess.optimized.wat | 102 +- tests/compiler/resolve-ternary.optimized.wat | 2 +- tests/compiler/resolve-unary.optimized.wat | 102 +- tests/compiler/std/array.optimized.wat | 350 +- tests/compiler/std/string.optimized.wat | 181 +- tests/compiler/std/typedarray.optimized.wat | 5045 +---------------- 12 files changed, 642 insertions(+), 5572 deletions(-) diff --git a/cli/asc.js b/cli/asc.js index da478bcad9..531e155b70 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -678,12 +678,13 @@ exports.main = function main(argv, options, callback) { const passes = []; function add(pass) { passes.push(pass); } - // enchance options for inline passes if (optimizeLevel >= 2 && shrinkLevel === 0) { + // tweak inlining options when speed more preferable than size module.setAlwaysInlineMaxSize(12); module.setFlexibleInlineMaxSize(70); module.setOneCallerInlineMaxSize(200); } else { + // tweak inlining options when size matters optimizeLevel === 0 && shrinkLevel >= 0 ? module.setAlwaysInlineMaxSize(2) : module.setAlwaysInlineMaxSize(4); // default: 2 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 66dd0e6459..92ee5616ca 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -199,18 +199,10 @@ (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 32 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 - i32.lt_s + if (result i32) + local.get $0 + i32.const 31 + i32.shr_u local.tee $1 if i32.const 0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index f73ffd989f..2b2e8e716d 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -276,28 +276,6 @@ end ) (func $~lib/util/number/decimalCount32 (; 3 ;) (param $0 i32) (result i32) - i32.const 1 - i32.store offset=12 - local.get $0 - ) - (func $~lib/array/Array#__get (; 5 ;) (param $0 i32) (result i64) - i32.const 0 - local.get $0 - i32.load offset=12 - i32.ge_u - if - i32.const 64 - i32.const 128 - i32.const 93 - i32.const 41 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i64.load - ) - (func $~lib/util/number/decimalCount32 (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u @@ -345,62 +323,7 @@ local.get $1 i32.const 10 i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/decimalCount64High (; 8 ;) (param $0 i64) (result i32) - local.get $0 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add - local.get $0 - i64.const 10000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add - local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add - local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add - local.get $0 - i64.const 1000000000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 9 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - loop $do-continue|0 + local.set $3 local.get $1 i32.const 10 i32.div_u @@ -450,11 +373,50 @@ local.get $2 call $~lib/util/number/utoa_simple else + local.get $0 + i64.const 100000000000 + i64.ge_u i32.const 10 - i32.const 11 - i32.const 12 + i32.add local.get $0 - call $~lib/util/number/decimalCount64High + i64.const 10000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000 + i64.ge_u + i32.const 13 + i32.add + local.get $0 + i64.const 10000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 1000000000000 + i64.lt_u + select + local.get $0 + i64.const 10000000000000000 + i64.ge_u + i32.const 16 + i32.add + local.get $0 + i64.const -8446744073709551616 + i64.ge_u + i32.const 18 + i32.add + local.get $0 + i64.const 1000000000000000000 + i64.ge_u + i32.add + local.get $0 + i64.const 100000000000000000 + i64.lt_u + select + local.get $0 + i64.const 1000000000000000 + i64.lt_u + select local.tee $1 i32.const 1 i32.shl diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index e38d251304..46273c76ec 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -172,7 +172,7 @@ end i32.const 0 ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 4 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u @@ -330,18 +330,10 @@ (local $2 i32) (local $3 i32) local.get $0 - i32.eqz - if - i32.const 192 - return - end - local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 - if - i32.const 0 - i32.lt_s + if (result i32) + local.get $0 + i32.const 31 + i32.shr_u local.tee $1 if i32.const 0 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 1a9e7ef367..387dac15d2 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -441,7 +441,7 @@ i32.add f32.load ) - (func $~lib/util/number/decimalCount32 (; 7 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 6 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u @@ -1321,26 +1321,18 @@ ) (func $~lib/util/number/dtoa_core (; 11 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i64) + (local $7 i32) + (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) + (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $9 + local.tee $7 if (result f64) local.get $0 i32.const 45 @@ -1357,59 +1349,58 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $4 + i32.const 1 + local.get $4 + select + i32.const 1075 + i32.sub + local.set $8 + local.get $3 + i64.const 4503599627370495 + i64.and + local.get $4 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $6 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $6 + local.set $4 local.get $3 local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $9 - i32.const 1 - local.get $5 - select - i32.const 1075 - i32.sub - local.tee $9 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $10 + local.get $8 + local.get $9 + i32.sub + local.get $8 + i32.const 1 i32.sub local.get $4 i32.sub + local.tee $4 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -1439,10 +1430,10 @@ local.tee $4 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 416 i32.add i64.load @@ -1460,7 +1451,7 @@ i64.and local.set $6 local.get $0 - local.get $8 + local.get $7 i32.const 1 i32.shl i32.add @@ -1472,11 +1463,6 @@ local.tee $0 i64.extend_i32_s i64.shl - local.tee $6 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 i64.shr_u @@ -1486,16 +1472,11 @@ i64.shr_u local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $5 + local.get $3 i64.const 4294967295 i64.and - local.tee $8 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 @@ -1505,19 +1486,15 @@ i64.mul i64.const 32 i64.shr_u - local.tee $4 - i64.mul - local.get $8 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $8 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -1525,19 +1502,21 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $7 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $8 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $7 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u local.tee $10 @@ -1553,9 +1532,8 @@ i64.mul i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add @@ -1570,20 +1548,12 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.sub - local.set $4 - local.get $0 - local.get $9 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add i32.const -64 i32.sub @@ -1610,13 +1580,10 @@ local.tee $2 local.get $3 i64.mul - local.get $13 - local.get $6 i64.const 32 i64.shr_u - local.tee $6 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add @@ -1631,37 +1598,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $6 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $7 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $9 call $~lib/util/number/genDigits - local.get $9 + local.get $7 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $9 + local.get $7 i32.add ) (func $~lib/string/String#get:length (; 12 ;) (param $0 i32) (result i32) diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index 11c116d424..641f34c2e2 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -20,59 +20,8 @@ local.get $0 global.set $~argumentsLength ) - (func $start:resolve-function-expression~anonymous|1 (; 3 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 41 - i32.add - ) - (func $start:resolve-function-expression~anonymous|2 (; 4 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 42 - i32.add - ) - (func $~lib/util/number/decimalCount32 (; 5 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 6 ;) (param $0 i32) + (func $~lib/util/number/itoa32 (; 2 ;) (result i32) + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -170,43 +119,6 @@ local.get $4 ) (func $~lib/string/String#get:length (; 3 ;) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 112 - return - end - 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 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - call $~lib/rt/stub/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 - end - local.get $2 - ) - (func $~lib/string/String#get:length (; 10 ;) (param $0 i32) (result i32) local.get $0 i32.const 16 i32.sub diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index ab06ab263d..e8439aa598 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -22,53 +22,35 @@ (global $~lib/rt/stub/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000 - i32.ge_u - i32.const 3 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 i32.add + local.tee $4 local.get $0 - i32.const 1000 - i32.ge_u + i32.const 15 i32.add - local.get $0 - i32.const 100 - i32.lt_u + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 + local.tee $6 i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size local.tee $2 memory.size local.tee $5 @@ -147,44 +129,38 @@ local.set $0 end local.get $1 - i32.const 1 - i32.const 2 local.get $0 i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 + i32.ge_u + i32.const 1 + i32.add local.get $0 i32.const 10000 - i32.lt_u - select + i32.ge_u + i32.const 3 + i32.add local.get $0 i32.const 1000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 100 i32.lt_u select - i32.const 6 - i32.const 7 local.get $0 i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 + i32.ge_u + i32.const 6 + i32.add local.get $0 i32.const 1000000000 - i32.lt_u - select + i32.ge_u + i32.const 8 + i32.add local.get $0 i32.const 100000000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 10000000 i32.lt_u diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index 02496a7f01..ed86f89a02 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -1117,7 +1117,7 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/util/number/decimalCount32 (; 14 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 11 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index a46e5aa2fe..fd7b77bc63 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -30,53 +30,35 @@ (global $resolve-unary/bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/number/decimalCount32 (; 1 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add + (func $~lib/rt/stub/__alloc (; 1 ;) (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 $0 - i32.const 10000 - i32.ge_u - i32.const 3 + i32.const 1073741808 + i32.gt_u + if + unreachable + end + global.get $~lib/rt/stub/offset + i32.const 16 i32.add + local.tee $4 local.get $0 - i32.const 1000 - i32.ge_u + i32.const 15 i32.add - local.get $0 - i32.const 100 - i32.lt_u + i32.const -16 + i32.and + local.tee $2 + i32.const 16 + local.get $2 + i32.const 16 + i32.gt_u select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 + local.tee $6 i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/rt/stub/maybeGrowMemory (; 2 ;) (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - memory.size local.tee $2 memory.size local.tee $5 @@ -155,44 +137,38 @@ local.set $0 end local.get $1 - i32.const 1 - i32.const 2 local.get $0 i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 + i32.ge_u + i32.const 1 + i32.add local.get $0 i32.const 10000 - i32.lt_u - select + i32.ge_u + i32.const 3 + i32.add local.get $0 i32.const 1000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 100 i32.lt_u select - i32.const 6 - i32.const 7 local.get $0 i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 + i32.ge_u + i32.const 6 + i32.add local.get $0 i32.const 1000000000 - i32.lt_u - select + i32.ge_u + i32.const 8 + i32.add local.get $0 i32.const 100000000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 10000000 i32.lt_u diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index faffcf5338..320976cb56 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -6103,7 +6103,7 @@ end local.get $1 ) - (func $~lib/util/number/decimalCount32 (; 152 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 126 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u @@ -7176,26 +7176,18 @@ ) (func $~lib/util/number/dtoa_core (; 138 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i64) + (local $7 i32) + (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) + (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $9 + local.tee $7 if (result f64) local.get $0 i32.const 45 @@ -7212,59 +7204,58 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $4 + i32.const 1 + local.get $4 + select + i32.const 1075 + i32.sub + local.set $8 + local.get $3 + i64.const 4503599627370495 + i64.and + local.get $4 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $6 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $6 + local.set $4 local.get $3 local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $9 - i32.const 1 - local.get $5 - select - i32.const 1075 - i32.sub - local.tee $9 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $10 + local.get $8 + local.get $9 + i32.sub + local.get $8 + i32.const 1 i32.sub local.get $4 i32.sub + local.tee $4 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -7294,10 +7285,10 @@ local.tee $4 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 5968 i32.add i64.load @@ -7315,7 +7306,7 @@ i64.and local.set $6 local.get $0 - local.get $8 + local.get $7 i32.const 1 i32.shl i32.add @@ -7327,11 +7318,6 @@ local.tee $0 i64.extend_i32_s i64.shl - local.tee $6 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 i64.shr_u @@ -7341,16 +7327,11 @@ i64.shr_u local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $5 + local.get $3 i64.const 4294967295 i64.and - local.tee $8 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 @@ -7360,19 +7341,15 @@ i64.mul i64.const 32 i64.shr_u - local.tee $4 - i64.mul - local.get $8 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $8 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -7380,19 +7357,21 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $7 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $8 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $7 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u local.tee $10 @@ -7408,9 +7387,8 @@ i64.mul i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add @@ -7425,20 +7403,12 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.sub - local.set $4 - local.get $0 - local.get $9 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add i32.const -64 i32.sub @@ -7465,13 +7435,10 @@ local.tee $2 local.get $3 i64.mul - local.get $13 - local.get $6 i64.const 32 i64.shr_u - local.tee $6 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add @@ -7486,92 +7453,20 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $6 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $7 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $9 call $~lib/util/number/genDigits - local.get $9 + local.get $7 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $9 + local.get $7 i32.add ) - (func $~lib/util/number/dtoa (; 165 ;) (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 5824 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - i32.const 5856 - return - end - i32.const 5888 - i32.const 5936 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/tlsf/__free - ) - (func $~lib/util/number/dtoa_stream (; 166 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 139 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8143,12 +8038,7 @@ i32.load offset=12 call $~lib/util/string/joinReferenceArray ) - (func $~lib/array/Array#toString (; 172 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 5360 - call $~lib/array/Array#join - ) - (func $~lib/util/number/itoa_stream (; 173 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 145 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 1 @@ -8455,7 +8345,7 @@ end local.get $1 ) - (func $~lib/util/number/decimalCount64High (; 177 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64High (; 149 ;) (param $0 i64) (result i32) local.get $0 i64.const 100000000000 i64.ge_u @@ -8532,47 +8422,6 @@ end ) (func $~lib/util/number/itoa_stream (; 151 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 180 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $0 local.get $1 @@ -8661,7 +8510,7 @@ call $~lib/util/number/utoa_simple else local.get $4 - call $~lib/util/number/decimalCount64 + call $~lib/util/number/decimalCount64High local.tee $1 i32.const 1 i32.shl @@ -8756,64 +8605,6 @@ call $~lib/rt/pure/__release return end - local.get $2 - ) - (func $~lib/util/number/itoa64 (; 182 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i64.eqz - if - i32.const 5472 - return - end - local.get $0 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.tee $1 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.get $1 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple - end local.get $1 ) (func $~lib/util/number/itoa_stream (; 153 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) @@ -8910,8 +8701,9 @@ i32.const 5472 else local.get $3 - i64.const 0 - i64.lt_s + i64.const 63 + i64.shr_u + i32.wrap_i64 local.tee $0 if i64.const 0 @@ -8940,7 +8732,7 @@ call $~lib/util/number/utoa_simple else local.get $3 - call $~lib/util/number/decimalCount64 + call $~lib/util/number/decimalCount64High local.get $0 i32.add local.tee $2 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index edbe312f39..e80cfbcc58 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -5524,7 +5524,7 @@ end local.get $0 ) - (func $~lib/util/number/decimalCount32 (; 69 ;) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 60 ;) (param $0 i32) (result i32) local.get $0 i32.const 10 i32.ge_u @@ -5658,7 +5658,7 @@ local.get $2 call $~lib/rt/pure/__retain ) - (func $~lib/util/number/decimalCount64High (; 73 ;) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64High (; 64 ;) (param $0 i64) (result i32) local.get $0 i64.const 100000000000 i64.ge_u @@ -6480,26 +6480,18 @@ ) (func $~lib/util/number/dtoa_core (; 70 ;) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) + (local $3 i64) + (local $4 i32) + (local $5 i64) (local $6 i64) - (local $7 i64) - (local $8 i64) + (local $7 i32) + (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) + (local $10 i64) local.get $1 f64.const 0 f64.lt - local.tee $9 + local.tee $7 if (result f64) local.get $0 i32.const 45 @@ -6516,59 +6508,58 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $4 + i32.const 1 + local.get $4 + select + i32.const 1075 + i32.sub + local.set $8 + local.get $3 + i64.const 4503599627370495 + i64.and + local.get $4 i32.const 0 i32.ne i64.extend_i32_u i64.const 52 i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and i64.add local.tee $2 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $6 + local.tee $3 i64.clz i32.wrap_i64 - local.set $3 - local.get $6 + local.set $4 local.get $3 local.get $4 i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $9 - i32.const 1 - local.get $5 - select - i32.const 1075 - i32.sub - local.tee $9 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $10 + local.tee $9 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $10 + local.get $8 + local.get $9 + i32.sub + local.get $8 + i32.const 1 i32.sub local.get $4 i32.sub + local.tee $4 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -6598,10 +6589,10 @@ local.tee $4 i32.const 3 i32.shl - local.tee $10 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $10 + local.get $9 i32.const 14368 i32.add i64.load @@ -6619,7 +6610,7 @@ i64.and local.set $6 local.get $0 - local.get $8 + local.get $7 i32.const 1 i32.shl i32.add @@ -6631,11 +6622,6 @@ local.tee $0 i64.extend_i32_s i64.shl - local.tee $6 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow local.tee $2 i64.const 32 i64.shr_u @@ -6645,16 +6631,11 @@ i64.shr_u local.tee $10 i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 + local.get $5 + local.get $3 i64.const 4294967295 i64.and - local.tee $8 + local.tee $5 i64.mul local.get $2 i64.const 4294967295 @@ -6664,19 +6645,15 @@ i64.mul i64.const 32 i64.shr_u - local.tee $4 - i64.mul - local.get $8 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $12 + i64.add + local.tee $5 i64.const 32 i64.shr_u i64.add - local.tee $8 + local.get $2 + local.get $10 + i64.mul + local.get $5 i64.const 4294967295 i64.and i64.add @@ -6684,19 +6661,21 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $7 - i64.mul + i64.add + global.get $~lib/util/number/_exp_pow + local.tee $4 local.get $8 + local.get $0 + i32.sub + i32.add + i32.const -64 + i32.sub + global.get $~lib/util/number/_frc_plus + local.tee $2 i64.const 32 i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $7 - local.get $16 - local.get $2 + local.tee $5 + local.get $3 i64.const 32 i64.shr_u local.tee $10 @@ -6712,9 +6691,8 @@ i64.mul i64.const 32 i64.shr_u - local.tee $8 - i64.mul - local.get $18 + i64.add + local.tee $6 i64.const 32 i64.shr_u i64.add @@ -6729,20 +6707,12 @@ i64.add i64.const 32 i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.sub - local.set $4 - local.get $0 - local.get $9 - i32.const 1 - i32.shl + local.tee $2 + local.get $4 + global.get $~lib/util/number/_exp i32.add i32.const -64 i32.sub @@ -6769,13 +6739,10 @@ local.tee $2 local.get $3 i64.mul - local.get $13 - local.get $6 i64.const 32 i64.shr_u - local.tee $6 - i64.mul - local.get $14 + i64.add + local.tee $3 i64.const 32 i64.shr_u i64.add @@ -6790,37 +6757,17 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $6 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u i64.add i64.const 1 i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub + i64.sub local.get $7 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $9 call $~lib/util/number/genDigits - local.get $9 + local.get $7 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $9 + local.get $7 i32.add ) (func $~lib/util/number/dtoa (; 71 ;) (param $0 f64) (result i32) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 16b9b96a56..479a1b7ff8 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -16268,44 +16268,38 @@ call $~lib/rt/pure/__release ) (func $~lib/util/number/decimalCount32 (; 237 ;) (param $0 i32) (result i32) - i32.const 1 - i32.const 2 local.get $0 i32.const 10 - i32.lt_u - select - i32.const 3 - i32.const 4 - i32.const 5 + i32.ge_u + i32.const 1 + i32.add local.get $0 i32.const 10000 - i32.lt_u - select + i32.ge_u + i32.const 3 + i32.add local.get $0 i32.const 1000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 100 i32.lt_u select - i32.const 6 - i32.const 7 local.get $0 i32.const 1000000 - i32.lt_u - select - i32.const 8 - i32.const 9 - i32.const 10 + i32.ge_u + i32.const 6 + i32.add local.get $0 i32.const 1000000000 - i32.lt_u - select + i32.ge_u + i32.const 8 + i32.add local.get $0 i32.const 100000000 - i32.lt_u - select + i32.ge_u + i32.add local.get $0 i32.const 10000000 i32.lt_u @@ -16353,8 +16347,8 @@ return end local.get $0 - i32.const 0 - i32.lt_s + i32.const 31 + i32.shr_u local.tee $1 if i32.const 0 @@ -16393,7 +16387,6 @@ i32.shr_u ) (func $~lib/util/number/itoa_stream (; 241 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $0 local.get $1 i32.const 1 @@ -16401,17 +16394,6 @@ i32.add local.set $0 local.get $2 - i32.const 255 - i32.and - i32.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 i32.const 24 i32.shl i32.const 24 @@ -16420,6 +16402,9 @@ i32.lt_s local.tee $1 if + local.get $0 + i32.const 45 + i32.store16 i32.const 0 local.get $2 i32.sub @@ -16430,22 +16415,42 @@ i32.shl i32.const 24 i32.shr_s - local.tee $3 + i32.const 10 + i32.lt_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 48 + i32.or + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + end + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add - local.set $2 + local.set $1 local.get $0 - local.get $3 local.get $2 + local.get $1 call $~lib/util/number/utoa_simple local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - local.get $2 ) (func $~lib/string/String#substring (; 242 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -16772,10 +16777,15 @@ local.get $2 i32.const 255 i32.and - i32.eqz + i32.const 10 + i32.lt_u if local.get $0 + local.get $2 + i32.const 255 + i32.and i32.const 48 + i32.or i32.store16 i32.const 1 return @@ -16901,7 +16911,6 @@ call $~lib/util/string/joinIntegerArray ) (func $~lib/util/number/itoa_stream (; 251 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $0 local.get $1 i32.const 1 @@ -16909,17 +16918,6 @@ i32.add local.set $0 local.get $2 - i32.const 65535 - i32.and - i32.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $2 i32.const 16 i32.shl i32.const 16 @@ -16928,6 +16926,9 @@ i32.lt_s local.tee $1 if + local.get $0 + i32.const 45 + i32.store16 i32.const 0 local.get $2 i32.sub @@ -16938,22 +16939,42 @@ i32.shl i32.const 16 i32.shr_s - local.tee $3 + i32.const 10 + i32.lt_u + if + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 48 + i32.or + i32.store16 + local.get $1 + i32.const 1 + i32.add + return + end + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add - local.set $2 + local.set $1 local.get $0 - local.get $3 local.get $2 + local.get $1 call $~lib/util/number/utoa_simple local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - local.get $2 ) (func $~lib/util/string/joinIntegerArray (; 252 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -17079,10 +17100,15 @@ local.get $2 i32.const 65535 i32.and - i32.eqz + i32.const 10 + i32.lt_u if local.get $0 + local.get $2 + i32.const 65535 + i32.and i32.const 48 + i32.or i32.store16 i32.const 1 return @@ -17221,39 +17247,45 @@ i32.add local.set $0 local.get $2 - i32.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end - local.get $0 - local.get $2 i32.const 0 i32.lt_s local.tee $1 if + local.get $0 + i32.const 45 + i32.store16 i32.const 0 local.get $2 i32.sub local.set $2 end local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $2 - call $~lib/util/number/utoa_simple - local.get $1 + i32.const 10 + i32.lt_u if local.get $0 - i32.const 45 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.const 48 + i32.or i32.store16 + local.get $1 + i32.const 1 + i32.add + return end + local.get $0 + local.get $2 local.get $2 + call $~lib/util/number/decimalCount32 + local.get $1 + i32.add + local.tee $0 + call $~lib/util/number/utoa_simple + local.get $0 ) (func $~lib/util/string/joinIntegerArray (; 258 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -17377,10 +17409,13 @@ i32.add local.set $0 local.get $2 - i32.eqz + i32.const 10 + i32.lt_u if local.get $0 + local.get $2 i32.const 48 + i32.or i32.store16 i32.const 1 return @@ -17507,50 +17542,43 @@ i32.shr_u call $~lib/util/string/joinIntegerArray ) - (func $~lib/util/number/decimalCount64 (; 263 ;) (param $0 i64) (result i32) - i32.const 10 - i32.const 11 - i32.const 12 + (func $~lib/util/number/decimalCount64High (; 263 ;) (param $0 i64) (result i32) local.get $0 i64.const 100000000000 - i64.lt_u - select + i64.ge_u + i32.const 10 + i32.add local.get $0 i64.const 10000000000 - i64.lt_u - select - i32.const 13 - i32.const 14 - i32.const 15 + i64.ge_u + i32.add local.get $0 i64.const 100000000000000 - i64.lt_u - select + i64.ge_u + i32.const 13 + i32.add local.get $0 i64.const 10000000000000 - i64.lt_u - select + i64.ge_u + i32.add local.get $0 i64.const 1000000000000 i64.lt_u select - i32.const 16 - i32.const 17 local.get $0 i64.const 10000000000000000 - i64.lt_u - select - i32.const 18 - i32.const 19 - i32.const 20 + i64.ge_u + i32.const 16 + i32.add local.get $0 i64.const -8446744073709551616 - i64.lt_u - select + i64.ge_u + i32.const 18 + i32.add local.get $0 i64.const 1000000000000000000 - i64.lt_u - select + i64.ge_u + i32.add local.get $0 i64.const 100000000000000000 i64.lt_u @@ -17592,64 +17620,69 @@ ) (func $~lib/util/number/itoa_stream (; 265 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) - (local $4 i32) local.get $0 local.get $1 i32.const 1 i32.shl i32.add - local.set $0 - local.get $2 - i64.eqz - if - local.get $0 - i32.const 48 - i32.store16 - i32.const 1 - return - end + local.set $1 local.get $2 i64.const 0 i64.lt_s - local.tee $1 + local.tee $0 if + local.get $1 + i32.const 45 + i32.store16 i64.const 0 local.get $2 i64.sub local.set $2 end local.get $2 + i64.const 10 + i64.lt_u + if + local.get $1 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $2 + i64.const 48 + i64.or + i64.store16 + local.get $0 + i32.const 1 + i32.add + return + end + local.get $2 i64.const 4294967295 i64.le_u if local.get $2 i32.wrap_i64 - local.tee $4 + local.tee $3 call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $3 local.get $0 - local.get $4 + i32.add + local.set $0 + local.get $1 local.get $3 + local.get $0 call $~lib/util/number/utoa_simple else - local.get $0 + local.get $1 local.get $2 local.get $2 - call $~lib/util/number/decimalCount64 - local.get $1 + call $~lib/util/number/decimalCount64High + local.get $0 i32.add - local.tee $3 + local.tee $0 call $~lib/util/number/utoa_simple end - local.get $1 - if - local.get $0 - i32.const 45 - i32.store16 - end - local.get $3 + local.get $0 ) (func $~lib/util/string/joinIntegerArray (; 266 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -17679,8 +17712,9 @@ i32.const 1936 else local.get $3 - i64.const 0 - i64.lt_s + i64.const 63 + i64.shr_u + i32.wrap_i64 local.tee $0 if i64.const 0 @@ -17709,7 +17743,7 @@ call $~lib/util/number/utoa_simple else local.get $3 - call $~lib/util/number/decimalCount64 + call $~lib/util/number/decimalCount64High local.get $0 i32.add local.tee $2 @@ -17832,11 +17866,14 @@ i32.add local.set $0 local.get $2 - i64.eqz + i64.const 10 + i64.lt_u if local.get $0 - i32.const 48 - i32.store16 + local.get $2 + i64.const 48 + i64.or + i64.store16 i32.const 1 return end @@ -17854,4460 +17891,22 @@ local.get $1 call $~lib/util/number/utoa_simple else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64 - local.tee $1 - call $~lib/util/number/utoa_simple - end - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - i32.const 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i64.load - local.tee $4 - i64.eqz - if (result i32) - i32.const 1936 - else - local.get $4 - i64.const 4294967295 - i64.le_u - if - local.get $4 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $1 - local.get $2 - call $~lib/util/number/utoa_simple - else - local.get $4 - call $~lib/util/number/decimalCount64 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $0 - local.get $4 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $0 - call $~lib/rt/pure/__retain - end - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $5 - i32.const 20 - i32.add - i32.mul - i32.const 20 - i32.add - local.tee $7 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $1 - loop $for-loop|0 - local.get $6 - local.get $3 - i32.lt_s - if - local.get $1 - local.get $2 - local.get $0 - local.get $6 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.set $2 - local.get $5 - if - local.get $1 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $5 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $2 - local.get $5 - i32.add - local.set $2 - end - local.get $6 - i32.const 1 - i32.add - local.set $6 - br $for-loop|0 - end - end - local.get $7 - local.get $1 - local.get $2 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $2 - i32.add - local.tee $0 - i32.gt_s - if - local.get $1 - local.get $0 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/pure/__release - return - end - local.get $1 - ) - (func $~lib/typedarray/Uint64Array#join (; 270 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - i32.const 3 -<<<<<<< HEAD - i32.shr_u - call $~lib/util/string/joinIntegerArray -======= - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 571 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 3 - i32.const 3 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 572 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 3 - i32.const 2 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 573 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 1 - i32.const 100 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 574 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 1 - i32.const -10 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 575 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 1 - i32.const -11 - call $~lib/typedarray/Float32Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 576 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 9 - call $~lib/typedarray/Float32Array#subarray - local.tee $0 - f32.const 3 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 580 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 4 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 581 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 5 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 582 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 9 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 583 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 10 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 584 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 11 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 585 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 5 - i32.const 1 - call $~lib/typedarray/Float32Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 586 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f32.const 5 - i32.const 2 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 587 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#indexOf (; 347 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $3 - if (result i32) - local.get $2 - local.get $3 - i32.ge_s - else - i32.const 1 - end - if - i32.const -1 - local.set $2 - br $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - i32.const 0 - i32.lt_s - if - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.set $2 - end - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Float64Array#lastIndexOf (; 348 ;) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) - (local $3 i32) - block $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $3 - i32.eqz - if - i32.const -1 - local.set $2 - br $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - local.get $3 - i32.add - local.get $3 - i32.const 1 - i32.sub - local.get $2 - local.get $2 - local.get $3 - i32.ge_s - select - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $2 - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $2 - i32.const 0 - i32.ge_s - if - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.get $1 - f64.eq - br_if $~lib/typedarray/LAST_INDEX_OF<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $while-continue|0 - end - end - i32.const -1 - local.set $2 - end - local.get $2 - ) - (func $~lib/typedarray/Float64Array#lastIndexOf|trampoline (; 349 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Float64Array#lastIndexOf - ) - (func $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> (; 350 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1900 - i32.load - local.tee $0 - local.set $2 - local.get $0 - call $~lib/typedarray/Float64Array#constructor - local.tee $3 - local.set $0 - loop $for-loop|0 - local.get $1 - local.get $2 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1888 - local.get $1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - f64.const 0 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 557 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 11 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 558 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const -1 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 559 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 560 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 561 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#indexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 562 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 563 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const 10 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 564 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const -100 - call $~lib/typedarray/Float64Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 565 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 0 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - if - i32.const 0 - i32.const 304 - i32.const 567 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 11 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 568 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const -1 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 569 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $~argumentsLength - local.get $0 - f64.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf|trampoline - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 570 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 4 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 571 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 3 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 572 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 3 - i32.const 2 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 573 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const 100 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 574 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const -10 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 575 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 1 - i32.const -11 - call $~lib/typedarray/Float64Array#lastIndexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 576 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 4 - i32.const 9 - call $~lib/typedarray/Float64Array#subarray - local.tee $0 - f64.const 3 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 580 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 4 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - if - i32.const 0 - i32.const 304 - i32.const 581 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 5 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 582 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 9 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 583 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 10 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 584 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 11 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 585 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 5 - i32.const 1 - call $~lib/typedarray/Float64Array#indexOf - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 586 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $0 - f64.const 5 - i32.const 2 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 304 - i32.const 587 - i32.const 2 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#includes (; 351 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - i32.const 0 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 1 - local.get $0 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - f64.const nan:0x8000000000000 - f64.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f64.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - ) - (func $~lib/typedarray/Float32Array#includes (; 352 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - i32.const 0 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - local.tee $2 - if (result i32) - i32.const 0 - local.get $2 - i32.ge_s - else - i32.const 1 - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $0 - i32.load offset=4 - local.set $0 - loop $while-continue|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 1 - local.get $0 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - f32.const nan:0x400000 - f32.eq - if (result i32) - i32.const 1 - else - local.get $3 - local.get $3 - f32.ne - end - br_if $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - drop - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $while-continue|0 - end - end - i32.const 0 - end - ) - (func $~lib/util/number/decimalCount32 (; 353 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 10 - i32.ge_u - i32.const 1 - i32.add - local.get $0 - i32.const 10000 - i32.ge_u - i32.const 3 - i32.add - local.get $0 - i32.const 1000 - i32.ge_u - i32.add - local.get $0 - i32.const 100 - i32.lt_u - select - local.get $0 - i32.const 1000000 - i32.ge_u - i32.const 6 - i32.add - local.get $0 - i32.const 1000000000 - i32.ge_u - i32.const 8 - i32.add - local.get $0 - i32.const 100000000 - i32.ge_u - i32.add - local.get $0 - i32.const 10000000 - i32.lt_u - select - local.get $0 - i32.const 100000 - i32.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 354 ;) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - loop $do-continue|0 - local.get $1 - i32.const 10 - i32.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.const 10 - i32.rem_u - i32.const 48 - i32.add - i32.store16 - local.tee $1 - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa32 (; 355 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 1936 - return - end - 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 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $3 - call $~lib/util/number/utoa_simple - local.get $1 - if - local.get $2 - i32.const 45 - i32.store16 - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/string/String#get:length (; 356 ;) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.sub - i32.load offset=12 - i32.const 1 - i32.shr_u - ) - (func $~lib/util/number/itoa_stream (; 357 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 0 - i32.lt_s - local.tee $1 - if - local.get $0 - i32.const 45 - i32.store16 - i32.const 0 - local.get $2 - i32.sub - local.set $2 - end - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - end - local.get $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $1 - ) - (func $~lib/string/String#substring (; 358 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 0 - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - i32.const 0 - local.get $2 - i32.lt_s - select - local.tee $3 - local.get $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - local.get $2 - local.get $1 - local.get $2 - i32.lt_s - select - local.tee $1 - local.get $3 - local.get $1 - i32.gt_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 - select - i32.const 1 - i32.shl - local.tee $1 - i32.sub - local.tee $3 - i32.eqz - if - i32.const 1920 - return - end - i32.const 0 - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.eq - local.get $1 - select - if - local.get $0 - call $~lib/rt/pure/__retain - return - end - local.get $3 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - i32.add - local.get $3 - call $~lib/memory/memory.copy - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/string/joinIntegerArray (; 359 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load8_s - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.add - i32.load8_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.add - i32.load8_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Int8Array#join (; 360 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $~lib/util/string/compareImpl (; 361 ;) (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 (; 362 ;) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $1 - i32.eqz - i32.const 1 - local.get $0 - select - if - i32.const 0 - return - end - local.get $0 - call $~lib/string/String#get:length - local.tee $2 - local.get $1 - call $~lib/string/String#get:length - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl - i32.eqz - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int8Array,i8> (; 363 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/utoa32 (; 364 ;) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.eqz - if - i32.const 1936 - return - end - local.get $0 - call $~lib/util/number/decimalCount32 - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 365 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 255 - i32.and - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $2 - i32.const 255 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return - end - local.get $2 - i32.const 255 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 366 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load8_u - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.add - i32.load8_u - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.add - i32.load8_u - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint8Array#join (; 367 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - i32.load offset=8 - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8Array,u8> (; 368 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint8ClampedArray,u8> (; 369 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint8Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 370 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 0 - i32.lt_s - local.tee $1 - if - local.get $0 - i32.const 45 - i32.store16 - i32.const 0 - local.get $2 - i32.sub - local.set $2 - end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - end - local.get $2 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 371 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load16_s - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_s - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Int16Array#join (; 372 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int16Array,i16> (; 373 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int16Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 374 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $2 - i32.const 65535 - i32.and - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return - end - local.get $2 - i32.const 65535 - i32.and - local.tee $2 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $2 - local.get $1 - call $~lib/util/number/utoa_simple - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 375 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load16_u - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint16Array#join (; 376 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int16Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint16Array,u16> (; 377 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint16Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 378 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - local.tee $1 - if - local.get $0 - i32.const 45 - i32.store16 - i32.const 0 - local.get $2 - i32.sub - local.set $2 - end - local.get $2 - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $2 - i32.const 48 - i32.or - i32.store16 - local.get $1 - i32.const 1 - i32.add - return - end - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (; 379 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/itoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 11 - i32.add - i32.mul - i32.const 11 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Int32Array#join (; 380 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int32Array,i32> (; 381 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int32Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/itoa_stream (; 382 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i32.const 10 - i32.lt_u - if - local.get $0 - local.get $2 - i32.const 48 - i32.or - i32.store16 - i32.const 1 - return - end - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount32 - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (; 383 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i32.load - call $~lib/util/number/utoa32 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 10 - i32.add - i32.mul - i32.const 10 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 2 - i32.shl - i32.add - i32.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint32Array#join (; 384 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint32Array,u32> (; 385 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint32Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/decimalCount64High (; 386 ;) (param $0 i64) (result i32) - local.get $0 - i64.const 100000000000 - i64.ge_u - i32.const 10 - i32.add - local.get $0 - i64.const 10000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 100000000000000 - i64.ge_u - i32.const 13 - i32.add - local.get $0 - i64.const 10000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 1000000000000 - i64.lt_u - select - local.get $0 - i64.const 10000000000000000 - i64.ge_u - i32.const 16 - i32.add - local.get $0 - i64.const -8446744073709551616 - i64.ge_u - i32.const 18 - i32.add - local.get $0 - i64.const 1000000000000000000 - i64.ge_u - i32.add - local.get $0 - i64.const 100000000000000000 - i64.lt_u - select - local.get $0 - i64.const 1000000000000000 - i64.lt_u - select - ) - (func $~lib/util/number/utoa_simple (; 387 ;) (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i64) - loop $do-continue|0 - local.get $1 - i64.const 10 - i64.div_u - local.get $0 - local.get $2 - i32.const 1 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - i32.const 48 - i32.add - i32.store16 - local.tee $1 - i64.const 0 - i64.ne - br_if $do-continue|0 - end - ) - (func $~lib/util/number/itoa64 (; 388 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i64.eqz - if - i32.const 1936 - return - end - local.get $0 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.tee $1 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $2 - call $~lib/util/number/decimalCount32 - local.get $1 - i32.add - local.tee $4 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $2 - local.get $4 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.get $1 - i32.add - local.tee $2 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $3 - local.get $0 - local.get $2 - call $~lib/util/number/utoa_simple - end - local.get $1 - if - local.get $3 - i32.const 45 - i32.store16 - end - local.get $3 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 389 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $2 - i64.const 0 - i64.lt_s - local.tee $0 - if - local.get $1 - i32.const 45 - i32.store16 - i64.const 0 - local.get $2 - i64.sub - local.set $2 - end - local.get $2 - i64.const 10 - i64.lt_u - if - local.get $1 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.get $2 - i64.const 48 - i64.or - i64.store16 - local.get $0 - i32.const 1 - i32.add - return - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.get $0 - i32.add - local.set $0 - local.get $1 - local.get $3 - local.get $0 - call $~lib/util/number/utoa_simple - else - local.get $1 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64High - local.get $0 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - end - local.get $0 - ) - (func $~lib/util/string/joinIntegerArray (; 390 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i64.load - call $~lib/util/number/itoa64 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 21 - i32.add - i32.mul - i32.const 21 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Int64Array#join (; 391 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Int64Array,i64> (; 392 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Int64Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/utoa64 (; 393 ;) (param $0 i64) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i64.eqz - if - i32.const 1936 - return - end - local.get $0 - i64.const 4294967295 - i64.le_u - if - local.get $0 - i32.wrap_i64 - local.tee $1 - call $~lib/util/number/decimalCount32 - local.tee $3 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $1 - local.get $3 - call $~lib/util/number/utoa_simple - else - local.get $0 - call $~lib/util/number/decimalCount64High - local.tee $1 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $2 - local.get $0 - local.get $1 - call $~lib/util/number/utoa_simple - end - local.get $2 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/number/itoa_stream (; 394 ;) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - i64.const 10 - i64.lt_u - if - local.get $0 - local.get $2 - i64.const 48 - i64.or - i64.store16 - i32.const 1 - return - end - local.get $2 - i64.const 4294967295 - i64.le_u - if - local.get $2 - i32.wrap_i64 - local.tee $3 - call $~lib/util/number/decimalCount32 - local.set $1 - local.get $0 - local.get $3 - local.get $1 - call $~lib/util/number/utoa_simple - else - local.get $0 - local.get $2 - local.get $2 - call $~lib/util/number/decimalCount64High - local.tee $1 - call $~lib/util/number/utoa_simple - end - local.get $1 - ) - (func $~lib/util/string/joinIntegerArray (; 395 ;) (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 1 - i32.sub - local.tee $3 - i32.const 0 - i32.lt_s - if - i32.const 1920 - return - end - local.get $3 - i32.eqz - if - local.get $0 - i64.load - call $~lib/util/number/utoa64 - return - end - local.get $3 - i32.const 1968 - call $~lib/string/String#get:length - local.tee $4 - i32.const 20 - i32.add - i32.mul - i32.const 20 - i32.add - local.tee $6 - i32.const 1 - i32.shl - i32.const 1 - call $~lib/rt/tlsf/__alloc - call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 - local.set $1 - loop $for-loop|0 - local.get $5 - local.get $3 - i32.lt_s - if - local.get $2 - local.get $1 - local.get $0 - local.get $5 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.set $1 - local.get $4 - if - local.get $2 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 1968 - local.get $4 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $1 - local.get $4 - i32.add - local.set $1 - end - local.get $5 - i32.const 1 - i32.add - local.set $5 - br $for-loop|0 - end - end - local.get $6 - local.get $2 - local.get $1 - local.get $0 - local.get $3 - i32.const 3 - i32.shl - i32.add - i64.load - call $~lib/util/number/itoa_stream - local.get $1 - i32.add - local.tee $0 - i32.gt_s - if - local.get $2 - local.get $0 - call $~lib/string/String#substring - local.get $2 - call $~lib/rt/pure/__release - return - end - local.get $2 - ) - (func $~lib/typedarray/Uint64Array#join (; 396 ;) (param $0 i32) (result i32) - local.get $0 - i32.load offset=4 - local.get $0 - call $~lib/typedarray/Int64Array#get:length - call $~lib/util/string/joinIntegerArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Uint64Array,u64> (; 397 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $0 - local.get $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 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 629 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Uint64Array#join - local.tee $1 - local.get $1 - i32.const 2000 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 630 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/util/number/genDigits (; 398 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) - (local $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - local.get $3 - local.get $1 - i64.sub - local.set $9 - local.get $3 - i64.const 1 - i32.const 0 - local.get $4 - i32.sub - local.tee $10 - i64.extend_i32_s - i64.shl - local.tee $11 - i64.const 1 - i64.sub - local.tee $13 - i64.and - local.set $12 - local.get $3 - local.get $10 - i64.extend_i32_s - i64.shr_u - i32.wrap_i64 - local.tee $7 - call $~lib/util/number/decimalCount32 - local.set $4 - loop $while-continue|0 - local.get $4 - i32.const 0 - i32.gt_s - if - block $break|1 - block $case10|1 - block $case9|1 - block $case8|1 - block $case7|1 - block $case6|1 - block $case5|1 - block $case4|1 - block $case3|1 - block $case2|1 - block $case1|1 - local.get $4 - i32.const 10 - i32.ne - if - local.get $4 - i32.const 1 - i32.sub - br_table $case9|1 $case8|1 $case7|1 $case6|1 $case5|1 $case4|1 $case3|1 $case2|1 $case1|1 $case10|1 - end - local.get $7 - i32.const 1000000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100000 - i32.div_u - local.set $8 - local.get $7 - i32.const 100000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10000 - i32.div_u - local.set $8 - local.get $7 - i32.const 10000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 1000 - i32.div_u - local.set $8 - local.get $7 - i32.const 1000 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 100 - i32.div_u - local.set $8 - local.get $7 - i32.const 100 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - i32.const 10 - i32.div_u - local.set $8 - local.get $7 - i32.const 10 - i32.rem_u - local.set $7 - br $break|1 - end - local.get $7 - local.set $8 - i32.const 0 - local.set $7 - br $break|1 - end - i32.const 0 - local.set $8 - end - local.get $6 - local.get $8 - i32.or - if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $12 - local.get $7 - i64.extend_i32_u - local.get $10 - i64.extend_i32_s - i64.shl - i64.add - local.tee $1 - local.get $5 - i64.le_u - if - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $4 - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - local.get $10 - i64.extend_i32_s - i64.shl - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|3 - i32.const 1 - local.get $9 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.sub - i64.gt_u - local.get $1 - local.get $3 - i64.add - local.get $9 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $3 - i64.ge_u - i32.const 0 - local.get $1 - local.get $9 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $3 - i64.add - local.set $1 - br $while-continue|3 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - return - end - br $while-continue|0 - end - end - loop $while-continue|4 (result i32) - local.get $5 - i64.const 10 - i64.mul - local.set $5 - local.get $12 - i64.const 10 - i64.mul - local.tee $3 - local.get $10 - i64.extend_i32_s - i64.shr_u - local.tee $1 - local.get $6 - i64.extend_i32_s - i64.or - i64.const 0 - i64.ne - if - local.get $6 - local.tee $2 - i32.const 1 - i32.add - local.set $6 - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $1 - i32.wrap_i64 - i32.const 65535 - i32.and - i32.const 48 - i32.add - i32.store16 - end - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $3 - local.get $13 - i64.and - local.tee $12 - local.get $5 - i64.ge_u - br_if $while-continue|4 - local.get $4 - global.get $~lib/util/number/_K - i32.add - global.set $~lib/util/number/_K - local.get $12 - local.set $1 - local.get $9 - i32.const 0 - local.get $4 - i32.sub - i32.const 2 - i32.shl - i32.const 3104 - i32.add - i64.load32_u - i64.mul - local.set $3 - local.get $0 - local.get $6 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - local.tee $2 - i32.load16_u - local.set $4 - loop $while-continue|6 - i32.const 1 - local.get $3 - local.get $1 - i64.sub - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.sub - i64.gt_u - local.get $1 - local.get $11 - i64.add - local.get $3 - i64.lt_u - select - i32.const 0 - local.get $5 - local.get $1 - i64.sub - local.get $11 - i64.ge_u - i32.const 0 - local.get $1 - local.get $3 - i64.lt_u - select - select - if - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $1 - local.get $11 - i64.add - local.set $1 - br $while-continue|6 - end - end - local.get $2 - local.get $4 - i32.store16 - local.get $6 - end - ) - (func $~lib/util/number/prettify (; 399 ;) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $1 - i32.const 2 - i32.add - return - end - local.get $1 - local.get $1 - local.get $2 - i32.add - local.tee $3 - i32.le_s - if (result i32) - local.get $3 - i32.const 21 - i32.le_s - else - i32.const 0 - end - if (result i32) - loop $for-loop|0 - local.get $1 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 3145774 - i32.store - local.get $3 - i32.const 2 - i32.add - else - local.get $3 - i32.const 21 - i32.le_s - i32.const 0 - local.get $3 - i32.const 0 - i32.gt_s - select - if (result i32) - local.get $0 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.tee $0 - i32.const 2 - i32.add - local.get $0 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 0 - i32.le_s - i32.const 0 - i32.const -6 - local.get $3 - i32.lt_s - select - if (result i32) - local.get $0 - i32.const 2 - local.get $3 - i32.sub - local.tee $3 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy - local.get $0 - i32.const 3014704 - i32.store - i32.const 2 - local.set $2 - loop $for-loop|1 - local.get $2 - local.get $3 - i32.lt_s - if - local.get $0 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.const 48 - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|1 - end - end - local.get $1 - local.get $3 - i32.add - else - local.get $1 - i32.const 1 - i32.eq - if (result i32) - local.get $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $1 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $1 - i32.const 45 - i32.const 43 - local.get $2 - select - i32.store16 - local.get $0 - i32.const 2 - i32.add - else - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.const 1 - i32.shl - local.tee $2 - i32.const 2 - i32.sub - call $~lib/memory/memory.copy - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - local.get $2 - i32.add - local.tee $0 - i32.const 101 - i32.store16 offset=2 - local.get $0 - i32.const 4 - i32.add - local.tee $2 - local.get $3 - i32.const 1 - i32.sub - local.tee $0 - i32.const 0 - i32.lt_s - local.tee $3 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 - local.get $0 - call $~lib/util/number/decimalCount32 - i32.const 1 - i32.add - local.tee $0 - call $~lib/util/number/utoa_simple - local.get $2 - i32.const 45 - i32.const 43 - local.get $3 - select - i32.store16 - local.get $0 - local.get $1 - i32.add - i32.const 2 - i32.add - end - end - end - end - ) - (func $~lib/util/number/dtoa_core (; 400 ;) (param $0 i32) (param $1 f64) (result i32) - (local $2 i64) - (local $3 i32) - (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i64) - (local $8 i64) - (local $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i64) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - local.get $1 - f64.const 0 - f64.lt - local.tee $9 - if (result f64) - local.get $0 - i32.const 45 - i32.store16 - local.get $1 - f64.neg - else - local.get $1 - end - i64.reinterpret_f64 - local.tee $2 - i64.const 9218868437227405312 - i64.and - i64.const 52 - i64.shr_u - i32.wrap_i64 - local.set $5 - local.get $2 - i64.const 4503599627370495 - i64.and - local.get $5 - i32.const 0 - i32.ne - i64.extend_i32_u - i64.const 52 - i64.shl - i64.add - local.tee $2 - i64.const 1 - i64.shl - i64.const 1 - i64.add - local.tee $6 - i64.clz - i32.wrap_i64 - local.set $3 - local.get $6 - local.get $3 - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_plus - local.get $5 - i32.const 1 - local.get $5 - select - i32.const 1075 - i32.sub - local.tee $5 - i32.const 1 - i32.sub - local.get $3 - i32.sub - local.set $3 - local.get $2 - local.get $2 - i64.const 4503599627370496 - i64.eq - i32.const 1 - i32.add - local.tee $10 - i64.extend_i32_s - i64.shl - i64.const 1 - i64.sub - local.get $5 - local.get $10 - i32.sub - local.get $3 - i32.sub - i64.extend_i32_s - i64.shl - global.set $~lib/util/number/_frc_minus - local.get $3 - global.set $~lib/util/number/_exp - i32.const 348 - i32.const -61 - global.get $~lib/util/number/_exp - i32.sub - f64.convert_i32_s - f64.const 0.30102999566398114 - f64.mul - f64.const 347 - f64.add - local.tee $1 - i32.trunc_f64_s - local.tee $3 - local.get $3 - f64.convert_i32_s - local.get $1 - f64.ne - i32.add - i32.const 3 - i32.shr_s - i32.const 1 - i32.add - local.tee $3 - i32.const 3 - i32.shl - local.tee $10 - i32.sub - global.set $~lib/util/number/_K - local.get $10 - i32.const 2192 - i32.add - i64.load - global.set $~lib/util/number/_frc_pow - local.get $3 - i32.const 1 - i32.shl - i32.const 2912 - i32.add - i32.load16_s - global.set $~lib/util/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $3 - i64.extend_i32_s - i64.shl - local.tee $6 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/util/number/_frc_pow - local.tee $2 - i64.const 4294967295 - i64.and - local.tee $13 - i64.mul - local.set $14 - global.get $~lib/util/number/_frc_plus - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $4 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $8 - i64.mul - local.set $12 - global.get $~lib/util/number/_frc_minus - local.tee $15 - i64.const 4294967295 - i64.and - local.tee $16 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $17 - i64.mul - local.set $18 - local.get $4 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $8 - local.get $7 - i64.const 32 - i64.shr_u - local.tee $7 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - local.tee $8 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $7 - i64.mul - local.get $8 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.sub - local.tee $7 - local.get $16 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $4 - i64.mul - local.get $17 - local.get $15 - i64.const 32 - i64.shr_u - local.tee $8 - i64.mul - local.get $18 - i64.const 32 - i64.shr_u - i64.add - local.tee $12 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $4 - local.get $8 - i64.mul - local.get $12 - i64.const 32 - i64.shr_u - i64.add - i64.add - i64.const 1 - i64.add - i64.sub - local.set $4 - local.get $0 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $0 - local.get $11 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - i64.mul - local.get $13 - local.get $6 - i64.const 32 - i64.shr_u - local.tee $6 - i64.mul - local.get $14 - i64.const 32 - i64.shr_u - i64.add - local.tee $11 - i64.const 4294967295 - i64.and - i64.add - i64.const 2147483647 - i64.add - i64.const 32 - i64.shr_u - local.get $2 - local.get $6 - i64.mul - local.get $11 - i64.const 32 - i64.shr_u - i64.add - i64.add - global.get $~lib/util/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 - i32.sub - i32.add - i32.const -64 - i32.sub - local.get $7 - local.get $0 - global.get $~lib/util/number/_exp - i32.add - i32.const -64 - i32.sub - local.get $4 - local.get $9 - call $~lib/util/number/genDigits - local.get $9 - i32.sub - global.get $~lib/util/number/_K - call $~lib/util/number/prettify - local.get $9 - i32.add - ) - (func $~lib/util/number/dtoa (; 401 ;) (param $0 f64) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - f64.const 0 - f64.eq - if - i32.const 2048 - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if - local.get $0 - local.get $0 - f64.ne - if - i32.const 2080 - return - end - i32.const 2112 - i32.const 2160 - local.get $0 - f64.const 0 - f64.lt - select - call $~lib/rt/pure/__retain - return - end - i32.const 56 - i32.const 1 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - call $~lib/util/number/dtoa_core - local.tee $2 - i32.const 28 - i32.eq - if - local.get $1 - call $~lib/rt/pure/__retain - return - end - local.get $1 - local.get $2 - call $~lib/string/String#substring - local.get $1 - call $~lib/rt/tlsf/__free - ) - (func $~lib/util/number/dtoa_stream (; 402 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $0 - local.get $2 - f64.const 0 - f64.eq - if - local.get $0 - i32.const 48 - i32.store16 - local.get $0 - i32.const 46 - i32.store16 offset=2 - local.get $0 - i32.const 48 - i32.store16 offset=4 - i32.const 3 - return - end - local.get $2 - local.get $2 - f64.sub - f64.const 0 - f64.ne - if - local.get $2 - local.get $2 - f64.ne - if - local.get $0 - i32.const 78 - i32.store16 - local.get $0 - i32.const 97 - i32.store16 offset=2 - local.get $0 - i32.const 78 - i32.store16 offset=4 - i32.const 3 - return - else - local.get $2 - f64.const 0 - f64.lt - local.tee $1 - if - local.get $0 - i32.const 45 - i32.store16 - local.get $0 - i32.const 2 - i32.add - local.set $0 - end - local.get $0 - i64.const 29555310648492105 - i64.store - local.get $0 - i64.const 34058970405077102 - i64.store offset=8 - local.get $1 - i32.const 8 - i32.add - return - end - unreachable + local.get $0 + local.get $2 + local.get $2 + call $~lib/util/number/decimalCount64High + local.tee $1 + call $~lib/util/number/utoa_simple end - local.get $0 - local.get $2 - call $~lib/util/number/dtoa_core + local.get $1 ) - (func $~lib/util/string/joinFloatArray (; 403 ;) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/string/joinIntegerArray (; 269 ;) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 i64) (local $5 i32) (local $6 i32) + (local $7 i32) local.get $1 i32.const 1 i32.sub @@ -22322,165 +17921,136 @@ i32.eqz if local.get $0 - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa + i64.load + local.tee $4 + i64.eqz + if (result i32) + i32.const 1936 + else + local.get $4 + i64.const 4294967295 + i64.le_u + if + local.get $4 + i32.wrap_i64 + local.tee $1 + call $~lib/util/number/decimalCount32 + local.tee $2 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $1 + local.get $2 + call $~lib/util/number/utoa_simple + else + local.get $4 + call $~lib/util/number/decimalCount64High + local.tee $1 + i32.const 1 + i32.shl + i32.const 1 + call $~lib/rt/tlsf/__alloc + local.tee $0 + local.get $4 + local.get $1 + call $~lib/util/number/utoa_simple + end + local.get $0 + call $~lib/rt/pure/__retain + end return end local.get $3 i32.const 1968 call $~lib/string/String#get:length - local.tee $4 - i32.const 28 + local.tee $5 + i32.const 20 i32.add i32.mul - i32.const 28 + i32.const 20 i32.add - local.tee $6 + local.tee $7 i32.const 1 i32.shl i32.const 1 call $~lib/rt/tlsf/__alloc call $~lib/rt/pure/__retain - local.set $2 - i32.const 0 local.set $1 loop $for-loop|0 - local.get $5 + local.get $6 local.get $3 i32.lt_s if - local.get $2 local.get $1 + local.get $2 local.get $0 - local.get $5 - i32.const 2 + local.get $6 + i32.const 3 i32.shl i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $1 + i64.load + call $~lib/util/number/itoa_stream + local.get $2 i32.add - local.set $1 - local.get $4 + local.set $2 + local.get $5 if - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.shl i32.add i32.const 1968 - local.get $4 + local.get $5 i32.const 1 i32.shl call $~lib/memory/memory.copy - local.get $1 - local.get $4 + local.get $2 + local.get $5 i32.add - local.set $1 + local.set $2 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $for-loop|0 end end - local.get $6 - local.get $2 + local.get $7 local.get $1 + local.get $2 local.get $0 local.get $3 - i32.const 2 + i32.const 3 i32.shl i32.add - f32.load - f64.promote_f32 - call $~lib/util/number/dtoa_stream - local.get $1 + i64.load + call $~lib/util/number/itoa_stream + local.get $2 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.get $2 + local.get $1 call $~lib/rt/pure/__release return end - local.get $2 + local.get $1 ) - (func $~lib/typedarray/Float32Array#join (; 404 ;) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#join (; 270 ;) (param $0 i32) (result i32) local.get $0 i32.load offset=4 local.get $0 - call $~lib/typedarray/Int32Array#get:length - call $~lib/util/string/joinFloatArray - ) - (func $std/typedarray/testArrayJoinAndToString<~lib/typedarray/Float32Array,f32> (; 405 ;) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $0 - local.get $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.load offset=8 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 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 626 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - call $~lib/typedarray/Float32Array#join - local.tee $1 - local.get $1 - i32.const 3168 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 304 - i32.const 627 - i32.const 4 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release ->>>>>>> master + i32.shr_u + call $~lib/util/string/joinIntegerArray ) (func $~lib/util/number/genDigits (; 271 ;) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) @@ -23131,7 +18701,7 @@ local.get $1 f64.const 0 f64.lt - local.tee $8 + local.tee $7 if (result f64) local.get $0 i32.const 45 @@ -23148,16 +18718,22 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.tee $9 + local.tee $4 + i32.const 1 + local.get $4 + select + i32.const 1075 + i32.sub + local.set $8 + local.get $3 + i64.const 4503599627370495 + i64.and + local.get $4 i32.const 0 i32.ne - local.tee $7 i64.extend_i32_u i64.const 52 i64.shl - local.get $3 - i64.const 4503599627370495 - i64.and i64.add local.tee $2 i64.const 1 @@ -23173,34 +18749,27 @@ i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_plus - local.get $9 - i32.const 1 - local.get $7 - select - i32.const 1075 - i32.sub - local.tee $9 - i32.const 1 - i32.sub - local.get $4 - i32.sub - local.set $4 local.get $2 local.get $2 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $7 + local.tee $9 i64.extend_i32_s i64.shl i64.const 1 i64.sub + local.get $8 local.get $9 - local.get $7 + i32.sub + local.get $8 + i32.const 1 i32.sub local.get $4 i32.sub + local.tee $4 + i32.sub i64.extend_i32_s i64.shl global.set $~lib/util/number/_frc_minus @@ -23230,10 +18799,10 @@ local.tee $4 i32.const 3 i32.shl - local.tee $7 + local.tee $9 i32.sub global.set $~lib/util/number/_K - local.get $7 + local.get $9 i32.const 2192 i32.add i64.load @@ -23251,7 +18820,7 @@ i64.and local.set $6 local.get $0 - local.get $8 + local.get $7 i32.const 1 i32.shl i32.add @@ -23305,7 +18874,7 @@ i64.add global.get $~lib/util/number/_exp_pow local.tee $4 - local.get $9 + local.get $8 local.get $0 i32.sub i32.add @@ -23402,13 +18971,13 @@ i64.const 1 i64.add i64.sub - local.get $8 + local.get $7 call $~lib/util/number/genDigits - local.get $8 + local.get $7 i32.sub global.get $~lib/util/number/_K call $~lib/util/number/prettify - local.get $8 + local.get $7 i32.add ) (func $~lib/util/number/dtoa (; 274 ;) (param $0 f64) (result i32) @@ -23466,7 +19035,6 @@ call $~lib/rt/tlsf/freeBlock ) (func $~lib/util/number/dtoa_stream (; 275 ;) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 i32.const 1 @@ -23514,20 +19082,25 @@ local.get $2 f64.const 0 f64.lt - local.tee $3 - i32.const 8 - i32.add - local.set $1 + local.tee $1 + if + local.get $0 + i32.const 45 + i32.store16 + local.get $0 + i32.const 2 + i32.add + local.set $0 + end local.get $0 - i32.const 2112 - i32.const 2160 - local.get $3 - select - local.get $1 - i32.const 1 - i32.shl - call $~lib/memory/memory.copy + i64.const 29555310648492105 + i64.store + local.get $0 + i64.const 34058970405077102 + i64.store offset=8 local.get $1 + i32.const 8 + i32.add return end unreachable